/* ═══════════════════════════════════════════
     기본 변수 · 리셋 (팝업 동작에 필요한 최소만)
  ═══════════════════════════════════════════ */
  :root {
    --border: #E3E8EF;
    --border-light: #F0F3F7;
    --text: #37474F;
    --text-secondary: #607D8B;
    --text-tertiary: #90A4AE;
  }
  * { margin: 0; padding: 0; box-sizing: border-box; }
  body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
  }
  button { font-family: inherit; }

  /* ── 데모 영역 (실제 적용 시 삭제) ── */
  .demo-stage {
    min-height: 100vh; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 18px;
    background: linear-gradient(140deg, #EEF2F7 0%, #F7F3F8 50%, #FDF2F7 100%);
  }
  .demo-title {
    font-size: 15px; font-weight: 600; color: #546E7A; letter-spacing: -0.3px;
  }
  .demo-note {
    font-size: 12.5px; color: #90A4AE; letter-spacing: -0.2px; line-height: 1.7; text-align: center;
  }
  .demo-open {
    height: 52px; padding: 0 30px; border-radius: 26px; border: none; cursor: pointer;
    background: linear-gradient(90deg, #EC407A 0%, #E91E63 100%);
    color: #fff; font-size: 15px; font-weight: 700; letter-spacing: -0.3px;
    box-shadow: 0 6px 16px rgba(236,64,122,0.32);
  }

    /* ═══════════════════════════════════════════
       LOGIN POPUP
    ═══════════════════════════════════════════ */

    .login-popup-overlay {
      position: fixed; top: 0; left: 0; right: 0; bottom: 0;
      background: rgba(20, 15, 30, 0.23);
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
      display: none; align-items: center; justify-content: center;
      z-index: 1000; opacity: 0; transition: opacity 0.35s ease, backdrop-filter 0.45s ease, background 0.45s ease;
    }
    .login-popup-overlay.active { display: flex; opacity: 1; z-index:999999999}

    .login-popup-outer {
      position: relative;
      background: rgba(255, 248, 255, 0.35);
      backdrop-filter: blur(1.5px);
      -webkit-backdrop-filter: blur(1.5px);
      border-radius: 52px;
      padding: 28px;
      border: 0 solid transparent;
      box-shadow:
        0 2px 0 rgba(255, 255, 255, 1.0) inset,
        1.5px 0 0 rgba(255, 255, 255, 0.72) inset,
        -1px 0 0 rgba(220, 170, 210, 0.10) inset,
        0 -2px 0 rgba(235, 195, 225, 0.14) inset,
        0 36px 80px rgba(185, 120, 160, 0.18),
        0 14px 32px rgba(185, 120, 160, 0.12),
        0 5px 14px rgba(185, 120, 160, 0.08),
        0 1px 4px rgba(185, 120, 160, 0.05);
      transform: scale(0.88);
      transition: transform 0.4s cubic-bezier(0.34, 1.52, 0.64, 1);
      max-width: calc(88vw + 56px);
    }

    .login-popup-outer::before {
      content: '';
      position: absolute;
      inset: 0;
      border-radius: 52px;
      background: linear-gradient(
        148deg,
        rgba(255, 255, 255, 0.82) 0%,
        rgba(255, 250, 255, 0.52) 15%,
        rgba(255, 242, 254, 0.24) 34%,
        rgba(255, 232, 252, 0.08) 56%,
        rgba(255, 220, 248, 0.02) 75%,
        rgba(255, 210, 245, 0.00) 100%
      );
      pointer-events: none;
      z-index: 0;
    }

    .login-popup-outer::after {
      content: '';
      position: absolute;
      bottom: 0;
      left: 6%;
      right: 6%;
      height: 48%;
      border-radius: 0 0 52px 52px;
      background: linear-gradient(
        to top,
        rgba(252, 220, 244, 0.22) 0%,
        rgba(254, 232, 248, 0.10) 40%,
        rgba(255, 244, 252, 0.03) 75%,
        rgba(255, 248, 254, 0.00) 100%
      );
      pointer-events: none;
      z-index: 0;
    }

    .login-popup-overlay.active .login-popup-outer { transform: scale(1); }
    .login-popup-outer > * { position: relative; z-index: 1; }

    .popup-float-close {
      position: absolute; top: -12px; right: -12px; width: 34px; height: 34px;
      background: rgba(255,255,255,0.95); border: 1.5px solid rgba(255,255,255,0.98);
      border-radius: 50%; display: flex; align-items: center; justify-content: center;
      cursor: pointer;
      box-shadow: 0 2px 10px rgba(185, 120, 160, 0.18), 0 0 0 1px rgba(220,180,210,0.10);
      transition: all 0.18s ease; z-index: 10; color: #78909C;
    }
    .popup-float-close:hover { background: #fff; transform: scale(1.1); color: #37474F; box-shadow: 0 4px 18px rgba(185, 120, 160, 0.22); }
    .popup-float-close svg { width: 14px; height: 14px; }
    /* 닫기 버튼 비활성 (가입 완료 화면) */
    .popup-float-close:disabled,
    .mobile-topbar button:disabled {
      opacity: 0.35; cursor: not-allowed; pointer-events: none;
    }
    .popup-float-close:disabled:hover {
      background: rgba(255,255,255,0.82); transform: none; box-shadow: none;
    }

    /* 모바일 상단바 */
    .mobile-topbar {
      display: none;
      height: 54px; flex-shrink: 0;
      align-items: center; justify-content: space-between;
      padding: 0 16px; background: #ffffff;
    }
    .mobile-topbar button {
      width: 40px; height: 40px; border: none; background: transparent;
      cursor: pointer; display: flex; align-items: center; justify-content: center;
      color: #37474F; border-radius: 50%; transition: background 0.15s;
    }
    .mobile-topbar button:hover { background: #F5F7FA; }
    .mobile-topbar button svg { width: 22px; height: 22px; }

    .login-popup {
      width: 88vw; max-width: 430px; max-height: 80vh;
      background: rgba(255, 255, 255, 0.97); border-radius: 36px;
      overflow: hidden; display: flex; flex-direction: column;
      box-shadow:
        0 1px 0 rgba(255,255,255,1) inset,
        0 8px 19px rgba(185, 120, 160, 0.11),
        0 3px 8px rgba(185, 120, 160, 0.07);
      position: relative;
    }

    .popup-header { display: none; }

    .popup-back-btn, .popup-close-btn {
      width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
      border-radius: 50%; background: transparent; border: none; cursor: pointer; transition: background 0.2s; color: #607D8B;
    }
    .popup-back-btn svg, .popup-close-btn svg { width: 20px; height: 20px; }

    .popup-content {
      flex: 1; overflow-y: auto; padding: 52px 28px 24px;
      display: flex; flex-direction: column; align-items: center; text-align: center;
    }

    /* ── 팝업 타이틀: Pretendard 700, 줄간격·자간 개선 ── */
    .brand-logo {
      display: flex; align-items: center; justify-content: center;
      margin-top: 18px;
      margin-bottom: 30px;
    }
    .brand-logo-text {
      position: relative;
      font-family: 'Jua', 'Pretendard', sans-serif;
      font-size: 33px; font-weight: 400;
      letter-spacing: 0.5px;
      display: inline-flex; align-items: baseline;
    }
    .brand-word { color: #5A5A5A; }
    .brand-logo-num { color: #EC407A; margin-left: 3px; }
    /* '편지'의 마지막 ㅣ 위에 하트 점 */
    .brand-heart {
      position: absolute;
      top: -0.18em;
      left: 1.60em;
      width: 0.32em; height: 0.32em;
      fill: #EC407A;
    }
    .popup-title {
      font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
      font-size: 21px;
      font-weight: 700;
      color: #37474F;
      line-height: 1.65;
      letter-spacing: -0.4px;
      margin-bottom: 24px;
    }
    .popup-title .highlight { color: #EC407A; }

    .envelope-container { position: relative; width: 140px; height: 105px; margin: 0 auto 36px; }
    .envelope-glow { position: absolute; inset: 0; background: rgba(236, 64, 122, 0.1); border-radius: 50%; filter: blur(40px); animation: pulse 2s ease-in-out infinite; }
    @keyframes pulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
    .envelope-box { position: relative; z-index: 10; width: 140px; height: 105px; background: white; border: 2px solid #FCE4EC; border-radius: 18px; box-shadow: 0 10px 30px rgba(236, 64, 122, 0.18); display: flex; align-items: center; justify-content: center; transform: rotate(-3deg); transition: transform 0.5s; }
    .envelope-box:hover { transform: rotate(0deg); }
    .envelope-flap { position: absolute; top: 0; left: 0; right: 0; height: 50%; background: #FCE4EC; border-radius: 18px 18px 0 0; clip-path: polygon(0 0, 100% 0, 50% 100%); }
    .envelope-icon { color: #F8BBD0; opacity: 0.6; width: 52px; height: 52px; }
    .heart-badge { position: absolute; top: -14px; right: -14px; width: 44px; height: 44px; background: white; border-radius: 50%; box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12); display: flex; align-items: center; justify-content: center; animation: bounce 1s ease-in-out infinite; }
    @keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
    .heart-icon { fill: #F06292; width: 26px; height: 26px; }

    .popup-btn { width: 100%; max-width: 400px; height: 54px; border-radius: 27px; font-size: 15px; font-weight: 700; cursor: pointer; transition: all 0.2s; border: none; margin-bottom: 12px; font-family: 'Pretendard', sans-serif; }
    .popup-btn:active { transform: scale(0.97); }
    .popup-btn-primary { background: #FFD600; color: #333; box-shadow: 0 6px 16px rgba(255, 214, 0, 0.35); }
    .popup-btn-primary:hover { box-shadow: 0 8px 20px rgba(255, 214, 0, 0.4); }
    .popup-btn-secondary { background: linear-gradient(90deg, #EC407A 0%, #F06292 100%); color: white; box-shadow: 0 6px 16px rgba(236, 64, 122, 0.35); }
    .popup-btn-secondary:hover { box-shadow: 0 8px 20px rgba(236, 64, 122, 0.4); }
    .popup-btn-tertiary { background: #F5F7FA; border: 1.5px solid #CFD8DC; color: #546E7A; }
    .popup-btn-tertiary:hover { background: #ECEFF1; }

    /* ── 앱 배지 영역 축소 ── */
    .app-badges {
      margin-top: auto;
      padding-top: 14px;
      border-top: 1px solid #E3E8EF;
      display: flex; gap: 20px; justify-content: center; width: 100%;
    }
    .app-badge {
      display: flex; align-items: center; gap: 7px;
      cursor: pointer; color: #90A4AE; transition: color 0.2s;
    }
    .app-badge:hover { color: #37474F; }
    .app-badge-icon {
      width: 28px; height: 28px; border-radius: 50%;
      background: #F5F7FA; display: flex; align-items: center;
      justify-content: center; transition: background 0.2s;
    }
    .app-badge:hover .app-badge-icon { background: #ECEFF1; }
    .app-badge-icon svg { width: 13px; height: 13px; }
    .app-badge-text { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; }

    /* ═══════════════════════════════════════════
       로그인 폼 화면
    ═══════════════════════════════════════════ */
    .login-form-view { display: none; flex-direction: column; height: 100%; width: 100%; min-height: 0; overflow: hidden; }
    .login-form-view.active { display: flex; }
    /* 로그인 폼일 때 팝업 높이를 기존과 동일하게 고정 */
    .login-popup.show-login { height: 80vh; max-height: 560px; }
    /* 로그인 폼이 활성화되면 기존 선택 화면 숨김 */
    .login-popup.show-login .popup-content > .popup-title,
    .login-popup.show-login .popup-content > .envelope-container,
    .login-popup.show-login .popup-content > .popup-buttons,
    .login-popup.show-login .popup-content > .app-badges { display: none; }
    .login-popup.show-login .popup-content { padding: 22px 28px 24px !important; height: 100%; overflow: hidden; }

    .lf-header {
      display: none;
    }
    .lf-back {
      width: 36px; height: 36px; border: none; background: transparent;
      cursor: pointer; display: flex; align-items: center; justify-content: center;
      color: #37474F; border-radius: 50%; transition: background 0.15s;
    }
    .lf-back:hover { background: #F5F7FA; }
    .lf-back svg { width: 22px; height: 22px; }
    .lf-header-title {
      font-family: 'Pretendard', sans-serif;
      font-size: 17px; font-weight: 700; color: #37474F;
    }

    .lf-body {
      flex: 1; overflow-y: auto;
      padding: 0;
      width: 100%;
      display: flex; flex-direction: column;
      align-items: center;
    }
    .lf-greeting, .lf-subtitle { align-self: center; width: 100%; max-width: 337px; text-align: center; }
    .lf-back-mini {
      align-self: flex-start;
      width: 100%; max-width: 337px;
      margin-bottom: 14px;
      background: none; border: none; cursor: pointer; padding: 0;
      color: #90A4AE; display: flex; align-items: center;
      transition: color 0.15s;
    }
    .lf-back-mini:hover { color: #37474F; }
    .lf-back-mini svg { width: 20px; height: 20px; }
    .lf-greeting {
      font-family: 'Pretendard', sans-serif;
      font-size: 28px; font-weight: 800; color: #263238;
      letter-spacing: -0.6px; margin-bottom: 8px;
    }
    .lf-subtitle {
      font-family: 'Pretendard', sans-serif;
      font-size: 14px; font-weight: 400; color: #90A4AE;
      margin-bottom: 32px;
    }
    .lf-input-wrap {
      position: relative; margin-bottom: 12px;
      width: 100%; max-width: 337px;
      align-self: center;
    }
    .lf-input-icon {
      position: absolute; left: 20px; top: 50%; transform: translateY(-50%);
      color: #B0BEC5; display: flex; align-items: center;
    }
    .lf-input-icon svg { width: 18px; height: 18px; }
    .lf-input {
      width: 100%; height: 54px;
      background: #F5F7FA; border: 1.5px solid transparent;
      border-radius: 27px; padding: 0 20px 0 52px;
      font-family: 'Pretendard', sans-serif;
      font-size: 15px; color: #37474F;
      transition: all 0.18s; outline: none;
    }
    .lf-input::placeholder { color: #B0BEC5; }
    .lf-input:focus { background: #fff; border-color: #EC407A; }
    .lf-input.has-eye { padding-right: 46px; }
    .lf-eye {
      position: absolute; right: 16px; top: 50%;
      transform: translateY(-50%);
      width: 22px; height: 22px;
      display: flex; align-items: center; justify-content: center;
      background: none; border: none; padding: 0; cursor: pointer;
      color: #B0BEC5; transition: color 0.15s; z-index: 3;
    }
    .lf-eye:hover { color: #78909C; }
    .lf-eye svg { width: 18px; height: 18px; }
    .lf-eye .eye-off { display: none; }
    .lf-eye.on .eye-on  { display: none; }
    .lf-eye.on .eye-off { display: block; }
    .lf-login-btn {
      width: 100%; max-width: 337px; height: 54px; margin-top: 16px; align-self: center;
      background: linear-gradient(90deg, #EC407A 0%, #E91E63 100%);
      border: none; border-radius: 27px; cursor: pointer;
      font-family: 'Pretendard', sans-serif;
      font-size: 15px; font-weight: 700; color: #fff;
      box-shadow: 0 6px 16px rgba(236,64,122,0.32);
      transition: all 0.18s;
    }
    .lf-login-btn:hover { box-shadow: 0 8px 22px rgba(236,64,122,0.42); }
    .lf-login-btn:active { transform: scale(0.98); }

    .lf-links {
      display: flex; align-items: center; justify-content: center; gap: 14px;
      margin-top: 20px;
    }
    .lf-link {
      font-family: 'Pretendard', sans-serif;
      font-size: 13px; font-weight: 500; color: #78909C;
      cursor: pointer; background: none; border: none;
      transition: color 0.15s;
    }
    .lf-link.signup { color: #EC407A; font-weight: 600; }
    .lf-link:hover { color: #37474F; }
    .lf-link.signup:hover { color: #C2185B; }
    .lf-link-dot { width: 3px; height: 3px; border-radius: 50%; background: #CFD8DC; }

    .lf-social-label {
      text-align: center; margin: 36px 0 20px;
      font-family: 'Pretendard', sans-serif;
      font-size: 12px; font-weight: 500; color: #B0BEC5;
      position: relative;
    }
    .lf-socials {
      display: flex; align-items: center; justify-content: center; gap: 18px;
    }
    .lf-social {
      width: 52px; height: 52px; border-radius: 50%;
      border: none; cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      transition: transform 0.15s, box-shadow 0.15s;
    }
    .lf-social:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.12); }
    .lf-social.kakao  { background: #FEE500; }
    .lf-social.naver  { background: #03C75A; }
    .lf-social.google { background: #fff; border: 1px solid #E8ECEF; }

    /* ═══════════════════════════════════════════
       회원가입 폼
    ═══════════════════════════════════════════ */
    .signup-form-view { display: none; flex-direction: column; height: 100%; width: 100%; min-height: 0; overflow: hidden; }
    .signup-form-view.active { display: flex; }

    /* ═══════════════════════════════════════════
       계정 찾기 폼
    ═══════════════════════════════════════════ */
    .find-form-view { display: none; flex-direction: column; height: 100%; width: 100%; min-height: 0; overflow: hidden; }
    .find-form-view.active { display: flex; }
    .login-popup.show-find .popup-content > .popup-title,
    .login-popup.show-find .popup-content > .envelope-container,
    .login-popup.show-find .popup-content > .popup-buttons,
    .login-popup.show-find .popup-content > .app-badges { display: none; }
    .login-popup.show-find .popup-content { padding: 22px 28px 24px !important; height: 100%; overflow: hidden; }
    .login-popup.show-find { height: 80vh; max-height: 560px; }

    .ff-body {
      flex: 1; min-height: 0; overflow-y: auto; padding: 0 0 8px; width: 100%;
      display: flex; flex-direction: column; align-items: center;
    }
    .ff-body > * { flex-shrink: 0; }
    .ff-back-mini {
      align-self: flex-start; width: 100%; max-width: 337px;
      margin-bottom: 14px; background: none; border: none; cursor: pointer; padding: 0;
      color: #90A4AE; display: flex; align-items: center; transition: color 0.15s;
    }
    .ff-back-mini:hover { color: #37474F; }
    .ff-back-mini svg { width: 20px; height: 20px; }
    .ff-title {
      align-self: center; width: 100%; max-width: 337px;
      font-family: 'Pretendard', sans-serif;
      font-size: 28px; font-weight: 800; color: #263238;
      letter-spacing: -0.6px; text-align: center; margin-bottom: 8px;
    }
    .ff-subtitle {
      align-self: center; width: 100%; max-width: 337px;
      font-family: 'Pretendard', sans-serif;
      font-size: 13px; font-weight: 400; color: #90A4AE;
      text-align: center; margin-bottom: 24px;
    }
    /* 탭 */
    .ff-tabs {
      display: flex; width: 100%; max-width: 337px; align-self: center;
      background: #F0F3F7; border-radius: 12px; padding: 4px; margin-bottom: 24px;
    }
    .ff-tab {
      flex: 1; height: 40px; border: none; background: transparent; cursor: pointer;
      border-radius: 9px; font-family: 'Pretendard', sans-serif;
      font-size: 13px; font-weight: 600; color: #90A4AE; transition: all 0.18s;
    }
    .ff-tab.active { background: #fff; color: #EC407A; box-shadow: 0 2px 6px rgba(0,0,0,0.06); }
    /* 패널 */
    .ff-panel { display: none; width: 100%; flex-direction: column; align-items: center; }
    .ff-panel.active { display: flex; }
    /* 결과 표시 중에는 입력폼·제출버튼 숨김 */
    .ff-panel.result-mode .ff-field,
    .ff-panel.result-mode .ff-notice,
    .ff-panel.result-mode .ff-submit { display: none; }
    .ff-panel.result-mode .ff-result { margin-top: 0; }
    .ff-desc {
      width: 100%; max-width: 337px; align-self: center;
      font-family: 'Pretendard', sans-serif;
      font-size: 14px; font-weight: 400; color: #90A4AE; line-height: 1.6;
      margin-bottom: 18px; text-align: center;
    }
    .ff-field { width: 100%; max-width: 337px; align-self: center; margin-bottom: 10px; position: relative; }
    .ff-icon { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: #B0BEC5; display: flex; }
    .ff-icon svg { width: 17px; height: 17px; }
    .ff-input {
      width: 100%; height: 52px; background: #F5F7FA; border: 1.5px solid transparent;
      border-radius: 26px; padding: 0 20px 0 50px;
      font-family: 'Pretendard', sans-serif; font-size: 15px; color: #37474F;
      transition: all 0.18s; outline: none;
    }
    .ff-input::placeholder { color: #B0BEC5; }
    .ff-input:focus { background: #fff; border-color: #EC407A; }
    .ff-input.invalid { border-color: #EF9A9A; background: #FFF5F5; }
    .ff-notice {
      width: 100%; max-width: 337px; align-self: center;
      margin-top: 32px; padding: 14px 16px;
      background: #F7F9FB; border: 1px solid #EDF1F5; border-radius: 12px;
      font-family: 'Pretendard', sans-serif;
      font-size: 12px; font-weight: 400; color: #90A4AE;
      line-height: 1.75; text-align: center; letter-spacing: -0.2px;
    }
    .ff-submit {
      width: 100%; max-width: 337px; align-self: center;
      height: 52px; margin-top: 14px;
      background: linear-gradient(90deg, #EC407A 0%, #E91E63 100%);
      border: none; border-radius: 26px; cursor: pointer;
      font-family: 'Pretendard', sans-serif; font-size: 15px; font-weight: 700; color: #fff;
      box-shadow: 0 6px 16px rgba(236,64,122,0.32); transition: all 0.18s;
    }
    .ff-submit:hover { box-shadow: 0 8px 22px rgba(236,64,122,0.42); }
    .ff-submit:active { transform: scale(0.98); }
    /* 결과 */
    @keyframes ffResIn {
      from { opacity: 0; transform: translateY(6px); }
      to   { opacity: 1; transform: translateY(0); }
    }
    .ff-result {
      display: none; width: 100%; max-width: 337px; align-self: center;
      margin-top: 14px; padding: 24px 18px; border-radius: 14px;
      background: #F5F7FA; text-align: center;
      min-height: 132px;
      animation: ffResIn 0.22s ease;
    }
    .ff-result.show { display: flex; flex-direction: column; justify-content: center; }
    .ff-result.fail { background: #FFF5F5; border: 1px solid #FFE0E0; }
    .ff-result-label { font-family: 'Pretendard', sans-serif; font-size: 12px; color: #90A4AE; margin-bottom: 6px; }
    .ff-result-value { font-family: 'Pretendard', sans-serif; font-size: 16px; font-weight: 700; color: #EC407A; letter-spacing: -0.2px; }
    .ff-result-note {
      font-family: 'Pretendard', sans-serif;
      font-size: 12px; color: #90A4AE; line-height: 1.6; margin-top: 10px;
    }
    .ff-result-fail-title {
      font-family: 'Pretendard', sans-serif; font-size: 14px; font-weight: 700;
      color: #D32F2F; margin-bottom: 5px;
    }
    .ff-result-fail-desc {
      font-family: 'Pretendard', sans-serif; font-size: 12.5px; color: #90A4AE; line-height: 1.6;
    }
    .ff-result-actions {
      display: none; gap: 9px; margin-top: 12px;
      width: 100%; max-width: 337px; align-self: center;
      animation: ffResIn 0.26s ease;
    }
    .ff-result-actions.show { display: flex; }
    .ff-result-btn {
      flex: 1; height: 48px; border-radius: 24px; cursor: pointer;
      font-family: 'Pretendard', sans-serif; font-size: 14px; font-weight: 600;
      border: 1.5px solid #E4E8EE; background: #fff; color: #607D8B;
      transition: all 0.16s;
    }
    .ff-result-btn:hover { border-color: #CFD8DC; background: #FAFBFC; color: #37474F; }
    .ff-result-btn:active { transform: scale(0.98); }
    .ff-result-btn.primary {
      border: none; color: #fff; font-weight: 700;
      background: linear-gradient(90deg, #EC407A 0%, #E91E63 100%);
      box-shadow: 0 5px 14px rgba(236,64,122,0.30);
    }
    .ff-result-btn.primary:hover { box-shadow: 0 7px 18px rgba(236,64,122,0.40); color: #fff; }
    .login-popup.show-signup .popup-content > .popup-title,
    .login-popup.show-signup .popup-content > .envelope-container,
    .login-popup.show-signup .popup-content > .popup-buttons,
    .login-popup.show-signup .popup-content > .app-badges { display: none; }
    .login-popup.show-signup .popup-content { padding: 22px 28px 24px !important; height: 100%; overflow: hidden; }
    .login-popup.show-signup { height: 80vh; max-height: 560px; }

    .sf-body {
      flex: 1; min-height: 0; overflow-y: auto; padding: 0 0 2px; width: 100%;
      display: flex; flex-direction: column; align-items: center;
    }
    /* flex 압축 방지 — 버튼·제목 찌그러짐 해결 */
    .sf-body > * { flex-shrink: 0; }
    .sf-back-mini {
      align-self: flex-start;
      width: 100%; max-width: 337px;
      margin-bottom: 10px;
      background: none; border: none; cursor: pointer; padding: 0;
      color: #90A4AE; display: flex; align-items: center;
      transition: color 0.15s;
    }
    .sf-back-mini:hover { color: #37474F; }
    .sf-back-mini svg { width: 20px; height: 20px; }
    .sf-greeting {
      align-self: center; width: 100%; max-width: 337px;
      font-family: 'Pretendard', sans-serif;
      font-size: 21px; font-weight: 600; color: #263238;
      letter-spacing: -1px;
      text-align: center; margin-bottom: 32px;
    }
    .sf-field { width: 100%; max-width: 337px; align-self: center; margin-bottom: 8px; position: relative; }
    .sf-icon {
      position: absolute; left: 20px; top: 50%; transform: translateY(-50%);
      color: #B0BEC5; display: flex; align-items: center;
    }
    .sf-icon svg { width: 17px; height: 17px; }
    .sf-input {
      width: 100%; height: 50px; min-height: 50px;
      background: #F5F7FA; border: 1.5px solid transparent;
      border-radius: 25px; padding: 0 18px 0 50px;
      font-family: 'Pretendard', sans-serif;
      font-size: 15px; color: #37474F;
      transition: all 0.18s; outline: none;
    }
    .sf-input::placeholder { color: #B0BEC5; font-size: 14px; transition: color 0.18s; }
    .sf-input:focus { background: #fff; border-color: #EC407A; }
    /* 포커스 시 안내 문구를 진하게 — 가독성 확보 */
    .sf-input:focus::placeholder { color: #78909C; font-weight: 450; }
    .sf-field:focus-within .sf-icon { color: #78909C; }
    .sf-input.has-eye { padding-right: 46px; }
    .sf-eye {
      position: absolute; right: 16px; top: 50%;
      transform: translateY(-50%);
      width: 22px; height: 22px;
      display: flex; align-items: center; justify-content: center;
      background: none; border: none; padding: 0; cursor: pointer;
      color: #B0BEC5; transition: color 0.15s; z-index: 3;
    }
    .sf-eye:hover { color: #78909C; }
    .sf-eye svg { width: 18px; height: 18px; }
    .sf-eye .eye-off { display: none; }
    .sf-eye.on .eye-on  { display: none; }
    .sf-eye.on .eye-off { display: block; }

    .sf-terms {
      position: relative;
      width: 100%; max-width: 337px; align-self: center;
      margin-top: 12px; padding-top: 12px;
      border-top: 1px solid #F0F3F7;
      display: flex; flex-direction: row; align-items: center;
      justify-content: space-between; gap: 8px;
    }

    /* 에러 메시지 — 약관 줄 위에 덮어쓰기 */
    .sf-error {
      position: absolute;
      left: 0; right: 0; top: 6px;
      display: none;
      align-items: center; gap: 7px;
      padding: 7px 12px;
      background: #FFEBEE;
      border: 1px solid #FFCDD2;
      border-radius: 8px;
      font-family: 'Pretendard', sans-serif;
      font-size: 12px; font-weight: 500; color: #D32F2F;
      letter-spacing: -0.2px;
      z-index: 5; cursor: pointer;
    }
    .sf-error:hover { background: #FFE0E3; }
    .sf-error-ico { flex-shrink: 0; }
    .sf-error span { flex: 1; }
    .sf-error-close {
      flex-shrink: 0; width: 18px; height: 18px; padding: 0;
      border: none; background: transparent; cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      color: #E57373; border-radius: 50%; transition: all 0.15s;
    }
    .sf-error-close:hover { background: rgba(211,47,47,0.12); color: #C62828; }
    .sf-error-close svg { width: 11px; height: 11px; }
    .sf-error.show { display: flex; }
    .sf-error svg { width: 14px; height: 14px; flex-shrink: 0; stroke: #E53935; }
    /* 에러 상태 입력창 */
    .sf-input.invalid { border-color: #EF9A9A; background: #FFF5F5; }
    /* 정상 입력 완료 */
    .sf-input.valid { background: rgb(232,240,254); }
    .sf-input.valid:focus { background: #fff; }

    /* ── 필드별 플로팅 토스트 ── */
    @keyframes sfTipIn {
      from { opacity: 0; transform: translateY(2px) scale(0.96); }
      to   { opacity: 1; transform: translateY(0) scale(1); }
    }
    .sf-tip {
      position: absolute;
      right: 14px; top: -9px;
      transform-origin: bottom right;
      display: none; align-items: center; gap: 5px;
      padding: 6px 11px;
      background: #F04452;
      border-radius: 8px;
      font-family: 'Pretendard', sans-serif;
      font-size: 11.5px; font-weight: 600; color: #fff;
      letter-spacing: -0.3px; white-space: nowrap;
      box-shadow: 0 6px 16px rgba(240,68,82,0.32), 0 2px 5px rgba(0,0,0,0.10);
      z-index: 20; pointer-events: none;
      animation: sfTipIn 0.18s cubic-bezier(0.34,1.56,0.64,1);
    }
    .sf-tip.show { display: inline-flex; }
    .sf-tip::after {
      content: '';
      position: absolute;
      right: 16px; bottom: -4px;
      width: 8px; height: 8px;
      background: #F04452;
      transform: rotate(45deg);
      border-radius: 1px;
    }
    .sf-tip svg { width: 12px; height: 12px; flex-shrink: 0; stroke: #fff; }
    .sf-term-row {
      display: flex; align-items: center; gap: 7px;
      cursor: pointer; user-select: none;
    }
    .sf-checkbox {
      width: 17px; height: 17px; border-radius: 5px;
      border: 1.5px solid #CFD8DC; background: #fff;
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0; transition: all 0.15s;
    }
    .sf-checkbox svg { width: 11px; height: 11px; stroke: #fff; opacity: 0; transition: opacity 0.15s; }
    .sf-term-row:focus { outline: none; }
    .sf-term-row:focus-visible .sf-checkbox,
    .sf-term-row.kb-focus .sf-checkbox {
      border-color: #EC407A;
      box-shadow: 0 0 0 3px rgba(236,64,122,0.18);
    }
    .sf-term-row.checked .sf-checkbox { background: #EC407A; border-color: #EC407A; }
    .sf-term-row.checked .sf-checkbox svg { opacity: 1; }
    .sf-term-text {
      font-family: 'Pretendard', sans-serif;
      font-size: 12px; color: #546E7A; white-space: nowrap;
    }
    .sf-term-req { color: #EC407A; font-weight: 600; }
    .sf-term-link {
      color: #546E7A; text-decoration: underline;
      text-underline-offset: 2px; text-decoration-color: #CFD8DC;
      cursor: pointer; transition: color 0.15s;
    }
    .sf-term-link:hover { color: #EC407A; text-decoration-color: #EC407A; }

    /* ── 약관 모달 ── */
    .terms-modal-overlay {
      position: fixed; inset: 0;
      background: rgba(20, 15, 30, 0.55);
      display: none; align-items: center; justify-content: center;
      z-index: 999999999999; padding: 20px;
      opacity: 0; transition: opacity 0.2s ease;
    }
    .terms-modal-overlay.active { display: flex; opacity: 1; }
    .terms-modal {
      width: 100%; max-width: 480px; max-height: 82vh;
      background: #fff; border-radius: 16px;
      display: flex; flex-direction: column; overflow: hidden;
      box-shadow: 0 20px 60px rgba(0,0,0,0.25);
      transform: scale(0.94); transition: transform 0.25s cubic-bezier(0.34,1.4,0.64,1);
    }
    .terms-modal-overlay.active .terms-modal { transform: scale(1); }
    .terms-modal-header {
      display: flex; align-items: center; justify-content: space-between;
      padding: 18px 22px; border-bottom: 1px solid #F0F3F7; flex-shrink: 0;
    }
    .terms-modal-title {
      font-family: 'Pretendard', sans-serif;
      font-size: 16px; font-weight: 700; color: #263238;
    }
    .terms-modal-close {
      width: 32px; height: 32px; border-radius: 50%;
      border: none; background: #F5F7FA; cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      color: #78909C; transition: background 0.15s;
    }
    .terms-modal-close:hover { background: #E8ECEF; }
    .terms-modal-close svg { width: 15px; height: 15px; }
    .terms-modal-body {
      padding: 22px 24px 28px; overflow-y: auto;
      font-family: 'Pretendard', sans-serif;
      font-size: 13px; line-height: 1.75; color: #455A64;
      letter-spacing: -0.2px;
    }
    .terms-modal-body h3 {
      font-size: 14px; font-weight: 700; color: #37474F;
      margin: 20px 0 8px;
    }
    .terms-modal-body h3:first-child { margin-top: 0; }
    .terms-modal-body p { margin-bottom: 12px; }
    .terms-modal-body .tm-updated {
      font-size: 11px; color: #B0BEC5; margin-bottom: 18px;
    }
    .terms-modal-footer {
      flex-shrink: 0; padding: 14px 22px 18px;
      border-top: 1px solid #F0F3F7; background: #fff;
    }
    .terms-agree-btn {
      width: 100%; height: 50px; border: none; border-radius: 25px;
      background: linear-gradient(90deg, #EC407A 0%, #E91E63 100%);
      color: #fff; cursor: pointer;
      font-family: 'Pretendard', sans-serif;
      font-size: 15px; font-weight: 700;
      box-shadow: 0 5px 14px rgba(236,64,122,0.30);
      transition: all 0.18s;
    }
    .terms-agree-btn:hover { box-shadow: 0 7px 18px rgba(236,64,122,0.40); }
    .terms-agree-btn:active { transform: scale(0.98); }
    .sf-term-opt { color: #B0BEC5; font-weight: 500; }

    /* ── 가입 완료 화면 ── */
    .sf-done, .sf-done-actions { display: none; }
    .sf-body.done-mode { justify-content: center; }
    .sf-body.done-mode > * { display: none; }
    .sf-body.done-mode > .sf-done { display: flex; }
    .sf-body.done-mode > .sf-done-actions { display: flex; }

    .sf-done {
      flex-direction: column; align-items: center;
      width: 100%; max-width: 337px; align-self: center;
      text-align: center;
      animation: ffResIn 0.28s ease;
    }
    @keyframes sfPop {
      0%   { transform: scale(0.4); opacity: 0; }
      60%  { transform: scale(1.08); opacity: 1; }
      100% { transform: scale(1); }
    }
    .sf-done-icon {
      width: 72px; height: 72px; border-radius: 50%;
      background: linear-gradient(135deg, #EC407A 0%, #E91E63 100%);
      display: flex; align-items: center; justify-content: center;
      box-shadow: 0 8px 22px rgba(236,64,122,0.34);
      margin-bottom: 22px;
      animation: sfPop 0.42s cubic-bezier(0.34,1.56,0.64,1);
    }
    .sf-done-icon svg { width: 34px; height: 34px; stroke: #fff; }
    .sf-done-title {
      font-family: 'Pretendard', sans-serif;
      font-size: 22px; font-weight: 700; color: #263238;
      letter-spacing: -0.8px; margin-bottom: 10px;
    }
    .sf-done-email {
      font-family: 'Pretendard', sans-serif;
      font-size: 13px; font-weight: 500; color: #78909C;
      padding: 9px 16px; border-radius: 20px;
      background: #F5F7FA; margin-bottom: 4px;
      letter-spacing: -0.2px;
    }
    .sf-done-msg {
      font-family: 'Pretendard', sans-serif;
      font-size: 13px; font-weight: 400; color: #90A4AE;
      line-height: 1.75; letter-spacing: -0.2px;
      margin-bottom: 22px;
    }
    .sf-done-desc {
      font-family: 'Pretendard', sans-serif;
      font-size: 13px; font-weight: 400; color: #90A4AE;
      line-height: 1.7;
    }
    /* ═══════════════════════════════════════════
       비회원 계정 발급 화면
    ═══════════════════════════════════════════ */
    .guest-view { display: none; flex-direction: column; height: 100%; width: 100%; min-height: 0; overflow: hidden; }
    .guest-view.active { display: flex; }
    .login-popup.show-guest .popup-content > .popup-title,
    .login-popup.show-guest .popup-content > .envelope-container,
    .login-popup.show-guest .popup-content > .popup-buttons,
    .login-popup.show-guest .popup-content > .app-badges { display: none; }
    .login-popup.show-guest .popup-content { padding: 22px 28px 24px !important; height: 100%; overflow: hidden; }
    .login-popup.show-guest { height: 80vh; max-height: 560px; }

    .gv-body {
      flex: 1; min-height: 0; overflow-y: auto; padding: 0 0 8px; width: 100%;
      display: flex; flex-direction: column; align-items: center;
    }
    .gv-body > * { flex-shrink: 0; }
    .gv-back {
      align-self: flex-start; width: 100%; max-width: 337px;
      margin-bottom: 10px; background: none; border: none; cursor: pointer; padding: 0;
      color: #90A4AE; display: flex; align-items: center; transition: color 0.15s;
    }
    .gv-back:hover { color: #37474F; }
    .gv-back svg { width: 20px; height: 20px; }

    .gv-badge {
      width: 66px; height: 66px; border-radius: 50%;
      background: linear-gradient(135deg, #EC407A 0%, #E91E63 100%);
      display: flex; align-items: center; justify-content: center;
      box-shadow: 0 8px 20px rgba(236,64,122,0.30);
      margin-bottom: 18px;
      animation: sfPop 0.42s cubic-bezier(0.34,1.56,0.64,1);
    }
    .gv-badge svg { width: 32px; height: 32px; stroke: #fff; }
    .gv-title {
      font-family: 'Pretendard', sans-serif;
      font-size: 20px; font-weight: 600; color: #263238;
      letter-spacing: -0.8px; margin-bottom: 6px; text-align: center;
    }
    .gv-sub {
      font-family: 'Pretendard', sans-serif;
      font-size: 13px; font-weight: 400; color: #90A4AE;
      letter-spacing: -0.2px; margin-bottom: 20px; text-align: center;
    }
    .gv-sub b { font-weight: 700; color: #EC407A; }

    /* 계정 정보 카드 */
    .gv-card {
      width: 100%; max-width: 337px; align-self: center;
      background: #F7F9FB; border: 1px solid #EDF1F5; border-radius: 14px;
      padding: 6px 10px; margin-bottom: 12px;
    }
    .gv-row {
      display: flex; align-items: center; gap: 8px;
      padding: 12px 0;
    }
    .gv-row + .gv-row { border-top: 1px solid #E9EEF3; }
    .gv-label {
      font-family: 'Pretendard', sans-serif;
      font-size: 12px; font-weight: 500; color: #90A4AE;
      width: 58px; flex-shrink: 0; letter-spacing: -0.5px;
    }
    .gv-value {
      flex: 1; font-family: 'Pretendard', sans-serif;
      font-size: 15px; font-weight: 700; color: #37474F;
      letter-spacing: 0.2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .gv-copy {
      flex-shrink: 0; height: 30px; padding: 0 9px; border-radius: 15px;
      border: 1px solid #DDE3EA; background: #fff; cursor: pointer;
      font-family: 'Pretendard', sans-serif;
      font-size: 11.5px; font-weight: 600; color: #78909C;
      transition: all 0.15s; white-space: nowrap;
    }
    .gv-copy:hover { border-color: #CFD8DC; color: #37474F; }
    .gv-copy.done { background: #EEF3FB; border-color: #D6E2F2; color: #3D5A80; }

    /* 안내 */
    .gv-notice {
      width: 100%; max-width: 337px; align-self: center;
      display: flex; align-items: flex-start; gap: 7px;
      background: #FFF8E7; border: 1px solid #FBE7BB; border-radius: 10px;
      padding: 10px 12px; margin-bottom: 4px;
      font-family: 'Pretendard', sans-serif;
      font-size: 12px; font-weight: 400; color: #8A6D3B;
      line-height: 1.6; letter-spacing: -0.3px; text-align: left;
    }
    .gv-notice svg { width: 14px; height: 14px; stroke: #C99A3B; flex-shrink: 0; margin-top: 2px; }

    .gv-actions { width: 100%; max-width: 337px; align-self: center; margin-top: 14px; }
    .gv-go {
      width: 100%; height: 54px; border: none; border-radius: 27px;
      background: linear-gradient(90deg, #EC407A 0%, #E91E63 100%);
      color: #fff; cursor: pointer;
      display: inline-flex; align-items: center; justify-content: center; gap: 8px;
      font-family: 'Pretendard', sans-serif;
      font-size: 15px; font-weight: 700; letter-spacing: -0.3px;
      box-shadow: 0 6px 16px rgba(236,64,122,0.32);
      transition: all 0.18s;
    }
    .gv-go:hover { box-shadow: 0 8px 22px rgba(236,64,122,0.42); }
    .gv-go:active { transform: scale(0.98); }
    .gv-go svg { width: 17px; height: 17px; transition: transform 0.18s; }
    .gv-go:hover svg { transform: translateX(3px); }

    @media (max-width: 767px) {
      .gv-back { display: none !important; }
      .login-popup.show-guest { height: 100vh !important; max-height: 100vh !important; }
    }

    /* ═══════════════════════════════════════════
       휴대폰 인증 화면 / 포인트 적립 완료
    ═══════════════════════════════════════════ */
    .sf-verify, .sf-point { display: none; }
    .sf-body.verify-mode, .sf-body.point-mode { justify-content: center; }
    .sf-body.verify-mode > *, .sf-body.point-mode > * { display: none; }
    .sf-body.verify-mode > .sf-verify { display: flex; }
    .sf-body.point-mode  > .sf-point  { display: flex; }

    .sf-verify {
      flex-direction: column; align-items: center;
      width: 100%; max-width: 337px; align-self: center;
      animation: ffResIn 0.26s ease;
    }
    /* 인증 배지 */
    .sv-gift {
      width: 82px; height: 82px; border-radius: 50%;
      background: #FFF1F6; border: 1.5px solid #FAD3E1;
      display: flex; align-items: center; justify-content: center;
      color: #EC407A; margin-bottom: 20px;
      animation: sfPop 0.42s cubic-bezier(0.34,1.56,0.64,1);
    }
    .sv-gift svg { width: 42px; height: 42px; }
    .sv-title {
      font-family: 'Pretendard', sans-serif;
      font-size: 21px; font-weight: 600; color: #263238;
      letter-spacing: -1px; margin-bottom: 8px;
    }
    .sv-desc {
      font-family: 'Pretendard', sans-serif;
      font-size: 13px; font-weight: 400; color: #90A4AE;
      letter-spacing: -0.2px; margin-bottom: 26px; text-align: center;
    }
    .sv-desc b { font-weight: 700; color: #EC407A; }
    .sv-field { position: relative; width: 100%; margin-bottom: 10px; }
    .sv-icon {
      position: absolute; left: 20px; top: 50%; transform: translateY(-50%);
      color: #B0BEC5; display: flex; align-items: center;
    }
    .sv-icon svg { width: 17px; height: 17px; }
    .sv-input {
      width: 100%; height: 52px;
      background: #F5F7FA; border: 1.5px solid transparent; border-radius: 26px;
      padding: 0 116px 0 50px;
      font-family: 'Pretendard', sans-serif;
      font-size: 15px; color: #37474F;
      transition: all 0.18s; outline: none;
    }
    .sv-input::placeholder { color: #B0BEC5; font-size: 14px; }
    .sv-input:focus { background: #fff; border-color: #EC407A; }
    .sv-input.invalid { border-color: #EF9A9A; background: #FFF5F5; }
    .sv-input.done { background: rgb(232,240,254); }
    .sv-send {
      position: absolute; right: 7px; top: 50%; transform: translateY(-50%);
      height: 38px; padding: 0 15px; border-radius: 19px;
      border: none; cursor: pointer;
      background: #FFEAF2; color: #EC407A;
      font-family: 'Pretendard', sans-serif;
      font-size: 13px; font-weight: 600; letter-spacing: -0.3px;
      transition: all 0.15s; white-space: nowrap;
    }
    .sv-send:hover { background: #FFD9E7; }
    .sv-send:disabled { background: #F0F3F7; color: #B0BEC5; cursor: not-allowed; }
    .sv-timer {
      position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
      display: none;
      font-family: 'Pretendard', sans-serif;
      font-size: 13px; font-weight: 600; color: #EC407A;
      font-variant-numeric: tabular-nums;
    }
    .sv-timer.show { display: block; }
    .sv-code-field { display: block; }
    .sv-resend {
      display: none; width: 100%; text-align: center; margin: 2px 0 4px;
      font-family: 'Pretendard', sans-serif;
      font-size: 12px; color: #B0BEC5;
    }
    .sv-resend.show { display: block; }
    .sv-resend button {
      background: none; border: none; cursor: pointer; padding: 0 0 0 4px;
      font-family: 'Pretendard', sans-serif;
      font-size: 12px; font-weight: 600; color: #78909C;
      text-decoration: underline; text-underline-offset: 2px;
    }
    .sv-resend button:hover { color: #37474F; }
    .sv-demo {
      display: none; width: 100%; margin: 10px 0 2px; padding: 9px 12px;
      background: #FFFDE7; border: 1px dashed #FFE082; border-radius: 10px;
      font-family: 'Pretendard', sans-serif;
      font-size: 12px; color: #8D6E63; text-align: center; letter-spacing: -0.2px;
    }
    .sv-demo.show { display: block; }
    .sv-demo b { font-weight: 800; color: #E65100; letter-spacing: 1px; }
    .sv-actions { width: 100%; display: flex; flex-direction: column; gap: 9px; margin-top: 18px; }

    /* 포인트 적립 완료 */
    .sf-point {
      flex-direction: column; align-items: center; text-align: center;
      width: 100%; max-width: 337px; align-self: center;
      animation: ffResIn 0.28s ease;
    }
    .sp-check {
      width: 72px; height: 72px; border-radius: 50%;
      background: linear-gradient(135deg, #EC407A 0%, #E91E63 100%);
      display: flex; align-items: center; justify-content: center;
      box-shadow: 0 8px 22px rgba(236,64,122,0.32);
      margin-bottom: 22px;
      animation: sfPop 0.44s cubic-bezier(0.34,1.56,0.64,1);
    }
    .sp-check svg { width: 34px; height: 34px; stroke: #fff; }
    .sp-amount {
      font-family: 'Pretendard', sans-serif;
      font-size: 32px; font-weight: 800; color: #EC407A;
      letter-spacing: -1.4px; line-height: 1.1; margin-bottom: 6px;
    }
    .sp-title {
      font-family: 'Pretendard', sans-serif;
      font-size: 18px; font-weight: 700; color: #263238;
      letter-spacing: -0.6px; margin-bottom: 10px;
    }
    .sp-desc {
      font-family: 'Pretendard', sans-serif;
      font-size: 13px; font-weight: 400; color: #90A4AE; line-height: 1.7;
    }
    .sp-actions { width: 100%; margin-top: 28px; }

    /* ── 아이콘 전환 ── */
    .sp-ico-info { display: none; }
    .sf-point.already .sp-ico-check { display: none; }
    .sf-point.already .sp-ico-info  { display: block; }

    /* ── '이미 받음' 상태 ── */
    .sf-point.already .sp-check {
      background: #ECEFF1;
      box-shadow: 0 6px 18px rgba(96,125,139,0.16);
    }
    .sf-point.already .sp-check svg { stroke: #78909C; }
    .sf-point.already .sp-amount { color: #90A4AE; }
    .sf-point.already .sp-title  { color: #455A64; }

    /* '이미 받음' 안내 문구 — 옅은 블루 블록 */
    .sp-desc-ico { display: none; }
    .sf-point.already .sp-desc {
      display: inline-flex; align-items: center; gap: 6px;
      width: auto;
      background: #EEF3FB; border-radius: 10px;
      padding: 10px 14px; margin-top: 4px;
      font-size: 12.5px; font-weight: 500; color: #3D5A80;
      letter-spacing: -0.4px; line-height: 1.5;
      white-space: nowrap;
    }
    .sf-point.already .sp-desc-ico {
      display: block; width: 15px; height: 15px;
      stroke: #4A6B96; flex-shrink: 0;
    }

    /* ── 개발자 전달용 임시 링크 ── */
    .sp-devtoggle {
      margin-top: 18px; padding: 6px 10px;
      background: none; border: none; cursor: pointer;
      font-family: 'Pretendard', sans-serif;
      font-size: 12px; font-weight: 400; color: #CFD8DC;
      text-decoration: underline; text-underline-offset: 3px;
      text-decoration-color: #E0E5EA;
      transition: color 0.15s;
    }
    .sp-devtoggle:hover { color: #90A4AE; }
    .sp-go {
      display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    }
    .sp-go svg { width: 17px; height: 17px; transition: transform 0.18s; }
    .sp-go:hover svg { transform: translateX(3px); }

    /* 완료 화면 버튼 — 세로 배치 */
    .sf-done-actions {
      flex-direction: column; align-items: center;
      width: 100%; max-width: 337px; align-self: center;
      gap: 9px; margin-top: 40px;
      animation: ffResIn 0.34s ease;
    }
    .sf-done-primary {
      width: 100%; height: 54px; border: none; border-radius: 27px;
      background: linear-gradient(90deg, #EC407A 0%, #E91E63 100%);
      color: #fff; cursor: pointer;
      font-family: 'Pretendard', sans-serif;
      font-size: 15px; font-weight: 700; letter-spacing: -0.3px;
      box-shadow: 0 6px 16px rgba(236,64,122,0.32);
      transition: all 0.18s;
    }
    .sf-done-primary:hover { box-shadow: 0 8px 22px rgba(236,64,122,0.42); }
    .sf-done-primary:active { transform: scale(0.98); }
    .sf-done-later {
      width: 100%; height: 54px; border-radius: 27px;
      background: transparent; border: 1.5px solid #E4E8EE;
      cursor: pointer;
      font-family: 'Pretendard', sans-serif;
      font-size: 15px; font-weight: 600; color: #78909C;
      letter-spacing: -0.3px;
      transition: all 0.16s;
    }
    .sf-done-later:hover { border-color: #CFD8DC; color: #546E7A; }
    .sf-done-later:active { transform: scale(0.98); }
    .sf-verify-notice {
      display: none; margin-top: 2px;
      font-family: 'Pretendard', sans-serif;
      font-size: 12px; color: #B0BEC5; letter-spacing: -0.2px;
    }
    .sf-verify-notice.show { display: block; }

    .sf-submit {
      width: 100%; max-width: 337px; align-self: center;
      height: 54px; min-height: 54px; flex-shrink: 0; margin-top: 14px;
      display: flex; align-items: center; justify-content: center;
      background: linear-gradient(90deg, #EC407A 0%, #E91E63 100%);
      border: none; border-radius: 27px; cursor: pointer;
      font-family: 'Pretendard', sans-serif;
      font-size: 15px; font-weight: 700; color: #fff;
      box-shadow: 0 6px 16px rgba(236,64,122,0.32);
      transition: all 0.18s;
    }
    .sf-submit:hover { box-shadow: 0 8px 22px rgba(236,64,122,0.42); }
    .sf-submit:active { transform: scale(0.98); }
    .sf-login-link {
      margin-top: 16px; align-self: center;
      font-family: 'Pretendard', sans-serif;
      font-size: 13px; color: #90A4AE;
    }
    .sf-login-link button {
      background: none; border: none; cursor: pointer;
      font-family: 'Pretendard', sans-serif;
      font-size: 13px; font-weight: 600; color: #EC407A;
    }

    @media (max-width: 767px) {
      .login-popup.show-signup { height: 100vh !important; max-height: 100vh !important; }
    }
    .lf-social svg { width: 24px; height: 24px; }

    /* 모바일 로그인 폼 */
    @media (max-width: 767px) {
      .lf-header { display: none !important; }
      .lf-back-mini, .sf-back-mini, .ff-back-mini { display: none !important; }
      /* 가입 완료 화면 — 위쪽 여백 축소 */
      .sf-body.done-mode { padding-bottom: 20vh; }
      .lf-greeting { font-size: 26px; }
    }

    ::-webkit-scrollbar { width: 4px; }

    /* ── 모바일 스타일: 아래 max-width:640px 통합 ── */

    .mobile-drag-handle {
      display: flex;
      justify-content: center;
      padding: 10px 0 4px;
      cursor: grab;
    }
    .mobile-drag-handle:active { cursor: grabbing; }
    .drag-bar {
      width: 40px; height: 5px;
      background: rgba(0,0,0,0.18);
      border-radius: 3px;
    }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

    /* ═══════════════════════════════════════════
       모바일 반응형 — 로그인 팝업 풀화면
    ═══════════════════════════════════════════ */
    @media (max-width: 767px) {
      /* 오버레이 → 흰 풀화면 */
      .login-popup-overlay {
        background: #ffffff !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
      }
      .login-popup-outer {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        border-radius: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border: none !important;
        box-shadow: none !important;
        transform: scale(1) !important;
      }
      .login-popup-outer::before,
      .login-popup-outer::after { display: none !important; }

      .login-popup {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        box-shadow: none !important;
      }

      /* 기존 플로팅 닫기 버튼 숨김 */
      .popup-float-close { display: none !important; }

      /* 모바일 상단바 (뒤로가기 + X) 표시 */
      .mobile-topbar { display: flex !important; }
      /* X 버튼 비활성 색상 */
      .mobile-topbar .mt-close { color: #CFD8DC !important; }

      /* 로고 숨김 */
      .brand-logo { display: none !important; }

      /* 콘텐츠 — 상단바 아래부터, 세로 중앙 배치 */
      .popup-content {
        padding: 20px 28px 0 !important;
        justify-content: flex-start;
      }
      .popup-title { font-size: 21px !important; margin-bottom: 30px !important; }
      .envelope-container { margin-bottom: 40px !important; transform: scale(0.85); }
      .popup-btn { height: 54px !important; font-size: 15px !important; }

      /* 앱 배지 → 하단 고정, 영역 세로높이 확대 + 좌우로 벌림 */
      .app-badges {
        margin-top: auto !important;
        padding: 34px 12px !important;
        gap: 0 !important;
        justify-content: space-between !important;
        border-top: 1px solid #F0F3F7 !important;
      }
      .app-badge { gap: 10px !important; }
      .app-badge-icon { width: 34px !important; height: 34px !important; }
      .app-badge-icon svg { width: 18px !important; height: 18px !important; }
      .app-badge-text { font-size: 13px !important; font-weight: 700 !important; }

    }