@font-face {
    font-family: 'RixInooAriDuri';
    src: url('/static/fonts/RixInooAriDuri_Pro_Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Hey October';
    src: url('/static/fonts/Hey_October.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 위의 `* { margin: 0 }` 이 UA 기본 dialog{margin:auto} 를 덮어써서
   <dialog> 가 화면 좌상단에 붙는다. 중앙 정렬을 복구한다. */
dialog {
    margin: auto;
}

:root {
    color-scheme: light; /* 브라우저/OS 자동 다크 반전(Chrome Android Auto Dark 등) 차단 — 다크모드 토글 비활성 상태와 정합 */
    /* Brand palette — lavender (코드 단일 관리, admin 동적 테마 제거) */
    --primary: #1e8a5e;
    --primary-rgb: 30, 138, 94;
    --primary-color: #1e8a5e; /* 강조색 별칭(테두리·텍스트·배경 accent). admin 일부 템플릿이 참조 */
    --primary-dark: #1e8a5e;
    --primary-hover: #1e8a5e;
    --primary-soft: #e9fbf4;
    --primary-gradient: linear-gradient(135deg, #1e8a5e 0%, #1e8a5e 50%, #1e8a5e 100%);
    --primary-gradient-hover: linear-gradient(135deg, #1e8a5e 0%, #1e8a5e 50%, #1e8a5e 100%);
    --secondary: #e9fbf4;
    --accent: #1e8a5e;
    --accent-soft: #e9fbf4;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --bg: #ffffff;
    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --bg-tertiary: #f3f4f6;
    --card-bg: #ffffff;
    --card-bg-hover: #f8fafc;
    --ink: #111111;
    --ink-soft: #6b7280;
    --ink-muted: #9ca3af;
    --text: #111111;
    --text-primary: #111111;
    --text-secondary: #4b5563;
    --text-light: #6b7280;
    --text-muted: #6b6b6b;   /* WCAG aa: #9ca3af 는 흰 배경 2.54:1 로 미달 */
    --border: #ececec;
    --border-color: #ececec;
    --border-light: #f3f4f6;
    --chip-bg: #f1f3f5;
    --chip-ink: #1e8a5e;
    --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: var(--bg);
    color: var(--text);
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    padding-bottom: 70px;
}

/* Global keyboard-access contract shared by every page extending base.html. */
.skip-link {
    position: fixed;
    top: 8px;
    left: 50%;
    z-index: 10000;
    transform: translate(-50%, -160%);
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--primary-color);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

.skip-link:focus {
    transform: translate(-50%, 0);
}

:where(a, button, input, select, textarea, [role="button"]):focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 3px;
    border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
    html:focus-within {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* Header */
.header {
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    /* 모바일 좌우 패딩을 12px 로 (구 16px). 375px 에서 logo + 우측 클러스터가
       콘텐츠 폭을 넘겨 2px 가로 스크롤이 생기던 문제를 .header-right gap 축소와
       함께 흡수. 데스크톱(≥992px)은 별도 규칙으로 padding:12px 32px 유지. */
    padding: 4px 12px;
    border-bottom: 1px solid var(--border);
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.25s ease;
    will-change: transform;
}

/* 모바일/태블릿(≤1023px): 스크롤 다운 시 헤더를 위로 숨김, 업 시 복귀.
   데스크톱(≥1024px)은 상단 탭바 네비라 적용하지 않음. JS(header-autohide.js)가 클래스 토글. */
@media (max-width: 1023px) {
    .header.header--hidden {
        transform: translateY(-100%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .header {
        transition: none;
    }
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-logo img {
    /* 헤더 로고 높이는 모바일 최대 32px로 제한, 초과 시 비율 유지하며 축소.
       max-height + width: auto 로 가로/세로 비율 유지, 좌측 정렬은 .header-left 그대로. */
    max-height: 32px;
    width: auto;
}

@media (min-width: 768px) {
    /* 태블릿/PC: 로고 높이 최대 40px */
    .header-logo img {
        max-height: 40px;
    }
}

.header h1 {
    font-family: 'Hey October', 'RixInooAriDuri', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 28px;
    font-weight: normal;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: -10px;
}

.header-right {
    display: flex;
    align-items: center;
    /* 375px 모바일에서 logo + 우측 클러스터(언어 스위처·알림·포인트 뱃지)가
       콘텐츠 폭을 2px 넘겨 가로 스크롤이 생기던 문제 수정. 간격을 좁혀 흡수
       (데스크톱 ≥992px 은 별도 규칙으로 gap:20 유지). */
    gap: 8px;
}

/* 언어 스위처 (헤더, 비로그인 방문자 전용) */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 2px;
    color: var(--ink-soft, var(--text-light));
}

.lang-switcher select {
    border: none;
    background: transparent;
    color: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 0;
    max-width: 90px;
}

.lang-switcher select:focus {
    outline: none;
}

/* Desktop top tab navigation (hidden on mobile/tablet, shown ≥1024px via desktop.css) */
.header-tabs {
    display: none;
}

.header-tab {
    position: relative;
    padding: 18px 4px;
    color: var(--ink-soft, var(--text-light));
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s ease;
    letter-spacing: -0.01em;
}

.header-tab:hover {
    color: var(--ink, var(--text));
}

.header-tab.active {
    color: var(--ink, var(--text));
}

.header-tab.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px 2px 0 0;
}

@media (min-width: 1024px) {
    .header-tabs {
        display: flex;
        align-items: center;
        gap: 28px;
        flex: 1;
        justify-content: center;
    }
}

.header-icon {
    width: 24px;
    height: 24px;
    color: var(--text-light);
    cursor: pointer;
}

.points-badge {
    background: var(--primary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

/* Header Chat Icon */
.header-chat-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--text-primary);
    text-decoration: none;
    transition: opacity 0.2s;
}

.header-chat-icon:hover {
    opacity: 0.7;
}

.header-chat-icon svg {
    width: 24px;
    height: 24px;
}

.chat-disabled-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    background: #f59e0b;
    color: white;
    font-size: 11px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-bonus-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    min-width: 18px;
    height: 16px;
    padding: 0 4px;
    background: #99f0ce;
    color: #111111;
    font-size: 10px;
    font-weight: 700;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bonus-pulse 2s ease-in-out infinite;
}

@keyframes bonus-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 4px rgba(16, 185, 129, 0);
    }
}

.chat-unread-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #e53935;
    color: white;
    font-size: 11px;
    font-weight: 700;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Header Left Group */
.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Region Selector */
.region-selector {
    position: relative;
}

.region-btn {
    display: flex;
    align-items: center;
    gap: 2px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1;
    transition: background 0.2s;
}

.region-btn:hover {
    background: var(--border-light);
}

.region-btn svg {
    color: var(--text-muted);
    margin-top: 1px;
}

.region-flag {
    font-size: 16px;
}

.region-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    min-width: 130px;
    overflow: hidden;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
}

.region-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.region-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    text-decoration: none;
    color: var(--text);
    font-size: 14px;
    transition: background 0.15s;
}

.region-option:hover {
    background: var(--bg-secondary);
}

.region-option.active {
    background: rgba(153, 240, 206, 0.12);
    color: var(--primary-dark);
    font-weight: 500;
}

.region-option span:first-child {
    font-size: 18px;
}

/* Hero Banner - Hidden for dark theme */
.hero {
    display: none;
}

/* Banner Slider */
/* Hooking Banner */
.hooking-banner {
    background: var(--primary-color);
    padding: 10px 16px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    min-height: 37px;
}

.hooking-text-wrapper {
    position: relative;
    display: inline-block;
}

.hooking-text-placeholder {
    color: transparent;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    line-height: 17px;
    visibility: hidden;
}

.hooking-text {
    position: absolute;
    left: 0;
    top: 0;
    color: white;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    line-height: 17px;
}

.banner-slider {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    overflow: hidden;
    background: var(--bg-secondary);
    aspect-ratio: 3 / 1;
}

.banner-track {
    display: flex;
    transition: transform 0.3s ease;
}

.banner-slide {
    min-width: 100%;
    width: 100%;
    flex-shrink: 0;
}

.banner-slide img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.banner-slide a {
    display: block;
}

.banner-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.banner-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.2s;
}

.banner-dot.active {
    background: white;
    width: 20px;
    border-radius: 4px;
}

/* Home gender filter — 4a 홈은 성별을 필터 칩 한 줄에 흡수했다(칩 모양은
   css/home-4a.css). 표시/숨김은 여전히 CSS 가 맡는다: home-gender-filter.js 는
   <html data-host-gender> 전환과 aria 동기화만 하므로, index.html head 의 인라인
   스크립트가 첫 페인트 전에 속성을 올리면 카드가 보였다 사라지는 깜빡임이 없다. */
/* 카드 숨김. 지금 가능·카테고리·검색 필터(home-4a.js 의 .is-filtered-out)와
   교집합을 만들도록 !important 로 둔다 — 서로의 결과를 덮어쓰지 않는다.
   REQ-2625: #characterList 만 걸면 강등 목록(쉬는 중)이 필터를 빠져나가
   "여성 0명인데 여성 카드가 보이는" 상태가 된다. 두 목록을 모두 [data-host-grid] 로 잡는다. */
html[data-host-gender="female"] [data-host-grid] .character-card:not([data-gender="female"]),
html[data-host-gender="male"] [data-host-grid] .character-card:not([data-gender="male"]) {
    display: none !important;
}

/* 쉬는 중 섹션은 매칭 카드가 0이면 제목만 덩그러니 남으므로 통째로 숨긴다. */
html[data-host-gender="female"] .demoted-hosts[data-demoted-empty-for~="female"],
html[data-host-gender="male"] .demoted-hosts[data-demoted-empty-for~="male"] {
    display: none;
}

/* Section */
.section {
    padding: 20px 16px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.section-more {
    font-size: 12px;
    color: var(--text-light);
    text-decoration: none;
}

/* Character List - 2 column grid, photo-forward vertical cards (app-style) */
.character-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 4px 0 12px;
}

.character-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    box-shadow: var(--shadow);
    /* Skip paint/style work for the long off-screen catalogue while keeping
       every card in the DOM for category, gender and SSE behavior. */
    content-visibility: auto;
    contain-intrinsic-size: auto 420px;
}

@media (hover: hover) {
    .character-card:hover {
        border-color: var(--primary);
        box-shadow: var(--shadow-md);
    }
}

.character-card:active {
    transform: scale(0.995);
}

.character-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 0;
    background: var(--bg-tertiary);
}

.character-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--border);
    display: block;
}

.character-status {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--card-bg);
}

.verified-icon-name {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    vertical-align: middle;
    cursor: help;
}

.free-call-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: var(--primary-gradient);
    color: white;
    font-size: 9px;
    line-height: 1;
    padding: 3px 6px;
    border-radius: 6px;
    font-weight: 700;
    letter-spacing: -0.01em;
    box-shadow: 0 2px 6px rgba(137, 77, 235, 0.35);
}

/* 무료 메시지 배지 — 무료통화 배지와 같은 자리를 쓰되(상호 배타) 톤을 낮춰
   통화 CTA 와 시각적으로 경쟁하지 않게 한다. */
.free-message-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: rgba(153, 240, 206, 0.92);
    color: white;
    font-size: 9px;
    line-height: 1;
    padding: 3px 6px;
    border-radius: 6px;
    font-weight: 700;
    letter-spacing: -0.01em;
    box-shadow: 0 2px 6px rgba(30, 138, 94, 0.28);
}

/* request #2267 의 '움직임 없는 고정 배지' 결정을 즉시통화 배지까지 승격했다
   (2026-08-27 신뢰도 감사): 얼굴 그리드 위에서 무한 맥동·깜빡이는 빨간 네온 배지가
   불법 사이트의 시각 문법으로 읽혔다. 차분한 단색 + 9px→11px 가독성. */
.live-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #047857;
    color: white;
    font-size: 11px;
    line-height: 1;
    padding: 3px 6px;
    border-radius: 6px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.live-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: white;
}

.live-badge.busy {
    background: var(--warning, #f59e0b);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

/* request #2267: 통화요청(대기 상태) 배지. 흰 글씨 대비 확보를 위해 #10b981(2.56:1)
   에서 기본 배지와 같은 녹색(5.5:1)으로 맞춘다. */
.live-badge.request {
    background: #047857;
}

.chat-available-badge {
    position: absolute;
    top: 36px;
    right: 8px;
    background: rgba(153, 240, 206, 0.92);
    color: white;
    font-size: 10px;
    padding: 3px 6px;
    border-radius: 4px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(2px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    pointer-events: none;
}

.chat-available-badge svg {
    width: 11px;
    height: 11px;
}

/* 상태 변경 시 카드 하이라이트 효과 */
.character-card.status-highlight {
    animation: statusHighlight 2s ease-out;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
}

@keyframes statusHighlight {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
        transform: scale(1);
    }
    30% {
        box-shadow: 0 0 25px 5px rgba(239, 68, 68, 0.5);
        transform: scale(1.02);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
        transform: scale(1);
    }
}

.character-status.online {
    background: #99f0ce;
}

.character-status.offline {
    background: var(--text-muted);
}

.character-info {
    padding: 10px 12px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 4px;
    min-width: 0;
    background: transparent;
}

.character-name-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    gap: 8px;
}

.character-name {
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--ink, var(--text));
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.character-name .verified-icon-name {
    width: 16px;
    height: 16px;
}

.character-badge {
    font-size: 9px;
    padding: 2px 5px;
    border-radius: 3px;
    font-weight: 500;
}

.badge-hot {
    background: var(--primary-color);
    color: white;
}

.badge-new {
    background: #99f0ce;
    color: var(--text-primary);
}

.character-desc {
    font-size: 12px;
    color: var(--ink-soft, var(--text-light));
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.character-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 2px;
    font-size: 11px;
    color: var(--ink-soft, var(--text-light));
}

.character-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.character-stat svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

.character-stat.stat-call .character-stat-value {
    font-weight: 700;
    color: var(--ink, var(--text));
    font-variant-numeric: tabular-nums;
}

.character-stat.stat-call .character-stat-label {
    color: var(--ink-soft);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.character-stat.stat-rating {
    color: var(--ink-soft);
}

.character-stat.stat-rating svg {
    color: var(--warning, #f59e0b);
}

.character-stat.stat-chat-ok {
    background: var(--accent-soft);
    color: var(--accent);
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 10px;
    font-weight: 600;
}

.character-stat.stat-chat-ok svg {
    width: 11px;
    height: 11px;
}

.character-price {
    font-size: 12px;
    color: var(--ink, #000);
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    font-variant-numeric: tabular-nums;
}

.character-price .original-price {
    color: var(--text-muted);
    text-decoration: line-through;
    font-weight: 400;
    font-size: 10px;
}

.character-keywords {
    display: flex;
    gap: 4px;
    flex-wrap: nowrap;
    overflow: hidden;
}

.keyword-tag {
    font-size: 9px;
    padding: 2px 6px;
    background: rgba(153, 240, 206, 0.15);
    color: var(--primary-dark);
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.character-tags {
    display: flex;
    gap: 4px;
    /* mobile: 1줄 nowrap, tablet+ : 2줄까지 wrap 허용 */
    flex-wrap: nowrap;
    overflow: hidden;
    max-height: 22px;
    /* 글자 중간에서 뚝 잘리던 것을 오른쪽 페이드로 의도된 잘림처럼 보이게 한다. */
    -webkit-mask-image: linear-gradient(to right, #000 85%, transparent 100%);
    mask-image: linear-gradient(to right, #000 85%, transparent 100%);
}

@media (min-width: 768px) {
    .character-tags {
        flex-wrap: wrap;
        max-height: 50px;
        -webkit-mask-image: none;
        mask-image: none;
    }
}

.tag-pill {
    font-size: 11px;
    padding: 2px 8px;
    background: var(--chip-bg);
    color: var(--chip-ink);
    border-radius: 9999px;
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.5;
}

/* Character Grid (for more compact view) */
.character-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.character-grid .character-card {
    flex-direction: column;
    padding: 12px;
}

.character-grid .character-image {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
}

/* Favorite Button */
.favorite-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.favorite-btn svg {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.favorite-btn.active svg {
    color: var(--accent);
    fill: var(--accent);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    display: flex;
    z-index: 100;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-muted);
    padding: 10px 0;
    font-size: 10px;
    transition: color 0.2s;
}

.nav-item:hover {
    color: var(--text-light);
}

.nav-item.active {
    color: var(--primary);
}

.nav-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
}

/* Live Room Mini-Player — floats as an independent card 8px above bottom-nav
 * to keep a clear visual boundary and avoid covering nav click areas. */
.live-mini-player {
    display: none;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    bottom: 64px; /* 56px bottom-nav + 8px gap */
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 16px); /* 8px margin on each side */
    max-width: 464px; /* 480px container - 16px margins */
    background: linear-gradient(135deg, rgba(153, 240, 206, 0.92), rgba(153, 240, 206, 0.92));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    padding: 6px 12px;
    border-radius: 12px;
    z-index: 101;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}
.live-mini-player-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}
.live-mini-player-pulse {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    animation: miniPulse 1.5s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes miniPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
.live-mini-player-title {
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.live-mini-player-status {
    font-size: 11px;
    opacity: 0.8;
    white-space: nowrap;
}
.live-mini-player-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
.live-mini-player-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 6px;
    padding: 6px 8px;
    cursor: pointer;
    color: #fff;
    display: flex;
    align-items: center;
}
.live-mini-player-btn:hover {
    background: rgba(255,255,255,0.3);
}
.live-mini-leave:hover {
    background: rgba(239,68,68,0.6);
}

/* Narrow-width slim mode: hide verbose status text, keep icon + title */
@media (max-width: 380px) {
    .live-mini-player {
        padding: 4px 10px;
    }
    .live-mini-player-status {
        display: none;
    }
    .live-mini-player-title {
        font-size: 12px;
        max-width: 100%;
    }
    .live-mini-player-btn {
        padding: 6px;
    }
}

/* When live mini-player is active, push fixed-bottom-cta above it.
 * Offset = bottom-nav (56) + gap (8) + mini-player (~36). */
.live-mini-active .fixed-bottom-cta {
    bottom: 100px;
}

/* When live mini-player is active, shrink chat page so input sits above it.
 * Offset = bottom-nav (56) + gap (8) + mini-player (56) + input padding/actionbar (~54).
 * If any of those change, update all four values so iOS Safari + desktop
 * stay consistent (`100vh` fallback is for browsers without `100dvh`). */
.live-mini-active .chat-page-container {
    height: calc(100vh - 174px);
    height: calc(100dvh - 174px);
    max-height: calc(100vh - 174px);
    max-height: calc(100dvh - 174px);
}

/* Spacer for fixed bottom CTA + bottom nav */
.bottom-cta-spacer {
    height: 140px;
}
.live-mini-active .bottom-cta-spacer {
    height: 184px;
}

.nav-item svg {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
}


/* Message nav with unread badge */
.nav-message {
    position: relative;
}

.nav-unread-badge {
    position: absolute;
    top: 4px;
    right: 50%;
    transform: translateX(14px);
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    width: 100%;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 14px rgba(137, 77, 235, 0.25);
    letter-spacing: -0.01em;
}

.btn-primary:hover {
    background: var(--primary-gradient-hover);
    box-shadow: 0 6px 18px rgba(137, 77, 235, 0.35);
    transform: translateY(-1px);
}

.btn-primary:active {
    background: var(--primary-dark);
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(137, 77, 235, 0.25);
}

.btn-secondary {
    background: #99f0ce;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 1.5px solid var(--primary-color);
    font-weight: 600;
}

.btn-outline:hover {
    background: var(--primary-soft);
}

.btn-google {
    background: #ffffff;
    color: #333;
    border: 1px solid var(--border-light);
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-google:hover {
    background: #f5f5f5;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    background: var(--card-bg);
    color: var(--text);
    color-scheme: light;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
}

/* Character Detail */
.character-detail-header {
    background: var(--card-bg);
    padding: 24px 16px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.character-detail-image {
    width: 200px;
    height: auto;
    border-radius: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.character-detail-name {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.character-detail-category {
    font-size: 12px;
    color: var(--primary-dark);
    background: rgba(153, 240, 206, 0.15);
    padding: 4px 12px;
    border-radius: 12px;
    display: inline-block;
    margin-bottom: 12px;
}

.character-description {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-light);
}

.character-price-info {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.character-price-original {
    display: inline;
    font-size: 16px;
    font-weight: 400;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-right: 8px;
}

.character-price-value {
    display: inline;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.character-price-unit {
    display: inline;
    font-size: 12px;
    color: var(--text-light);
}

/* Reviews */
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.review-item {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 12px;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.review-info-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.review-user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.review-date {
    font-size: 11px;
    color: var(--text-light);
}

.review-actions {
    display: flex;
    gap: 6px;
}

.btn-review-action {
    padding: 3px 8px;
    font-size: 11px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--card-bg);
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-review-action:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-review-delete:hover {
    border-color: #dc3545;
    color: #dc3545;
}

.review-content {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.review-stars {
    font-size: 12px;
    color: var(--warning);
    flex-shrink: 0;
    letter-spacing: 1px;
}

.review-comment {
    font-size: 13px;
    color: var(--text);
    line-height: 1.5;
}

/* Review Form */
.review-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: 12px;
}

.star-rating-input {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.star-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    transition: transform 0.2s;
}

.star-btn svg {
    width: 32px;
    height: 32px;
    transition: all 0.2s;
}

.star-btn svg path {
    fill: none;
    stroke: var(--warning);
    stroke-width: 2;
}

.star-btn:hover svg path,
.star-btn.filled svg path,
.star-btn.hovered svg path {
    fill: var(--warning);
}

.star-btn:hover {
    transform: scale(1.1);
}

.star-btn.hovered {
    transform: scale(1.05);
}

.review-form textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    resize: none;
    background: var(--card-bg);
    color: var(--text);
    font-family: inherit;
    min-height: 80px;
    transition: border-color 0.2s;
}

.review-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.review-form textarea::placeholder {
    color: var(--text-light);
}

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: relative;
}

.page-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.reviews-page-content {
    padding: 16px;
}

/* Fixed Bottom CTA */
.fixed-bottom-cta {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: var(--bg-secondary);
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    z-index: 100;
}

/* 게스트 화면 공통 회사 고지 푸터 (templates/includes/site_footer.html).
   2026-08-27 신뢰도 감사 #4: 홈·호스트 상세에 운영 주체 표기가 하나도 없었다. */
.site-footer {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: min(100%, 420px);
    margin: 28px auto 0;
    padding: 16px 12px 28px;
    border-top: 1px solid var(--border);
    color: var(--text-light);
    font-size: 11px;
    line-height: 1.55;
    text-align: center;
}

.site-footer strong {
    color: var(--text-secondary);
    font-size: 12px;
}

.site-footer-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 0 0 6px;
    font-size: 12px;
}

.site-footer-links a {
    color: var(--text-secondary);
    text-decoration: underline;
}

/* 하단 고정 바가 있는 페이지에서는 마지막 줄이 바 뒤로 숨지 않게 더 띄운다. */
body:has(.fixed-bottom-cta) .site-footer,
body:has(.charge-bottom-bar) .site-footer {
    padding-bottom: 128px;
}

/* Login Page */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 70px);
    padding: 24px;
    text-align: center;
}

.login-logo-img {
    height: 48px;
    width: auto;
    margin-bottom: 8px;
    object-fit: contain;
}

.login-subtitle {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 32px;
}

.login-features {
    text-align: left;
    margin-bottom: 32px;
    width: 100%;
}

.login-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.login-feature:last-child {
    border-bottom: none;
}

.login-feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(153, 240, 206, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark);
}

.login-feature-text {
    font-size: 13px;
    color: var(--text);
}

/* Charge Page */
.charge-heading {
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.charge-reference-basis {
    margin: 5px 0 0;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.4;
}

.charge-history-toggle {
    padding: 4px 0 4px 12px;
    color: var(--text-muted, #aaa);
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
}

.package-groups {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.package-group {
    border-radius: 14px;
    padding: 12px 10px 14px;
    background: var(--bg-secondary, #fafafa);
    border: 1px solid var(--border, #eee);
}

.package-group-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    padding: 0 4px;
}

.package-group-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.package-group-desc {
    font-size: 11px;
    color: var(--text-muted);
}

.package-group-main {
    background: linear-gradient(135deg, rgba(255, 149, 0, 0.06), rgba(255, 107, 0, 0.03));
    border-color: rgba(255, 149, 0, 0.25);
}

.package-group-main .package-group-title {
    color: #c46900;
}

.package-group-premium {
    background: linear-gradient(135deg, rgba(153, 240, 206, 0.06), rgba(212, 160, 23, 0.04));
    border-color: rgba(30, 138, 94, 0.25);
}

.package-group-premium .package-group-title {
    color: #1e8a5e;
}

.package-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.package-card {
    background: var(--card-bg);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 14px 10px 12px;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.15s ease, background-color 0.15s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    min-width: 0;
    overflow: visible;
    min-height: 116px;
    gap: 5px;
    will-change: transform;
}

.package-card:active {
    transform: scale(0.96);
    transition: transform 0.08s ease;
}

.package-card.tag-emphasized:active {
    transform: scale(1.02);
    transition: transform 0.08s ease;
}

.package-card.selected {
    border-color: var(--primary);
    background: rgba(153, 240, 206, 0.12);
    box-shadow: 0 0 0 2px rgba(30, 138, 94, 0.25), 0 4px 14px rgba(30, 138, 94, 0.18);
}

@keyframes packagePop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.08); }
    100% { transform: scale(1); }
}

@keyframes packagePopEmphasized {
    0%   { transform: scale(1.06); }
    50%  { transform: scale(1.14); }
    100% { transform: scale(1.06); }
}

.package-card.just-selected {
    animation: packagePop 0.32s ease;
}

.package-card.tag-emphasized.just-selected {
    animation: packagePopEmphasized 0.32s ease;
}

.package-card.selected::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 18px;
    height: 18px;
    background: var(--primary-color);
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px;
    box-shadow: 0 1px 4px rgba(137, 77, 235, 0.5);
    z-index: 2;
}

.package-card:not(.selected):hover {
    border-color: rgba(30, 138, 94, 0.55);
    background: rgba(153, 240, 206, 0.06);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
}

/* Disable transform-on-hover on touch devices to avoid sticky :hover state */
@media (hover: none) {
    .package-card:not(.selected):hover {
        transform: none;
        box-shadow: none;
    }
}

.package-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.package-points {
    font-size: clamp(17px, 5vw, 21px);
    font-weight: 850;
    color: var(--primary);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
}

.package-bonus {
    font-size: 10px;
    color: var(--accent);
}

.package-price {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

/* Charge Bottom Bar (sticky) */
.charge-bottom-bar {
    position: fixed;
    bottom: 56px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    z-index: 99;
    box-sizing: border-box;
}

/* Beta Launch Promotion Styles */
.promo-banner {
    background: var(--primary-gradient);
    border-radius: 16px;
    padding: 24px 20px;
    margin-bottom: 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(137, 77, 235, 0.25);
}

.promo-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

.promo-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
    backdrop-filter: blur(4px);
}

.promo-title {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.promo-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.promo-subtitle strong {
    color: #fff;
    font-weight: 700;
}

.promo-timer {
    margin-top: 12px;
}

.timer-label {
    display: inline-block;
    background: rgba(0, 0, 0, 0.2);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    color: #fff;
    font-weight: 600;
}

/* Package Card Enhancements for Promotion */
.discount-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--primary-gradient);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(137, 77, 235, 0.35);
    animation: pulse 2s infinite;
    z-index: 4;
}

.discount-badge.discount-badge-high {
    background: linear-gradient(135deg, #ec407a, #c2185b);
    box-shadow: 0 2px 6px rgba(233, 30, 99, 0.45);
}

.discount-badge.discount-badge-max {
    background: linear-gradient(135deg, #ff3d7f, #d81b60);
    box-shadow: 0 2px 8px rgba(216, 27, 96, 0.55);
    font-size: 10px;
    padding: 3px 6px;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.popular-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ff9500, #ff6b00);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(255, 149, 0, 0.45);
    white-space: nowrap;
    z-index: 3;
    letter-spacing: 0;
    line-height: 1.25;
    max-width: calc(100% + 16px);
}

@media (max-width: 480px) {
    .popular-badge {
        font-size: 10px;
        padding: 3px 8px;
    }
}

.package-card.tagged {
    padding-top: 22px;
}

/* Emphasize recommended (tagged) cards: ~10% scale + stronger hover */
.package-card.tag-emphasized {
    transform: scale(1.06);
    transform-origin: center;
    z-index: 1;
}

.package-card.tag-emphasized:not(.selected):hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.1);
}

.package-card.tag-emphasized.selected {
    transform: scale(1.08);
}

/* On very small screens, drop the emphasis scale to avoid overlap */
@media (max-width: 360px) {
    .package-card.tag-emphasized,
    .package-card.tag-emphasized.selected,
    .package-card.tag-emphasized:not(.selected):hover {
        transform: none;
    }
}

.package-card.tag-hot {
    border-color: #ff9500;
    background: rgba(255, 149, 0, 0.05);
}

.package-card.tag-hot.selected {
    background: rgba(255, 149, 0, 0.15);
    border-color: #ff9500;
    box-shadow: 0 0 0 3px rgba(255, 149, 0, 0.2), 0 4px 12px rgba(255, 149, 0, 0.15);
}

.badge-best-entry {
    background: linear-gradient(135deg, #99f0ce, #99f0ce);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.package-card.tag-best-entry {
    border-color: #10b981;
    background: rgba(153, 240, 206, 0.05);
}

.package-card.tag-best-entry.selected {
    background: rgba(153, 240, 206, 0.15);
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2), 0 4px 12px rgba(16, 185, 129, 0.15);
}

.badge-vip {
    background: #99f0ce;
    box-shadow: 0 2px 8px rgba(30, 138, 94, 0.4);
}

.package-card.tag-vip {
    border-color: #1e8a5e;
    background: rgba(153, 240, 206, 0.05);
}

.package-card.tag-vip.selected {
    background: rgba(153, 240, 206, 0.15);
    border-color: #1e8a5e;
    box-shadow: 0 0 0 3px rgba(30, 138, 94, 0.2), 0 4px 12px rgba(30, 138, 94, 0.15);
}

.badge-max {
    background: linear-gradient(135deg, #d4a017, #f0c040);
    box-shadow: 0 2px 8px rgba(212, 160, 23, 0.4);
}

.package-card.tag-max {
    border-color: #d4a017;
    background: rgba(212, 160, 23, 0.05);
}

.package-card.tag-max.selected {
    background: rgba(212, 160, 23, 0.15);
    border-color: #d4a017;
    box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.2), 0 4px 12px rgba(212, 160, 23, 0.15);
}

.package-price-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    max-width: 100%;
}

.package-price-reference {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 10px;
    max-width: 100%;
}

.package-price-reference strong {
    overflow: hidden;
    color: inherit;
    font-size: inherit;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.package-price-sale {
    font-size: clamp(16px, 4.5vw, 19px);
    font-weight: 850;
    color: var(--text-primary);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
}

.package-price-saving {
    max-width: 100%;
    padding: 3px 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(153, 240, 206, .12);
    color: #087a55;
    font-size: 10px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (min-width: 500px) {
    .package-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .package-points { font-size: 20px; }
    .package-price-sale { font-size: 18px; }
}

@media (min-width: 768px) {
    .package-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 760px; margin: 0 auto; }
}

/* Reservation List */
.reservation-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reservation-card {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.reservation-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--border);
}

.reservation-info {
    flex: 1;
    min-width: 0;
}

.reservation-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.reservation-time {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 4px;
}

.reservation-duration {
    font-size: 11px;
    color: var(--text-muted);
}

.reservation-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.reservation-status {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.status-CONFIRMED {
    background: rgba(153, 240, 206, 0.15);
    color: var(--success);
}

.status-REQUESTED {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.status-CANCELLED {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.status-COMPLETED {
    background: rgba(153, 240, 206, 0.15);
    color: #1e8a5e;
}

.status-REVIEWED {
    background: rgba(153, 240, 206, 0.15);
    color: #1e8a5e;
}

.reservation-points {
    font-size: 12px;
    color: var(--text-light);
}

/* My Page */
.mypage-header {
    background: var(--bg-secondary);
    padding: 24px 16px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.mypage-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 12px;
    border: 3px solid var(--primary);
}

.mypage-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.mypage-email {
    font-size: 12px;
    color: var(--text-light);
}

.mypage-points-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 12px;
    padding: 20px;
    margin: 16px;
    text-align: center;
}

.mypage-points-label {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.mypage-points-value {
    font-size: 32px;
    font-weight: 700;
}

.mypage-points-unit {
    font-size: 14px;
    font-weight: 400;
}

.mypage-menu {
    padding: 16px;
}

.mypage-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--card-bg);
    border-radius: 8px;
    margin-bottom: 8px;
    text-decoration: none;
    color: var(--text);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.mypage-menu-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mypage-menu-icon {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-light);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 14px;
    margin-bottom: 16px;
}

/* Transaction List */
.transaction-list {
    padding: 0 16px;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.transaction-item:last-child {
    border-bottom: none;
}

.transaction-info {
    flex: 1;
}

.transaction-desc {
    font-size: 13px;
    margin-bottom: 4px;
}

.transaction-date {
    font-size: 11px;
    color: var(--text-muted);
}

.transaction-amount {
    font-size: 14px;
    font-weight: 600;
}

.transaction-amount.positive {
    color: var(--success);
}

.transaction-amount.negative {
    color: var(--danger);
}

.transaction-grouped {
    border-left: 3px solid var(--primary);
    padding-left: 12px;
    transition: background 0.2s;
}

.transaction-grouped:hover {
    background: var(--hover-bg, rgba(0,0,0,0.02));
}

.tx-duration-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-bg, rgba(99,102,241,0.1));
    padding: 1px 6px;
    border-radius: 10px;
    margin-left: 6px;
    vertical-align: middle;
}

/* REQ-2670: 그룹 상세의 날짜 구분 헤더 — 그룹이 여러 날에 걸칠 수 있어(광장
   스피커권 등 reference_id 가 재사용되는 유형) 행의 시각만으로는 어느 날 거래인지
   알 수 없다. */
.tx-detail-date {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    margin: 10px 0 2px;
}

/* REQ-2642: 유형 필터 칩 + 행별 유형 태그 — 선물/통화/팬클럽 등 어디에 썼는지
   한눈에 구분하고 원하는 유형만 골라 볼 수 있게 한다. */
.tx-filter-chips {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 12px 16px 4px;
    scrollbar-width: none;
}
.tx-filter-chips::-webkit-scrollbar { display: none; }
.tx-filter-chip {
    flex: 0 0 auto;
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
}
.tx-filter-chip.active {
    color: #fff;
    background: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
}
.tx-category-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--hover-bg, rgba(0,0,0,0.05));
    padding: 1px 6px;
    border-radius: 10px;
    margin-left: 6px;
    vertical-align: middle;
}

/* Report #2360: refund badge in the point-transaction list so a refund is
   visibly distinguished from a deduction (matches the app's blue refund tag). */
.tx-refund-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: #0095FF;
    background: rgba(0,149,255,0.1);
    padding: 1px 6px;
    border-radius: 10px;
    margin-left: 6px;
    vertical-align: middle;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
}

.pagination-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    background: var(--card-bg);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 13px;
    color: var(--text-light);
    min-width: 60px;
    text-align: center;
}

/* Time Slots */
.time-slots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.time-slot {
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    text-align: center;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--card-bg);
}

.time-slot.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.time-slot:disabled,
.time-slot.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f0f0f0;
    color: #bbb;
    border-color: #e0e0e0;
    text-decoration: line-through;
    pointer-events: none;
}

/* Duration Options */
.duration-options {
    display: flex;
    gap: 8px;
}

.duration-option {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--card-bg);
}

.duration-option.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.duration-option-full {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
}

.duration-option-full .duration-value,
.duration-option-full .duration-label {
    font-size: 14px;
}

.duration-value {
    font-size: 16px;
    font-weight: 600;
}

.duration-label {
    font-size: 10px;
    opacity: 0.8;
}

/* Charge Success */
.success-container {
    text-align: center;
    padding: 48px 24px;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: rgba(153, 240, 206, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.success-icon svg {
    width: 40px;
    height: 40px;
    color: var(--success);
}

.success-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.success-message {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 24px;
}

/* Utility */
.text-center {
    text-align: center;
}

.text-primary {
    color: var(--primary);
}

.text-danger {
    color: var(--danger);
}

.mb-8 {
    margin-bottom: 8px;
}

.mb-16 {
    margin-bottom: 16px;
}

.mb-24 {
    margin-bottom: 24px;
}

.mt-8 {
    margin-top: 8px;
}

.mt-16 {
    margin-top: 16px;
}

.mt-24 {
    margin-top: 24px;
}

.p-16 {
    padding: 16px;
}

.gap-8 {
    gap: 8px;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

/* Placeholder Image */
.placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e0e0e0, #f5f5f5);
    color: var(--text-muted);
    font-size: 32px;
}

/* 부모 컨테이너의 배경/테두리를 그대로 유지하면서 SVG 만 중앙 정렬 (어두운 배경 아바타용) */
.avatar-image-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Alert */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
}

.alert-info {
    background: rgba(153, 240, 206, 0.1);
    color: var(--primary-dark);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* Loading */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    font-size: 13px;
    color: var(--text-light);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 하단에 고정 버튼 줄(결제하기·통화하기)이 있는 화면에서는 맨 위로 버튼이
   그 버튼을 가리므로 숨긴다. (정산 화면은 settlement-4a.css 에서 같은 처리) */
body:has(.charge-bottom-bar) .floating-buttons,
body:has(.fixed-bottom-cta) .floating-buttons { display: none; }

/* Floating Buttons */
.floating-buttons {
    position: fixed;
    right: calc(16px + env(safe-area-inset-right, 0px));
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
}

.floating-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.floating-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.kakao-btn {
    background: #FEE500;
    color: #3C1E1E;
}

.kakao-btn:hover {
    background: #F5DC00;
}

.top-btn {
    background: var(--primary-color);
    color: white;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.top-btn:hover {
    background: var(--primary-dark);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
}

.modal {
    background: var(--card-bg);
    border-radius: 12px;
    width: 100%;
    max-width: 320px;
    padding: 24px;
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    text-align: center;
}

.modal-message {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 20px;
    text-align: center;
    line-height: 1.5;
}

.modal-buttons {
    display: flex;
    gap: 8px;
}

.modal-buttons .btn {
    flex: 1;
}

/* Back Button */
.back-button {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 0;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
}

.back-button svg {
    width: 20px;
    height: 20px;
}

/* MyPage Name Edit */
.mypage-name-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 4px;
}

.mypage-name-row .mypage-name {
    margin-bottom: 0;
}

.edit-name-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.edit-name-btn:hover {
    color: var(--primary-dark);
    background: rgba(153, 240, 206, 0.1);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    width: 100%;
    max-width: 320px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    text-align: center;
}

.modal-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
    outline: none;
    transition: border-color 0.2s;
}

.modal-input:focus {
    border-color: var(--primary);
}

.modal-buttons {
    display: flex;
    gap: 8px;
}

.modal-buttons .btn {
    flex: 1;
    padding: 12px;
}

/* Toast Message */
.toast-container {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 440px;
    padding: 0 20px;
    z-index: 9999;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--card-bg);
    color: var(--text);
    padding: 14px 16px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    line-height: 1.4;
    pointer-events: auto;
    animation: toastSlideIn 0.3s ease;
    border-left: 3px solid var(--primary);
}

.toast.toast-success {
    border-left-color: var(--success);
}

.toast.toast-error {
    border-left-color: var(--danger);
}

.toast.toast-warning {
    border-left-color: var(--warning);
}

.toast.toast-info {
    border-left-color: var(--primary);
}

.toast-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.toast-success .toast-icon {
    color: var(--success);
}

.toast-error .toast-icon {
    color: var(--danger);
}

.toast-warning .toast-icon {
    color: var(--warning);
}

.toast-info .toast-icon {
    color: var(--primary);
}

.toast-message {
    flex: 1;
}

.toast-close {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    color: var(--text-light);
}

.toast.toast-hiding {
    animation: toastSlideOut 0.3s ease forwards;
}

.toast.toast-clickable {
    cursor: pointer;
}

.toast.toast-clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}


/* Header Points Sale Icon */
.points-sale-icon {
    width: 14px;
    height: 14px;
    color: #FFD700;
    animation: pointsIconPulse 1.2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes pointsIconPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

/* request-685: Web-optimized header scale-up & padding redesign
   - Mobile icons (~24px) felt cramped on wide browsers
   - On desktop: 32px horizontal header padding, 1.3x icon/text scale, 20px icon gap */
@media (min-width: 992px) {
    .header {
        padding: 12px 32px;
    }

    .header-right {
        gap: 20px;
    }

    .header-icon {
        width: 31px;
        height: 31px;
    }

    .points-badge {
        padding: 8px 16px;
        font-size: 16px;
        gap: 6px;
        border-radius: 24px;
    }

    .points-sale-icon {
        width: 18px;
        height: 18px;
    }

    .user-avatar {
        width: 42px;
        height: 42px;
    }
}

/* ===========================================
   Character Feed Section
   =========================================== */

.character-feed-section {
    margin-top: 24px;
}

/* ===========================================
   Voice Preview Button (Character Card)
   =========================================== */

.voice-preview-btn {
    position: absolute;
    bottom: 4px;
    left: 4px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: 1.5px solid rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.voice-preview-btn svg { width: 12px; height: 12px; }

.voice-preview-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.voice-preview-btn:active {
    transform: scale(0.95);
}

.voice-preview-btn svg {
    color: white;
}

.voice-preview-btn .voice-play-icon {
    margin-left: 2px; /* Play 아이콘 시각적 중앙 정렬 */
}

.voice-preview-btn.playing {
    background: var(--primary-color);
    border-color: var(--primary-color);
    animation: voicePreviewPulse 1.5s ease-in-out infinite;
}

.voice-preview-btn.playing .voice-play-icon {
    display: none;
}

.voice-preview-btn.playing .voice-pause-icon {
    display: block !important;
}

@keyframes voicePreviewPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(30, 138, 94, 0.5);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(30, 138, 94, 0);
    }
}


/* ========== Host Global Standby Toggle ========== */
.global-standby-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--card-bg);
    border-radius: 20px;
    margin-right: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* OFF state - attention-grabbing style */
.global-standby-toggle.offline {
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.15), rgba(251, 191, 36, 0.1));
    border: 1px solid rgba(251, 146, 60, 0.3);
    animation: standbyOffPulse 2.5s ease-in-out infinite;
}

/* ON state - calm and stable */
.global-standby-toggle.online {
    background: linear-gradient(135deg, rgba(153, 240, 206, 0.15), rgba(153, 240, 206, 0.1));
    border: 1px solid rgba(16, 185, 129, 0.3);
    animation: none;
}

@keyframes standbyOffPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(251, 146, 60, 0.4);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(251, 146, 60, 0);
    }
}

.global-standby-switch {
    position: relative;
    width: 36px;
    height: 20px;
    cursor: pointer;
}

.global-standby-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.global-standby-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fb923c;
    border-radius: 20px;
    transition: 0.3s;
}

.global-standby-slider:before {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.global-standby-switch input:checked + .global-standby-slider {
    background: #99f0ce;
}

.global-standby-switch input:checked + .global-standby-slider:before {
    transform: translateX(16px);
}

.global-standby-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fb923c;
    transition: all 0.3s;
}

.global-standby-dot.connecting {
    background: #f59e0b;
    animation: dotPulse 1s ease-in-out infinite;
}

.global-standby-dot.connected,
.global-standby-dot.online {
    background: #99f0ce;
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.global-standby-text {
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s;
}

/* OFF text - more prominent */
.global-standby-toggle.offline .global-standby-text {
    color: #f97316;
    font-weight: 500;
}

/* ON text - calm green */
.global-standby-toggle.online .global-standby-text {
    color: #10b981;
    font-weight: 500;
}

/* ========== Global Incoming Call Modal ========== */
.global-incoming-call-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.global-incoming-call-modal.active {
    display: flex;
}

.global-incoming-call-content {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 32px 24px;
    width: 90%;
    max-width: 320px;
    text-align: center;
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.incoming-call-header {
    position: relative;
    margin-bottom: 16px;
}

.incoming-call-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.3;
    animation: incomingPulse 1.5s ease-out infinite;
}

@keyframes incomingPulse {
    0% {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0.4;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.4);
        opacity: 0;
    }
}

.global-incoming-call-content .caller-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    position: relative;
    z-index: 1;
    margin: 0 auto;
    display: block;
    border: 3px solid var(--primary);
}

.global-incoming-call-content .caller-name {
    font-size: 20px;
    font-weight: 600;
    margin: 16px 0 8px 0;
    color: var(--text);
}

.global-incoming-call-content .call-info {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 24px 0;
}

.incoming-call-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.incoming-call-actions .btn-reject,
.incoming-call-actions .btn-accept {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    border: none;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.incoming-call-actions .btn-reject {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.incoming-call-actions .btn-reject:hover {
    background: rgba(239, 68, 68, 0.25);
}

.incoming-call-actions .btn-accept {
    background: rgba(153, 240, 206, 0.15);
    color: #10b981;
}

.incoming-call-actions .btn-accept:hover {
    background: rgba(153, 240, 206, 0.25);
}

.incoming-call-hint {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
}

/* Toast Animation */
@keyframes toastFadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes toastFadeOut {
    from { opacity: 1; transform: translateX(-50%) translateY(0); }
    to { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

/* Mobile responsive for standby toggle */
@media (max-width: 480px) {
    .global-standby-toggle {
        padding: 4px 8px;
        gap: 4px;
    }

    .global-standby-text {
        display: none;
    }

    .global-standby-switch {
        width: 32px;
        height: 18px;
    }

    .global-standby-slider:before {
        height: 14px;
        width: 14px;
    }

    .global-standby-switch input:checked + .global-standby-slider:before {
        transform: translateX(14px);
    }

    /* Mobile OFF state - stronger visual cue */
    .global-standby-toggle.offline {
        animation: standbyOffPulseMobile 2s ease-in-out infinite;
    }
}

@keyframes standbyOffPulseMobile {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(251, 146, 60, 0.5);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 3px rgba(251, 146, 60, 0);
        transform: scale(1.02);
    }
}

/* ===========================================
   Dark Mode Component Overrides
   =========================================== */

[data-theme="dark"] .character-price {
    color: var(--text);
}

[data-theme="dark"] .btn-google {
    background: #374151;
    color: #f9fafb;
    border-color: #4b5563;
}

[data-theme="dark"] .btn-google:hover {
    background: #4b5563;
}

[data-theme="dark"] .form-input,
[data-theme="dark"] .modal-input {
    color-scheme: dark;
}

[data-theme="dark"] .time-slot:disabled,
[data-theme="dark"] .time-slot.disabled {
    background: #374151;
    color: #6b7280;
    border-color: #4b5563;
}

[data-theme="dark"] .placeholder-image {
    background: linear-gradient(135deg, #374151, #1f2937);
}

[data-theme="dark"] .mypage-menu-item {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .favorite-btn {
    background: rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .hooking-banner {
    background: #1a4a40;
}

[data-theme="dark"] .tag-pill {
    background: #1a4a40;
}

[data-theme="dark"] .transaction-grouped:hover {
    background: rgba(255, 255, 255, 0.03);
}

[data-theme="dark"] .region-dropdown {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* ===========================================================================
   Mobile Full-Width Layout (<=767px)
   ---------------------------------------------------------------------------
   Removes the default 480px max-width on the main shell so content fills the
   viewport on phones and small tablets. Applies to all main surfaces so the
   top header, bottom nav, banner slider, character slider, charge/CTA bars
   and live mini-player extend bezel-to-bezel.
   =========================================================================== */
@media (max-width: 767px) {
    body {
        max-width: 100%;
    }

    .header,
    .bottom-nav,
    .live-mini-player,
    .fixed-bottom-cta,
    .charge-bottom-bar,
    .banner-slider {
        max-width: 100%;
    }

    /* Banner slider is centered via margin:0 auto; left unchanged so it still
       spans the full width naturally. */

    /* Character detail page (templates/character.html) */
    .first-trial-banner {
        max-width: 100%;
    }
}

/* 핀치 줌 허용(user-scalable=no 제거)에 따른 보완 — iOS Safari는 16px 미만
   입력 필드 포커스 시 자동 줌하므로 모바일에서 텍스트 입력 컨트롤을 16px로 보장 */
@media (max-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="search"],
    input[type="tel"],
    input[type="url"],
    textarea,
    select {
        font-size: 16px !important;
    }
}
