/* LOOPIN auth entry pages: Japanese minimal visual direction. */

:root {
    --c-blue: #33548C;
    --c-blue-soft: #6285C2;
    --c-blue-deep: #2B4675;
    --c-teal: #1FA89C;
    --c-amber: #E08545;
    --c-violet: #7163C4;
    --bg: #FAFAF8;
    --surface: #FFFFFF;
    --surface-alt: #F7F5F1;
    --surface-soft: #FCFBFA;
    --text: #2B2B2E;
    --text-secondary: #5D5B56;
    --text-muted: #8B8983;
    --text-faint: #A8A49C;
    --border: #EAE8E2;
    --border-hover: #D8D4CC;
    --grid-line: rgba(98, 133, 194, 0.05);
    --warning: #B96A5E;
    --success: #7A9B7E;
    --radius-sm: 0.5rem;
    --radius-md: 0.875rem;
    --radius-pill: 999px;
    --shadow-cta: 0 12px 30px -10px rgba(98, 133, 194, 0.55);
    --shadow-cta-hover: 0 16px 36px -10px rgba(51, 84, 140, 0.6);
    --shadow-card: 0 1px 3px rgba(43, 43, 46, 0.04), 0 12px 40px rgba(43, 43, 46, 0.05);
    --fast: 0.14s;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --zen-bg: var(--bg);
    --zen-surface: var(--surface);
    --zen-surface-alt: var(--surface-alt);
    --zen-text-primary: var(--text);
    --zen-text-secondary: var(--text-secondary);
    --zen-text-muted: var(--text-muted);
    --zen-border: var(--border);
    --zen-border-hover: var(--border-hover);
    --zen-accent: var(--c-blue-soft);
    --zen-accent-hover: var(--c-blue);
    --zen-grid-line: var(--grid-line);
}

.loopin-auth-body {
    min-height: 100vh;
    margin: 0;
    background:
        linear-gradient(var(--zen-grid-line, rgba(61, 90, 138, 0.035)) 1px, transparent 1px),
        linear-gradient(90deg, var(--zen-grid-line, rgba(61, 90, 138, 0.035)) 1px, transparent 1px),
        var(--zen-bg, #FAFAF8);
    background-size: 32px 32px, 32px 32px, auto;
    color: var(--zen-text-primary, #2B2B2E);
    font-family: 'Noto Sans TC', 'Montserrat', 'Inter', system-ui, sans-serif;
    letter-spacing: 0;
}

.loopin-auth-body * {
    box-sizing: border-box;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-header {
    min-height: 4.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem clamp(1.25rem, 3vw, 2.75rem);
    border-bottom: 1px solid var(--zen-border, #E4E1DA);
    background: rgba(250, 250, 248, 0.92);
    backdrop-filter: blur(12px);
}

.auth-brand {
    color: var(--zen-accent-hover, #3D5A8A);
    font-family: 'Montserrat', 'Inter', sans-serif;
    font-size: 1.35rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-decoration: none;
}

.auth-lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.auth-lang-link,
.auth-quiet-link {
    color: var(--zen-text-muted, #8B8983);
    text-decoration: underline;
    text-decoration-color: rgba(139, 137, 131, 0.35);
    text-underline-offset: 0.24em;
    transition: color var(--zen-fast, 0.12s) var(--zen-ease, ease),
        text-decoration-color var(--zen-fast, 0.12s) var(--zen-ease, ease);
}

.auth-lang-link {
    min-width: 2.75rem;
    min-height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    text-decoration: none;
}

.auth-lang-link:hover,
.auth-quiet-link:hover {
    color: var(--zen-text-primary, #2B2B2E);
    text-decoration-color: currentColor;
}

.auth-shell {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(24rem, 42%) minmax(0, 58%);
}

.auth-form-panel {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(3.5rem, 6vw, 6rem) clamp(2rem, 5vw, 4.5rem);
}

.auth-form-surface {
    width: min(100%, 25rem);
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.auth-steps {
    width: 100%;
}

.login-step {
    transition: opacity 280ms var(--zen-ease, ease), transform 280ms var(--zen-ease, ease);
}

.login-step.hidden {
    opacity: 0;
    transform: translateY(0.5rem);
    pointer-events: none;
}

.auth-title {
    margin: 0 0 0.5rem;
    color: var(--zen-text-primary, #2B2B2E);
    font-size: clamp(2rem, 3vw, 2.35rem);
    font-weight: 400;
    line-height: 1.18;
    letter-spacing: 0;
}

.auth-subtitle {
    margin: 0 0 2rem;
    color: var(--zen-text-muted, #8B8983);
    font-size: 0.9375rem;
    font-weight: 300;
    line-height: 1.8;
}

.auth-account-row {
    min-height: 2.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 1.75rem;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--zen-border, #E4E1DA);
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.58);
}

.auth-account-text {
    min-width: 0;
    flex: 1;
    color: var(--zen-text-secondary, #5D5B56);
    font-size: 0.875rem;
    line-height: 1.5;
}

.auth-account-email {
    display: block;
    overflow: hidden;
    color: var(--zen-text-primary, #2B2B2E);
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auth-icon-button {
    width: 2.25rem;
    min-width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--zen-border, #E4E1DA);
    border-radius: 999px;
    background: var(--zen-surface, #FFFFFF);
    color: var(--zen-text-secondary, #5D5B56);
    cursor: pointer;
    transition: border-color var(--zen-fast, 0.12s) var(--zen-ease, ease),
        color var(--zen-fast, 0.12s) var(--zen-ease, ease),
        transform var(--zen-fast, 0.12s) var(--zen-ease, ease);
}

.auth-icon-button:hover {
    border-color: var(--zen-border-hover, #C8C0B5);
    color: var(--zen-accent-hover, #3D5A8A);
    transform: translateX(-1px);
}

.auth-field {
    margin-bottom: 1rem;
}

.auth-label {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--zen-text-secondary, #5D5B56);
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.4;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-icon {
    position: absolute;
    inset-block: 0;
    left: 0.875rem;
    display: inline-flex;
    align-items: center;
    color: var(--zen-text-muted, #8B8983);
    pointer-events: none;
}

.loopin-auth-body .auth-input {
    width: 100%;
    min-height: 3rem;
    height: 3rem;
    padding: 0 0.95rem 0 2.55rem;
    border: 1px solid var(--zen-border, #E4E1DA);
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.78);
    color: var(--zen-text-primary, #2B2B2E);
    font-size: 0.95rem;
    line-height: 1.5;
    transition: border-color var(--zen-fast, 0.12s) var(--zen-ease, ease),
        box-shadow var(--zen-fast, 0.12s) var(--zen-ease, ease),
        background var(--zen-fast, 0.12s) var(--zen-ease, ease);
}

.loopin-auth-body .auth-input.auth-input--password {
    padding-right: 3.5rem;
}

.loopin-auth-body .auth-input::placeholder {
    color: rgba(43, 43, 46, 0.32);
}

.loopin-auth-body .auth-input:focus {
    outline: none;
    border-color: var(--zen-accent, #6E89B5);
    background: var(--zen-surface, #FFFFFF);
    box-shadow: 0 0 0 3px var(--zen-focus, rgba(110, 137, 181, 0.18));
}

.loopin-auth-body .auth-input.input-error,
.loopin-auth-body .auth-input:invalid:not(:placeholder-shown) {
    border-color: var(--zen-warning, #B96A5E);
}

.auth-toggle-password {
    position: absolute;
    inset-block: 0;
    right: 0.25rem;
    width: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    color: var(--zen-text-muted, #8B8983);
    cursor: pointer;
    transition: color var(--zen-fast, 0.12s) var(--zen-ease, ease),
        background var(--zen-fast, 0.12s) var(--zen-ease, ease);
}

.auth-toggle-password:hover {
    background: var(--zen-surface-2, #F3F1EC);
    color: var(--zen-text-primary, #2B2B2E);
}

.auth-field-error {
    margin: 0.5rem 0 0;
    color: var(--zen-warning, #B96A5E);
    font-size: 0.8125rem;
    line-height: 1.5;
}

.auth-field-error.hidden {
    display: none;
}

.auth-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0 0 1.5rem;
}

.auth-remember {
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--zen-text-muted, #8B8983);
    font-size: 0.875rem;
    cursor: pointer;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin: 1.2rem 0 1rem;
    color: rgba(43, 43, 46, 0.36);
    font-size: 0.75rem;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: var(--zen-border, #E4E1DA);
}

.auth-btn {
    width: 100%;
    min-height: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0;
    transition: background-color 180ms var(--zen-ease, ease),
        border-color 180ms var(--zen-ease, ease),
        color 180ms var(--zen-ease, ease),
        transform 180ms var(--zen-ease, ease);
}

.auth-btn--primary {
    border: 1px solid var(--zen-accent-hover, #3D5A8A) !important;
    background: var(--zen-accent-hover, #3D5A8A) !important;
    color: #FFFFFF !important;
}

.auth-btn--primary:hover,
.auth-btn--primary:focus {
    border-color: #304B75 !important;
    background: #304B75 !important;
    color: #FFFFFF !important;
}

.auth-btn--secondary {
    border: 1px solid var(--zen-border, #E4E1DA) !important;
    background: var(--zen-surface, #FFFFFF) !important;
    color: var(--zen-text-primary, #2B2B2E) !important;
}

.auth-btn--secondary:hover,
.auth-btn--secondary:focus {
    border-color: var(--zen-border-hover, #C8C0B5) !important;
    background: var(--zen-surface-alt, #F7F5F0) !important;
}

.auth-google-container,
.google-signin-container {
    width: 100%;
    min-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    pointer-events: auto;
}

.auth-google-container > div,
.google-signin-container > div,
#googleSignupContainer > div {
    max-width: 100% !important;
}

.auth-google-container iframe,
.google-signin-container iframe,
#googleSignupContainer iframe {
    display: block;
    /* GIS adds negative horizontal margins; preserve its native iframe width so the pill border is not clipped. */
    max-width: none !important;
    pointer-events: auto;
}

.auth-register-prompt {
    margin-top: 1rem;
    text-align: center;
    color: var(--zen-text-muted, #8B8983);
    font-size: 0.875rem;
}

.auth-register-link {
    color: var(--zen-accent-hover, #3D5A8A);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 0.24em;
}

.auth-register-card {
    width: min(100%, 28rem);
}

.auth-register-head {
    margin-bottom: 1.5rem;
}

.auth-register-title {
    margin: 0 0 0.45rem;
    color: var(--zen-text-primary, #2B2B2E);
    font-size: 1.85rem;
    font-weight: 400;
    line-height: 1.25;
}

.auth-register-subtitle {
    margin: 0;
    color: var(--zen-text-muted, #8B8983);
    font-size: 0.9375rem;
    font-weight: 300;
    line-height: 1.75;
}

.auth-register-form {
    display: grid;
    gap: 0.9rem;
}

.auth-register-form .auth-field {
    margin-bottom: 0;
}

.auth-register-otp-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 0.75rem;
}

.auth-register-otp-btn {
    width: auto;
    min-width: 7rem;
    padding-inline: 1rem;
    white-space: nowrap;
}

.auth-register-hint {
    margin: -0.35rem 0 0;
    color: var(--zen-success, #7A9B7E);
    font-size: 0.8125rem;
    line-height: 1.5;
}

.auth-register-rules {
    margin-top: 0.65rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--zen-border, #E4E1DA);
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.58);
}

.auth-register-rules p {
    color: var(--zen-text-muted, #8B8983) !important;
}

.auth-register-rules ul {
    margin: 0;
    padding: 0;
}

.auth-register-rules li {
    line-height: 1.55;
}

.auth-register-tos {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    color: var(--zen-text-secondary, #5D5B56);
    font-size: 0.875rem;
    line-height: 1.65;
}

.auth-register-tos .checkbox {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.auth-register-actions {
    margin-top: 0.2rem;
}

.auth-register-footer-link {
    margin-top: 1.15rem;
    text-align: center;
    color: var(--zen-text-muted, #8B8983);
    font-size: 0.875rem;
}

.auth-register-modal .modal-box {
    width: min(28rem, calc(100vw - 2rem));
    max-width: min(28rem, calc(100vw - 2rem));
    max-height: min(44rem, calc(100vh - 2rem));
    padding: 1.75rem;
    overflow-y: auto;
    border: 1px solid var(--zen-border, #E4E1DA);
    border-radius: 1rem;
    background: rgba(250, 250, 248, 0.98);
    box-shadow: var(--zen-shadow-lg, 0 22px 64px rgba(14, 17, 22, 0.10));
}

.auth-tos-modal .modal-box {
    width: min(34rem, calc(100vw - 2rem));
    max-width: min(34rem, calc(100vw - 2rem));
}

.auth-register-close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--zen-text-muted, #8B8983);
    cursor: pointer;
    transition: background var(--zen-fast, 0.12s) var(--zen-ease, ease),
        color var(--zen-fast, 0.12s) var(--zen-ease, ease),
        border-color var(--zen-fast, 0.12s) var(--zen-ease, ease);
}

.auth-register-close:hover {
    border-color: var(--zen-border, #E4E1DA);
    background: var(--zen-surface-2, #F3F1EC);
    color: var(--zen-text-primary, #2B2B2E);
}

.auth-alert,
.loopin-auth-body .alert {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    width: 100%;
    margin-bottom: 1rem;
    padding: 0.875rem 1rem;
    border: 1px solid transparent;
    border-left-width: 3px;
    border-radius: 0.5rem;
    box-shadow: none;
    color: var(--zen-text-secondary, #5D5B56);
    font-size: 0.875rem;
    line-height: 1.55;
}

.auth-alert.hidden {
    display: none;
}

.auth-alert--warning,
.loopin-auth-body .alert-warning,
.loopin-auth-body .alert-error {
    border-color: rgba(194, 107, 87, 0.35);
    border-left-color: #C26B57;
    background: rgba(194, 107, 87, 0.10);
    color: #7E4639;
}

.auth-alert--success,
.loopin-auth-body .alert-success {
    border-color: rgba(122, 155, 126, 0.30);
    border-left-color: var(--zen-success, #7A9B7E);
    background: rgba(122, 155, 126, 0.12);
    color: #4F684F;
}

.auth-carousel-panel {
    position: relative;
    min-width: 0;
    display: flex;
    border-left: 1px solid var(--zen-border, #E4E1DA);
    overflow: hidden;
}

.auth-carousel {
    position: relative;
    width: 100%;
    min-height: 0;
    overflow: hidden;
    background: var(--zen-surface-alt, #F7F5F0);
}

.auth-carousel::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(250, 250, 248, 0.04), rgba(43, 43, 46, 0.18)),
        linear-gradient(var(--zen-grid-line, rgba(61, 90, 138, 0.035)) 1px, transparent 1px),
        linear-gradient(90deg, var(--zen-grid-line, rgba(61, 90, 138, 0.035)) 1px, transparent 1px);
    background-size: auto, 36px 36px, 36px 36px;
}

.auth-carousel .login-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 720ms var(--zen-ease, ease);
}

.auth-carousel .login-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.auth-carousel .login-slide > .relative {
    z-index: 2;
}

.auth-carousel .login-slide[data-media-type="ICON"] h2 {
    color: var(--zen-text-primary, #2B2B2E) !important;
}

.auth-carousel .login-slide:not([data-media-type="ICON"]) h2,
.auth-carousel .login-slide:not([data-media-type="ICON"]) p {
    color: #FFFFFF !important;
}

.auth-carousel .login-carousel-dot {
    width: 0.5rem;
    height: 0.5rem;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.68);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.34);
    cursor: pointer;
    transition: width 220ms var(--zen-ease, ease),
        background 220ms var(--zen-ease, ease),
        border-color 220ms var(--zen-ease, ease);
}

.auth-carousel .login-carousel-dot.active {
    width: 1.5rem;
    background: rgba(255, 255, 255, 0.92);
    border-color: transparent;
}

.auth-carousel.icon-slide .login-carousel-dot {
    border-color: rgba(61, 90, 138, 0.28);
    background: rgba(61, 90, 138, 0.14);
}

.auth-carousel.icon-slide .login-carousel-dot.active {
    background: var(--zen-accent-hover, #3D5A8A);
}

.auth-carousel .login-carousel-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 999px;
    background: rgba(43, 43, 46, 0.18);
    color: #FFFFFF;
    cursor: pointer;
    opacity: 0;
    transition: opacity 180ms var(--zen-ease, ease), background 180ms var(--zen-ease, ease);
}

.auth-carousel:hover .login-carousel-arrow,
.auth-carousel .login-carousel-arrow:focus-visible {
    opacity: 0.78;
}

.auth-carousel .login-carousel-arrow:hover {
    background: rgba(43, 43, 46, 0.34);
}

.auth-carousel.icon-slide .login-carousel-arrow {
    border-color: rgba(61, 90, 138, 0.2);
    background: rgba(255, 255, 255, 0.62);
    color: var(--zen-accent-hover, #3D5A8A);
}

.auth-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem clamp(1.25rem, 3vw, 2.75rem);
    border-top: 1px solid var(--zen-border, #E4E1DA);
    background: rgba(250, 250, 248, 0.92);
    color: var(--zen-text-muted, #8B8983);
    font-size: 0.75rem;
}

.auth-footer a {
    color: var(--zen-text-secondary, #5D5B56);
    text-decoration: underline;
    text-decoration-color: rgba(93, 91, 86, 0.28);
    text-underline-offset: 0.22em;
}

.auth-footer a:hover {
    color: var(--zen-text-primary, #2B2B2E);
    text-decoration-color: currentColor;
}

.auth-footer-copy,
.auth-footer-agreement,
.auth-footer-nav {
    margin: 0;
}

.auth-footer-agreement,
.auth-footer-nav {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.auth-recovery-visual {
    position: relative;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-left: 1px solid var(--zen-border, #E4E1DA);
    background:
        linear-gradient(var(--zen-grid-line, rgba(61, 90, 138, 0.035)) 1px, transparent 1px),
        linear-gradient(90deg, var(--zen-grid-line, rgba(61, 90, 138, 0.035)) 1px, transparent 1px),
        var(--zen-surface-alt, #F7F5F0);
    background-size: 36px 36px, 36px 36px, auto;
}

.auth-recovery-mark {
    width: min(70%, 22rem);
    aspect-ratio: 1;
    position: relative;
}

.auth-recovery-mark::before,
.auth-recovery-mark::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(61, 90, 138, 0.38);
}

.auth-recovery-mark::before {
    inset: 10%;
}

.auth-recovery-mark::after {
    inset: 24%;
    border-radius: 999px;
}

.auth-recovery-line {
    position: absolute;
    inset: 50% 4%;
    height: 1px;
    background: rgba(61, 90, 138, 0.28);
    transform: rotate(-36deg);
}

.auth-recovery-copy {
    position: absolute;
    left: clamp(2rem, 6vw, 4.5rem);
    bottom: clamp(2rem, 6vw, 4.5rem);
    max-width: 22rem;
}

.auth-recovery-copy h3 {
    margin: 0 0 0.55rem;
    color: var(--zen-text-primary, #2B2B2E);
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.45;
}

.auth-recovery-copy p {
    margin: 0;
    color: var(--zen-text-muted, #8B8983);
    font-size: 0.9375rem;
    font-weight: 300;
    line-height: 1.8;
}

.email-autocomplete-list {
    border-color: var(--zen-border, #E4E1DA) !important;
    border-radius: 0.5rem !important;
    box-shadow: var(--zen-shadow-sm, 0 8px 24px rgba(43, 43, 46, 0.045)) !important;
}

@media (max-width: 1023px) {
    .auth-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .auth-form-panel {
        padding: clamp(2.75rem, 8vw, 4.5rem) 1.5rem;
    }

    .auth-carousel-panel,
    .auth-recovery-visual {
        order: -1;
        min-height: 14rem;
        border-left: 0;
        border-bottom: 1px solid var(--zen-border, #E4E1DA);
    }

    .auth-carousel .login-slide > .relative {
        justify-content: center !important;
        padding: 2rem !important;
    }

    .auth-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    .auth-header {
        min-height: 4rem;
        padding: 0.875rem 1rem;
    }

    .auth-brand {
        font-size: 1.15rem;
    }

    .auth-carousel-panel,
    .auth-recovery-visual {
        display: none;
    }

    .auth-form-panel {
        align-items: flex-start;
        padding: 3.5rem 1.25rem 2.5rem;
    }

    .auth-title {
        font-size: 1.85rem;
    }

    .auth-form-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.5rem;
    }

    .auth-footer {
        padding: 1rem;
    }

    .auth-footer-agreement,
    .auth-footer-nav {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .auth-register-modal .modal-box {
        padding: 1.35rem;
    }

    .auth-register-otp-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .auth-register-otp-btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .loopin-auth-body *,
    .loopin-auth-body *::before,
    .loopin-auth-body *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* Login page — matches the public Loopin visual language and supplied redesign. */
.loopin-auth-body {
    background:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
        var(--bg);
    background-size: 64px 64px, 64px 64px, auto;
    color: var(--text);
    font-family: 'Noto Sans TC', 'Hiragino Sans', -apple-system, 'Segoe UI', sans-serif;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.auth-page--login .auth-header {
    position: sticky;
    top: 0;
    z-index: 50;
    min-height: 4.5rem;
    padding: 1rem clamp(1.25rem, 3vw, 2.75rem);
    border-color: var(--border);
    background: rgba(250, 250, 248, 0.85);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.auth-page--login .auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-family: 'Montserrat', 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-decoration: none;
}

.auth-page--login .auth-brand svg {
    flex-shrink: 0;
    color: var(--c-blue);
}

.auth-page--login .auth-lang-link {
    min-width: 2.75rem;
    min-height: 2.75rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    transition: color var(--fast) var(--ease), background var(--fast) var(--ease);
}

.auth-page--login .auth-lang-link:hover,
.auth-page--login .auth-lang-link.active {
    color: var(--c-blue);
    background: rgba(98, 133, 194, 0.08);
}

.auth-shell--login {
    grid-template-columns: minmax(24rem, 44%) minmax(0, 56%);
}

.auth-shell--login .auth-form-panel {
    padding: clamp(3rem, 6vw, 6rem) clamp(2rem, 5vw, 4.5rem);
}

.auth-shell--login .auth-form-surface {
    width: min(100%, 25rem);
}

.auth-shell--login .login-step {
    transition: opacity 0.28s var(--ease), transform 0.28s var(--ease);
}

.auth-shell--login .auth-eyebrow {
    display: inline-block;
    margin-bottom: 1.15rem;
    padding: 6px 16px;
    border: 1px solid rgba(98, 133, 194, 0.32);
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.5);
    color: var(--c-blue-soft);
    font-family: 'Montserrat', 'Inter', sans-serif;
    font-size: 0.66rem;
    letter-spacing: 0.2em;
    line-height: 1.8;
    text-transform: uppercase;
}

.auth-shell--login .auth-title {
    margin: 0 0 0.5rem;
    color: var(--text);
    font-size: clamp(2rem, 3vw, 2.3rem);
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: 0.01em;
}

.auth-shell--login .auth-subtitle {
    margin: 0 0 2rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.8;
}

.auth-shell--login .auth-account-row {
    min-height: initial;
    border-color: var(--border);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.6);
}

.auth-shell--login .auth-icon-button {
    width: 2.75rem;
    min-width: 2.75rem;
    height: 2.75rem;
    border-color: var(--border);
    border-radius: var(--radius-pill);
    background: var(--surface);
    color: var(--text-secondary);
}

.auth-shell--login .auth-icon-button:hover {
    border-color: var(--border-hover);
    color: var(--c-blue);
    transform: translateX(-2px);
}

.auth-shell--login .auth-label {
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.auth-shell--login .auth-input-icon {
    left: 0.95rem;
    color: var(--text-muted);
}

.auth-shell--login .auth-input {
    width: 100%;
    height: 3rem;
    min-height: 3rem;
    padding: 0 0.95rem 0 2.6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.8);
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease), background var(--fast) var(--ease);
}

.auth-shell--login .auth-input.auth-input--password {
    padding-right: 3.5rem;
}

.auth-shell--login .auth-input:focus {
    border-color: var(--c-blue-soft);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(98, 133, 194, 0.16);
}

.auth-shell--login .auth-toggle-password {
    right: 0.35rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
}

.auth-shell--login .auth-toggle-password:hover {
    background: var(--surface-alt);
    color: var(--text);
}

.auth-shell--login .auth-remember input {
    width: 1rem;
    height: 1rem;
    border-radius: 0.2rem;
    accent-color: var(--c-blue-soft);
}

.auth-shell--login .auth-quiet-link {
    color: var(--text-muted);
    font-size: 0.875rem;
    text-decoration-color: rgba(139, 137, 131, 0.35);
    transition: color var(--fast) var(--ease), text-decoration-color var(--fast) var(--ease);
}

.auth-shell--login .auth-quiet-link:hover {
    color: var(--c-blue);
}

.auth-shell--login .auth-quiet-link,
.auth-shell--login .auth-register-link,
.auth-page--login .auth-footer a {
    position: relative;
}

.auth-shell--login .auth-quiet-link::before,
.auth-shell--login .auth-register-link::before,
.auth-page--login .auth-footer a::before {
    content: "";
    position: absolute;
    inset: -12px -4px;
}

.auth-page--login .auth-btn {
    min-height: 3rem;
    height: 3rem;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease), color var(--fast) var(--ease), box-shadow var(--fast) var(--ease), transform var(--fast) var(--ease);
}

.auth-page--login .auth-btn--primary {
    border-color: var(--c-blue-soft) !important;
    background: var(--c-blue-soft) !important;
    color: #F7F5F1 !important;
    box-shadow: var(--shadow-cta);
}

.auth-page--login .auth-btn--primary:hover,
.auth-page--login .auth-btn--primary:focus-visible {
    border-color: var(--c-blue) !important;
    background: var(--c-blue) !important;
    box-shadow: var(--shadow-cta-hover);
    transform: translateY(-1px);
}

.auth-page--login .auth-btn--secondary {
    border-color: var(--border) !important;
    border-radius: var(--radius-pill);
    background: var(--surface) !important;
    color: var(--text) !important;
}

.auth-shell--login .auth-divider {
    margin: 1.25rem 0 1rem;
    color: rgba(43, 43, 46, 0.36);
    letter-spacing: 0.08em;
}

.auth-shell--login .auth-divider::before,
.auth-shell--login .auth-divider::after {
    background: var(--border);
}

.auth-shell--login .google-signin-container {
    min-height: 3rem;
}

.auth-shell--login .google-signin-container iframe {
    border-radius: var(--radius-pill);
}

.auth-shell--login .auth-register-prompt {
    margin-top: 1.5rem;
    color: var(--text-muted);
}

.auth-shell--login .auth-register-link {
    color: var(--c-blue);
}

.auth-shell--login .auth-carousel-panel {
    border-left-color: var(--border);
}

.auth-shell--login .auth-carousel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    background:
        radial-gradient(circle at 26% 24%, rgba(98, 133, 194, 0.16), transparent 50%),
        radial-gradient(circle at 78% 74%, rgba(31, 168, 156, 0.12), transparent 48%),
        radial-gradient(circle at 62% 10%, rgba(224, 133, 69, 0.06), transparent 42%),
        linear-gradient(180deg, var(--surface-soft) 0%, var(--surface-alt) 100%);
    animation: drift-glow 18s ease-in-out infinite alternate;
}

@keyframes drift-glow {
    0% {
        background-position: 0% 0%, 100% 100%, 50% 0%, 0 0;
    }

    100% {
        background-position: 100% 60%, 0% 40%, 50% 100%, 0 0;
    }
}

.auth-shell--login .auth-carousel::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background-image:
        repeating-linear-gradient(90deg, rgba(43, 43, 46, 0.03) 0 1px, transparent 1px 64px),
        repeating-linear-gradient(0deg, rgba(43, 43, 46, 0.03) 0 1px, transparent 1px 64px);
    opacity: 0.6;
}

.auth-shell--login .auth-carousel::after {
    display: none;
}

.auth-shell--login .login-slide {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(3rem, 6vw, 5rem);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.9s var(--ease);
}

.auth-shell--login .login-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.auth-shell--login .slide-content {
    position: relative;
    z-index: 2;
}

.auth-shell--login .slide-content--media {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: flex-end;
    color: #FFFFFF;
}

.auth-shell--login .slide-media,
.auth-shell--login .slide-media-overlay {
    position: absolute;
    inset: 0;
}

.auth-shell--login .slide-media--image {
    background-position: center;
    background-size: cover;
}

.auth-shell--login .slide-media--video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auth-shell--login .slide-media-overlay {
    z-index: 1;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.62) 100%);
}

.auth-shell--login .slide-tag {
    display: inline-block;
    margin-bottom: 1.75rem;
    padding: 7px 20px;
    border: 1px solid rgba(98, 133, 194, 0.32);
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.5);
    color: var(--c-blue-soft);
    font-family: 'Montserrat', 'Inter', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    line-height: 1.8;
    text-transform: uppercase;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.auth-shell--login .slide-tag.teal {
    color: var(--c-teal);
    border-color: rgba(31, 168, 156, 0.4);
}

.auth-shell--login .slide-tag.amber {
    color: var(--c-amber);
    border-color: rgba(224, 133, 69, 0.4);
}

.auth-shell--login .slide-managed-icon {
    display: block;
    margin-bottom: 1.5rem;
    font-size: 3.75rem;
    opacity: 0.82;
}

.auth-shell--login .slide-title {
    margin: 0 0 1.1rem;
    color: var(--text);
    font-size: clamp(1.9rem, 3vw, 2.5rem);
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0.04em;
}

.auth-shell--login .slide-title em {
    color: var(--c-blue-soft);
    font-style: normal;
}

.auth-shell--login .login-slide[data-accent="teal"] .slide-title em {
    color: var(--c-teal);
}

.auth-shell--login .login-slide[data-accent="amber"] .slide-title em {
    color: var(--c-amber);
}

.auth-shell--login .slide-content--media .slide-title,
.auth-shell--login .slide-content--media .slide-lead {
    color: #FFFFFF !important;
}

.auth-shell--login .slide-lead {
    margin: 0 0 2.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.8;
    letter-spacing: 0.04em;
}

.auth-shell--login .slide-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-shell--login .slide-feature {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 300;
}

.auth-shell--login .slide-feature .bar {
    width: 3px;
    height: 16px;
    flex-shrink: 0;
    border-radius: 2px;
}

.auth-shell--login .slide-feature:nth-child(1) .bar {
    background: var(--c-blue-soft);
}

.auth-shell--login .slide-feature:nth-child(2) .bar {
    background: var(--c-teal);
}

.auth-shell--login .slide-feature:nth-child(3) .bar {
    background: var(--c-amber);
}

.auth-shell--login .slide-art {
    position: absolute;
    right: clamp(2rem, 5vw, 4rem);
    bottom: clamp(2rem, 5vw, 4rem);
    z-index: 1;
    color: var(--c-blue);
    opacity: 0.16;
    pointer-events: none;
}

.auth-shell--login .auth-carousel:not(.icon-slide) .slide-art {
    display: none;
}

.auth-shell--login .carousel-dots {
    position: absolute;
    bottom: 0.375rem;
    left: clamp(3rem, 6vw, 5rem);
    z-index: 3;
    display: flex;
    gap: 0.55rem;
}

.auth-shell--login .carousel-dot,
.auth-shell--login .auth-carousel.icon-slide .carousel-dot {
    position: relative;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    margin-inline: -8px;
    padding: 0;
    border: 0;
    border-radius: var(--radius-pill);
    background: transparent;
    cursor: pointer;
}

.auth-shell--login .carousel-dot::before,
.auth-shell--login .auth-carousel.icon-slide .carousel-dot::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 28px;
    height: 3px;
    border-radius: var(--radius-pill);
    background: rgba(43, 43, 46, 0.18);
    transform: translate(-50%, -50%);
    transition: width 0.4s var(--ease), background 0.4s var(--ease);
}

.auth-shell--login .carousel-dot.active,
.auth-shell--login .auth-carousel.icon-slide .carousel-dot.active {
    width: 44px;
    border: 0;
    background: transparent;
}

.auth-shell--login .carousel-dot.active::before,
.auth-shell--login .auth-carousel.icon-slide .carousel-dot.active::before {
    width: 46px;
    background: var(--c-blue-soft);
}

.auth-shell--login .auth-carousel:not(.icon-slide) .carousel-dot::before {
    background: rgba(255, 255, 255, 0.42);
}

.auth-shell--login .auth-carousel:not(.icon-slide) .carousel-dot.active::before {
    background: rgba(255, 255, 255, 0.94);
}

.auth-shell--login .carousel-dot:focus-visible {
    outline: 2px solid var(--c-blue-soft);
    outline-offset: -6px;
}

.auth-shell--login .slide-copyright {
    position: absolute;
    right: clamp(2rem, 5vw, 4rem);
    bottom: 1.6rem;
    z-index: 3;
    color: var(--text-faint);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
}

.auth-shell--login .auth-carousel:not(.icon-slide) .slide-copyright {
    color: rgba(255, 255, 255, 0.72);
}

.auth-shell--login .login-carousel-arrow {
    width: 2.75rem;
    height: 2.75rem;
    z-index: 4;
}

.auth-shell--login .login-carousel-arrow--prev {
    left: 14px;
}

.auth-shell--login .login-carousel-arrow--next {
    right: 14px;
}

.auth-page--login .auth-footer {
    border-color: var(--border);
    background: rgba(250, 250, 248, 0.92);
    color: var(--text-muted);
}

.auth-page--login .auth-footer-agreement,
.auth-page--login .auth-footer-nav {
    flex-wrap: wrap;
}

.auth-page--login .auth-footer a {
    color: var(--text-secondary);
}

.auth-page--login .auth-footer a:hover {
    color: var(--text);
}

@media (max-width: 1023px) {
    .auth-shell--login {
        grid-template-columns: minmax(0, 1fr);
    }

    .auth-shell--login .auth-carousel-panel {
        order: -1;
        min-height: 16rem;
        border-left: 0;
        border-bottom: 1px solid var(--border);
    }

    .auth-shell--login .login-slide {
        padding: 2.5rem;
    }

    .auth-shell--login .slide-features {
        display: none;
    }

    .auth-shell--login .carousel-dots {
        left: 2.5rem;
    }
}

@media (max-width: 640px) {
    .auth-page--login .auth-header {
        min-height: 4rem;
        padding: 0.875rem 1rem;
    }

    .auth-page--login .auth-brand {
        font-size: 1.05rem;
        letter-spacing: 0.12em;
    }

    .auth-shell--login .auth-carousel-panel {
        display: none;
    }

    .auth-shell--login .auth-form-panel {
        align-items: flex-start;
        padding: 3rem 1.25rem 2.5rem;
    }

    .auth-shell--login .auth-form-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .auth-page--login .auth-footer {
        padding: 1rem;
    }
}
