/* ========== 디자인 시스템 변수 ========== */
.access-container {
    --access-primary: var(--forum-color-primary);
    --access-primary-dark: var(--forum-color-primary-dark);
    --access-border: var(--forum-access-border);
    --access-border-focus: var(--forum-access-border-focus);
    --access-text: var(--forum-access-text);
    --access-text-muted: var(--forum-access-text-muted);
    --access-bg: var(--forum-access-bg);
    --access-bg-focus: var(--forum-access-bg-focus);
    --access-danger: var(--forum-access-danger);
}
@media (prefers-reduced-motion: reduce) {
    .access-container * { transition: none !important; }
    body.forum-access-page .login-form-group > .mobile-access-info .frm-access-brand-inner {
        animation: none !important;
    }
}

/* ========== 사이드바 브랜드 영역 (로그인/가입만 — 모임·목록은 list.css) ========== */
body.forum-access-page .frm-sidebar-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100%;
    padding: 20px 20px;
    box-sizing: border-box;
}

.frm-access-left {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    text-align: right;
}

/* 브랜드 3줄: 줄 사이 여백 최소, 블록 위·아래 균형 */
.frm-access-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    width: 100%;
}

/* 데스크톱·모바일 공통: 타이틀·소셜 묶음 (모바일 애니메이션은 이 래퍼에만 — fixed 자식 .site-credit 의 뷰포트 기준 유지) */
.frm-access-brand-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    width: 100%;
}

.site-subtitle {
    font-size: 16px;
    color: #6B7280;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: right;
}

.site-title {
    font-size: 58px;
    font-weight: 800;
    color: #1F2937;
    margin: 0;
    line-height: 1.08;
    text-align: right;
    word-break: keep-all;
    margin-right: -0.07em;
}

.site-description {
    font-size: 16px;
    color: #999 !important;
    margin: 0;
    text-align: right;
}

/* 소셜 미디어 링크 */
.social-media-links {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 14px;
    margin-bottom: 18px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
}

.social-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.social-link.youtube { background-color: #FF0000; color: #fff; }
.social-link.youtube:hover { background-color: #CC0000; }
.social-link.twitter { background-color: #000; color: #fff; }
.social-link.twitter:hover { background-color: #333; }
.social-link.instagram { background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%); color: #fff; }
.social-link.instagram:hover { opacity: 0.9; }
.social-link.threads { background-color: #000; color: #fff; }
.social-link.threads:hover { background-color: #333; }

.x-icon {
    font-size: 16px;
    font-weight: bold;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.threads-icon {
    font-size: 14px;
    font-weight: bold;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* 왼쪽 하단 크레딧 (링크 없음, 모바일 클론에도 포함) */
.site-credit {
    margin: 14px 0 0;
    padding: 0;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: #9ca3af;
    text-align: right;
    width: 100%;
    line-height: 1.3;
}

/* ========== 콘텐츠 래퍼 (로그인 폼 영역) ========== */
.frm-content-wrapper {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 20px;
    width: 100%;
}

.access-container {
    max-width: 550px;
    width: 100%;
    margin: 0;
    padding: 40px 0;
    display: block;
    text-align: left;
}

.login-form {
    width: 100%;
    max-width: 550px;
    text-align: left;
}

/* ========== 통합 입력 필드 컨테이너 ========== */
.inputs-container {
    border: 2px solid var(--access-border, #E5E7EB);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    background: var(--access-bg, #F9FAFB);
    transition: border-color 0.3s ease, background 0.3s ease;
}

.inputs-container:focus-within {
    border-color: var(--access-border-focus, #3B82F6);
    background: var(--access-bg-focus, #fff);
}

.inputs-container.has-value {
    border-color: #D1D5DB;
    background: var(--access-bg, #F9FAFB);
}

.inputs-container.error {
    border-color: var(--access-danger, #DC2626);
    background: #FEF2F2;
}

.input-group {
    position: relative;
    overflow: hidden;
    background: transparent;
    transition: all 0.3s ease;
}

/* 초기: 로그인 폼 아이디/이메일 필드만 표시, 나머지 모두 숨김 */
#login-form .login-password-group,
#login-form .login-form-options,
#login-form #login-actions,
#login-form .login-oauth-wrap {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    margin: 0;
    padding: 0;
    border: none;
}

#login-form .login-password-group.show,
#login-form .login-form-options.show,
#login-form #login-actions.show,
#login-form .login-oauth-wrap.show {
    opacity: 1;
    max-height: 300px;
    margin-bottom: 20px;
}

#login-form .login-password-group.show {
    margin-bottom: 0;
}

#login-form #login-actions.show {
    margin-top: 20px;
}

/* 입력 필드 (로그인·회원가입 공통) */
.access-container input[type="text"],
.access-container input[type="password"],
.access-container input[type="email"] {
    width: 100%;
    min-height: 82px;
    padding: 30px 20px 26px 20px;
    border: none;
    border-radius: 0;
    font-size: 22px;
    background: transparent;
    color: #374151;
    transition: all 0.3s ease;
    box-sizing: border-box;
    text-align: left;
    outline: none;
}

.access-container input:focus {
    outline: none;
}

.access-container input::placeholder {
    color: #9CA3AF;
    font-size: 16px;
    text-align: left;
}

.access-container .input-group:not(:first-child) input {
    border-top: 1px solid #E5E7EB;
}

/* 플로팅 라벨 */
.input-label {
    position: absolute;
    top: 8px;
    left: 20px;
    font-size: 12px;
    color: #6B7280;
    font-weight: 500;
    opacity: 0;
    transform: translateY(0);
    transition: all 0.3s ease;
    pointer-events: none;
}

.input-group:focus-within .input-label,
.input-group.has-value .input-label {
    opacity: 1;
    transform: translateY(-2px);
    color: var(--access-primary, #2563eb);
}

/* 회원가입/비밀번호 찾기 링크 */
.password-link {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--access-primary, #3B82F6);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    z-index: 10;
}
.password-link:hover { color: var(--access-primary-dark, #2563EB); text-decoration: underline; }
.input-group:has(.password-toggle) .password-link { right: 70px; }

.password-toggle {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--access-primary, #3B82F6);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 10;
}

.password-toggle:hover {
    color: var(--access-primary-dark, #2563EB);
    text-decoration: underline;
}

.password-toggle.password-toggle--small {
    font-size: 11px;
    font-weight: 500;
    right: 18px;
}

/* 회원가입: 비밀번호 필드에 보기 링크 여백 */
#register-form .register-password-field input[type="password"],
#register-form .register-password-field input[type="text"] {
    padding-right: 56px;
}

/* 회원가입: 초기 라벨 숨김 → 포커스·입력 시 표시, 라벨 #666, placeholder 강조, 입력 굵게, 보기 링크 #000 */
#register-form .input-group:focus-within .input-label,
#register-form .input-group.has-value .input-label {
    color: #666;
}
#register-form .input-group:focus-within .input-label {
    opacity: 1;
}
#register-form .inputs-container input::placeholder {
    color: #000;
    font-size: 20px;
    opacity: 1;
}
#register-form .input-group:focus-within input,
#register-form .input-group.has-value input {
    font-weight: 700;
    color: #111827;
}
#register-form .register-password-field .password-toggle,
#register-form .register-password-field .password-toggle.password-toggle--small {
    color: #000;
}
#register-form .register-password-field .password-toggle:hover {
    color: #374151;
    text-decoration: underline;
}

/* 회원가입 동의·모달 */
.register-consent-block {
    margin-top: 16px;
    margin-bottom: 8px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.register-consent-line {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px 12px;
    font-size: 14px;
    color: #374151;
}
.register-consent-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
}
.register-consent-row > input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: #3B82F6;
}
.register-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    flex: 1 1 auto;
    min-width: 0;
}
.register-consent-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: #3B82F6;
}
.register-consent-text {
    line-height: 1.45;
}
.register-consent-lead {
    margin-right: 0.25em;
}
.register-consent-inline-link {
    display: inline;
    margin: 0;
    padding: 0 0 0.3em;
    border: none;
    background: none;
    font: inherit;
    font-size: inherit;
    color: var(--access-primary, #3B82F6);
    text-decoration: underline;
    text-underline-offset: 0.58em;
    cursor: pointer;
    font-weight: 600;
    text-align: left;
    vertical-align: baseline;
}
.register-consent-inline-link:hover {
    color: var(--access-primary-dark, #2563EB);
}
.register-consent-inline-link:focus-visible {
    outline: 2px solid var(--access-primary, #3B82F6);
    outline-offset: 2px;
}
.register-consent-link {
    flex-shrink: 0;
    border: none;
    background: none;
    padding: 0;
    font-size: 12px;
    color: var(--access-primary, #3B82F6);
    text-decoration: underline;
    cursor: pointer;
    font-weight: 500;
}
.register-consent-link:hover {
    color: var(--access-primary-dark, #2563EB);
}

/* 회원가입 완료(즉시 가입) → 로그인 유도 */
.register-success-panel[hidden] {
    display: none !important;
}
.register-success-panel {
    text-align: center;
    padding: 8px 0 16px;
}
.register-success-title {
    margin: 0 0 10px;
    font-size: 1.15rem;
    font-weight: 700;
    color: #111827;
}
.register-success-hint {
    margin: 0 0 20px;
    font-size: 15px;
    color: #6B7280;
    line-height: 1.5;
}
.register-success-actions {
    display: flex;
    justify-content: center;
}

.access-modal-overlay[hidden] {
    display: none !important;
}
.access-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: rgba(15, 23, 42, 0.45);
    box-sizing: border-box;
}
.access-modal-dialog {
    position: relative;
    max-width: 420px;
    width: 100%;
    max-height: min(72vh, 520px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
    padding: 20px 20px 16px;
    text-align: left;
}
.access-modal-title {
    margin: 0 0 12px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
}
.access-modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.55;
    color: #4B5563;
    margin-bottom: 16px;
    -webkit-overflow-scrolling: touch;
}
.access-modal-body ul {
    margin: 10px 0 10px 1.1em;
    padding: 0;
}
.access-modal-body li {
    margin-bottom: 6px;
}
.access-modal-footnote {
    font-size: 12px;
    color: #6B7280;
    margin: 12px 0 0;
}
.access-modal-close-btn {
    align-self: flex-end;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid #E5E7EB;
    background: #F9FAFB;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
}
.access-modal-close-btn:hover {
    background: #F3F4F6;
}

/* ========== 폼 옵션 ========== */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 14px;
    text-align: left;
    flex-direction: row-reverse;
}

.device-info {
    color: #6B7280;
    font-size: 13px;
    order: 2;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6B7280;
    cursor: pointer;
    text-align: left;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #3B82F6;
}

.remember-options {
    display: flex;
    flex-direction: row;
    gap: 20px;
    order: 1;
}

/* ========== 폼 하단 (링크 + 버튼) ========== */
.access-container .form-group {
    margin-bottom: 0;
    text-align: left;
}

#login-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    gap: 16px;
}

#login-actions .login-form-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

#login-actions .login-form-links .password-link {
    position: static;
    font-size: 15px;
    color: #000;
}
#login-actions .login-form-links .password-link:hover {
    color: #333;
    text-decoration: underline;
}

/* 이미 계정이 있나요? 로그인 / 로그인으로 돌아가기 */
.access-container .waiting-request {
    display: block;
    margin-top: 12px;
    text-align: center;
    font-size: 15px;
    color: #000;
    text-decoration: none;
}

/* 비밀번호 찾기: 로그인으로 돌아가기(왼쪽) | 재설정 링크 요청(오른쪽) */
.access-container .form-group-forgot {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    gap: 16px;
}
.access-container .form-group-forgot .waiting-request {
    margin-top: 0;
    text-align: left;
}

/* 비밀번호 재설정: 안내(버튼 위) → 로그인 링크(왼쪽) | 제출(오른쪽, 데스크톱) */
.access-container .form-group-reset-password {
    margin-top: 20px;
}
.access-container .form-group-reset-password .reset-password-hint {
    margin: 0 0 12px;
    font-size: 0.9em;
    line-height: 1.5;
    color: #374151;
    text-align: left;
}
.access-container .reset-password-actions {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.access-container .reset-password-actions .waiting-request {
    margin-top: 0;
    text-align: left;
}
.access-container .reset-password-actions .login-btn {
    flex-shrink: 0;
}

.access-container .waiting-request:hover {
    color: #333;
    text-decoration: underline;
}

/* 회원가입: 이미 계정이 있나요? 로그인(왼쪽) | 회원가입(오른쪽) */
#register-form .form-group-register {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    gap: 16px;
}
#register-form .form-group-register .waiting-request {
    margin-top: 0;
    text-align: left;
}
.form-field-error { display: block; font-size: 13px; color: var(--access-danger, #DC2626); margin-top: 6px; padding: 0 20px; }
.login-field-error {
    display: none;
    position: absolute;
    top: 8px;
    left: 20px;
    margin: 0;
    padding: 0;
    font-size: 12px;
    font-weight: 500;
    color: var(--access-danger, #DC2626);
    z-index: 5;
    transform: translateY(-2px);
}
.login-field-error.show { display: block; }
.input-group:has(.login-field-error.show) .input-label { opacity: 0; }
.input-group:has(.login-field-error.show) { overflow: visible; }

.form-links {
    display: flex;
    gap: 20px;
    margin-bottom: 0;
}

.form-links a {
    color: #6B7280;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
    font-weight: 500;
}

.form-links a:hover {
    color: var(--access-primary, #2563eb);
    text-decoration: none;
}

@keyframes forum-access-brand-drop {
    from {
        opacity: 0;
        transform: translateY(-28px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== 모바일 (<1000px) ========== */
@media (max-width: 999px) {
    /* iOS Safari 주소창: 뷰포트 높이 확보 (layout.php 에서 html.forum-access-doc 부여) */
    /* dvh 를 마지막에: 창 리사이즈·모바일 주소창 변화에 맞춤 (svh/fill-available 이 dvh 를 덮으면 위치가 고정되는 경우 있음) */
    html.forum-access-doc {
        min-height: 100%;
        min-height: 100vh;
        min-height: -webkit-fill-available;
        min-height: 100dvh;
        /* app.js 가 창·visualViewport 리사이즈 시 갱신 */
        min-height: var(--access-vvh, 100dvh);
    }

    html.forum-access-doc body.forum-access-page {
        min-height: 100%;
        min-height: 100vh;
        min-height: -webkit-fill-available;
        min-height: 100dvh;
        min-height: var(--access-vvh, 100dvh);
    }

    body.forum-access-page .frm-sidebar-content {
        padding: 20px 20px 20px;
        justify-content: flex-start;
        align-items: center;
    }

    body.forum-access-page .frm-content-wrapper {
        padding: 0;
        min-height: auto;
        justify-content: flex-start;
        align-items: flex-start;
    }

    /* 액세스 전용: 오른쪽 패널이 실제 뷰포트 높이를 채우고, 폼 블록만 아래쪽 가용 행에서 세로 중앙 */
    body.forum-access-page .frm-container {
        min-height: 100%;
        min-height: 100vh;
        min-height: -webkit-fill-available;
        min-height: 100dvh;
        min-height: var(--access-vvh, 100dvh);
    }

    body.forum-access-page .frm-main-container {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: minmax(0, 1fr);
        width: 100%;
        min-height: 100%;
        min-height: 100vh;
        min-height: -webkit-fill-available;
        min-height: 100dvh;
        min-height: var(--access-vvh, 100dvh);
        box-sizing: border-box;
    }

    body.forum-access-page .frm-right-content {
        grid-column: 1;
        grid-row: 1;
        min-width: 0;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    body.forum-access-page .frm-content-wrapper {
        flex: 1 1 0%;
        min-height: 0;
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    body.forum-access-page #content {
        flex: 1 1 0%;
        min-height: 0;
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    body.forum-access-page .access-container {
        flex: 1 1 0%;
        min-height: 0;
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        padding: 0 0 calc(40px + env(safe-area-inset-bottom, 0px));
        margin: 0 auto;
        box-sizing: border-box;
    }

    /*
     * 모바일: 브랜드(클론) + 로그인 폼을 한 세로 스택으로 묶어 뷰포트 세로 중앙에 배치.
     * 브랜드는 폼 바로 위, 등장 시 위에서 살짝 내려오는 모션.
     */
    body.forum-access-page .login-form-group {
        flex: 1 1 0%;
        min-height: 0;
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: stretch;
        gap: clamp(18px, 5vw, 32px);
    }

    body.forum-access-page .login-form-group > .mobile-access-info {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
        align-items: center;
        text-align: center;
    }

    body.forum-access-page .login-form-group > .mobile-access-info .frm-access-brand-inner {
        width: 100%;
        align-items: center;
        animation: forum-access-brand-drop 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    body.forum-access-page .login-form-group > .mobile-access-info .site-subtitle,
    body.forum-access-page .login-form-group > .mobile-access-info .site-title,
    body.forum-access-page .login-form-group > .mobile-access-info .site-description {
        text-align: center;
        width: 100%;
    }

    /* LA Designed: 브라우저 뷰포트 맨 아래 (fixed 는 transform 없는 조상만 있도록 brand-inner 로 애니메이션 분리) */
    body.forum-access-page .login-form-group > .mobile-access-info .site-credit {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        margin: 0 !important;
        padding: 8px 20px max(8px, env(safe-area-inset-bottom, 0px));
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        text-align: center;
        font-size: 10px;
        font-weight: 500;
        letter-spacing: 0.06em;
        color: #9ca3af;
        line-height: 1.3;
        z-index: 50;
        pointer-events: none;
    }

    body.forum-access-page .login-form-group > .mobile-access-info .site-title {
        margin-right: 0;
    }

    body.forum-access-page .login-form-group > .mobile-access-info .social-media-links {
        justify-content: center;
        margin-top: 6px;
        margin-bottom: 0;
    }

    body.forum-access-page .login-form-group > .login-form:only-child {
        flex: 0 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: stretch;
        width: 100%;
        padding: 12px 16px 20px;
        box-sizing: border-box;
    }

    body.forum-access-page .login-form-group > .mobile-access-info ~ .login-form {
        flex: 0 0 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        width: 100%;
        padding: 12px 16px 20px;
        box-sizing: border-box;
    }

    .access-container input[type="text"],
    .access-container input[type="password"],
    .access-container input[type="email"] {
        min-height: 68px;
        padding: 24px 20px 12px 20px;
    }

    /* 로그인 첫 필드: 플로팅 라벨·placeholder 기준 위아래 안쪽 여백 균형 */
    #login-form #login-inputs .input-group:first-child input#login-identifier {
        padding-top: 26px;
        padding-bottom: 14px;
        min-height: 72px;
    }

    /* 비어 있고 포커스 없음: placeholder 가운데·검정·크게·볼드 → 포커스/입력 시 기본 */
    #login-form #login-inputs .input-group:first-child input#login-identifier:placeholder-shown:not(:focus) {
        text-align: center;
        /* placeholder 세로 위치: 기본 대비 살짝 위, 전 단계보다 아주 조금 아래 */
        padding-top: 20px;
        padding-bottom: 20px;
    }

    #login-form #login-inputs .input-group:first-child input#login-identifier:placeholder-shown:not(:focus)::placeholder {
        color: #000;
        opacity: 1;
        -webkit-text-fill-color: #000;
        font-size: 22px;
        font-weight: 700;
        text-align: center;
    }

    #login-form #login-inputs .input-group:first-child input#login-identifier:focus::placeholder {
        font-weight: 400;
    }

    body.forum-access-page .inputs-container {
        margin-bottom: 12px;
    }

    .form-options {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .form-options .device-info {
        display: none;
    }

    .remember-options { order: 1; }
    .device-info { order: 2; }

    #login-form .form-group {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }

    /* 로그인: 로그인 버튼 위 → 회원가입·비밀번호 찾기 아래 (데스크톱은 기존 한 줄 유지) */
    #login-form #login-actions {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
    }
    #login-form #login-actions .login-btn {
        order: 1;
        width: 100%;
    }
    #login-form #login-actions .login-form-links {
        order: 2;
        justify-content: center;
        flex-wrap: wrap;
        width: 100%;
    }

    /* 회원가입: 회원가입 버튼 위 → 로그인 링크 아래 */
    #register-form .form-group-register {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
    }
    #register-form .form-group-register .login-btn {
        order: 1;
        width: 100%;
    }
    #register-form .form-group-register .waiting-request {
        order: 2;
        text-align: center;
        margin-top: 0;
    }

    /* 비밀번호 찾기: 재설정 요청 위 → 로그인으로 돌아가기 아래 */
    .access-container .form-group-forgot {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
    }
    .access-container .form-group-forgot .login-btn {
        order: 1;
        width: 100%;
    }
    .access-container .form-group-forgot .waiting-request {
        order: 2;
        text-align: center;
    }

    /* 비밀번호 재설정: 버튼 위(안내) → 제출 버튼 → 링크, 가운데 정렬 */
    .access-container .form-group-reset-password .reset-password-hint {
        text-align: center;
    }
    .access-container .reset-password-actions {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    .access-container .reset-password-actions .login-btn {
        order: 1;
        width: 100%;
    }
    .access-container .reset-password-actions .waiting-request {
        order: 2;
        text-align: center;
        width: 100%;
    }

    .form-links {
        justify-content: center;
        order: 2;
    }

    .login-btn {
        width: 100%;
        order: 1;
    }

    /* Waitlist 액션 줄: 모바일은 아래 전역 규칙(#waitlist-form .waitlist-form-actions) 사용 */

    /* 모바일 클론된 브랜드 정보: 상단 고정, 줄 간격 최소 */
    .mobile-access-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        flex-shrink: 0;
        text-align: center;
        margin: 0;
        padding: calc(8px + env(safe-area-inset-top, 0px)) 20px 12px;
        box-sizing: border-box;
    }

    .mobile-access-info .site-subtitle,
    .mobile-access-info .site-title,
    .mobile-access-info .site-description {
        text-align: center !important;
        margin: 0 !important;
    }

    .mobile-access-info .site-description {
        margin-bottom: 0 !important;
    }

    .mobile-access-info .site-title {
        font-size: 36px;
        margin-right: 0;
        line-height: 1.08;
    }

    .mobile-access-info .social-media-links {
        display: none;
    }

    /* 모바일 기기 아이콘 (폼 하단) */
    .mobile-device-info {
        text-align: center;
        color: #6B7280;
        font-size: 13px;
        margin-top: 0.5em;
        min-height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 6px;
    }

    .mobile-device-info .device-text {
        display: none;
    }

    .device-icon {
        display: inline-block;
        margin-right: 8px;
        font-size: 18px;
        vertical-align: middle;
        color: #6B7280;
        cursor: pointer;
    }

    .device-icon.device-icon--svg {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 22px;
        height: 22px;
        font-size: 0;
        line-height: 0;
        transform: translateX(5px);
    }

    .device-icon--svg .device-icon-svg {
        width: 22px;
        height: 22px;
        display: block;
        flex-shrink: 0;
    }

    /* 모바일 소셜 링크 (제일 하단) */
    .mobile-moved-social-links {
        display: flex;
        justify-content: center;
        gap: 10px;
        margin-top: 8px;
        padding: 0 20px;
        flex-wrap: nowrap;
    }

    .mobile-moved-social-links .social-link {
        flex-shrink: 0;
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    /* Waitlist: 모바일 — 신청하기 95% 가운데, 로그인 아래 가운데 */
    #waitlist-form .waitlist-form-actions {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 14px 16px;
        margin-top: 20px;
        width: 100%;
        box-sizing: border-box;
    }

    #waitlist-form .waitlist-form-actions .login-btn {
        order: 1;
        flex: 0 0 auto;
        width: 95%;
        max-width: 480px;
        margin-left: auto;
        margin-right: auto;
        box-sizing: border-box;
    }

    #waitlist-form .waitlist-form-actions .waiting-request.waitlist-form-login-link {
        order: 2;
        margin-top: 0;
        text-align: center;
        display: block;
        width: 100%;
        font-size: 16px;
    }

    /* 가입 신청: 이미 신청함 안내 문구 가운데 정렬 */
    .waitlist-done-block {
        text-align: center;
    }
    .waitlist-done-title,
    .waitlist-done-hint {
        text-align: center;
    }
}

/* ========== 데스크톱 (≥1000px) ========== */
@media (min-width: 1000px) {
    /* 액세스 페이지: 오른쪽 패널 본문을 뷰포트 세로 중앙 */
    body.forum-access-page .frm-right-content {
        min-height: 100vh;
        min-height: 100dvh;
        min-height: var(--access-vvh, 100dvh);
        display: flex;
        flex-direction: column;
        justify-content: center;
        /* flex-start 이면 자식이 열 전폭을 못 쓰고 내용폭으로 줄어 «폼이 좁게» 보일 수 있음 */
        align-items: stretch;
        box-sizing: border-box;
    }

    body.forum-access-page .frm-content-wrapper {
        padding-top: 0;
        align-items: stretch;
        justify-content: flex-start;
        width: 100%;
        max-width: none;
        display: flex;
        flex-direction: column;
        flex: 0 0 auto;
        min-height: 0;
    }

    /*
     * 로그인: 비밀번호 행(.show) 시 열 전체 높이를 쓰고 세로 기준은 중앙,
     * 폼 블록은 중앙보다 약간 아래(--access-login-expanded-nudge-y)로 내려 배치.
     */
    body.forum-access-page .frm-content-wrapper:has(#login-form .login-password-group.show) {
        --access-login-expanded-nudge-y: clamp(1.25rem, 7vh, 5.5rem);
        flex: 1 1 auto;
        min-height: 0;
        justify-content: center;
    }

    body.forum-access-page .frm-content-wrapper:has(#login-form .login-password-group.show) #content {
        flex: 0 0 auto;
        width: 100%;
        min-width: 0;
        transform: translateY(var(--access-login-expanded-nudge-y, clamp(1.25rem, 7vh, 5.5rem)));
    }

    @media (prefers-reduced-motion: reduce) {
        body.forum-access-page .frm-content-wrapper:has(#login-form .login-password-group.show) #content {
            transform: none;
            margin-top: var(--access-login-expanded-nudge-y, clamp(1.25rem, 7vh, 5.5rem));
        }
    }

    /* 로그인·가입 등: 폭 상한 550px, 오른쪽 열 안에서 왼쪽 정렬 */
    body.forum-access-page .access-container,
    body.forum-access-page .login-form {
        max-width: min(550px, 100%);
        width: 100%;
    }

    body.forum-access-page .access-container {
        margin-left: 0;
        margin-right: auto;
        padding-top: 0;
    }

    body.forum-access-page #content {
        width: 100%;
        min-width: 0;
    }

    .register-invite-invalid-wrap {
        text-align: left;
    }

    /* LA Designed: 데스크톱 왼쪽 패널(뷰포트) 맨 아래 — 브랜드 블록 중앙 정렬은 유지 */
    body.forum-access-page .frm-sidebar-content {
        position: relative;
    }

    body.forum-access-page .frm-access-info > .site-credit {
        position: absolute;
        left: 20px;
        right: 20px;
        bottom: max(12px, env(safe-area-inset-bottom, 0px));
        margin: 0 !important;
        padding: 0;
        width: auto;
        max-width: none;
        text-align: right;
        pointer-events: none;
    }
}

.register-invite-notice {
    font-size: 13px;
    color: #b45309;
    background: #fffbeb;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.register-email-verify-notice {
    font-size: 13px;
    color: #1e40af;
    background: #eff6ff;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    line-height: 1.5;
}

.register-invite-notice--via-link {
    font-size: 1.125rem;
    font-weight: 600;
    color: #000;
    background: transparent;
    padding: 0;
    border-radius: 0;
    margin-bottom: 12px;
    line-height: 1.55;
}

.verify-register-result {
    padding: 4px 0 12px;
}

.verify-register-title {
    margin: 0 0 10px;
    font-size: 1.25rem;
    font-weight: 600;
    color: #0f172a;
}

.verify-register-title--err {
    color: #b91c1c;
}

.verify-register-hint {
    margin: 0 0 16px;
    font-size: 15px;
    line-height: 1.55;
    color: #475569;
}

.verify-register-result--ok .verify-register-hint strong {
    color: #0f172a;
}

.register-invite-invalid-wrap {
    display: block;
    text-align: center;
}

.register-invite-invalid {
    font-size: 20px;
    font-weight: 600;
    color: #b91c1c;
    margin: 0 0 20px;
    line-height: 1.5;
}

.register-invite-login-only {
    margin-top: 8px;
}

.register-invite-login-only .waiting-request {
    font-size: 15px;
}

/* Waitlist 비활성: 모바일 가운데 · 데스크톱 로그인 링크 왼쪽 */
.waitlist-closed {
    text-align: center;
}

.waitlist-closed-msg {
    margin: 0 0 20px;
    font-size: clamp(1.25rem, 4.2vw, 1.625rem);
    font-weight: 600;
    line-height: 1.45;
    color: #1e293b;
}

.waitlist-closed-actions {
    margin-top: 0;
}

.waitlist-closed .waiting-request {
    margin-top: 0;
    text-align: center;
    font-size: 16px;
}

@media (min-width: 1000px) {
    .waitlist-closed {
        text-align: left;
    }

    .waitlist-closed .waiting-request {
        text-align: left;
    }

    .waitlist-closed-msg {
        font-size: 1.625rem;
        max-width: 22em;
    }

    /* Waitlist: 데스크톱 — 로그인 왼쪽 · 신청하기 오른쪽 */
    #waitlist-form .waitlist-form-actions {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        margin-top: 20px;
        box-sizing: border-box;
        gap: 16px 24px;
    }

    #waitlist-form .waitlist-form-actions .login-btn {
        order: 0;
        width: auto;
        min-width: 120px;
        max-width: none;
        margin-left: 0;
        margin-right: 0;
    }

    #waitlist-form .waitlist-form-actions .waiting-request.waitlist-form-login-link {
        order: 0;
        width: auto;
        text-align: left;
    }
}

.waitlist-policy-lead {
    margin: 0 0 12px;
    font-size: clamp(16px, 3.8vw, 18px);
    line-height: 1.55;
    font-weight: 500;
    color: #1e293b;
}

.waitlist-policy-note {
    margin: 0 0 20px;
    font-size: clamp(15px, 3.4vw, 16px);
    line-height: 1.55;
    color: #475569;
}

#waitlist-form #waitlist-email {
    font-size: clamp(17px, 4vw, 20px);
    font-weight: 500;
    color: #000;
    padding-bottom: 32px;
}

/* 비포커스·placeholder만 보일 때: 가운데 + 큰 안내 문구 */
#waitlist-form #waitlist-email:placeholder-shown:not(:focus) {
    text-align: center;
}

/* 포커스·입력 시: placeholder와 타이핑 텍스트를 같은 세로 위치로 (기본 padding-top 30px + 이전 transform과 동일 오프셋) */
#waitlist-form #waitlist-email:focus,
#waitlist-form #waitlist-email:not(:placeholder-shown) {
    text-align: left;
    padding-top: calc(30px + 0.32em);
}

#waitlist-form #waitlist-email::placeholder {
    color: #000;
    opacity: 1;
}

#waitlist-form #waitlist-email:placeholder-shown:not(:focus)::placeholder {
    font-size: clamp(22px, 5.5vw, 28px);
    text-align: center;
}

#waitlist-form #waitlist-email:focus::placeholder {
    font-size: clamp(17px, 4vw, 20px);
    text-align: left;
}

#waitlist-form #waitlist-email::-webkit-input-placeholder {
    color: #000;
    -webkit-text-fill-color: #000;
    opacity: 1;
}

#waitlist-form #waitlist-email:placeholder-shown:not(:focus)::-webkit-input-placeholder {
    font-size: clamp(22px, 5.5vw, 28px);
    text-align: center;
}

#waitlist-form #waitlist-email:focus::-webkit-input-placeholder {
    font-size: clamp(17px, 4vw, 20px);
    text-align: left;
}

#waitlist-form #waitlist-email::-moz-placeholder {
    color: #000;
    opacity: 1;
}

#waitlist-form #waitlist-email:placeholder-shown:not(:focus)::-moz-placeholder {
    font-size: clamp(22px, 5.5vw, 28px);
    text-align: center;
}

#waitlist-form #waitlist-email:focus::-moz-placeholder {
    font-size: clamp(17px, 4vw, 20px);
    text-align: left;
}

.waitlist-done-block {
    padding: 8px 0 16px;
}

.waitlist-done-title {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 600;
    color: #0f172a;
}

.waitlist-done-hint {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #475569;
}
