/* ===== RESET & VARIABLES (Modern Refined Premium) ===== */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* ===== iOS 300ms 터치 지연 제거 + 앱 네이티브 터치 응답성 ===== */
a, button, [role="button"], input[type="submit"], input[type="button"],
label, .nav-item, .cat-item, .studio-card, .room-card, [onclick] {
    touch-action: manipulation;      /* 더블탭 줌 비활성화 → 300ms 지연 제거 */
    -webkit-touch-callout: none;     /* 롱프레스 시스템 메뉴 방지 */
    cursor: pointer;
}

/* 터치 시 즉각적인 시각 피드백 (눌린 느낌) */
button:active, a:active, [role="button"]:active,
.nav-item:active, .cat-item:active, .studio-card:active,
.room-card:active, .bm-confirm:active, .cta-btn:active {
    opacity: 0.75;
    transform: scale(0.98);
    transition: opacity 0.05s, transform 0.05s;
}

:root {
    --bg-primary: #FFFFFF;
    --bg-secondary: #F5F5F7;
    --bg-card: #FFFFFF;
    --accent: #7C3AED;
    --accent-light: #A78BFA;
    --accent-glow: rgba(124, 58, 237, 0.1);
    --accent-bg: #F3EEFF;
    --gold: #C9A84C;
    --gold-bg: #FBF5E6;
    --dark-card: #1F1135;
    --text-primary: #111827;
    --text-secondary: #4B5563;
    --text-muted: #9CA3AF;
    --border: #F0F0F0;
    --border-light: #F3F4F6;
    --success: #059669;
    --warning: #D97706;
    --error: #DC2626;
    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.07), 0 2px 6px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.09), 0 4px 12px rgba(0, 0, 0, 0.04);
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    /* 노치·홈바 영역을 앱 흰색 배경으로 채워 자연스럽게 이어지게 함 */
    background: var(--bg-primary);
    /* iOS safe area를 전체 뷰포트에서 인식하도록 설정 */
    -webkit-text-size-adjust: 100%;
}

html, body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* 앱 느낌의 부드러운 모멘텀 스크롤 */
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    /* 텍스트 드래그 방지 (버튼·아이콘 등 UI 요소) */
    -webkit-user-select: none;
    user-select: none;
}

/* 실제 텍스트 콘텐츠는 선택 허용 */
p, h1, h2, h3, h4, h5, h6, span, a, label, input, textarea, select {
    -webkit-user-select: text;
    user-select: text;
}

/* ===== APP CONTAINER ===== */
.app {
    max-width: 520px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    background: #F5F5F7;
    /* 상단: 노치/다이나믹아일랜드 safe-area + 최소 여백 */
    padding: calc(env(safe-area-inset-top, 0px) + 12px) 20px 0;
    /* 하단: 바텀 네비 높이(~70px) + 여유(16px) + 홈바 영역 */
    padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
}

/* Main content area that grows to push footer down */
.page-body {
    flex: 1;
}

/* ===== HEADER ===== */
.header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    margin-bottom: 8px;
    padding-top: 6px;
    min-height: 44px;
}

.header .header-icons {
    grid-column: 3;
    justify-self: end;
    display: flex;
    gap: 14px;
    align-items: center;
}

.logo {
    grid-column: 2;
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    line-height: 1;
    text-align: center;
}

.logo span { color: var(--accent); }

.header-icons {
    display: flex;
    gap: 14px;
    align-items: center;
}

.icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 1px solid #E2DDD4;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.icon-btn:hover {
    background: var(--accent-bg);
}

.icon-btn svg {
    width: 17px;
    height: 17px;
    stroke: var(--text-secondary);
}

/* ===== SECTION TITLE ===== */
.section-title {
    font-size: 20px;
    font-weight: 800;
    margin-top: 16px;
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-primary);
    letter-spacing: -0.6px;
}

.section-title a {
    font-size: 13px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0;
}

/* ===== HERO CAROUSEL ===== */
.hero-carousel {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    margin: 0;
    margin-bottom: 4px;
    box-shadow: 0 6px 24px rgba(91, 45, 142, 0.22), 0 2px 6px rgba(0, 0, 0, 0.08);
}

.carousel-track {
    display: flex;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.carousel-slide {
    min-width: 100%;
    padding: 24px 24px;
    position: relative;
    overflow: hidden;
    aspect-ratio: 2.4 / 1;
    display: flex;
    align-items: center;
}


/* Image-based banner slides (admin dynamic banners) */
.carousel-slide[style*="padding:0"] {
    padding: 0;
}
.carousel-slide[style*="padding:0"]::before,
.carousel-slide[style*="padding:0"]::after {
    display: none;
}
.carousel-slide a {
    display: block;
    width: 100%;
    height: 100%;
}

/* 슬라이드별 그라데이션 배경 */
.slide-brand {
    background: linear-gradient(
        115deg,
        #2D1B4E 0%,
        #4A2474 42%,
        #5B2D8E 72%,
        #7B4DC0 100%
    );
}
.slide-night {
    background: linear-gradient(135deg, #2D1B4E 0%, #2D1B4E 50%, #4A2474 100%);
}
.slide-event {
    background: linear-gradient(135deg, #5B2D8E 0%, #DB2777 50%, #F97316 100%);
}

/* 장식 원형 */
.carousel-slide::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 180px;
    height: 180px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 50%;
    pointer-events: none;
}
.carousel-slide::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -8%;
    width: 130px;
    height: 130px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    pointer-events: none;
}

/* 배너 우측 피아노 데코 */
.slide-deco {
    position: absolute;
    right: 16px;
    bottom: -6px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.32;
    transform: rotate(-4deg);
}
.slide-deco svg {
    display: block;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.25));
}

.slide-content {
    position: relative;
    z-index: 1;
}

/* 배너 슬라이드 콘텐츠 */
.slide-content-splash {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.slide-eyebrow {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 500;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    margin-bottom: 8px;
    line-height: 1;
}

.slide-headline {
    font-size: 22px;
    font-weight: 900;
    color: #fff;
    letter-spacing: -1px;
    line-height: 1.22;
    margin-bottom: 14px;
}

/* 하위 호환 — 기존 동적 배너에서 쓰는 경우 대비 */
.splash-logo-banner {
    font-size: 44px;
    font-weight: 900;
    color: #fff;
    letter-spacing: -2px;
    line-height: 1;
    margin-bottom: 6px;
}
.splash-logo-banner span { color: rgba(255,255,255,0.5); }
.splash-sub-banner {
    font-size: 13px;
    color: rgba(255,255,255,0.65);
    letter-spacing: 0.5px;
    font-weight: 400;
    margin-bottom: 18px;
    line-height: 1;
}

.carousel-slide h2 {
    font-size: 23px;
    font-weight: 800;
    margin-bottom: 8px;
    color: #FFFFFF;
    letter-spacing: -0.6px;
    line-height: 1.25;
}

.carousel-slide p {
    font-size: 14px;
    opacity: 0.85;
    margin-bottom: 22px;
    color: #FFFFFF;
    line-height: 1.6;
    font-weight: 400;
}

.hero-btn {
    display: inline-block;
    background: #FFFFFF;
    color: var(--accent);
    padding: 9px 18px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    position: relative;
    z-index: 1;
    transition: transform var(--transition), box-shadow var(--transition);
    letter-spacing: -0.1px;
    white-space: nowrap;
}
.hero-btn:hover { transform: scale(1.03); box-shadow: 0 4px 16px rgba(0,0,0,0.12); }

/* 페이지네이션 점 */
.carousel-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.carousel-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dots .dot.active {
    background: #FFFFFF;
    width: 24px;
    border-radius: 4px;
}

/* ===== CATEGORY GRID (4 top + 3 bottom centered) ===== */
.category-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 0;
    padding: 10px 0 14px;
    gap: 16px 0;
}
.category-grid::-webkit-scrollbar { display: none; }

.category-grid .cat-item {
    width: 25%;
    min-width: 0;
}

.cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    cursor: pointer;
    transition: transform var(--transition);
    -webkit-tap-highlight-color: transparent;
    padding: 2px 0;
}

.cat-item:hover {
    transform: translateY(-2px);
}

.cat-item:active {
    transform: scale(0.95);
}

.cat-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: #EDEAD4;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    box-shadow: none;
}

.cat-icon img {
    width: 40px;
    height: 40px;
    pointer-events: none;
}
.cat-icon--piano img {
    width: 32px;
    height: 32px;
}

.cat-item:hover .cat-icon {
    background: #E2DDD4;
    box-shadow: none;
}

.cat-item span {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.2;
    letter-spacing: -0.2px;
    white-space: nowrap;
}

/* 전체 카테고리 — SVG 인라인 아이콘 지원 */
.cat-icon-svg {
    background: #EDEAD4;
}
.cat-icon-svg svg {
    width: 40px;
    height: 40px;
    pointer-events: none;
}

/* trailing spacer - not needed */
.cat-scroll-end {
    display: none;
}

.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ===== STUDIO CARD ===== */
.studio-card {
    background: #FFFFFF;
    border: 1px solid #ECEAE2;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 16px;
    transition: all var(--transition);
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
}

.studio-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.10), 0 2px 8px rgba(0, 0, 0, 0.05);
}

.studio-image {
    height: 120px;
    background: linear-gradient(135deg, var(--accent-bg) 0%, var(--bg-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    position: relative;
    overflow: hidden;
}

.studio-image > img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.studio-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 4px 9px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    line-height: 1.4;
    pointer-events: none;
}
/* Rating badge — amber */
.studio-badge.badge-rating {
    background: rgba(245, 158, 11, 0.92);
    color: #fff;
}
/* New studio badge — emerald */
.studio-badge.badge-new {
    background: rgba(5, 150, 105, 0.92);
    color: #fff;
}
/* Popular / promoted badge — purple */
.studio-badge.badge-popular {
    background: rgba(91, 45, 142, 0.90);
    color: #fff;
}
/* Discount badge — rose */
.studio-badge.badge-discount {
    background: rgba(220, 38, 38, 0.90);
    color: #fff;
}

.studio-like {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 1;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
}

.studio-like:hover { background: var(--accent); }
.studio-like:hover svg { stroke: white; }
.studio-like svg { width: 18px; height: 18px; stroke: var(--text-secondary); fill: none; }
.studio-like.liked svg { fill: var(--accent); stroke: var(--accent); }

.studio-info { padding: 10px 12px 12px; }

/* Row 1: 이름 + 별점 pill */
.studio-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
}
.studio-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}
.studio-rating-pill {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    background: #FBF5E6;
    border-radius: 20px;
    padding: 2px 8px;
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    color: #D97706;
}
.studio-rating-pill .rp-count {
    font-size: 10px;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 1px;
}

/* Row 2: 주소 */
.studio-address {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}

/* Row 3: 역 도보 */
.studio-station-row {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 7px;
}

/* Row 4: 가격 */
.studio-price-row {
    font-size: 13px;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: -0.3px;
    text-align: right;
}
.price-note {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-muted);
}

/* legacy — unused */
.studio-inline-rating { display: none; }
.studio-combined { display: none; }
.studio-station { display: none; }
.studio-meta { display: none; }
.studio-station-chip { display: none; }
.studio-price { display: none; }

/* ===== PREMIUM SPOT CARD ===== */
.premium-card {
    border: 2px solid #C9A84C;
    box-shadow: 0 2px 12px rgba(229, 197, 0, 0.14), 0 0 0 0px rgba(0,0,0,0.04);
}

.premium-card:hover {
    border-color: #C9A84C;
    box-shadow: 0 10px 30px rgba(229, 197, 0, 0.22), 0 2px 8px rgba(0,0,0,0.05);
}

.premium-card .studio-image {
    background: linear-gradient(135deg, #FBF5E6 0%, #FBF5E6 50%, var(--bg-secondary) 100%);
}

.badge-premium {
    background: linear-gradient(135deg, #C9A84C, #C9A84C) !important;
    color: #2D1B4E !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px;
    padding: 5px 14px !important;
    font-size: 11px !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(229, 197, 0, 0.3);
}

/* ===== PLUS UP CARD ===== */
.plusup-card {
    /* uses base studio-card shadow, no extra border */
}

/* 거리 라벨 */
.distance-label {
    display: inline-block;
    font-size: 10px;
    font-weight: 500;
    color: #999999;
    background: #EEEAE2;
    padding: 2px 7px;
    border-radius: 6px;
    margin-left: 5px;
    vertical-align: middle;
}

.location-notice {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--accent-bg);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    margin: -4px 0 12px;
}
.location-notice svg {
    flex-shrink: 0;
    color: var(--accent);
}

.badge-plusup {
    background: var(--bg-secondary) !important;
    color: var(--text-secondary) !important;
    font-weight: 600 !important;
    font-size: 10px !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
    border: 1px solid var(--border);
    letter-spacing: 0.5px;
}

/* ===== SEARCH ===== */
.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 1.5px solid transparent;
    border-radius: 50px;
    padding: 16px 22px;
    margin-bottom: 24px;
    transition: all var(--transition);
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); background: white; }
.search-box svg { width: 20px; height: 20px; stroke: var(--text-muted); margin-right: 12px; flex-shrink: 0; }
.search-box input { flex: 1; background: none; border: none; outline: none; font-size: 15px; color: var(--text-primary); font-family: inherit; }
.search-box input::placeholder { color: var(--text-muted); }

.filter-section { margin-bottom: 28px; }
.filter-title { font-size: 14px; font-weight: 600; color: var(--text-secondary); margin-bottom: 14px; }

.price-range { display: flex; gap: 12px; align-items: center; }
.price-input { flex: 1; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; font-size: 14px; color: var(--text-primary); font-family: inherit; outline: none; transition: border-color var(--transition); }
.price-input:focus { border-color: var(--accent); }

.search-btn { width: 100%; background: var(--accent); border: none; border-radius: var(--radius-md); padding: 17px; font-size: 16px; font-weight: 600; color: white; cursor: pointer; transition: all var(--transition); margin-top: 24px; }

/* ===== SEARCH PAGE HEADER ===== */
/* 검색 페이지: .app의 padding-top을 0으로 리셋하고 search-header가 safe-area 직접 처리 */
.search-page .app {
    padding-top: 0;
}

.search-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg-primary);
    margin: 0 -12px 0;
    padding: calc(env(safe-area-inset-top, 0px) + 8px) 12px 8px;
    border-bottom: 1px solid var(--border-light);
}

.search-header-bar {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-back-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all var(--transition);
}
.search-back-btn:hover { background: var(--accent-bg); }
.search-back-btn svg { width: 19px; height: 19px; stroke: var(--text-secondary); }

.search-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    height: 42px;
    background: var(--bg-secondary);
    border: 1.5px solid transparent;
    border-radius: 50px;
    padding: 0 16px;
    transition: all var(--transition);
}
.search-input-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); background: white; }
.search-input-wrap svg { width: 17px; height: 17px; stroke: var(--text-muted); margin-right: 10px; flex-shrink: 0; }
.search-input-wrap input { flex: 1; background: none; border: none; outline: none; font-size: 14px; color: var(--text-primary); font-family: inherit; line-height: 1; }
.search-input-wrap input::placeholder { color: var(--text-muted); }

.map-header-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all var(--transition);
    text-decoration: none;
}
.map-header-btn:hover { background: var(--accent-bg); }
.map-header-btn svg { width: 19px; height: 19px; stroke: var(--text-secondary); }

.filter-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all var(--transition);
}
.filter-toggle-btn:hover { background: var(--accent-bg); }
.filter-toggle-btn svg { width: 19px; height: 19px; stroke: var(--text-secondary); }

.filter-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
    opacity: 0;
    margin-top: 0;
}
.filter-panel.open {
    max-height: 600px;
    opacity: 1;
    margin-top: 16px;
    overflow-y: auto;
}
.filter-panel .filter-section { margin-bottom: 16px; }
.filter-panel .search-btn { margin-top: 8px; padding: 14px; font-size: 15px; }

.filter-group { margin-bottom: 18px; }
.filter-group-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    letter-spacing: -0.2px;
}

.filter-footer {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.filter-reset-btn {
    flex: 1;
    padding: 14px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: all var(--transition);
}
.filter-reset-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-apply-btn {
    flex: 2;
    padding: 14px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    background: var(--accent);
    border: none;
    color: white;
    transition: all var(--transition);
}
.filter-apply-btn:hover { filter: brightness(1.08); box-shadow: 0 4px 16px rgba(91, 45, 142, 0.25); }

/* ===== STICKY SORT ACTION BAR ===== */
/* search-header 높이: padding-top(safe-area+8) + bar(42px) + padding-bottom(8) + border(1) = safe-area + 59px */
.sort-action-bar {
    position: sticky;
    top: calc(env(safe-area-inset-top, 0px) + 59px);
    z-index: 9;
    background: var(--bg-primary);
    margin: 0 -12px 12px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

/* [A] Sort Dropdown */
.sort-select-wrapper {
    position: relative;
    flex-shrink: 0;
}
.sort-select-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 4px;
    background: transparent;
    border: none;
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.15s;
    white-space: nowrap;
}
.sort-select-btn:hover { opacity: 0.8; }
.sort-select-btn .sort-select-icon { font-size: 15px; }
.sort-chevron {
    width: 16px;
    height: 16px;
    stroke: var(--accent);
    flex-shrink: 0;
    transition: transform 0.2s;
}

/* PC Dropdown Menu */
.sort-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    min-width: 180px;
    z-index: 100;
    overflow: hidden;
}
.sort-dropdown-menu.open { display: block; }
.sort-dropdown-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 18px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
    transition: background 0.15s;
}
.sort-dropdown-option:hover { background: var(--bg-secondary); }
.sort-dropdown-option.active {
    color: var(--accent);
    font-weight: 700;
}
.sort-dropdown-option:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* [B][C] Action Bar Buttons (Filter + Map) */
.action-bar-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: transparent;
    border: none;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    height: 36px;
}
.action-bar-btn svg {
    width: 18px;
    height: 18px;
    stroke: #333;
    flex-shrink: 0;
}
.action-bar-btn:hover {
    background: var(--bg-secondary);
    color: var(--accent);
}
.action-bar-btn:hover svg { stroke: var(--accent); }

.map-action-btn {
    margin-left: auto;
}

/* ===== Mobile Sort Bottom Sheet ===== */
.sort-sheet-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.25s;
}
.sort-sheet-overlay.open {
    display: block;
    opacity: 1;
}
.sort-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 20px 20px 0 0;
    padding: 8px 0 24px 0;
    z-index: 1000;
    max-height: 60vh;
}
.sort-sheet-overlay:not(.open) .sort-sheet {
    display: none;
}
.sort-sheet-handle {
    width: 40px;
    height: 4px;
    background: #CFC9BE;
    border-radius: 2px;
    margin: 8px auto 16px;
}
.sort-sheet-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    padding: 0 20px 16px;
    border-bottom: 1px solid var(--border-light);
}
.sort-sheet-options { padding: 8px 0; }
.sort-sheet-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
    transition: background 0.15s;
}
.sort-sheet-option:active { background: var(--bg-secondary); }
.sort-sheet-option.active { color: var(--accent); font-weight: 700; }
.sort-sheet-option .sso-icon { font-size: 18px; width: 24px; text-align: center; }
.sort-sheet-option .sso-check { margin-left: auto; font-size: 16px; }
.sort-sheet-option:disabled { opacity: 0.4; cursor: not-allowed; }

/* Hide bottom sheet on PC, hide dropdown on mobile */
@media (min-width: 769px) {
    .sort-sheet-overlay { display: none !important; }
}
@media (max-width: 768px) {
    .sort-dropdown-menu { display: none !important; }
}

/* Legacy sort-chip classes (kept for any other pages) */
.sort-chip {
    flex-shrink: 0;
    padding: 7px 16px;
    border-radius: 20px;
    border: 1.5px solid var(--border);
    background: var(--bg-primary);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    white-space: nowrap;
}
.sort-chip:hover {
    border-color: var(--accent-light);
    color: var(--accent);
}
.sort-chip.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.sort-chip:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.sort-chip:disabled:hover {
    border-color: var(--border);
    color: var(--text-secondary);
}

/* ===== PARTNER VERIFICATION BANNER ===== */
.partner-verified-banner {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #5B2D8E, #5B2D8E);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 14px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(91, 45, 142, 0.35);
    letter-spacing: -0.2px;
}
.partner-verified-banner svg {
    stroke: #fff;
    flex-shrink: 0;
}

.chip {
    flex-shrink: 0;
    padding: 9px 18px;
    background: var(--bg-secondary);
    border: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
}
.chip.active, .chip:hover {
    background: var(--accent);
    color: #FFFFFF;
    font-weight: 600;
}

/* Section divider — used on other pages */
.section-divider {
    height: 0;
    background: transparent;
    margin: 0 0 28px;
    border: none;
}

/* 홈 페이지 섹션 간 공백 — 회색 선 제거, 여백만 유지 */
.section-gap {
    height: 0;
    background: transparent;
    margin: 0 0 20px;
    border: none;
}
.section-gap--sm {
    margin-bottom: 12px;
}

/* 홈 카테고리 ↔ 내 주변 연습실 사이 프로모 배너 */
.search-btn:hover { filter: brightness(1.08); box-shadow: 0 4px 16px rgba(91, 45, 142, 0.25); }

/* ===== MAP ===== */
.map-page .app {
    padding: 0;
    padding-bottom: 80px;
}
.map-page .header {
    padding: 16px 20px;
}
.map-container {
    width: 100%;
    height: calc(100vh - 56px - 80px);
    position: relative;
    overflow: hidden;
}

.map-placeholder { text-align: center; color: var(--text-secondary); }
.map-placeholder svg { width: 60px; height: 60px; stroke: var(--text-muted); margin-bottom: 16px; }
.map-placeholder p { font-size: 14px; }

.map-bottom-sheet {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 400px;
    background: var(--bg-card);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 20px 24px;
    border: none;
    border-bottom: none;
    box-shadow: 0 -8px 32px rgba(0,0,0,0.1), 0 -2px 8px rgba(0,0,0,0.05);
    z-index: 50;
    max-height: 200px;
    overflow-y: auto;
}

.sheet-handle { width: 40px; height: 4px; background: var(--border); border-radius: 2px; margin: 0 auto 18px; }

/* ===== BOOKING ===== */
.booking-tabs { display: flex; background: var(--bg-secondary); border-radius: var(--radius-md); padding: 4px; margin-bottom: 28px; }
.booking-tab { flex: 1; padding: 13px; text-align: center; font-size: 14px; font-weight: 500; color: var(--text-secondary); border-radius: var(--radius-sm); cursor: pointer; transition: all var(--transition); }
.booking-tab.active { background: var(--accent); color: white; box-shadow: var(--shadow-sm); }

.booking-card { background: var(--bg-card); border: none; border-radius: 18px; padding: 16px; margin-bottom: 14px; box-shadow: 0 2px 12px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.04); transition: box-shadow var(--transition); }
.booking-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.09); }
.booking-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; gap: 10px; }
.booking-header > div { flex: 1; min-width: 0; }
.booking-studio { font-size: 17px; font-weight: 700; margin-bottom: 5px; color: var(--text-primary); word-break: keep-all; overflow-wrap: break-word; letter-spacing: -0.2px; }
.booking-room { font-size: 13px; color: var(--text-muted); font-weight: 400; }

.booking-status { padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 600; flex-shrink: 0; white-space: nowrap; }
.booking-status.confirmed { background: rgba(5, 150, 105, 0.08); color: var(--success); }
.booking-status.cancelled { background: rgba(220, 38, 38, 0.08); color: var(--error); }
.booking-status.completed { background: rgba(90, 90, 114, 0.08); color: var(--text-secondary); }

.booking-details { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.booking-detail { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary); }
.booking-detail svg { width: 16px; height: 16px; stroke: var(--text-muted); }

.booking-actions { display: flex; gap: 10px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.booking-action-btn { flex: 1; padding: 13px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; cursor: pointer; transition: all var(--transition); }
.booking-action-btn.primary { background: var(--accent); border: none; color: white; }
.booking-action-btn.primary:hover { filter: brightness(1.08); box-shadow: 0 4px 12px rgba(91, 45, 142, 0.2); }
.booking-action-btn.secondary { background: transparent; border: 1px solid var(--border); color: var(--text-secondary); }
.booking-action-btn.secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ===== PROFILE ===== */
.profile-header { text-align: center; margin-bottom: 32px; }

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 18px;
    border: 4px solid var(--bg-card);
    box-shadow: 0 0 0 3px var(--accent-glow), 0 8px 24px rgba(91, 45, 142, 0.2);
    color: #FFFFFF;
}

.profile-name { font-size: 22px; font-weight: 800; margin-bottom: 5px; color: var(--text-primary); letter-spacing: -0.4px; }
.profile-email { font-size: 14px; color: var(--text-muted); font-weight: 400; }

.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 32px; }
.stat-card { background: var(--bg-card); border: none; border-radius: 16px; padding: 22px 12px; text-align: center; box-shadow: 0 2px 10px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.03); transition: box-shadow var(--transition); }
.stat-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.09); }
.stat-value { font-size: 26px; font-weight: 800; color: var(--accent); margin-bottom: 5px; letter-spacing: -0.5px; }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 500; }

/* 메뉴 리스트: 선(border) 대신 면(background) 으로 구분 */
.menu-list { background: var(--bg-card); border: none; border-radius: 18px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.03); }
.menu-item { display: flex; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--border-light); cursor: pointer; transition: background var(--transition); }
.menu-item:last-child { border-bottom: none; }
.menu-item:hover { background: var(--bg-secondary); }

.menu-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-bg); display: flex; align-items: center; justify-content: center; margin-right: 16px; flex-shrink: 0; }
.menu-icon svg { width: 20px; height: 20px; stroke: var(--accent); }
.menu-text { flex: 1; font-size: 15px; font-weight: 500; color: var(--text-primary); letter-spacing: -0.1px; }
.menu-arrow { color: var(--text-muted); }

.menu-item.logout { color: var(--error); }
.menu-item.logout .menu-icon { background: rgba(220, 38, 38, 0.06); }
.menu-item.logout .menu-icon svg { stroke: var(--error); }
.menu-item.logout .menu-text { color: var(--error); }

/* ===== GUEST PROFILE ===== */
.guest-profile { text-align: center; padding: 72px 24px; }

.guest-icon {
    width: 108px;
    height: 108px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px dashed var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 28px;
}

.guest-icon svg { width: 48px; height: 48px; stroke: var(--text-muted); }
.guest-title { font-size: 21px; font-weight: 600; margin-bottom: 10px; color: var(--text-primary); letter-spacing: -0.3px; }
.guest-desc { font-size: 14px; color: var(--text-secondary); margin-bottom: 28px; line-height: 1.7; }

.auth-buttons { display: flex; flex-direction: column; gap: 12px; max-width: 300px; margin: 0 auto; }
.auth-btn { padding: 17px; border-radius: var(--radius-md); font-size: 16px; font-weight: 600; cursor: pointer; transition: all var(--transition); text-decoration: none; text-align: center; }
.auth-btn.primary { background: var(--accent); border: none; color: white; }
.auth-btn.primary:hover { filter: brightness(1.08); box-shadow: 0 4px 16px rgba(91, 45, 142, 0.25); }
.auth-btn.secondary { background: transparent; border: 1px solid var(--border); color: var(--text-primary); }
.auth-btn.secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 72px 24px; }
.empty-state svg { width: 80px; height: 80px; stroke: var(--text-muted); margin-bottom: 24px; }
.empty-state h3 { font-size: 19px; margin-bottom: 10px; color: var(--text-primary); font-weight: 600; }
.empty-state p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

/* ===== BOTTOM NAV ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 520px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.07);
    display: flex;
    /* 하단 홈바(제스처 영역) 위로 아이템 올리기 */
    padding: 10px 4px calc(10px + env(safe-area-inset-bottom));
    z-index: 100;
    box-shadow: none;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 8px;
    cursor: pointer;
    transition: all var(--transition);
    border-radius: var(--radius-sm);
    text-decoration: none;
}

.nav-item:hover { background: transparent; }
.nav-item svg { width: 22px; height: 22px; stroke: var(--text-muted); stroke-width: 1.8; margin-bottom: 4px; transition: all var(--transition); }
.nav-item span { font-size: 10px; color: var(--text-muted); font-weight: 500; transition: all var(--transition); letter-spacing: -0.1px; }
.nav-item.active { background: transparent; border-radius: 0; }
.nav-item.active svg { stroke: var(--accent); stroke-width: 2.2; }
.nav-item.active span { color: var(--accent); font-weight: 700; }
.nav-item:nth-child(2) svg { width: 22px; height: 22px; margin-bottom: 3px; }

/* SVG 아이콘 바텀 네비 (owner mode) */
.nav-item .bn-icon svg { stroke: var(--text-muted, #999); transition: all 0.2s; }
.nav-item.active .bn-icon svg { stroke: var(--accent, #6D28D9); stroke-width: 2.2; }

/* 이모지 스타일 바텀 네비 (lessons, booking, chats, profile) */
.nav-item .bn-icon { font-size: 22px; position: relative; line-height: 1; }
.nav-item .bn-badge { position: absolute; top: -4px; right: -8px; background: #E53935; color: #fff; font-size: 9px; font-weight: 700; width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.nav-item .bn-label { font-size: 10px; font-weight: 500; color: var(--text-muted); }
.nav-item.active .bn-label { color: var(--accent); font-weight: 700; }
.bn-active-dot { width: 4px; height: 4px; background: var(--accent); border-radius: 50%; margin-top: 2px; display: none; }
.nav-item.active .bn-active-dot { display: block; }

/* 6 아이콘 레이아웃 (TEACHER/OWNER) */
.bottom-nav.has-dashboard { padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
.bottom-nav.has-dashboard .nav-item { padding: 6px 4px; }
.bottom-nav.has-dashboard .nav-item svg { width: 22px; height: 22px; margin-bottom: 4px; }
.bottom-nav.has-dashboard .nav-item span { font-size: 10px; }

/* ===== TOAST ===== */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 16px 28px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    max-width: 90%;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.success { border-color: var(--success); color: var(--success); }
.toast.error { border-color: var(--error); color: var(--error); }

/* ===== AUTH PAGE STYLES ===== */
.auth-header { text-align: center; padding: 48px 0; }
.auth-logo { font-size: 34px; font-weight: 800; margin-bottom: 10px; color: var(--text-primary); letter-spacing: -0.5px; }
.auth-logo span { color: var(--accent); }
.auth-subtitle { color: var(--text-secondary); font-size: 15px; line-height: 1.5; }

.auth-tabs { display: flex; background: var(--bg-secondary); border-radius: var(--radius-md); padding: 4px; margin-bottom: 32px; }
.auth-tab { flex: 1; padding: 14px; text-align: center; font-size: 15px; font-weight: 600; color: var(--text-secondary); border-radius: var(--radius-sm); cursor: pointer; transition: all var(--transition); }
.auth-tab.active { background: var(--accent); color: white; box-shadow: var(--shadow-sm); }

.auth-form { display: none; flex-direction: column; gap: 18px; }
.auth-form.active { display: flex; }

.input-group { display: flex; flex-direction: column; gap: 8px; }
.input-label { font-size: 13px; font-weight: 600; color: var(--text-secondary); letter-spacing: 0.2px; }

.input-wrapper {
    display: flex;
    align-items: center;
    background: #FFFFFF;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0 18px;
    transition: all var(--transition);
}

.input-wrapper:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); background: #FFFFFF; }
.input-wrapper svg { width: 20px; height: 20px; stroke: var(--text-muted); flex-shrink: 0; }
.input-wrapper input { flex: 1; background: none; border: none; outline: none; padding: 17px 14px; font-size: 15px; color: var(--text-primary); font-family: inherit; }
.input-wrapper input::placeholder { color: var(--text-muted); }

.toggle-password { cursor: pointer; padding: 4px; }

.error-message { font-size: 12px; color: var(--error); display: none; }
.error-message.show { display: block; }

.checkbox-group { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.checkbox-wrapper { position: relative; width: 20px; height: 20px; }
.checkbox-wrapper input { position: absolute; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.checkbox-custom { width: 20px; height: 20px; border: 2px solid var(--border); border-radius: 6px; display: flex; align-items: center; justify-content: center; transition: all var(--transition); }
.checkbox-wrapper input:checked + .checkbox-custom { background: var(--accent); border-color: var(--accent); }
.checkbox-custom svg { width: 12px; height: 12px; stroke: white; stroke-width: 3; opacity: 0; }
.checkbox-wrapper input:checked + .checkbox-custom svg { opacity: 1; }
.checkbox-label { font-size: 14px; color: var(--text-secondary); }
.checkbox-label a { color: var(--accent); text-decoration: none; }

.auth-submit-btn {
    width: 100%;
    padding: 17px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    background: var(--accent);
    color: white;
    transition: all var(--transition);
}
.auth-submit-btn:hover { filter: brightness(1.08); box-shadow: 0 4px 16px rgba(91, 45, 142, 0.25); }
.auth-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.auth-submit-btn.loading { color: transparent; position: relative; }
.auth-submit-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

.divider { display: flex; align-items: center; gap: 16px; margin: 28px 0; }
.divider-line { flex: 1; height: 1px; background: var(--border); }
.divider-text { font-size: 13px; color: var(--text-muted); }

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-primary);
    width: 100%;
    transition: all var(--transition);
}
.social-btn.kakao { background: #FEE500; border: none; color: #000; }

.forgot-password { text-align: center; margin-top: 20px; }
.forgot-password a { font-size: 14px; color: var(--text-secondary); text-decoration: none; }
.forgot-password a:hover { color: var(--accent); }

.back-btn {
    position: absolute;
    /* .app 기준 절대 위치 — safe-area 위로 버튼이 올라가지 않도록 보정 */
    top: calc(12px + env(safe-area-inset-top, 0px));
    left: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all var(--transition);
}
.back-btn:hover { background: var(--accent-bg); }
.back-btn svg { width: 20px; height: 20px; stroke: var(--text-secondary); }

.password-strength { display: flex; gap: 4px; margin-top: 10px; }
.strength-bar { flex: 1; height: 4px; background: var(--bg-secondary); border-radius: 2px; }
.strength-bar.weak { background: var(--error); }
.strength-bar.medium { background: var(--warning); }
.strength-bar.strong { background: var(--success); }
.strength-text { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

/* ===== ROLE TABS (Signup) ===== */
.role-tabs {
    display: flex;
    gap: 14px;
    margin-bottom: 32px;
}

.role-tab {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
}

.role-tab:hover {
    border-color: var(--accent-light);
    background: var(--bg-secondary);
}

.role-tab.active {
    border-color: var(--accent);
    background: var(--accent-bg);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.role-tab-icon {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition);
}

.role-tab.active .role-tab-icon {
    background: var(--accent);
}

.role-tab-icon svg {
    width: 22px;
    height: 22px;
    stroke: var(--text-secondary);
    transition: all var(--transition);
}

.role-tab.active .role-tab-icon svg {
    stroke: #FFFFFF;
}

.role-tab-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.role-tab-text strong {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.role-tab-text span {
    font-size: 11px;
    color: var(--text-muted);
}

.role-tab.active .role-tab-text strong {
    color: var(--accent);
}

/* Owner-only field */
.owner-only {
    animation: slideDown 0.3s ease;
}

.owner-only .label-badge {
    display: inline-block;
    background: var(--accent);
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
    vertical-align: middle;
}

.input-hint {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

@keyframes slideDown {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Signup-Login link */
.signup-login-link {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 24px;
}

.signup-login-link a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.signup-login-link a:hover {
    text-decoration: underline;
}

/* ===== HOME PAGE SEARCH BAR (야놀자 스타일: 헤더 아래 전체 너비) ===== */
.home-search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 46px;
    padding: 0 18px;
    background: #FFFFFF;
    border: 1px solid #E2DDD4;
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 1px 6px rgba(0,0,0,0.07);
    margin-bottom: 8px;
    align-self: stretch;
}

.home-search-bar:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 10px rgba(91, 45, 142, 0.12);
}

.home-search-bar:active {
    transform: scale(0.98);
}

.home-search-bar svg {
    width: 18px;
    height: 18px;
    stroke: var(--text-muted);
    flex-shrink: 0;
}

.home-search-bar span {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1;
}

/* ===== HEADER WITH SEARCH BAR (Naver Map / Airbnb Style) ===== */
.header.header-with-search {
    flex-wrap: nowrap;
    gap: 12px;
    align-items: center;
}

.header-search-bar {
    flex: 1 1 0;
    min-width: 0;
    max-width: 78%;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 42px;
    padding: 0 16px;
    background: var(--bg-secondary);
    border: none;
    border-radius: 50px;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.header-search-bar:hover {
    background: var(--accent-bg);
    box-shadow: 0 2px 8px rgba(91, 45, 142, 0.1);
}

.header-search-bar:active {
    transform: scale(0.97);
}

.header-search-bar svg {
    width: 17px;
    height: 17px;
    stroke: var(--text-muted);
    flex-shrink: 0;
}

.header-search-bar span {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1;
    font-weight: 400;
}

/* ===== TEACHER SLIDER (Karrot Market Style) ===== */
.teacher-slider {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    margin-bottom: 32px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.teacher-slider::-webkit-scrollbar {
    display: none;
}

.teacher-card {
    flex-shrink: 0;
    width: 164px;
    background: var(--bg-card);
    border: none;
    border-radius: 18px;
    padding: 18px 14px;
    cursor: pointer;
    scroll-snap-align: start;
    transition: all var(--transition);
    box-shadow: 0 2px 10px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.04);
}

.teacher-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.1);
}

.teacher-card:active {
    transform: scale(0.98);
}

.teacher-profile-img {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-bg) 0%, var(--bg-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 30px;
}

.teacher-info {
    text-align: center;
}

.teacher-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.2px;
}

.teacher-badges {
    display: flex;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.subject-badge {
    display: inline-block;
    padding: 3px 8px;
    background: var(--accent);
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
}

.subject-badge.secondary {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.teacher-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}

.teacher-rating {
    font-size: 12px;
    color: var(--warning);
    font-weight: 600;
}

.teacher-price {
    font-size: 13px;
    color: var(--accent);
    font-weight: 700;
}

/* ===== SEARCH PAGE BACK BUTTON ===== */
/* (Defined in SEARCH PAGE HEADER section above) */

/* ===== ACCORDION FOOTER ===== */
.site-footer {
    background-color: transparent;
    color: #C4C0B8;
    padding: 12px 4px 8px;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 10px;
    border-top: 1px solid #F0ECE6;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-summary {
    margin-bottom: 6px;
    font-size: 10px;
    color: #C4C0B8;
    line-height: 1.6;
}

.footer-summary strong {
    font-weight: 600;
}

.footer-toggle-btn {
    background: none;
    border: none;
    color: #B4B0A8;
    cursor: pointer;
    font-size: 10px;
    font-weight: 500;
    margin-top: 4px;
    font-family: inherit;
    padding: 3px 8px;
    border-radius: 4px;
    transition: color 0.2s, background-color 0.2s;
    display: inline-block;
}

.footer-toggle-btn:hover {
    color: #999999;
    background-color: rgba(91, 45, 142, 0.04);
}

.footer-details {
    display: none;
    margin-bottom: 8px;
    line-height: 1.6;
    font-size: 10px;
    color: #C4C0B8;
    padding: 6px 0;
}

.footer-details.open {
    display: block;
}

.footer-details p {
    margin: 0 0 2px;
}

.footer-links {
    margin-bottom: 6px;
    font-size: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
}

.footer-link-divider {
    color: #D8D3C8;
    margin: 0 4px;
    user-select: none;
}

.footer-links a {
    color: #C4C0B8;
    text-decoration: none;
    font-weight: 500;
    padding: 1px 3px;
    border-radius: 3px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #999999;
}

.payment-logos {
    margin-bottom: 6px;
}

.payment-logos p {
    font-size: 10px;
    margin-bottom: 4px;
    color: #C4C0B8;
}

.payment-logos img {
    height: 14px;
    filter: grayscale(100%);
    opacity: 0.35;
    display: inline-block;
    vertical-align: middle;
}

.footer-copyright {
    font-size: 10px;
    color: #CCC8C0;
    margin-top: 4px;
}

/* Footer responsive for mobile */
@media (max-width: 520px) {
    .site-footer {
        padding: 10px 4px 6px;
    }

    .footer-summary {
        font-size: 10px;
        line-height: 1.7;
    }

    .footer-links {
        gap: 1px;
    }

    .footer-link-divider {
        margin: 0 2px;
    }

    .footer-links a {
        font-size: 10px;
    }

    .footer-details {
        font-size: 10px;
        line-height: 1.6;
        padding: 4px 0;
    }
}

/* ===== LEGAL MODAL ===== */
/* ===== 법적 문서 모달 — iOS 바텀 시트 ===== */
.legal-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.legal-modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.legal-modal {
    background: #fff;
    border-radius: 22px 22px 0 0;
    width: 100%;
    max-width: 520px;
    height: 88vh;
    display: flex;
    flex-direction: column;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
    box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.15), 0 -1px 0 rgba(0, 0, 0, 0.06);
}

.legal-modal-overlay:not(.open) .legal-modal {
    display: none;
}

/* 핸들 바 */
.legal-modal-handle {
    width: 40px;
    height: 4px;
    background: #E2DDD4;
    border-radius: 2px;
    margin: 14px auto 0;
    flex-shrink: 0;
}

.legal-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px 13px;
    border-bottom: 1px solid #EEEAE2;
    flex-shrink: 0;
}

.legal-modal-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary, #2D1B4E);
    letter-spacing: -0.3px;
    margin: 0;
}

.legal-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #F4F1EB;
    border-radius: 50%;
    color: #999999;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}

.legal-modal-close:active {
    background: #E2DDD4;
    color: #4A2474;
}

.legal-modal-body {
    padding: 20px 20px 24px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    font-size: 13.5px;
    line-height: 1.85;
    color: #666666;
    overscroll-behavior: contain;
}

.legal-modal-body h4 {
    font-size: 13px;
    font-weight: 700;
    color: #2D1B4E;
    margin: 24px 0 8px;
    padding-bottom: 7px;
    border-bottom: 1px solid #EEEAE2;
    letter-spacing: -0.2px;
}

.legal-modal-body h4:first-child {
    margin-top: 0;
}

.legal-modal-body p {
    margin: 0 0 10px;
    color: #666666;
    word-break: keep-all;
}

.legal-modal-body ul {
    padding-left: 16px;
    margin: 0 0 12px;
}

.legal-modal-body ul li {
    margin-bottom: 5px;
    color: #666666;
    word-break: keep-all;
}

.legal-modal-body strong {
    color: #333333;
    font-weight: 600;
}

/* ===== APP-STYLE LAYOUT FOR DESKTOP ===== */
@media (min-width: 768px) {
    body {
        background: #EEEAE2;
    }

    .app {
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04), 0 0 8px rgba(0, 0, 0, 0.02);
    }
}

/* ===== 스와이프 백: 왼쪽 엣지 그림자 (깊이감) ===== */
body.swipe-back-active::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 22px; height: 100%;
    background: linear-gradient(90deg, rgba(0,0,0,0.15), transparent);
    pointer-events: none;
    z-index: 99999;
}

