/* ============================================================
   머더미스터리 커뮤니티 - 메인 스타일시트
   라이트 테마 기본, Noto Sans KR 폰트 사용
   ============================================================ */

/* ── CSS 변수 (컬러 팔레트) ────────────────────────────── */
:root {
    /* 주요 색상 */
    --color-primary: #c93648;
    --color-primary-hover: #ad2d3d;
    --color-primary-light: rgba(201, 54, 72, 0.08);

    /* 배경 - 따뜻한 크림 계열 */
    --color-bg: #fffaf7;
    --color-surface: #ffffff;
    --color-surface-2: #fff3ee;
    --color-card: #ffffff;
    --color-sidebar-bg: #fff8f5;

    /* 텍스트 */
    --color-text: #1c1615;
    --color-text-muted: #6b5c5e;
    --color-text-faint: #a89496;

    /* 테두리 - 따뜻한 로즈 계열 */
    --color-border: #f0dbd8;
    --color-border-light: #f7ecea;

    /* 상태 색상 */
    --color-success: #1e7a4a;
    --color-danger: #c93648;
    --color-warning: #b85e0a;
    --color-info: #1558c0;

    /* 배지 색상 */
    --color-badge-blue: rgba(21, 88, 192, 0.1);
    --color-badge-blue-text: #1558c0;
    --color-badge-green: rgba(30, 122, 74, 0.1);
    --color-badge-green-text: #1e7a4a;
    --color-badge-purple: rgba(100, 40, 180, 0.1);
    --color-badge-purple-text: #5b21b6;
    --color-badge-yellow: rgba(184, 94, 10, 0.1);
    --color-badge-yellow-text: #92400e;
    --color-badge-red: rgba(201, 54, 72, 0.1);
    --color-badge-red-text: #991b1b;
    --color-badge-gray: rgba(90, 82, 84, 0.1);
    --color-badge-gray-text: #4b4648;

    /* 보조 배경 */
    --color-bg-alt: #fdeee9;
    --color-bg-secondary: #ffffff;

    /* 그림자 - 따뜻한 톤 */
    --shadow-sm: 0 1px 3px rgba(120, 60, 50, 0.08);
    --shadow-md: 0 4px 12px rgba(120, 60, 50, 0.11);
    --shadow-lg: 0 8px 24px rgba(120, 60, 50, 0.14);

    /* 반경 */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* 전환 */
    --transition: 0.15s ease;

    /* 레이아웃 */
    --navbar-height: 60px;
    --container-max: 1200px;
    --sidebar-width: 240px;
}

/* ── 다크 테마 변수 ──────────────────────────────────────── */
[data-theme="dark"] {
    --color-primary: #c93648;
    --color-primary-hover: #ad2d3d;
    --color-primary-light: rgba(201, 54, 72, 0.12);

    --color-bg: #0e0c0c;
    --color-surface: #1a1516;
    --color-surface-2: #221c1e;
    --color-card: #1e1819;
    --color-sidebar-bg: #160f10;

    --color-text: #ede8e9;
    --color-text-muted: #8e8688;
    --color-text-faint: #5a5254;

    --color-border: #2e2628;
    --color-border-light: #3d3436;

    --color-success: #4caf82;
    --color-danger: #e05c5c;
    --color-warning: #f0a040;
    --color-info: #5c9ef0;

    --color-badge-blue: rgba(92, 158, 240, 0.15);
    --color-badge-blue-text: #7ab8ff;
    --color-badge-green: rgba(76, 175, 130, 0.15);
    --color-badge-green-text: #6ad4a0;
    --color-badge-purple: rgba(180, 120, 255, 0.15);
    --color-badge-purple-text: #c89fff;
    --color-badge-yellow: rgba(240, 160, 64, 0.15);
    --color-badge-yellow-text: #f0c060;
    --color-badge-red: rgba(224, 92, 92, 0.15);
    --color-badge-red-text: #ff8080;
    --color-badge-gray: rgba(136, 136, 153, 0.15);
    --color-badge-gray-text: #aaaacc;

    --color-bg-alt: #130f10;
    --color-bg-secondary: #1a1516;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* ── 테마 전환 트랜지션 ──────────────────────────────────── */
body,
.navbar,
.card,
.filter-panel,
.data-table th,
.data-table td,
.form-control,
.btn,
.badge,
.chip,
.sort-btn,
.toast,
.mobile-bottom-nav,
.admin-sidebar,
.stat-card,
.record-item,
.review-item,
.partner-item,
.game-card,
.meta-card,
.page-btn {
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

/* ── 키보드 포커스 표시 ─────────────────────────────────── */
:focus { outline: none; }
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* ── 리셋 및 기본 스타일 ────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-primary-hover);
}

img {
    max-width: 100%;
}

/* ── 네비게이션 ─────────────────────────────────────────── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    height: var(--navbar-height);
    display: flex;
    align-items: center;
}

.navbar-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-icon {
    width: 14px;
    height: 14px;
    color: var(--color-primary);
    flex-shrink: 0;
}

.brand-text {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--color-text);
    letter-spacing: -0.02em;
}

.navbar-menu {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
}

.nav-link {
    display: block;
    padding: 0.4rem 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-muted);
    border-radius: var(--radius-md);
    transition: color var(--transition), background var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-text);
    background: var(--color-surface-2);
}

.nav-link-admin {
    color: var(--color-warning) !important;
}

.nav-link-user {
    color: var(--color-primary) !important;
}

/* 테마 토글 버튼 */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: none;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--color-text-muted);
    transition: color var(--transition), border-color var(--transition), background var(--transition);
    flex-shrink: 0;
}

.theme-toggle:hover {
    color: var(--color-text);
    border-color: var(--color-border-light);
    background: var(--color-surface-2);
}

.theme-toggle svg {
    width: 16px;
    height: 16px;
}

/* 라이트모드(기본): 달 표시, 태양 숨김 */
:root .icon-sun,
[data-theme="light"] .icon-sun  { display: none; }
:root .icon-moon,
[data-theme="light"] .icon-moon { display: block; }

/* 다크모드: 태양 표시, 달 숨김 */
[data-theme="dark"] .icon-sun  { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

/* 햄버거 버튼 */
.navbar-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
}

.navbar-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* 열림 상태: X 모양으로 변환 */
.navbar-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.navbar-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.navbar-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── 버튼 ───────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 1.2rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    touch-action: manipulation;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.3;
}

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

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

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}
.btn-outline:hover:not(:disabled) {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.btn-ghost {
    background: transparent;
    color: var(--color-text-muted);
    border-color: transparent;
}
.btn-ghost:hover:not(:disabled) {
    background: var(--color-surface-2);
    color: var(--color-text);
}

.btn-danger {
    background: var(--color-danger);
    color: #fff;
    border-color: var(--color-danger);
}
.btn-danger:hover:not(:disabled) {
    background: #c84a4a;
}

.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.8rem; }
.btn-xs { padding: 0.2rem 0.55rem; font-size: 0.75rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 0.75rem 1.8rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* ── 폼 ─────────────────────────────────────────────────── */
.form-group {
    margin-bottom: 1.1rem;
}

.form-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text-muted);
    margin-bottom: 0.4rem;
    letter-spacing: 0.01em;
}

.form-label.required::after {
    content: '*';
    color: var(--color-danger);
    margin-left: 0.25rem;
}

.form-label-link {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--color-primary);
}

.form-control {
    width: 100%;
    padding: 0.6rem 0.85rem;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--color-text);
    background: var(--color-surface-2);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
    appearance: none;
}

.form-control:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
}

.form-control::placeholder {
    color: var(--color-text-faint);
}

.form-control-sm {
    padding: 0.4rem 0.7rem;
    font-size: 0.825rem;
}

.form-control-code {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 0.4em;
    text-align: center;
}

.form-hint {
    display: block;
    font-size: 0.78rem;
    color: var(--color-text-faint);
    margin-top: 0.3rem;
}

.form-hint-success { color: var(--color-success); }
.form-hint-error { color: var(--color-danger); }
.form-hint-warn { color: var(--color-warning); font-weight: 600; }

/* 비밀번호 정책 체크리스트 */
.pw-policy {
    list-style: none;
    margin: 0.4rem 0 0;
    padding: 0;
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.pw-rule {
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    background: var(--color-bg-alt);
    color: var(--color-text-faint);
    border: 1px solid var(--color-border);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.pw-rule::before { content: '○ '; }
.pw-rule-ok {
    background: color-mix(in srgb, var(--color-success) 12%, transparent);
    color: var(--color-success);
    border-color: color-mix(in srgb, var(--color-success) 40%, transparent);
}
.pw-rule-ok::before { content: '✓ '; }
.pw-rule-fail {
    background: color-mix(in srgb, var(--color-danger) 10%, transparent);
    color: var(--color-danger);
    border-color: color-mix(in srgb, var(--color-danger) 35%, transparent);
}
.pw-rule-fail::before { content: '✗ '; }

.form-check-group {
    margin-bottom: 1rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.form-check-input {
    width: 16px;
    height: 16px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.form-check-label {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    cursor: pointer;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.form-row-4 {
    grid-template-columns: repeat(4, 1fr);
}

.form-static {
    padding: 0.6rem 0;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

/* 비밀번호 토글 래퍼 */
.input-with-toggle {
    position: relative;
}

.input-with-toggle .form-control {
    padding-right: 2.5rem;
}

.password-toggle {
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    font-size: 1rem;
    padding: 0.2rem;
    transition: color var(--transition);
}

.password-toggle:hover {
    color: var(--color-text);
}

/* textarea */
textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* select */
select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888899' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
}

/* ── 카드 ───────────────────────────────────────────────── */
.card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
}

.card-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--color-text);
    letter-spacing: -0.01em;
}

.card-body {
    padding: 1.25rem;
}

.card-link {
    font-size: 0.8rem;
    color: var(--color-primary);
}

.card-badge {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    background: var(--color-surface-2);
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
}

/* ── 배지 ───────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

.badge-blue { background: var(--color-badge-blue); color: var(--color-badge-blue-text); }
.badge-green { background: var(--color-badge-green); color: var(--color-badge-green-text); }
.badge-purple { background: var(--color-badge-purple); color: var(--color-badge-purple-text); }
.badge-yellow { background: var(--color-badge-yellow); color: var(--color-badge-yellow-text); }
.badge-red { background: var(--color-badge-red); color: var(--color-badge-red-text); }
.badge-gray { background: var(--color-badge-gray); color: var(--color-badge-gray-text); }

/* ── 토스트 알림 ─────────────────────────────────────────── */
.toast-container {
    position: fixed;
    top: calc(var(--navbar-height) + 1rem);
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 280px;
    max-width: 420px;
    pointer-events: all;
    animation: toastSlideIn 0.25s ease;
    font-size: 0.875rem;
    font-weight: 500;
}

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

.toast-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 0.05rem; }
.toast-message { flex: 1; color: var(--color-text); }
.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-faint);
    font-size: 1rem;
    padding: 0;
    flex-shrink: 0;
    transition: color var(--transition);
}
.toast-close:hover { color: var(--color-text); }

@keyframes toastSlideIn {
    from { transform: translateX(110%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes toastSlideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(110%); opacity: 0; }
}

.toast-hide {
    animation: toastSlideOut 0.25s ease forwards;
}

/* ── 메인 레이아웃 ──────────────────────────────────────── */
.main-content {
    flex: 1;
    padding-bottom: 2rem;
}

.page-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 1.5rem 1.5rem;
}

.page-container-narrow {
    max-width: 680px;
}

.page-header {
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--color-text);
    letter-spacing: -0.03em;
    margin-bottom: 0.25rem;
}

.page-subtitle {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.page-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.75rem;
}

/* ── 인증 페이지 ─────────────────────────────────────────── */
.auth-container {
    min-height: calc(100vh - var(--navbar-height));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

.auth-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.auth-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 0.3rem;
}

.auth-subtitle {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.auth-footer {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.25rem 0;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--color-text-faint);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-border);
}

.auth-form-resend {
    margin-top: 0;
}

/* ── 검색 바 ────────────────────────────────────────────── */
.search-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.search-bar {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--color-surface-2);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color var(--transition);
}

.search-bar:focus-within {
    border-color: var(--color-primary);
}

.search-icon {
    padding: 0 0.75rem;
    width: 16px;
    height: 16px;
    color: var(--color-text-faint);
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    padding: 0.7rem 0;
    background: none;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--color-text);
}

.search-input::placeholder {
    color: var(--color-text-faint);
}

.search-clear {
    padding: 0 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-faint);
    font-size: 0.9rem;
    transition: color var(--transition);
    touch-action: manipulation;
    min-width: 44px;
    min-height: 44px;
}

.search-clear:hover {
    color: var(--color-text);
}

/* ── 필터 패널 ──────────────────────────────────────────── */
.filter-panel {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

/* 인원 수처럼 칩이 많을 때 전체 너비 차지 */
.filter-group--wide {
    grid-column: 1 / -1;
}

/* 12인+ 등 특수 칩: 점선 구분 */
.chip--more {
    border-style: dashed;
}

.filter-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.filter-separator {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.filter-store-stack {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.submit-hint {
    text-align: right;
    margin-bottom: 0.5rem;
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    border-top: 1px solid var(--color-border);
    padding-top: 1rem;
}

/* 칩 필터 */
.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 700;
    font-family: inherit;
    background: var(--color-surface-2);
    border: 1.5px solid var(--color-border);
    border-radius: 999px;
    cursor: pointer;
    touch-action: manipulation;
    color: var(--color-text-muted);
    transition: all var(--transition);
}

.chip:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.chip-active {
    background: var(--color-primary-light);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    font-weight: 700;
    background: var(--color-primary);
    color: #fff;
    border-radius: 999px;
    margin-left: 0.25rem;
}

/* ── 결과 바 ────────────────────────────────────────────── */
.results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.results-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.results-count {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* 안 한 작품만 보기 토글 버튼 */
.unplayed-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    border: 1.5px solid var(--color-border);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-text-muted);
    background: transparent;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s ease;
}

.unplayed-toggle svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

.unplayed-toggle input[type="checkbox"] {
    display: none;
}

.unplayed-toggle:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* 체크된 상태 */
.unplayed-toggle:has(input:checked) {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.sort-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-label {
    font-size: 0.8rem;
    color: var(--color-text-faint);
}

.sort-buttons {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.sort-btn {
    padding: 0.25rem 0.6rem;
    font-size: 0.78rem;
    font-weight: 700;
    font-family: inherit;
    background: none;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--color-text-muted);
    transition: all var(--transition);
}

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

.sort-btn-active {
    background: var(--color-primary-light);
    border-color: var(--color-primary);
    color: var(--color-primary);
    font-weight: 800;
}

/* ── 인원 수 드롭다운 ─────────────────────────────────── */
.players-dropdown-wrap {
    position: relative;
}

/* sort-btn과 함께 사용하므로 추가 속성만 정의 */
.players-dropdown-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}

.players-dropdown-btn--active {
    background: var(--color-primary-light);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.players-dropdown-arrow {
    font-size: 0.65rem;
    opacity: 0.7;
}

/* 드롭다운 패널 */
.players-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 200;
    background: var(--color-surface);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    min-width: 220px;
    padding: 0.6rem;
}

.players-dropdown-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

/* 개별 인원 옵션 버튼 */
.players-opt {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    padding: 0.25rem 0.5rem;
    font-size: 0.78rem;
    font-weight: 700;
    font-family: inherit;
    background: var(--color-surface-2);
    border: 1.5px solid var(--color-border);
    border-radius: 999px;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: all var(--transition);
}

.players-opt:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.players-opt--active {
    background: var(--color-primary-light);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* 12인+ 옵션: 점선 테두리로 구분 */
.players-opt--more {
    border-style: dashed;
}

/* ── 테이블 ─────────────────────────────────────────────── */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    margin-bottom: 1rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table th {
    padding: 0.75rem 1rem;
    background: var(--color-surface-2);
    color: var(--color-text-muted);
    font-weight: 700;
    font-size: 0.78rem;
    text-align: left;
    white-space: nowrap;
    letter-spacing: 0.03em;
    border-bottom: 1px solid var(--color-border);
}

.data-table td {
    padding: 0.7rem 1rem;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.table-row {
    cursor: pointer;
    transition: background var(--transition);
}

.table-row:hover {
    background: var(--color-surface-2);
}

.col-id { color: var(--color-text-faint); font-size: 0.78rem; width: 4rem; }
.col-date { font-size: 0.8rem; color: var(--color-text-muted); white-space: nowrap; }
.col-ip { font-family: monospace; font-size: 0.8rem; }
.col-ua { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-actions { white-space: nowrap; }

.game-title-link {
    color: var(--color-text);
    font-weight: 700;
    transition: color var(--transition);
}

.game-title-link:hover {
    color: var(--color-primary);
}

.sortable {
    cursor: pointer;
    user-select: none;
}

.sortable:hover {
    background: var(--color-surface);
    color: var(--color-text);
}

.sort-indicator {
    font-size: 0.65rem;
    opacity: 0.4;
    margin-left: 0.2rem;
    vertical-align: middle;
}

.col-sorted .sort-indicator {
    opacity: 1;
    color: var(--color-primary);
}

/* ── 난이도 점 ──────────────────────────────────────────── */
.difficulty-dots {
    display: flex;
    gap: 3px;
}

.difficulty-dots-lg {
    gap: 5px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-border);
}

.dot-filled {
    background: var(--color-primary);
}

/* 반쪽 채워진 점: 왼쪽 절반만 색상 적용 */
.dot-half {
    background: linear-gradient(
        to right,
        var(--color-primary) 50%,
        var(--color-border) 50%
    );
}

.difficulty-dots-lg .dot {
    width: 11px;
    height: 11px;
}

/* ── 평점 ───────────────────────────────────────────────── */
.rating-display {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.rating-star {
    color: #f0c040;
    font-size: 0.9rem;
}

.rating-star-lg {
    color: #f0c040;
    font-size: 1.2rem;
}

.rating-value {
    font-weight: 700;
    font-size: 0.9rem;
}

.rating-count {
    font-size: 0.75rem;
    color: var(--color-text-faint);
}

.rating-count-sm {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.rating-empty {
    color: var(--color-text-faint);
}

.rating-pending {
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

/* 별점 입력 UI */
.star-rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 4px;
    margin-bottom: 0.5rem;
}

.star-rating-input input[type="radio"] {
    display: none;
}

.star-rating-input label {
    font-size: 1.8rem;
    color: var(--color-border);
    cursor: pointer;
    transition: color var(--transition);
    line-height: 1;
}

.star-rating-input label:hover,
.star-rating-input label:hover ~ label,
.star-rating-input input[type="radio"]:checked ~ label {
    color: #f0c040;
}

/* 슬라이더 평점 입력 UI */
.slider-rating-input {
    margin-bottom: 0.5rem;
}

.slider-rating-display {
    text-align: center;
    margin-bottom: 0.5rem;
}

.slider-rating-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-primary);
}

.slider-rating-max {
    font-size: 1rem;
    color: var(--color-text-muted);
    font-weight: 400;
}

.rating-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--color-border);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.rating-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--color-primary);
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.rating-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--color-primary);
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.slider-rating-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--color-text-faint);
    margin-top: 0.25rem;
    padding: 0 2px;
}

.rating-hint {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
}

/* ── 찜 버튼 ────────────────────────────────────────────── */
.favorite-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--color-text-faint);
    transition: color var(--transition), transform var(--transition);
    padding: 0.2rem;
    line-height: 1;
}

.favorite-btn:hover,
.favorite-btn.favorited {
    color: var(--color-danger);
}

.favorite-btn:hover {
    transform: scale(1.2);
}

.favorite-btn.favorited {
    color: var(--color-danger);
}

.favorite-btn-login {
    font-size: 1.2rem;
    color: var(--color-text-faint);
    text-decoration: none;
}

.favorite-btn-lg {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    background: var(--color-surface-2);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 700;
    font-family: inherit;
    color: var(--color-text-muted);
    transition: all var(--transition);
}

.favorite-btn-lg .fav-icon {
    font-size: 1.1rem;
}

.favorite-btn-lg:hover,
.favorite-btn-lg.favorited {
    border-color: var(--color-danger);
    color: var(--color-danger);
    background: rgba(224, 92, 92, 0.08);
}

/* ── 페이지네이션 ───────────────────────────────────────── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 1rem 0;
    flex-wrap: wrap;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    font-size: 0.85rem;
    font-family: inherit;
    font-weight: 500;
    background: var(--color-surface-2);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: all var(--transition);
}

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

.page-btn-active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
    font-weight: 700;
}

.page-ellipsis {
    color: var(--color-text-faint);
    padding: 0 0.25rem;
}

/* ── 모바일 카드 그리드 ──────────────────────────────────── */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.game-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
}

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

.game-card-header {
    padding: 0.875rem 1rem 0.5rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    min-height: 3.2rem;
}

.game-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text);
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
}

.game-card-title:hover {
    color: var(--color-primary);
}

.game-card-body {
    padding: 0.5rem 1rem 0.875rem;
    margin-top: auto;
}

.game-card-meta {
    display: flex;
    align-items: center;
    gap: 0.3rem 0.4rem;
    margin-bottom: 0.4rem;
    flex-wrap: wrap;
    min-height: 1.6rem;
}

.meta-item {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}

.game-card-stats {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    height: 1.4rem;
    overflow: hidden;
}

.stat-item {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* ── 빈 상태 ────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 4rem 1rem;
}

.empty-state-sm {
    padding: 2rem 1rem;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.empty-desc {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

/* ── 작품 상세 페이지 ────────────────────────────────────── */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: var(--color-text-muted);
}

.breadcrumb a:hover {
    color: var(--color-primary);
}

.breadcrumb-sep {
    color: var(--color-text-faint);
}

.detail-header {
    margin-bottom: 1.5rem;
}

.detail-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.detail-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--color-text);
    letter-spacing: -0.03em;
}

.detail-meta-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.meta-card {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.6rem 1rem;
    min-width: 100px;
}

.meta-card-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--color-text-faint);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.meta-card-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-text);
}

.detail-description {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.7;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.detail-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.detail-left,
.detail-right {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ── 타이머 ─────────────────────────────────────────────── */
.timer-card {
    position: relative;
}

.timer-stages {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 1rem;
    max-height: 180px;
    overflow-y: auto;
}

.timer-stage {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition);
    font-size: 0.82rem;
    border: 1px solid transparent;
}

.timer-stage:hover {
    background: var(--color-surface-2);
}

.timer-stage-active {
    background: var(--color-primary-light);
    border-color: var(--color-primary);
}

.stage-order {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: var(--color-surface-2);
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

.timer-stage-active .stage-order {
    background: var(--color-primary);
    color: #fff;
}

.stage-name {
    flex: 1;
    color: var(--color-text);
    font-weight: 500;
}

.stage-duration {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.timer-display {
    text-align: center;
    padding: 1rem 0;
    border-top: 1px solid var(--color-border);
}

.timer-stage-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

.timer-clock {
    font-size: 3rem;
    font-weight: 800;
    font-family: monospace;
    color: var(--color-text);
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.timer-clock.timer-warning {
    color: var(--color-warning);
}

.timer-clock.timer-danger {
    color: var(--color-danger);
}

.timer-progress {
    margin-bottom: 0.75rem;
}

.timer-slider {
    width: 100%;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.timer-controls {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.timer-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-family: inherit;
    font-weight: 700;
    background: var(--color-surface-2);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--color-text);
    transition: all var(--transition);
}

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

.timer-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.timer-btn-primary {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.timer-btn-primary:hover:not(:disabled) {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    color: #fff;
}

.timer-options {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.timer-option {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    cursor: pointer;
}

/* 단계 진행 표시 (1 / 4) */
.timer-stage-progress {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-text-muted);
    text-align: center;
    margin-bottom: 0.25rem;
    letter-spacing: 0.05em;
}

/* 전체화면 모드 */
.timer-fullscreen {
    position: fixed !important;
    inset: 0 !important;
    z-index: 9999 !important;
    border-radius: 0 !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--color-bg) !important;
}

.timer-fullscreen .timer-clock {
    font-size: 8rem;
}

.timer-fullscreen .timer-stage-name {
    font-size: 1.5rem;
}

.timer-fullscreen .timer-stage-progress {
    font-size: 1rem;
}

.timer-fullscreen .timer-stages {
    max-height: 180px;
}

/* 자유 타이머 */
.free-timer {
    text-align: center;
}

.free-timer-presets {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.free-preset-btn {
    padding: 0.45rem 0.85rem;
    border: 1.5px solid var(--color-border);
    border-radius: 999px;
    background: transparent;
    color: var(--color-text);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, transform 0.1s;
}

.free-preset-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.free-preset-btn--active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
    transform: scale(0.95);
}

.free-timer-hint {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 0.75rem;
}

.timer-sound-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: var(--color-bg-secondary);
    border-radius: 8px;
}

.timer-sound-icon {
    font-size: 1rem;
    flex-shrink: 0;
    width: 1.4rem;
    text-align: center;
}

.timer-volume-slider {
    flex: 1;
    height: 4px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.timer-sound-test {
    flex-shrink: 0;
    padding: 0.2rem 0.6rem;
    font-size: 0.78rem;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-bg);
    color: var(--color-text);
    cursor: pointer;
    white-space: nowrap;
}

.timer-sound-test:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

/* ── 리뷰 ───────────────────────────────────────────────── */
.review-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.review-item {
    padding: 1rem;
    background: var(--color-surface-2);
    border-radius: var(--radius-md);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
    flex-wrap: wrap;
}

.review-author {
    font-weight: 700;
    font-size: 0.875rem;
}

.review-rating {
    color: #f0c040;
    font-size: 0.8rem;
    font-weight: 700;
}

.review-date {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    margin-left: auto;
}

.review-partners {
    font-size: 0.78rem;
    color: var(--color-text-faint);
    margin-bottom: 0.4rem;
}

.review-content {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* ── 대시보드 ────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.stats-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.stat-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.stat-card-warning {
    border-color: var(--color-warning);
    background: rgba(240, 160, 64, 0.05);
}

.stat-icon {
    font-size: 1.6rem;
    line-height: 1;
}

.stat-body {
    flex: 1;
    min-width: 0;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--color-text);
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.stat-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-top: 0.1rem;
}

.stat-sub {
    font-size: 0.75rem;
    color: var(--color-text-faint);
    margin-top: 0.15rem;
}

.stat-link {
    font-size: 0.75rem;
    color: var(--color-warning);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1rem;
}

.dashboard-main { min-width: 0; }
.dashboard-side {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* 플레이 기록 목록 */
.record-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.record-item {
    padding: 0.875rem;
    background: var(--color-surface-2);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--color-primary);
}

.record-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text);
    display: block;
    margin-bottom: 0.3rem;
}

.record-title:hover {
    color: var(--color-primary);
}

.record-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: var(--color-text-muted);
    flex-wrap: wrap;
    margin-bottom: 0.3rem;
}

.record-rating { color: #f0c040; font-weight: 700; }
.record-partners { color: var(--color-text-faint); }

.nickname-link {
    color: var(--color-primary);
    text-decoration: none;
}
.nickname-link:hover {
    text-decoration: underline;
}

.record-memo {
    font-size: 0.825rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
}

/* 파트너 목록 */
.partner-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.partner-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    background: var(--color-surface-2);
}

.partner-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-primary);
    flex-shrink: 0;
}

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

.partner-name {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-text);
}

.partner-count {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.partner-rank {
    font-size: 1rem;
}

/* 빠른 메뉴 */
.quick-menu {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.quick-menu-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-md);
    color: var(--color-text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    transition: background var(--transition), color var(--transition);
    text-decoration: none;
}

.quick-menu-item:hover {
    background: var(--color-surface-2);
    color: var(--color-text);
}

/* ── Finder 태그 입력 ────────────────────────────────────── */
.finder-form-card {
    margin-bottom: 1.5rem;
}

.tag-input-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    min-height: 48px;
    padding: 0.5rem 0.75rem;
    background: var(--color-surface-2);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: text;
    transition: border-color var(--transition);
}

.tag-input-wrapper:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    background: var(--color-primary-light);
    border: 1px solid var(--color-primary);
    border-radius: 999px;
    font-size: 0.825rem;
    font-weight: 700;
    color: var(--color-primary);
}

.tag-error {
    background: var(--color-badge-red);
    border-color: var(--color-danger);
    color: var(--color-badge-red-text);
}

.tag-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    font-size: 0.8rem;
    padding: 0;
    line-height: 1;
    opacity: 0.7;
    transition: opacity var(--transition);
}

.tag-remove:hover {
    opacity: 1;
}

.tag-input {
    flex: 1;
    min-width: 120px;
    border: none;
    background: none;
    outline: none;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--color-text);
    padding: 0.1rem;
}

.tag-input::placeholder {
    color: var(--color-text-faint);
}

/* ── Finder 파트너 / 파티 ────────────────────────────────── */
.finder-shortcuts {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.finder-favorites-row {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: flex-start;
}

.finder-favorites-row > .finder-shortcut-card {
    flex: 1 1 0%;
    min-width: 0;
    width: 0;
}

.finder-shortcut-card {
    margin-bottom: 0;
}

/* 접기/펼치기 */
.collapsible-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    gap: .5rem;
}

.collapsible-arrow {
    font-size: .85rem;
    color: var(--color-text-muted);
    transition: transform .2s;
    flex-shrink: 0;
}

.collapsible-header.collapsed .collapsible-arrow {
    transform: rotate(-90deg);
}

.collapsible-body {
    margin-top: .6rem;
    overflow: hidden;
    transition: max-height .25s ease, opacity .2s ease;
}

.collapsible-body.collapsed {
    max-height: 0 !important;
    opacity: 0;
    margin-top: 0;
    overflow: hidden;
}

.finder-shortcut-title {
    font-size: .95rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 .2rem;
}

.finder-shortcut-hint {
    font-size: .8rem;
    color: var(--color-text-faint);
    margin: 0 0 .75rem;
}

.partner-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.partner-chip {
    padding: .3rem .75rem;
    border-radius: 999px;
    border: 1.5px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
    font-size: .82rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.partner-chip:hover {
    border-color: var(--color-primary);
    background: var(--color-surface-2);
}

.party-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .2rem;
}

.party-list {
    list-style: none;
    padding: 0;
    margin: .5rem 0 0;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.party-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .6rem .75rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: .5rem;
}

.party-info {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    min-width: 0;
}

.party-name {
    font-size: .9rem;
    font-weight: 700;
    color: var(--color-text);
}

.party-members {
    font-size: .78rem;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.party-actions {
    display: flex;
    gap: .4rem;
    flex-shrink: 0;
}

.party-empty {
    font-size: .85rem;
    color: var(--color-text-faint);
    margin: .25rem 0 0;
}

/* 개발 중 공지사항 배너 */
.dev-notice {
    display: flex;
    align-items: center;
    gap: .6rem;
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-left: 3px solid var(--color-warning);
    border-radius: var(--radius);
    padding: .6rem .9rem;
    margin-bottom: 1rem;
    font-size: .85rem;
    color: var(--color-text-muted);
}

.dev-notice-icon {
    flex-shrink: 0;
}

.dev-notice-text {
    flex: 1;
    line-height: 1.4;
}

.dev-notice-close {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-faint);
    font-size: .8rem;
    padding: 0 2px;
    line-height: 1;
}

.dev-notice-close:hover {
    color: var(--color-text-muted);
}

/* Finder 필터 패널 */
.finder-filter-panel {
    margin-top: 1rem;
    border-top: 1px solid var(--color-border);
    padding-top: .75rem;
}

.finder-filter-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    font-size: .9rem;
    padding: 0;
    display: flex;
    align-items: center;
    gap: .25rem;
}

.finder-filter-toggle:hover {
    color: var(--color-text);
}

.finder-filter-body {
    margin-top: .75rem;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: .3rem;
}

.filter-label {
    font-size: .8rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

.filter-range {
    display: flex;
    align-items: center;
    gap: .3rem;
}

.filter-range input {
    width: 5rem;
}

.filter-range-sep {
    color: var(--color-text-muted);
    font-size: .85rem;
}

/* Finder 결과 */
.finder-results {
    margin-top: 1.5rem;
}

.results-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.results-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
}

.users-list {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-right: 0.4rem;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    background: var(--color-primary-light);
    border: 1px solid var(--color-primary);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-primary);
}

/* ── 프로필 정보 목록 ────────────────────────────────────── */
.info-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

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

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

.info-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text-muted);
}

.info-value {
    font-size: 0.875rem;
    color: var(--color-text);
}

/* ── 관리자 페이지 ──────────────────────────────────────── */
.admin-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.admin-page-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.admin-search-form {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    max-width: 400px;
}

.admin-filter-form {
    width: 100%;
}

.filter-inline {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.action-group {
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

.admin-table th, .admin-table td {
    font-size: 0.82rem;
    padding: 0.6rem 0.875rem;
}

.admin-dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 1rem;
    background: var(--color-surface-2);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--color-text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    transition: all var(--transition);
    position: relative;
}

.quick-action-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--color-primary-light);
}

.qa-icon {
    font-size: 1.5rem;
}

.qa-badge {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    background: var(--color-danger);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.1rem 0.35rem;
    border-radius: 999px;
}

/* 로그 리스트 */
.log-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.log-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.82rem;
}

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

.log-detail {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--color-text-muted);
    font-size: 0.78rem;
}

.log-badge {
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.log-badge-success { background: var(--color-badge-green); color: var(--color-badge-green-text); }
.log-badge-danger { background: var(--color-badge-red); color: var(--color-badge-red-text); }
.log-badge-info { background: var(--color-badge-blue); color: var(--color-badge-blue-text); }
.log-badge-primary { background: var(--color-badge-purple); color: var(--color-badge-purple-text); }
.log-badge-gray { background: var(--color-badge-gray); color: var(--color-badge-gray-text); }

/* 탭 바 */
.tab-bar {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 0;
}

.tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    text-decoration: none;
    transition: color var(--transition), border-color var(--transition);
}

.tab-btn:hover {
    color: var(--color-text);
}

.tab-btn-active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* 리뷰 관리 카드 */
.review-admin-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.review-admin-card {
    overflow: visible;
}

.review-admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    flex-wrap: wrap;
}

.review-admin-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.82rem;
}

.review-admin-game {
    font-weight: 700;
}

.review-admin-actions {
    margin-top: 0.75rem;
    display: flex;
    gap: 0.5rem;
}

.review-created {
    font-size: 0.75rem;
    color: var(--color-text-faint);
}

/* 관리자 폼 */
.admin-form-container {
    max-width: 900px;
}

.form-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-card {
    height: fit-content;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* 단계 타이머 폼 */
.stage-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: var(--color-surface-2);
    border-radius: var(--radius-md);
    transition: opacity 0.15s;
}

.stage-drag-handle {
    cursor: grab;
    font-size: 1.2rem;
    color: var(--color-text-faint);
    padding: 0 4px;
    flex-shrink: 0;
    user-select: none;
}

.stage-drag-handle:active {
    cursor: grabbing;
}

.stage-dragging {
    opacity: 0.4;
}

.stage-drag-over {
    outline: 2px dashed var(--color-primary);
    outline-offset: 2px;
}

.stage-order-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.stage-inputs {
    flex: 1;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    min-width: 0;
    flex-wrap: wrap;
}

.stage-duration-inputs {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.stage-duration-inputs .form-control {
    width: 60px;
}

.stage-no-limit-label {
    display: flex;
    align-items: center;
    gap: .3rem;
    font-size: .8rem;
    color: var(--color-text-muted);
    white-space: nowrap;
    cursor: pointer;
}

.stage-sep {
    color: var(--color-text-muted);
    font-weight: 700;
}

.stage-hint {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-border);
}

/* Alert */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
}

.alert-warning {
    background: var(--color-badge-yellow);
    color: var(--color-badge-yellow-text);
    border: 1px solid rgba(240, 160, 64, 0.3);
}

.mt-2 { margin-top: 0.5rem; }

/* ── 푸터 ───────────────────────────────────────────────── */
.footer {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: 1.25rem 0;
    margin-top: auto;
}

.footer-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.footer-link {
    font-size: .8rem;
    color: var(--color-text-muted);
    text-decoration: none;
}
.footer-link:hover {
    color: var(--color-text);
    text-decoration: underline;
}

.footer-divider {
    font-size: .8rem;
    color: var(--color-text-faint);
}

.footer-text {
    font-size: 0.75rem;
    color: var(--color-text-faint);
    text-align: center;
    margin: 0;
}

/* ── 소개 / 문의 페이지 ───────────────────────────────── */
.about-section {
    margin-bottom: 2.5rem;
}

.about-heading {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: .75rem;
    padding-bottom: .4rem;
    border-bottom: 2px solid var(--color-border);
}

.about-body {
    font-size: .95rem;
    color: var(--color-text-muted);
    line-height: 1.75;
}

.about-feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.about-feature-list li {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    font-size: .95rem;
}

.about-feature-list li strong {
    color: var(--color-text);
}

.about-feature-list li span {
    color: var(--color-text-muted);
}

.about-step-list {
    padding-left: 1.25rem;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

.about-step-list li {
    font-size: .95rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.contact-email-box {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: .5rem;
    padding: .75rem 1.25rem;
    margin-top: .75rem;
}

.contact-email-label {
    font-size: .8rem;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
}

.contact-email-addr {
    font-size: .95rem;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
}
.contact-email-addr:hover {
    text-decoration: underline;
}

/* ── 라이트 모드 전용 보정 ───────────────────────────────── */
[data-theme="light"] .star-rating-input label {
    color: #d1c4c6;
}

[data-theme="light"] .dot {
    background: #c8bdbf;
}

[data-theme="light"] .table-row:hover {
    background: var(--color-surface-2);
}

[data-theme="light"] .navbar {
    box-shadow: var(--shadow-sm);
}

[data-theme="light"] .card {
    box-shadow: var(--shadow-sm);
}

/* ── 모바일 정렬 바 ─────────────────────────────────────── */
/* 기본은 숨김 — 모바일 미디어 쿼리에서 표시 */
.mobile-sort-bar {
    display: none;
    margin-bottom: 0.75rem;
}

.mobile-sort-bar .form-control {
    width: 100%;
}

/* ── 뷰 토글 버튼 ────────────────────────────────────────── */
.view-toggle-group {
    display: flex;
    gap: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.view-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    height: 34px;
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    font-size: 0.78rem;
    font-weight: 600;
}

.view-toggle-btn + .view-toggle-btn {
    border-left: 1px solid var(--color-border);
}

.view-toggle-btn svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.view-toggle-label {
    pointer-events: none;
}

.view-toggle-btn:hover {
    background: var(--color-surface-2);
    color: var(--color-text);
}

.view-toggle-btn.active {
    background: var(--color-primary);
    color: #fff;
}

/* ── 뷰 모드 제어 ─────────────────────────────────────────── */
/* 기본(리스트): 테이블 보이고 카드 숨김 */
.view-table { display: block; }
.view-card  { display: none; }

/* 카드 모드일 때 */
#boardgameResults.mode-card .view-table { display: none; }
#boardgameResults.mode-card .view-card  { display: grid; }

/* 모바일 기본은 카드 뷰 — 단, JS 토글 시 인라인 스타일이 우선해야 하므로 !important 사용 안 함 */
@media (max-width: 768px) {
    .view-table { display: none; }
    .view-card  { display: grid; }
    .mobile-only-el { display: block; }
}

/* 데스크톱 카드 뷰 — 이미지 더 크게 */
#boardgameResults.mode-card .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.6rem;
}

#boardgameResults.mode-card .game-card-image,
#boardgameResults.mode-card .game-card-image-placeholder {
    aspect-ratio: 3 / 4;
    height: auto;
}

#boardgameResults.mode-card .game-card-header {
    padding: 0.5rem 0.6rem 0.3rem;
}

#boardgameResults.mode-card .game-card-title {
    font-size: 0.82rem;
}

#boardgameResults.mode-card .game-card-body {
    padding: 0.25rem 0.6rem 0.6rem;
}

#boardgameResults.mode-card .game-card-meta {
    font-size: 0.72rem;
}

#boardgameResults.mode-card .game-card-stats {
    font-size: 0.72rem;
    gap: 0.5rem;
}

/* ── 반응형 ─────────────────────────────────────────────── */
.desktop-only { display: block; }
.mobile-only  { display: none; }
.mobile-only-el { display: none; }

@media (max-width: 1024px) {
    .stats-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .admin-dashboard-grid {
        grid-template-columns: 1fr;
    }
    .form-card-grid {
        grid-template-columns: 1fr;
    }
    /* 태블릿: 상세 페이지 2단 → 1단 */
    .detail-body {
        grid-template-columns: 1fr;
    }
    /* 태블릿: 대시보드 사이드바 해제 */
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .navbar-toggle {
        display: flex;
    }

    .navbar-menu {
        position: absolute;
        top: var(--navbar-height);
        left: 0;
        right: 0;
        background: var(--color-surface);
        border-bottom: 1px solid var(--color-border);
        z-index: 99;
    }

    .navbar-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
    }

    .nav-link {
        text-align: left;
    }

    .desktop-only { display: none; }
    .mobile-only  { display: block; }
    .mobile-only-el { display: block; }
    .view-toggle-group { display: flex; }
    .view-toggle-label { display: none; }

    /* 모바일 리스트 뷰: 가로 스크롤 */
    .view-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .view-table .data-table { min-width: 600px; }
    .game-title-link { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; max-width: 160px; }
    .view-toggle-btn { padding: 0.4rem 0.5rem; }

    /* 작품 상세 2열 → 1열 */
    .detail-body {
        grid-template-columns: 1fr;
    }

    /* 타이머 카드: sticky 해제 (모바일에선 스크롤로 접근) */
    .timer-card {
        position: static;
    }

    /* 대시보드 2열 → 1열 */
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-row-4 {
        grid-template-columns: 1fr 1fr;
    }

    /* 페이지 헤더: 세로 스택 */
    .page-header {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }

    .page-title {
        font-size: 1.3rem;
    }

    /* 검색 바: 세로 스택 */
    .search-bar-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .search-bar-wrapper .btn {
        width: 100%;
        justify-content: center;
    }

    /* 필터 패널: 1열 그리드 */
    .filter-grid {
        grid-template-columns: 1fr;
    }

    /* 인원 수 와이드 그룹도 1열 안에서 자동 */
    .filter-group--wide {
        grid-column: 1;
    }

    /* 칩 그룹: wrap 유지 (기본 이미 flex-wrap:wrap) */
    .chip-group {
        flex-wrap: wrap;
    }

    /* 결과 바 */
    .results-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .results-left {
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    /* 정렬 그룹: 가로 스크롤 허용, overflow visible로 dropdown 클리핑 방지 */
    .sort-group {
        width: 100%;
        overflow: visible;
    }

    .sort-buttons {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 0.25rem;
        padding-bottom: 2px;
    }

    .sort-buttons::-webkit-scrollbar {
        display: none;
    }

    .sort-btn {
        font-size: 0.8rem;
        padding: 0.45rem 0.7rem;
        white-space: nowrap;
        flex-shrink: 0;
        min-height: 36px;
        touch-action: manipulation;
    }

    /* 인원 드롭다운: 모바일에서 필터 패널 칩으로 대체 — 정렬바에서 숨김 */
    .players-dropdown-wrap {
        display: none;
    }

    /* 모바일 카드 그리드: 1열 */
    .card-grid {
        grid-template-columns: 1fr;
    }

    /* 관리자 폼 그리드: 1열 */
    .form-card-grid {
        grid-template-columns: 1fr;
    }

    /* 관리자 페이지 헤더: 세로 스택 */
    .admin-page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-search-form {
        max-width: 100%;
    }

    /* 관리자 대시보드 그리드: 1열 */
    .admin-dashboard-grid {
        grid-template-columns: 1fr;
    }

    /* 퀵 액션: 4열 → 2열 */
    .quick-actions {
        grid-template-columns: 1fr 1fr;
    }

    /* 탭 바: 가로 스크롤 */
    .tab-bar {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        flex-wrap: nowrap;
    }

    .tab-bar::-webkit-scrollbar {
        display: none;
    }

    .tab-btn {
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* 리뷰 헤더: 줄바꿈 허용 */
    .review-header {
        flex-wrap: wrap;
    }

    /* 리뷰 날짜를 별도 줄로 */
    .review-date {
        margin-left: 0;
        width: 100%;
    }

    /* 토스트: 화면 너비에 맞게 */
    .toast-container {
        right: 0.5rem;
        left: 0.5rem;
    }

    .toast {
        min-width: unset;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .page-container {
        padding: 0.75rem;
    }

    .auth-card {
        padding: 1.25rem;
        border-radius: var(--radius-lg);
    }

    /* 통계 그리드: 2열 유지 (숫자가 작아도 보임) */
    .stats-grid-4 {
        grid-template-columns: 1fr 1fr;
    }

    /* 폼 행: 1열로 */
    .form-row {
        grid-template-columns: 1fr;
    }

    .form-row-4 {
        grid-template-columns: 1fr 1fr;
    }

    /* 상세 제목 크기 축소 */
    .detail-title {
        font-size: 1.2rem;
    }

    /* 타이머 시계 크기 축소 */
    .timer-clock {
        font-size: 2rem;
    }

    /* 버튼 크기 조정 */
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .btn-sm {
        padding: 0.3rem 0.7rem;
        font-size: 0.78rem;
    }

    /* 페이지 타이틀 */
    .page-title {
        font-size: 1.2rem;
    }

    /* 메타 카드: 더 작게 */
    .meta-card {
        padding: 0.5rem 0.75rem;
        min-width: 80px;
    }

    /* 정렬 버튼 */
    .sort-btn {
        font-size: 0.78rem;
        padding: 0.4rem 0.6rem;
        min-height: 36px;
    }

    /* 칩 버튼: 터치 타겟 확보 */
    .chip {
        font-size: 0.8rem;
        padding: 0.4rem 0.7rem;
        min-height: 36px;
        touch-action: manipulation;
    }

    /* 필터 적용/초기화 버튼 */
    .filter-actions .btn {
        min-height: 40px;
        padding: 0.5rem 1.2rem;
        touch-action: manipulation;
    }

    /* 검색 바 필터 버튼 */
    .search-bar-wrapper .btn {
        min-height: 40px;
        touch-action: manipulation;
    }

    /* 카드 패딩 */
    .card-body {
        padding: 1rem;
    }

    .card-header {
        padding: 0.75rem 1rem;
    }

    /* 필터 패널 패딩 */
    .filter-panel {
        padding: 1rem;
    }

    /* 타이머 컨트롤: 세로 스택 */
    .timer-controls {
        flex-wrap: wrap;
    }

    .timer-btn {
        flex: 1;
        min-width: 80px;
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
    }

    /* 페이지네이션 버튼 */
    .page-btn {
        min-width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
}

/* ── 유틸리티 ────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.text-sm { font-size: 0.875rem; }
.mt-2 { margin-top: 0.5rem; }
.d-none { display: none; }

/* ── 히어로 섹션 (인덱스) ────────────────────────────────── */
.hero-section {
    padding: 5rem 1.5rem;
    text-align: center;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--color-text);
    letter-spacing: -0.04em;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    margin-bottom: 2rem;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── 리뷰 헤더 레이아웃 ─────────────────────────────────── */
.review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}
.review-header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ── 스포일러 배지 ──────────────────────────────────────── */
.spoiler-badge {
    font-size: 0.7rem;
    font-weight: 700;
    background: rgba(240, 160, 64, 0.15);
    color: var(--color-warning);
    border: 1px solid rgba(240, 160, 64, 0.4);
    border-radius: 4px;
    padding: 1px 6px;
}

/* ── 스포일러 경고 박스 ─────────────────────────────────── */
.spoiler-warning {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(240, 160, 64, 0.07);
    border: 1px solid rgba(240, 160, 64, 0.25);
    border-radius: 6px;
    padding: 0.6rem 0.9rem;
    font-size: 0.875rem;
    color: var(--color-warning);
    margin-top: 0.3rem;
}

/* ── 신고로 비공개된 리뷰 ───────────────────────────────── */
.review-reported {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    background: var(--color-bg-secondary);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    margin-top: 0.3rem;
    font-style: italic;
}

/* ── 신고 버튼 ──────────────────────────────────────────── */
.report-btn {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    background: none;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 2px 8px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}
.report-btn:hover {
    color: var(--color-danger);
    border-color: var(--color-danger);
}

/* ── 에러 페이지 ──────────────────────────────────────────── */
.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    gap: 1rem;
}
.error-code {
    font-size: 6rem;
    font-weight: 900;
    color: var(--color-primary);
    line-height: 1;
}
.error-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
}
.error-desc {
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

/* ── 매장 작품 관리 ──────────────────────────────────────────── */
.store-game-grid {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.store-game-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-bg);
    transition: background 0.1s;
}
.store-game-row--active {
    background: color-mix(in srgb, var(--color-primary) 6%, var(--color-bg));
    border-color: color-mix(in srgb, var(--color-primary) 30%, transparent);
}
.store-game-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}
.store-game-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    flex: 1;
    min-width: 0;
}
.store-game-title {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.store-game-meta {
    font-size: 0.75rem;
}


/* ── 매장 찾기 ────────────────────────────────────────────── */

.store-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
}

.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.store-card {
    display: block;
    padding: 1.25rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--color-text);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.store-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.store-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

.store-card-name {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.store-card-address,
.store-card-phone {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin: 0.25rem 0;
}

.store-card-footer {
    margin-top: 0.75rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--color-border-light);
}

.store-card-count {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

/* 작품 상세 - 보유 매장 */
.detail-stores {
    margin-top: 1.25rem;
}

.detail-stores-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.detail-stores-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.detail-store-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    text-decoration: none;
    color: var(--color-text);
    font-size: 0.82rem;
    transition: border-color 0.15s;
}

.detail-store-chip:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.detail-store-name {
    font-weight: 600;
}

.detail-store-region {
    color: var(--color-text-muted);
    font-size: 0.75rem;
}

/* ── 작품 이미지 ──────────────────────────────────────────── */

/* 상세 페이지 이미지 */
/* 상세 페이지 이미지+정보 2단 레이아웃 */
.detail-hero {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.detail-hero-image {
    flex-shrink: 0;
    width: 240px;
}

.detail-main-image {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    object-fit: cover;
    display: block;
}

.detail-image-placeholder {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    background: var(--color-bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
}

.detail-hero-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (max-width: 640px) {
    .detail-hero {
        flex-direction: column;
        gap: 1rem;
    }
    .detail-hero-image {
        width: 100%;
        max-width: 300px;
        align-self: center;
    }
}

/* 기존 detail-image (제거됨, 하위호환) */
.detail-image {
    margin: 1.5rem 0;
    text-align: center;
}

.detail-image img {
    max-width: 100%;
    max-height: 400px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    object-fit: contain;
}

/* 목록 테이블 썸네일 */
.game-title-cell {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.game-thumb {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--color-border-light);
}

.game-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-secondary);
    color: var(--color-text-muted);
}

.game-thumb-placeholder svg {
    width: 22px;
    height: 22px;
}

.game-title-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.game-title-badges {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

/* GM 배지 */
.badge-gm {
    background: var(--color-warning, #f59e0b);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    letter-spacing: .03em;
}

/* 모바일 카드 이미지 */
.game-card-image-link {
    display: block;
}

.game-card-image {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.game-card-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-secondary);
    color: var(--color-text-muted);
}

.game-card-image-placeholder svg {
    width: 32px;
    height: 32px;
}


/* ══════════════════════════════════════════════════════════
   모바일 반응형 보강
   ══════════════════════════════════════════════════════════ */

/* ── 모바일 하단 내비게이션 바 ──────────────────────────── */
.mobile-bottom-nav {
    display: none !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    z-index: 110;
    padding: 0 0.5rem;
    padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-items {
    display: flex;
    height: 100%;
    align-items: stretch;
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.3rem 0.25rem;
    border-radius: var(--radius-md);
    transition: color var(--transition), background var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
    color: var(--color-primary);
    background: var(--color-primary-light);
}

.bottom-nav-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

/* ── 모바일 메뉴 backdrop ────────────────────────────────── */
.navbar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    top: var(--navbar-height);
    background: rgba(0, 0, 0, 0.5);
    z-index: 98;
    -webkit-tap-highlight-color: transparent;
}

.navbar-backdrop.visible {
    display: block;
}

/* ── 모바일 메뉴 슬라이드 애니메이션 ───────────────────── */
@media (max-width: 768px) {
    /* 모바일 메뉴: 슬라이드 다운 애니메이션 */
    .navbar-menu {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease, padding 0.25s ease;
        padding: 0 0.75rem;
    }

    .navbar-menu.open {
        max-height: 400px;
        padding: 0.75rem;
    }

    /* 데스크톱에서는 하단 내비 숨김, body padding 제거 */
}

@media (min-width: 769px) {
    .mobile-bottom-nav {
        display: none !important;
    }

    body {
        padding-bottom: 0;
    }
}

/* ── iOS 입력창 자동 줌 방지 ────────────────────────────── */
@media (max-width: 768px) {
    .form-control,
    .search-input,
    .tag-input,
    select.form-control {
        font-size: 1rem;
    }
}

/* ── 터치 타겟 보강 ─────────────────────────────────────── */
@media (max-width: 768px) {
    /* 찜 버튼: 터치 영역 확대 */
    .favorite-btn {
        padding: 0.5rem;
        font-size: 1.3rem;
        min-width: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* 태그 제거 버튼 */
    .tag-remove {
        min-width: 28px;
        min-height: 28px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* 페이지 버튼 */
    .page-btn {
        min-width: 40px;
        height: 40px;
    }

    /* 비밀번호 토글 */
    .password-toggle {
        min-width: 40px;
        min-height: 40px;
        padding: 0.5rem;
    }
}

/* ── 히어로 섹션 모바일 ─────────────────────────────────── */
@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 1.25rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-actions .btn {
        text-align: center;
        justify-content: center;
    }
}

/* ── 상세 페이지 모바일 ─────────────────────────────────── */
@media (max-width: 768px) {
    /* 메타 카드: 가로 스크롤 가능하게 */
    .detail-meta-grid {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
    }

    .detail-meta-grid::-webkit-scrollbar {
        display: none;
    }

    .meta-card {
        flex-shrink: 0;
        min-width: 90px;
    }

    /* 제목 줄바꿈 처리 */
    .detail-title-row {
        align-items: flex-start;
    }

    .detail-title {
        font-size: 1.4rem;
        flex: 1;
    }

    /* 찜하기 버튼: 상단 고정 크기 */
    .favorite-btn-lg {
        flex-shrink: 0;
    }

    /* 정보 오류 신고 버튼 */
    .detail-correction-btn {
        margin-top: 0.75rem;
    }
}

/* ── 대시보드 모바일 ─────────────────────────────────────── */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-value {
        font-size: 1.3rem;
    }
}

/* ── 카드 모바일 ─────────────────────────────────────────── */
@media (max-width: 480px) {
    /* 게임 카드 그리드: 단일 컬럼 */
    .card-grid {
        gap: 0.5rem;
    }

    /* 게임 카드 더 컴팩트하게 */
    .game-card-header {
        padding: 0.75rem 0.875rem 0.4rem;
    }

    .game-card-body {
        padding: 0.4rem 0.875rem 0.75rem;
    }

    /* 통계 카드 */
    .stat-card {
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .stat-icon {
        font-size: 1.3rem;
    }
}

/* ── 폼 모바일 ───────────────────────────────────────────── */
@media (max-width: 480px) {
    .auth-card {
        border-left: none;
        border-right: none;
        border-radius: 0;
    }

    .auth-container {
        padding: 1rem 0;
        align-items: flex-start;
    }
}

/* ── 푸터 모바일 ─────────────────────────────────────────── */
@media (max-width: 768px) {
    .footer {
        display: none;
    }
}

@media (max-width: 768px) {
    .finder-favorites-row {
        flex-direction: column;
    }
    .finder-favorites-row > .finder-shortcut-card {
        width: auto;
    }
}

/* ── 이미지 업로드 & 크롭 ──────────────────────────────── */
.image-upload-area {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.image-upload-preview {
    width: 200px;
    height: 200px;
    border: 2px dashed var(--color-border);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-secondary);
    transition: border-color 0.2s;
}

.image-upload-preview:hover {
    border-color: var(--color-primary);
}

.image-upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    text-align: center;
    padding: 1rem;
    pointer-events: none;
}

.image-upload-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* 크롭 모달 오버레이 */
.crop-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.crop-modal {
    background: var(--color-bg);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    width: min(700px, 95vw);
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.crop-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
    gap: 1rem;
    flex-wrap: wrap;
}

.crop-modal-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.crop-aspect-btns {
    display: flex;
    gap: 0.4rem;
}

.crop-aspect-btn {
    padding: 0.25rem 0.65rem;
    font-size: 0.78rem;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-bg-secondary);
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.15s;
}

.crop-aspect-btn.active,
.crop-aspect-btn:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.crop-modal-body {
    flex: 1;
    overflow: auto;
    padding: 1rem;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.crop-container {
    width: 100%;
    max-height: 55vh;
}

.crop-container img {
    display: block;
    max-width: 100%;
}

.crop-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--color-border);
    flex-shrink: 0;
    flex-wrap: wrap;
}

.crop-zoom-controls {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.crop-zoom-controls .btn-sm {
    min-width: 2.2rem;
    padding: 0.3rem 0.6rem;
    font-size: 1rem;
    line-height: 1;
}

.crop-zoom-hint {
    font-size: 0.8rem;
    color: var(--color-text-muted, #6b7280);
    margin-left: 0.4rem;
}

.crop-zoom-spacer {
    flex: 1 1 auto;
}
