:root {
            --safe-area-top: env(safe-area-inset-top, 0px);
            --safe-area-bottom: env(safe-area-inset-bottom, 0px);
            
            
            
            
            --gray-50: #F9FAFB;
            --gray-100: #F3F4F6;
            --gray-200: #E5E7EB;
            --gray-300: #D1D5DB;
            --gray-400: #9CA3AF;
            --gray-500: #6B7280;
            --gray-600: #4B5563;
            --gray-700: #374151;
            --gray-800: #1F2937;
        }
        
        * { margin: 0; padding: 0; box-sizing: border-box; }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Apple SD Gothic Neo', sans-serif;
            background: #fff;
            color: var(--gray-800);
            min-height: 100vh;
            padding-top: env(safe-area-inset-top, 0px);
            padding-bottom: env(safe-area-inset-bottom, 0px);
        }
        
        /* 헤더 */
        .header {
            display: flex;
            align-items: center;
            padding: 12px 16px;
            background: #fff;
            position: sticky;
            top: 0;
            z-index: 100;
            border-bottom: 1px solid var(--gray-100);
        }
        
        .header-back {
            font-size: 24px;
            cursor: pointer;
            color: var(--gray-500);
            margin-right: 12px;
        }
        
        .header-title {
            font-size: 18px;
            font-weight: 700;
        }
        
        /* 히어로 섹션 */
        .hero {
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
            color: #fff;
            padding: 40px 20px;
            text-align: center;
        }
        
        .hero-icon {
            font-size: 48px;
            margin-bottom: 16px;
        }
        
        .hero-title {
            font-size: 24px;
            font-weight: 700;
            margin-bottom: 8px;
        }
        
        .hero-desc {
            font-size: 14px;
            opacity: 0.9;
            line-height: 1.5;
        }
        
        /* 통계 카드 */
        .stats-row {
            display: flex;
            gap: 12px;
            padding: 20px 16px;
            margin-top: -30px;
        }
        
        .stat-card {
            flex: 1;
            background: #fff;
            border-radius: 16px;
            padding: 20px 16px;
            text-align: center;
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        }
        
        .stat-number {
            font-size: 28px;
            font-weight: 700;
            color: var(--primary);
        }
        
        .stat-label {
            font-size: 12px;
            color: var(--gray-500);
            margin-top: 4px;
        }
        
        /* 섹션 */
        .section {
            padding: 24px 16px;
        }
        
        .section-title {
            font-size: 18px;
            font-weight: 700;
            margin-bottom: 16px;
            color: var(--gray-800);
        }
        
        /* 혜택 리스트 */
        .benefit-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        
        .benefit-item {
            display: flex;
            align-items: center;
            padding: 16px;
            background: var(--gray-50);
            border-radius: 12px;
        }
        
        .benefit-icon {
            width: 44px;
            height: 44px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            margin-right: 14px;
            background: var(--primary-bg);
        }
        
        .benefit-text {
            flex: 1;
        }
        
        .benefit-title {
            font-size: 14px;
            font-weight: 600;
            color: var(--gray-800);
            margin-bottom: 2px;
        }
        
        .benefit-desc {
            font-size: 12px;
            color: var(--gray-500);
        }
        
        /* 멤버십 선택 */
        .membership-cards {
            display: flex;
            flex-direction: column;
            gap: 16px;
        }
        
        .membership-card {
            background: #fff;
            border: 2px solid var(--gray-200);
            border-radius: 16px;
            padding: 20px;
            cursor: pointer;
            transition: all 0.2s;
            position: relative;
        }
        
        .membership-card.selected {
            border-color: var(--primary);
            background: var(--primary-bg);
        }
        
        .membership-card.premium {
            border-color: #F59E0B;
        }
        
        .membership-card.premium.selected {
            background: #FFFBEB;
        }
        
        .membership-badge {
            display: inline-block;
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 700;
            margin-bottom: 12px;
        }
        
        .membership-card.basic .membership-badge {
            background: var(--primary);
            color: #fff;
        }
        
        .membership-card.premium .membership-badge {
            background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
            color: #fff;
        }
        
        .membership-card.trial {
            border-color: #D1FAE5;
        }

        .membership-card.trial.selected {
            border-color: #10B981;
            background: #ECFDF5;
        }

        .membership-card.trial .membership-badge {
            background: #10B981;
            color: #fff;
        }

        .membership-card.trial.selected .membership-check {
            color: #10B981;
        }
        
        .membership-name {
            font-size: 18px;
            font-weight: 700;
            margin-bottom: 4px;
        }
        
        .membership-price {
            font-size: 14px;
            color: var(--gray-500);
            margin-bottom: 4px;
        }
        
        .membership-price strong {
            font-size: 20px;
            color: var(--primary);
        }

        .membership-price-sub {
            font-size: 12px;
            color: var(--gray-400);
            margin-bottom: 12px;
        }

        /* 프리미엄 자리 현황 */
        .premium-slot {
            display: flex;
            align-items: center;
            gap: 5px;
            background: #fff;
            border: 1.5px solid #E5E7EB;
            border-radius: 10px;
            padding: 8px 8px;
            transition: all 0.2s;
            overflow: hidden;
        }
        .premium-slot .slot-icon {
            font-size: 15px;
            flex-shrink: 0;
        }
        .premium-slot .slot-name {
            font-size: 11px;
            font-weight: 600;
            color: #374151;
            flex: 1;
            min-width: 0;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .premium-slot .slot-blocks {
            display: flex;
            align-items: center;
            flex-shrink: 0;
        }
        .premium-slot .slot-status {
            font-size: 10px;
            font-weight: 700;
            padding: 2px 5px;
            border-radius: 20px;
            flex-shrink: 0;
            white-space: nowrap;
        }
        @keyframes slotPulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.6; }
        }
        
        .membership-features {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }
        
        .membership-feature {
            font-size: 12px;
            padding: 4px 10px;
            background: var(--gray-100);
            border-radius: 12px;
            color: var(--gray-600);
        }
        
        .membership-card.selected .membership-feature {
            background: rgba(124, 58, 237, 0.15);
            color: var(--primary);
        }
        
        .membership-check {
            position: absolute;
            top: 16px;
            right: 16px;
            width: 24px;
            height: 24px;
            border-radius: 50%;
            border: 2px solid var(--gray-300);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            color: transparent;
        }
        
        .membership-card.selected .membership-check {
            background: var(--primary);
            border-color: var(--primary);
            color: #fff;
        }
        
        .membership-card.premium.selected .membership-check {
            background: #F59E0B;
            border-color: #F59E0B;
        }
        
        /* 가입 폼 */
        .form-section {
            background: var(--gray-50);
            padding: 24px 16px;
        }
        
        .form-group {
            margin-bottom: 16px;
        }
        
        .form-label {
            display: block;
            font-size: 13px;
            font-weight: 600;
            color: var(--gray-700);
            margin-bottom: 6px;
        }
        
        .form-label .required {
            color: #EF4444;
        }
        
        .form-input {
            width: 100%;
            padding: 14px 16px;
            border: 1px solid var(--gray-200);
            border-radius: 12px;
            font-size: 15px;
            outline: none;
            transition: border-color 0.2s;
            background: #fff;
        }
        
        .form-input:focus {
            border-color: var(--primary);
        }
        
        .form-input::placeholder {
            color: var(--gray-400);
        }
        
        /* 가게 검색 */
        .store-search-wrap {
            position: relative;
        }
        
        .store-search-results {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: #fff;
            border: 1px solid var(--gray-200);
            border-radius: 12px;
            max-height: 200px;
            overflow-y: auto;
            z-index: 10;
            display: none;
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        }
        
        .store-search-results.show {
            display: block;
        }
        
        .store-search-item {
            padding: 12px 16px;
            cursor: pointer;
            border-bottom: 1px solid var(--gray-100);
        }
        
        .store-search-item:last-child {
            border-bottom: none;
        }
        
        .store-search-item:hover {
            background: var(--gray-50);
        }
        
        .store-search-name {
            font-size: 14px;
            font-weight: 600;
            margin-bottom: 2px;
        }
        
        .store-search-addr {
            font-size: 12px;
            color: var(--gray-500);
        }
        
        /* 선택된 가게 */
        .selected-store {
            display: none;
            background: var(--primary-bg);
            border: 2px solid var(--primary);
            border-radius: 12px;
            padding: 14px 16px;
        }
        
        .selected-store.show {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        
        .selected-store-info {
            flex: 1;
        }
        
        .selected-store-name {
            font-size: 15px;
            font-weight: 600;
            color: var(--primary);
        }
        
        .selected-store-addr {
            font-size: 12px;
            color: var(--gray-500);
        }
        
        .selected-store-change {
            font-size: 13px;
            color: var(--primary);
            font-weight: 600;
            cursor: pointer;
        }
        
        /* 제출 버튼 */
        .submit-btn {
            width: 100%;
            padding: 16px;
            background: var(--primary);
            color: #fff;
            border: none;
            border-radius: 12px;
            font-size: 16px;
            font-weight: 700;
            cursor: pointer;
            transition: background 0.2s;
            margin-top: 8px;
        }
        
        .submit-btn:hover {
            background: var(--primary-dark);
        }
        
        .submit-btn:disabled {
            background: var(--gray-300);
            cursor: not-allowed;
        }
        
        /* 하단 안내 */
        .footer-info {
            padding: 24px 16px;
            text-align: center;
        }
        
        .footer-text {
            font-size: 12px;
            color: var(--gray-400);
            line-height: 1.6;
        }
        
        /* FAQ */
        .faq-item {
            background: #fff;
            border-radius: 12px;
            margin-bottom: 12px;
            overflow: hidden;
            border: 1px solid var(--gray-200);
        }
        
        .faq-question {
            padding: 16px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .faq-question::after {
            content: '+';
            font-size: 20px;
            color: var(--gray-400);
        }
        
        .faq-item.open .faq-question::after {
            content: '−';
        }
        
        .faq-answer {
            display: none;
            padding: 0 16px 16px;
            font-size: 13px;
            color: var(--gray-600);
            line-height: 1.6;
        }
        
        .faq-item.open .faq-answer {
            display: block;
        }
        
        /* 성공사례 */
        .success-card {
            background: var(--gray-50);
            border-radius: 12px;
            padding: 16px;
            margin-bottom: 12px;
        }
        
        .success-header {
            display: flex;
            align-items: center;
            margin-bottom: 12px;
        }
        
        .success-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: var(--primary-bg);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            margin-right: 12px;
        }
        
        .success-name {
            font-size: 14px;
            font-weight: 600;
        }
        
        .success-category {
            font-size: 12px;
            color: var(--gray-500);
        }
        
        .success-quote {
            font-size: 13px;
            color: var(--gray-600);
            line-height: 1.6;
            font-style: italic;
        }

        /* 스텝 타이틀 */
        .form-step-title {
            font-size: 15px;
            font-weight: 700;
            color: var(--gray-800);
            margin: 24px 0 14px;
            padding-bottom: 8px;
            border-bottom: 2px solid var(--primary);
        }
        .form-step-title:first-child,
        .form-group + .form-step-title:first-of-type {
            margin-top: 0;
        }

        /* 2열 레이아웃 */
        .form-row {
            display: flex;
            gap: 12px;
        }
        .form-half {
            flex: 1;
            min-width: 0;
        }

        /* 셀렉트 */
        .form-select {
            appearance: none;
            -webkit-appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239CA3AF' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 14px center;
            padding-right: 36px;
        }

        /* 힌트 텍스트 */
        .form-hint {
            font-size: 12px;
            margin-top: 4px;
            min-height: 16px;
        }
        .form-hint.success { color: #10B981; }
        .form-hint.error { color: #EF4444; }
        .form-hint.info { color: var(--gray-500); }

        /* 인풋+버튼 조합 */
        .input-with-btn {
            display: flex;
            gap: 8px;
        }
        .input-with-btn .form-input {
            flex: 1;
        }
        .check-btn {
            white-space: nowrap;
            padding: 0 16px;
            border: 1px solid var(--primary);
            background: #fff;
            color: var(--primary);
            border-radius: 12px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }
        .check-btn:hover {
            background: var(--primary);
            color: #fff;
        }

        /* 파일 업로드 */
        .file-upload-area {
            border: 2px dashed var(--gray-300);
            border-radius: 12px;
            overflow: hidden;
            transition: border-color 0.2s;
        }
        .file-upload-area.dragover {
            border-color: var(--primary);
            background: var(--primary-bg);
        }
        .file-upload-placeholder {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 24px 16px;
            cursor: pointer;
            text-align: center;
        }
        .file-upload-icon {
            font-size: 32px;
            margin-bottom: 8px;
        }
        .file-upload-text {
            font-size: 14px;
            color: var(--gray-600);
            font-weight: 500;
        }
        .file-upload-hint {
            font-size: 12px;
            color: var(--gray-400);
            margin-top: 4px;
        }
        .file-upload-preview {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 14px 16px;
            background: var(--primary-bg);
        }
        .file-preview-name {
            font-size: 13px;
            font-weight: 500;
            color: var(--primary);
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            flex: 1;
        }
        .file-preview-remove {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            background: var(--gray-200);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 14px;
            color: var(--gray-600);
            margin-left: 12px;
            flex-shrink: 0;
        }

        /* 약관 동의 */
        .agreement-section {
            background: #fff;
            border-radius: 12px;
            border: 1px solid var(--gray-200);
            padding: 16px;
            margin-bottom: 16px;
        }
        .agreement-all,
        .agreement-item {
            display: flex;
            align-items: center;
            cursor: pointer;
            padding: 10px 0;
            gap: 10px;
        }
        .agreement-all { padding-bottom: 12px; }
        .agreement-all input,
        .agreement-item input {
            display: none;
        }
        .agreement-check {
            width: 22px;
            height: 22px;
            border: 2px solid var(--gray-300);
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            transition: all 0.15s;
        }
        .agreement-check::after {
            content: '✓';
            font-size: 13px;
            color: transparent;
            font-weight: 700;
        }
        input:checked + .agreement-check {
            background: var(--primary);
            border-color: var(--primary);
        }
        input:checked + .agreement-check::after {
            color: #fff;
        }
        .agreement-text-all {
            font-size: 15px;
            font-weight: 700;
            color: var(--gray-800);
            flex: 1;
        }
        .agreement-text {
            font-size: 13px;
            color: var(--gray-700);
            flex: 1;
        }
        .agreement-link {
            font-size: 12px;
            color: var(--primary);
            text-decoration: underline;
            flex-shrink: 0;
        }
        .agreement-divider {
            height: 1px;
            background: var(--gray-200);
            margin-bottom: 4px;
        }

        /* 안내 문구 */
        .form-notice {
            text-align: center;
            font-size: 12px;
            color: var(--gray-400);
            margin-top: 12px;
        }

/* ===== 반응형: 소형 모바일 ===== */
@media (max-width: 360px) {
    .hero-title { font-size: 20px; }
    .hero-desc { font-size: 13px; }
    .section-title { font-size: 16px; }
    .form-input, .form-select { font-size: 14px; padding: 12px 14px; }
    .form-label { font-size: 12px; }
    .submit-btn { font-size: 14px; padding: 14px; }
    .form-section { padding: 20px 12px; }
    .selected-store-name { font-size: 14px; }
    .store-search-name { font-size: 13px; }
    .form-step-title { font-size: 13px; }
    .form-row { flex-direction: column; gap: 0; }
    .check-btn { font-size: 12px; padding: 0 12px; }
    .agreement-text { font-size: 12px; }
    .agreement-text-all { font-size: 14px; }
    .file-upload-text { font-size: 13px; }
    .membership-name { font-size: 16px; }
    .membership-price strong { font-size: 18px; }
    .stat-number { font-size: 24px; }
}

@media (min-width: 361px) and (max-width: 390px) {
    .hero-title { font-size: 22px; }
    .form-input, .form-select { font-size: 14px; }
    .submit-btn { font-size: 15px; }
    .form-step-title { font-size: 14px; }
}

/* ============================================
   PC 레이아웃: 모바일 폰 프레임 (769px 이상)
   ============================================ */
@media (min-width: 769px) {
  html {
    background: #F5F3FF;
  }

  body {
    max-width: 430px;
    margin: 0 auto;
    background: #fff;
    position: relative;
    box-shadow: 0 0 60px rgba(124, 58, 237, 0.08),
                0 0 15px rgba(0, 0, 0, 0.05);
    border-left: 1px solid rgba(124, 58, 237, 0.08);
    border-right: 1px solid rgba(124, 58, 237, 0.08);
  }
}
