/* ============================================
   CSS Custom Properties (Variables)
   ============================================ */
:root {
  /* Colors - Primary */
  --color-primary: #c0392b;
  --color-gold: #ffd700;

  /* Colors - Dark UI (강화 패널, 확률표) */
  --color-bg-dark: #111;
  --color-bg-darker: #1a1a1a;
  --color-border-dark: #333;
  --color-text-dark: #d4c4a0;
  --color-text-dark-muted: #999;
  --color-chat-text: #F2E5AD;

  /* Colors - Light UI (상점, 도감) */
  --color-bg-light: #f5f5f5;
  --color-bg-panel: #f0f0f0;
  --color-bg-white: #fff;
  --color-border-light: #ddd;
  --color-text-primary: #333;
  --color-text-secondary: #666;
  --color-text-muted: #888;

  /* Colors - Status */
  --color-success: #44ff44;
  --color-fail: #ff4444;
  --color-destroy: #ff0000;
  --color-enchant-level: #00ffff;

  /* Font Sizes */
  --font-xs: 9px;
  --font-sm: 11px;
  --font-base: 12px;
  --font-md: 13px;
  --font-lg: 14px;
  --font-xl: 16px;
  --font-2xl: 18px;
  --font-3xl: 20px;
  --font-nav: 15px;
  --font-sidebar: 12px;
}

/* ============================================
   Reset & Base
   ============================================ */
        * { margin: 0; padding: 0; box-sizing: border-box; }

        body {
            background: var(--color-bg-light);
            margin: 0;
            padding: 0;
            font-family: 'Malgun Gothic', sans-serif;
            color: var(--color-text-dark);
            display: flex;
            flex-direction: column;
            align-items: center;
            height: 100vh;
            overflow: hidden;
        }

        .page-wrapper {
            width: 100%;
            height: 100vh;
            display: flex;
            flex-direction: column;
            transform-origin: top center;
        }

/* ============================================
   상단 메뉴바 (Top Navigation Bar)
   ============================================ */
        .top-bar {
            width: 100%;
            height: 60px;
            display: flex;
            flex-shrink: 0;
            background: var(--color-bg-dark);
            border-bottom: none;
        }
        .top-nav {
            display: flex;
            align-items: stretch;
            flex: 0 0 auto;
            padding: 0;
        }
        .nav-logo {
            display: flex;
            align-items: center;
            padding: 0 20px;
            height: 100%;
        }
        .nav-logo img {
            height: 36px;
            cursor: pointer;
        }
        .nav-item {
            display: flex;
            align-items: center;
            padding: 0 28px;
            height: 100%;
            color: #777;
            font-size: var(--font-nav);
            font-weight: 500;
            letter-spacing: 1px;
            cursor: pointer;
            text-decoration: none;
            white-space: nowrap;
            flex-shrink: 0;
            border-bottom: 3px solid transparent;
            transition: all 0.2s;
        }
        .nav-item:hover {
            color: var(--color-border-light);
            background: rgba(255,255,255,0.05);
        }
        .nav-item.active {
            color: var(--color-bg-white);
            font-weight: 700;
            border-bottom-color: var(--color-primary);
        }
        .nav-item.admin-only { display: none; }
        .home-card.admin-only { display: none; }
        .admin-visible .nav-item.admin-only { display: flex; }
        .admin-visible .home-card.admin-only { display: block; }
        .nav-right {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-left: auto;
            padding: 0 16px;
            flex-shrink: 0;
            white-space: nowrap;
        }
        .online-indicator {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-size: 11px;
            color: #888;
            font-weight: 600;
            font-family: monospace;
            cursor: help;
            white-space: nowrap;
            flex-shrink: 0;
        }
        .online-label {
            color: #666;
            font-weight: 500;
            letter-spacing: 0.5px;
            white-space: nowrap;
        }
        .nav-server-label {
            color: #ff8c00;
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.5px;
            white-space: nowrap;
            text-shadow: 0 0 4px rgba(255,140,0,0.3);
        }
        .nav-server-select {
            background: #1a1a1a;
            color: #d4af37;
            border: 1px solid #333;
            border-radius: 4px;
            padding: 5px 10px;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            outline: none;
            min-width: 90px;
        }
        .nav-server-select:hover {
            border-color: #d4af37;
        }

        /* 검색 가능한 서버 콤보박스 (상단바) */
        .nav-server-combo {
            position: relative;
            display: inline-flex;
            align-items: center;
        }
        .nav-server-input {
            background: #1a1a1a;
            color: #d4af37;
            border: 1px solid #333;
            border-radius: 4px;
            padding: 5px 24px 5px 10px;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            outline: none;
            min-width: 110px;
            font-family: inherit;
            caret-color: #d4af37;
        }
        .nav-server-input::placeholder { color: #666; }
        .nav-server-input:hover { border-color: #d4af37; }
        .nav-server-input:focus {
            border-color: #d4af37;
            box-shadow: 0 0 0 2px rgba(212,175,55,0.15);
            cursor: text;
        }
        .nav-server-arrow {
            position: absolute;
            right: 8px;
            top: 50%;
            transform: translateY(-50%);
            color: #d4af37;
            font-size: 11px;
            pointer-events: none;
            opacity: 0.7;
        }
        .nav-server-dropdown {
            display: none;
            position: absolute;
            top: calc(100% + 4px);
            left: 0;
            right: 0;
            min-width: 140px;
            max-height: 320px;
            overflow-y: auto;
            background: #0e0e0e;
            border: 1px solid #333;
            border-radius: 6px;
            box-shadow: 0 12px 28px rgba(0,0,0,0.6);
            z-index: 10001;
            padding: 4px 0;
        }
        .nav-server-combo.open .nav-server-dropdown { display: block; }
        .nav-server-option {
            padding: 8px 12px;
            font-size: 12px;
            color: #ccc;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.1s;
            white-space: nowrap;
        }
        .nav-server-option:hover {
            background: rgba(212,175,55,0.12);
            color: #f5d87a;
        }
        .nav-server-option.selected {
            background: rgba(212,175,55,0.18);
            color: #f5d87a;
        }
        .nav-server-option.no-match {
            color: #555;
            font-style: italic;
            cursor: default;
        }
        .nav-server-option.no-match:hover { background: transparent; }
        .nav-server-dropdown::-webkit-scrollbar { width: 6px; }
        .nav-server-dropdown::-webkit-scrollbar-track { background: transparent; }
        .nav-server-dropdown::-webkit-scrollbar-thumb { background: rgba(212,175,55,0.2); border-radius: 3px; }
        .online-dot {
            width: 7px;
            height: 7px;
            background: #4ade80;
            border-radius: 50%;
            box-shadow: 0 0 6px rgba(74,222,128,0.6);
            animation: pulse-dot 2s infinite;
        }
        @keyframes pulse-dot {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.4; }
        }
        .nav-auth {
            display: flex;
            align-items: center;
        }
        .discord-login-btn {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 6px 14px;
            background: #5865F2;
            color: #fff;
            border: none;
            border-radius: 4px;
            font-size: var(--font-sm);
            font-weight: 600;
            cursor: pointer;
            text-decoration: none;
            white-space: nowrap;
        }
        .discord-login-btn:hover { background: #4752C4; }
        .nav-user {
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
        }
        .nav-user-avatar {
            width: 22px;
            height: 22px;
            border-radius: 50%;
        }
        .nav-user-name {
            color: #ccc;
            font-size: var(--font-sm);
            font-weight: 500;
        }
        .nav-logout {
            color: #777;
            font-size: var(--font-xs);
            cursor: pointer;
            text-decoration: none;
            margin-left: 4px;
        }
        .nav-logout:hover { color: #ccc; }
        .top-ad {
            flex: 1 1 0;
            min-width: 0;
            overflow: hidden;
            display: flex;
            justify-content: center;
            align-items: center;
            background: var(--color-bg-dark);
        }

/* ============================================
   서브페이지 공통 (시장, 사냥, 정치)
   ============================================ */
        .sub-page-container {
            flex: 1;
            display: flex;
            overflow: hidden;
            min-height: 0;
        }
        .sub-page-sidebar {
            width: 100px;
            flex-shrink: 0;
            background: var(--color-bg-dark);
            display: flex;
            flex-direction: column;
            border-right: 1px solid var(--color-border-dark);
        }
        .server-select {
            width: 100%;
            padding: 10px 8px;
            background: #1a1a1a;
            color: var(--color-gold);
            border: none;
            border-bottom: 1px solid var(--color-border-dark);
            font-size: var(--font-sm);
            font-weight: 700;
            text-align: center;
            cursor: pointer;
            outline: none;
            appearance: none;
            -webkit-appearance: none;
        }
        .server-select option {
            background: #1a1a1a;
            color: #fff;
        }
        .sub-page-tab {
            padding: 16px 8px;
            text-align: center;
            color: #777;
            font-size: var(--font-sidebar);
            font-weight: 600;
            cursor: pointer;
            text-decoration: none;
            border-left: 3px solid transparent;
            transition: all 0.15s;
            line-height: 1.4;
        }
        .sub-page-tab:hover {
            color: #ccc;
            background: rgba(255,255,255,0.05);
        }
        .sub-page-tab.active {
            color: #fff;
            border-left-color: var(--color-primary);
            background: rgba(255,255,255,0.08);
        }
        .sub-page-content {
            flex: 1;
            display: flex;
            align-items: stretch;
            justify-content: center;
            background: var(--color-bg-light);
            overflow: hidden;
        }
        .wip-content {
            text-align: center;
            color: var(--color-text-secondary);
        }
        .wip-icon {
            font-size: 48px;
            margin-bottom: 16px;
        }
        .wip-content h2 {
            font-size: var(--font-3xl);
            color: var(--color-text-primary);
            margin-bottom: 8px;
        }
        .wip-content p {
            font-size: var(--font-lg);
            margin-bottom: 16px;
        }
        .wip-badge {
            display: inline-block;
            padding: 4px 16px;
            background: var(--color-primary);
            color: #fff;
            border-radius: 12px;
            font-size: var(--font-md);
            font-weight: 600;
        }

/* ============================================
   사냥 - 자리요~ (캘린더 + 파티)
   ============================================ */
/* ============================================
   아덴 시세 (Adena Price Chart - Trading UI)
   ============================================ */
        .adena-container {
            width: 100%;
            height: 100%;
            overflow: hidden;
            background: #fff;
        }
        .adena-layout {
            display: flex;
            width: 100%;
            height: 100%;
        }
        /* 좌측: 서버 상세 (흰색 테마) */
        .adena-detail {
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow-y: auto;
            border-right: 1px solid #e0e0e0;
            background: #fff;
        }
        .adena-detail-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 14px 20px;
            background: #fff;
            border-bottom: 1px solid #e0e0e0;
        }
        .adena-detail-left {
            display: flex;
            align-items: baseline;
            gap: 10px;
            flex-wrap: wrap;
        }
        .adena-server-label {
            font-size: 18px;
            font-weight: 800;
            color: #222;
        }
        .adena-current-price {
            font-size: 26px;
            font-weight: 800;
            color: #111;
        }
        .adena-price-unit {
            font-size: 13px;
            color: #999;
        }
        .adena-price-change {
            font-size: 14px;
            font-weight: 600;
        }
        .adena-price-change.up { color: #ef4444; }
        .adena-price-change.down { color: #2563eb; }
        .adena-price-change.none { color: #999; }
        .adena-detail-right {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .adena-detail-date {
            font-size: 12px;
            color: #999;
        }
        /* 환율 변환기 */
        .adena-calc {
            display: flex;
            flex-direction: column;
            padding: 14px 20px;
            background: linear-gradient(135deg, #fdf8f0 0%, #fafafa 100%);
            border: 1px solid #e8dcc8;
            border-radius: 8px;
            margin: 10px 16px;
        }
        .adena-calc-title {
            font-size: 13px;
            font-weight: 800;
            color: #8b6914;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            gap: 6px;
            letter-spacing: 0.5px;
        }
        .adena-calc-title::before {
            content: '';
            display: inline-block;
            width: 3px;
            height: 14px;
            background: linear-gradient(180deg, #b8860b, #c0392b);
            border-radius: 2px;
        }
        .adena-calc-row {
            display: flex;
            align-items: center;
            gap: 10px;
            width: 100%;
        }
        .adena-calc-field {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 3px;
        }
        .adena-calc-field label {
            font-size: 11px;
            color: #999;
            font-weight: 600;
        }
        .adena-calc-field input {
            padding: 7px 10px;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 15px;
            font-weight: 700;
            color: #222;
            outline: none;
            width: 100%;
        }
        .adena-calc-field input:focus { border-color: #c0392b; }
        .adena-calc-arrow {
            font-size: 18px;
            color: #bbb;
            margin-top: 16px;
        }
        /* 통계 바 */
        .adena-stats-bar {
            display: flex;
            gap: 0;
            padding: 0;
            background: #fafafa;
            border-bottom: 1px solid #e0e0e0;
        }
        .adena-stat {
            flex: 1;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 8px 16px;
            border-right: 1px solid #e0e0e0;
        }
        .adena-stat:last-child { border-right: none; }
        .adena-stat-label {
            font-size: 12px;
            color: #999;
        }
        .adena-stat-value {
            font-size: 14px;
            font-weight: 700;
            color: #333;
        }
        .adena-stat-value.up { color: #ef4444; }
        .adena-stat-value.down { color: #2563eb; }
        /* 기간 선택 바 */
        .adena-period-bar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 6px 16px;
            background: #fff;
            border-bottom: 1px solid #e0e0e0;
        }
        .adena-period-tabs {
            display: flex;
            gap: 2px;
        }
        .adena-period-btn {
            padding: 4px 12px;
            background: transparent;
            border: 1px solid #ddd;
            border-radius: 3px;
            color: #888;
            font-size: 12px;
            cursor: pointer;
            transition: all 0.15s;
        }
        .adena-period-btn:hover { color: #333; border-color: #bbb; }
        .adena-period-btn.active {
            background: #c0392b;
            border-color: #c0392b;
            color: #fff;
        }
        .adena-source {
            font-size: 11px;
            color: #c0392b;
            line-height: 1.4;
            text-align: right;
        }
        /* 차트 */
        .adena-chart-wrap {
            width: 100%;
            height: 340px;
            padding: 8px 8px 0 8px;
            position: relative;
            background: #fff;
        }
        .adena-chart-wrap canvas {
            width: 100% !important;
            height: 100% !important;
        }
        /* 일별 시세 테이블 */
        .adena-history {
            flex: 1;
            overflow-y: auto;
            background: #fff;
        }
        .adena-history-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 16px;
            font-size: 13px;
            font-weight: 700;
            color: #333;
            border-top: 1px solid #e0e0e0;
            border-bottom: 1px solid #e0e0e0;
            background: #fafafa;
        }
        .adena-history-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 12px;
        }
        .adena-history-table thead th {
            position: sticky;
            top: 0;
            padding: 8px 12px;
            text-align: right;
            background: #fafafa;
            color: #888;
            font-weight: 600;
            border-bottom: 1px solid #e0e0e0;
        }
        .adena-history-table thead th:first-child { text-align: left; }
        .adena-history-table tbody td {
            padding: 7px 12px;
            text-align: right;
            color: #333;
            border-bottom: 1px solid #f0f0f0;
        }
        .adena-history-table tbody td:first-child { text-align: left; color: #888; }
        .adena-history-table tbody tr:hover { background: #f5f5f5; }
        .adena-history-table .price-up { color: #ef4444; }
        .adena-history-table .price-down { color: #2563eb; }
        /* 우측: 서버 목록 */
        .adena-server-panel {
            width: 340px;
            flex-shrink: 0;
            overflow-y: auto;
            background: #0d0d0d;
        }
        .adena-server-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 12px;
        }
        .adena-server-table thead th {
            position: sticky;
            top: 0;
            padding: 10px 8px;
            text-align: right;
            background: #111;
            color: #888;
            font-weight: 600;
            border-bottom: 1px solid #333;
            z-index: 1;
        }
        .adena-server-table thead th:first-child {
            text-align: left;
            padding-left: 12px;
        }
        .adena-server-table tbody td {
            padding: 9px 8px;
            text-align: right;
            color: #ccc;
            border-bottom: 1px solid #1a1a1a;
            cursor: pointer;
        }
        .adena-server-table tbody td:first-child {
            text-align: left;
            padding-left: 12px;
            font-weight: 600;
            color: #fff;
        }
        .adena-server-table tbody tr:hover {
            background: #1a1a1a;
        }
        .adena-server-table tbody tr.active {
            background: #1a2e1a;
        }
        .adena-server-table tbody tr.active td:first-child {
            color: #4ade80;
        }
        .adena-server-table .pct-up { color: #ef4444; }
        .adena-server-table .pct-down { color: #3b82f6; }
        .adena-server-table .vol {
            color: #777;
            font-size: 11px;
        }

/* ============================================
   잡템 NPC 최고가 매입
   ============================================ */
        .japtem-container {
            width: 100%;
            height: 100%;
            overflow-y: auto;
            background: #fff;
            padding: 20px;
        }
        .japtem-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
        }
        .japtem-header h2 {
            font-size: 18px;
            font-weight: 800;
            color: #222;
        }
        .japtem-search {
            padding: 8px 14px;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 13px;
            width: 240px;
            outline: none;
        }
        .japtem-search:focus { border-color: #c0392b; }
        .japtem-list {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .japtem-card {
            border: 1px solid #e0e0e0;
            border-radius: 6px;
            overflow: hidden;
        }
        .japtem-card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 16px;
            background: #fafafa;
            cursor: pointer;
            user-select: none;
        }
        .japtem-card-header:hover { background: #f0f0f0; }
        .japtem-card-left {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .japtem-item-img {
            width: 24px;
            height: 24px;
            object-fit: contain;
            image-rendering: pixelated;
        }
        .japtem-item-img-empty {
            display: inline-block;
            width: 24px;
            height: 24px;
        }
        .japtem-item-name {
            font-size: 14px;
            font-weight: 700;
            color: #222;
        }
        .japtem-item-link {
            cursor: pointer;
            text-decoration: none;
        }
        .japtem-item-link:hover {
            color: #c0392b;
            text-decoration: underline;
        }
        .japtem-best-price {
            font-size: 14px;
            font-weight: 700;
            color: #c0392b;
        }
        .japtem-best-npc {
            font-size: 11px;
            color: #999;
            margin-left: 8px;
        }
        .japtem-card-body {
            display: none;
            border-top: 1px solid #e0e0e0;
        }
        .japtem-card.open .japtem-card-body { display: block; }
        .japtem-npc-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 12px;
        }
        .japtem-npc-table tr:hover { background: #f9f9f9; }
        .japtem-npc-table td {
            padding: 6px 16px;
            border-bottom: 1px solid #f0f0f0;
            color: #444;
        }
        .japtem-npc-table td:last-child {
            text-align: right;
            font-weight: 600;
            color: #333;
        }
        .japtem-npc-table tr:first-child td {
            color: #c0392b;
            font-weight: 700;
        }

/* ============================================
   혈마크 생성기
   ============================================ */
        .bloodmark-panel {
            flex: 1;
            flex-direction: column;
            background: #fff;
            overflow: hidden;
            padding: 0;
        }
        .bloodmark-panel h3 {
            padding: 14px 20px;
            font-size: 16px;
            font-weight: 800;
            color: #222;
            border-bottom: 1px solid #e0e0e0;
            background: #fafafa;
        }
        .bm-body {
            display: flex;
            flex: 1;
            min-height: 0;
        }
        .bm-sidebar {
            width: 260px;
            flex-shrink: 0;
            display: flex;
            flex-direction: column;
            border-right: 1px solid #e0e0e0;
            background: #fafafa;
        }
        .bm-tools {
            padding: 12px;
            display: flex;
            flex-direction: column;
            gap: 8px;
            border-bottom: 1px solid #e0e0e0;
        }
        .bm-tool-row {
            display: flex;
            gap: 4px;
            align-items: center;
        }
        .bm-text-input {
            flex: 1;
            padding: 6px 8px;
            border: 1px solid #ccc;
            border-radius: 3px;
            font-size: 13px;
        }
        .bm-font-select {
            width: 85px;
            padding: 6px 4px;
            border: 1px solid #ccc;
            border-radius: 3px;
            font-size: 12px;
        }
        .bm-btn {
            padding: 6px 10px;
            background: #555;
            color: #fff;
            border: none;
            border-radius: 3px;
            font-size: 12px;
            cursor: pointer;
            white-space: nowrap;
        }
        .bm-btn:hover { background: #333; }
        .bm-btn-save { background: var(--color-primary); }
        .bm-btn-save:hover { background: #a93226; }
        .bm-upload-btn { text-align: center; }
        .bm-palette {
            display: flex;
            flex-wrap: wrap;
            gap: 3px;
            padding: 12px;
            border-bottom: 1px solid #e0e0e0;
            align-items: center;
        }
        .bm-color {
            width: 22px;
            height: 22px;
            border: 2px solid transparent;
            border-radius: 3px;
            cursor: pointer;
        }
        .bm-color.active { border-color: #c0392b; box-shadow: 0 0 0 1px #fff inset; }
        .bm-color-picker {
            width: 22px;
            height: 22px;
            border: none;
            padding: 0;
            cursor: pointer;
            border-radius: 3px;
        }
        .bm-eraser {
            width: 22px;
            height: 22px;
            border: 2px solid transparent;
            border-radius: 3px;
            cursor: pointer;
            background: repeating-conic-gradient(#ccc 0% 25%, #fff 0% 50%) 50%/8px 8px;
        }
        .bm-eraser.active { border-color: #c0392b; }
        .bm-main {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            background: #e8e8e8;
            padding: 20px;
        }
        .bm-main canvas {
            border: 1px solid #999;
            cursor: crosshair;
            image-rendering: pixelated;
            max-width: 100%;
            max-height: 100%;
        }
        .bm-info {
            padding: 8px;
            font-size: 11px;
            color: #999;
            text-align: center;
        }

        .hunt-container {
            width: 100%;
            height: 100%;
            overflow: hidden;
            background: #f5f5f5;
        }
        .hunt-layout {
            display: flex;
            width: 100%;
            height: 100%;
        }
        /* 좌측: 메인 콘텐츠 */
        .hunt-main {
            flex: 1;
            overflow-y: auto;
            background: #f5f5f5;
        }
        .hunt-page-inner {
            max-width: 1100px;
            padding: 28px 24px;
        }

        /* 우측: 서버별 현황 (검정) */
        .hunt-server-panel {
            width: 280px;
            flex-shrink: 0;
            overflow-y: auto;
            background: #0d0d0d;
        }
        .hunt-server-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 12px;
        }
        .hunt-server-table thead th {
            position: sticky;
            top: 0;
            padding: 12px 10px;
            text-align: right;
            background: #111;
            color: #888;
            font-weight: 600;
            border-bottom: 1px solid #333;
            z-index: 1;
        }
        .hunt-server-table thead th:first-child {
            text-align: left;
            padding-left: 14px;
        }
        .hunt-server-table tbody td {
            padding: 11px 10px;
            text-align: right;
            color: #ccc;
            border-bottom: 1px solid #1a1a1a;
            cursor: pointer;
        }
        .hunt-server-table tbody td:first-child {
            text-align: left;
            padding-left: 14px;
            font-weight: 600;
            color: #fff;
        }
        .hunt-server-table tbody tr:hover {
            background: #1a1a1a;
        }
        .hunt-server-table tbody tr.active {
            background: #1a2e1a;
        }
        .hunt-server-table tbody tr.active td:first-child {
            color: #4ade80;
        }
        .hunt-server-table .hunt-count-recruiting {
            color: #4ade80;
            font-weight: 700;
        }
        .hunt-server-table .hunt-count-zero {
            color: #444;
        }

        /* 상단 섹션: 캘린더 + 액션 */
        .hunt-top-section {
            display: flex;
            gap: 16px;
            margin-bottom: 24px;
        }
        .hunt-cal-card {
            flex: 0 0 320px;
            background: #111;
            border-radius: 12px;
            padding: 20px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        }
        .hunt-action-card {
            flex: 1;
            background: #fff;
            border: 1px solid #e8e8e8;
            border-radius: 12px;
            padding: 20px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            box-shadow: 0 2px 8px rgba(0,0,0,0.04);
        }
        .hunt-selected-date {
            font-size: 15px;
            color: #888;
            font-weight: 600;
        }

        /* 하단 섹션: 파티 목록 */
        .hunt-list-section {
            min-height: 200px;
        }
        .hunt-party-list {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
            gap: 16px;
        }

        /* 캘린더 - 리니지 스타일 */
        .hunt-calendar {
            margin-bottom: 20px;
            background: rgba(255,255,255,0.02);
            border: 1px solid rgba(255,215,0,0.08);
            border-radius: 10px;
            padding: 16px;
        }
        .cal-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 14px;
            padding-bottom: 10px;
            border-bottom: 1px solid rgba(255,215,0,0.1);
        }
        .cal-title {
            font-size: 17px;
            font-weight: 800;
            color: #ffd700;
            text-shadow: 0 0 12px rgba(255,215,0,0.2);
            letter-spacing: 1px;
        }
        .cal-nav {
            background: rgba(255,255,255,0.04);
            border: 1px solid rgba(255,215,0,0.15);
            border-radius: 6px;
            padding: 6px 12px;
            cursor: pointer;
            font-size: 13px;
            color: #999;
            transition: all 0.2s;
        }
        .cal-nav:hover { background: rgba(255,215,0,0.08); color: #ffd700; border-color: rgba(255,215,0,0.3); }
        .cal-grid {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 3px;
        }
        .cal-dow {
            text-align: center;
            font-size: 11px;
            color: #555;
            padding: 6px 0;
            font-weight: 700;
        }
        .cal-dow:first-child { color: #c0392b; }
        .cal-dow:last-child { color: #3b82f6; }
        .cal-day {
            text-align: center;
            padding: 9px 0;
            font-size: 12px;
            cursor: pointer;
            border-radius: 6px;
            color: #888;
            position: relative;
            transition: all 0.15s;
        }
        .cal-day:hover { background: rgba(255,255,255,0.06); color: #fff; }
        .cal-day.today { font-weight: 800; color: #ffd700; text-shadow: 0 0 8px rgba(255,215,0,0.3); }
        .cal-day.selected { background: #c0392b; color: #fff; font-weight: 700; box-shadow: 0 0 10px rgba(192,57,43,0.4); }
        .cal-day.has-party::after {
            content: '';
            position: absolute;
            bottom: 3px;
            left: 50%;
            transform: translateX(-50%);
            width: 5px;
            height: 5px;
            border-radius: 50%;
            background: #4ade80;
            box-shadow: 0 0 6px rgba(74,222,128,0.5);
        }
        .cal-day.selected.has-party::after { background: #fff; box-shadow: 0 0 6px rgba(255,255,255,0.5); }
        .cal-day.other-month { color: #2a2a2a; }

        /* ==================== 익명 채팅 위젯 (우측 하단) ==================== */
        .chat-toggle {
            position: fixed;
            bottom: 24px;
            right: 24px;
            width: 54px;
            height: 54px;
            background: linear-gradient(135deg, #111 0%, #222 100%);
            border: 2px solid #333;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            cursor: pointer;
            z-index: 9990;
            box-shadow: 0 4px 16px rgba(0,0,0,0.4);
            transition: all 0.2s;
        }
        .chat-toggle:hover {
            transform: scale(1.1);
            border-color: #d4af37;
            box-shadow: 0 6px 24px rgba(0,0,0,0.5);
        }
        .chat-badge {
            position: absolute;
            top: -4px;
            right: -4px;
            min-width: 20px;
            height: 20px;
            padding: 0 5px;
            background: #c0392b;
            color: #fff;
            font-size: 11px;
            font-weight: 800;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 2px 6px rgba(192,57,43,0.5);
            animation: badgePop 0.3s ease-out;
            font-family: inherit;
        }
        @keyframes badgePop {
            from { transform: scale(0); }
            50% { transform: scale(1.3); }
            to { transform: scale(1); }
        }
        .chat-widget {
            position: fixed;
            bottom: 90px;
            right: 24px;
            width: 360px;
            height: 460px;
            max-height: calc(100vh - 120px);
            background: #fff;
            border: 1px solid #e0e0e0;
            border-radius: 14px;
            box-shadow: 0 12px 40px rgba(0,0,0,0.18);
            z-index: 9990;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            animation: chatPop 0.2s ease-out;
        }
        @keyframes chatPop {
            from { opacity: 0; transform: translateY(16px) scale(0.95); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }
        .chat-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 16px;
            background: #111;
            color: #f5d87a;
            font-size: 13px;
            font-weight: 700;
            letter-spacing: 0.5px;
            flex-shrink: 0;
        }
        .chat-header-title { display: flex; align-items: center; gap: 6px; }
        .chat-header-actions { display: flex; align-items: center; gap: 4px; }
        .chat-close, .chat-resize {
            background: none;
            border: none;
            color: #666;
            font-size: 16px;
            cursor: pointer;
            padding: 4px;
            line-height: 1;
        }
        .chat-close:hover, .chat-resize:hover { color: #fff; }

        /* 대형 모드 */
        .chat-widget.chat-large {
            width: 520px;
            height: calc(100vh - 120px);
            max-height: none;
        }
        .chat-tabs {
            display: flex;
            gap: 0;
            flex-shrink: 0;
            background: #1a1a1a;
            border-bottom: 1px solid #333;
        }
        .chat-tab {
            flex: 1;
            padding: 8px 12px;
            background: transparent;
            border: none;
            border-bottom: 2px solid transparent;
            color: #777;
            font-size: 11px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.15s;
            letter-spacing: 0.5px;
            font-family: inherit;
        }
        .chat-tab:hover { color: #ccc; }
        .chat-tab.active {
            color: #f5d87a;
            border-bottom-color: #d4af37;
        }
        .chat-notice {
            flex-shrink: 0;
            padding: 6px 14px;
            background: #fff8e6;
            color: #8a6000;
            font-size: 10px;
            text-align: center;
            border-bottom: 1px solid #f0e6c4;
            letter-spacing: 0.3px;
        }
        .chat-messages {
            flex: 1;
            overflow-y: auto;
            padding: 12px 14px;
            display: flex;
            flex-direction: column;
            gap: 6px;
            background: #fafafa;
        }
        .chat-messages::-webkit-scrollbar { width: 5px; }
        .chat-messages::-webkit-scrollbar-track { background: transparent; }
        .chat-messages::-webkit-scrollbar-thumb { background: #ddd; border-radius: 3px; }
        .chat-msg {
            display: flex;
            gap: 8px;
            align-items: flex-start;
            font-size: 13px;
            line-height: 1.5;
        }
        .chat-msg-tag {
            font-weight: 800;
            color: #c0392b;
            white-space: nowrap;
            font-size: 11px;
            margin-top: 2px;
            font-family: monospace;
        }
        .chat-msg-text {
            color: #333;
            word-break: break-word;
        }
        .chat-msg-time {
            font-size: 10px;
            color: #bbb;
            white-space: nowrap;
            margin-top: 3px;
            margin-left: auto;
            flex-shrink: 0;
        }
        .chat-msg-system {
            text-align: center;
            color: #aaa;
            font-size: 11px;
            font-style: italic;
        }
        .chat-input-wrap {
            display: flex;
            gap: 8px;
            padding: 10px 12px;
            border-top: 1px solid #eee;
            background: #fff;
            flex-shrink: 0;
        }
        .chat-input {
            flex: 1;
            padding: 10px 12px;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            font-size: 13px;
            color: #222;
            outline: none;
            font-family: inherit;
            background: #fafafa;
        }
        .chat-input:focus { border-color: #c0392b; background: #fff; }
        .chat-input::placeholder { color: #bbb; }
        .chat-send {
            padding: 10px 16px;
            background: #111;
            color: #f5d87a;
            border: none;
            border-radius: 8px;
            font-size: 12px;
            font-weight: 700;
            cursor: pointer;
            letter-spacing: 0.5px;
            flex-shrink: 0;
            transition: all 0.15s;
            font-family: inherit;
        }
        .chat-send:hover { background: #333; }
        @media (max-width: 480px) {
            .chat-widget { width: calc(100vw - 16px); right: 8px; bottom: 80px; }
            .chat-toggle { bottom: 16px; right: 16px; }
        }

        /* ==================== 공지 팝업 ==================== */
        .notice-overlay {
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(10,10,10,0.55);
            backdrop-filter: blur(6px);
            -webkit-backdrop-filter: blur(6px);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 9998;
            animation: noticeFade 0.25s ease-out;
        }
        @keyframes noticeFade {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        @keyframes noticePop {
            from { opacity: 0; transform: translateY(14px) scale(0.96); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }
        .notice-box {
            background: #ffffff;
            border: 2px solid #111;
            border-radius: 14px;
            padding: 28px 30px 22px;
            width: 420px;
            max-width: calc(100vw - 32px);
            box-shadow: 0 20px 60px rgba(0,0,0,0.25), 8px 8px 0 rgba(0,0,0,0.9);
            animation: noticePop 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
        }
        .notice-header {
            display: flex;
            align-items: center;
            gap: 10px;
            padding-bottom: 16px;
            border-bottom: 1px solid #eee;
            margin-bottom: 18px;
        }
        .notice-icon {
            font-size: 22px;
        }
        .notice-title {
            font-size: 16px;
            font-weight: 800;
            color: #111;
            letter-spacing: 0.5px;
        }
        .notice-body {
            color: #333;
            font-size: 14px;
            line-height: 1.7;
        }
        .notice-body p {
            margin: 0 0 14px 0;
        }
        .notice-body b {
            color: #111;
            font-weight: 700;
        }
        .notice-tip {
            background: #f7f7f7;
            border-left: 3px solid #111;
            padding: 12px 14px;
            border-radius: 6px;
            font-size: 13px;
            color: #444;
        }
        .notice-tip kbd {
            display: inline-block;
            padding: 2px 7px;
            background: #fff;
            border: 1px solid #ccc;
            border-bottom-width: 2px;
            border-radius: 4px;
            font-family: 'Courier New', monospace;
            font-size: 11px;
            font-weight: 700;
            color: #222;
            margin: 0 1px;
        }
        .notice-tip-sub {
            display: inline-block;
            margin-top: 6px;
            font-size: 11px;
            color: #888;
            font-weight: 400;
        }
        .notice-thanks {
            color: #666 !important;
            font-size: 13px;
            text-align: center;
            padding-top: 4px;
        }
        .notice-footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding-top: 18px;
            margin-top: 18px;
            border-top: 1px solid #eee;
        }
        .notice-check {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 12px;
            color: #666;
            cursor: pointer;
            user-select: none;
        }
        .notice-check input[type=checkbox] {
            width: 14px;
            height: 14px;
            accent-color: #111;
            cursor: pointer;
        }
        .notice-ok {
            padding: 10px 22px;
            background: #111;
            color: #fff;
            border: none;
            border-radius: 8px;
            font-size: 13px;
            font-weight: 700;
            letter-spacing: 1px;
            cursor: pointer;
            transition: all 0.15s;
            font-family: inherit;
        }
        .notice-ok:hover {
            background: #333;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.2);
        }

        /* 익명 파티 안내 배너 (PUBG 컨셉) */
        .hunt-anon-banner {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 14px 18px;
            background: linear-gradient(90deg, #1a1a1a 0%, #252525 100%);
            border: 1px solid #2f2f2f;
            border-left: 3px solid #d4af37;
            border-radius: 10px;
            margin-bottom: 16px;
            color: #eee;
        }
        .hunt-anon-icon {
            font-size: 22px;
            flex-shrink: 0;
        }
        .hunt-anon-text { flex: 1; min-width: 0; }
        .hunt-anon-title {
            font-size: 13px;
            font-weight: 800;
            color: #f5d87a;
            letter-spacing: 0.8px;
            margin-bottom: 2px;
        }
        .hunt-anon-desc {
            font-size: 11px;
            color: #aaa;
            line-height: 1.5;
        }
        .hunt-anon-desc b { color: #f5d87a; font-weight: 700; }

        /* 슬롯 — Boolean 표기 (참가 / 비참가) */
        .slot-bool {
            font-size: 11px;
            font-weight: 800;
            letter-spacing: 0.8px;
            text-align: center;
            font-family: 'Courier New', monospace;
            text-transform: uppercase;
        }
        .slot-bool.slot-true {
            color: #2ecc71;
            text-shadow: 0 0 6px rgba(46,204,113,0.35);
        }
        .slot-bool.slot-false {
            color: #999;
        }
        .slot-bool.slot-none {
            color: #555;
        }
        .slot-bool.slot-disabled {
            color: #ccc;
            text-decoration: line-through;
        }
        .hunt-slot.empty.disabled {
            cursor: not-allowed;
            background: #fafafa;
            border-style: dashed;
            border-color: #e8e8e8;
            pointer-events: none;
        }
        .hunt-slot.filled {
            background: rgba(46,204,113,0.08);
            border-color: rgba(46,204,113,0.35);
        }
        .hunt-slot.empty:hover .slot-bool.slot-false {
            color: #c0392b;
        }

        /* 나가기 버튼 */
        .hunt-leave-btn {
            padding: 8px 14px;
            background: transparent;
            color: #888;
            border: 1px solid #ddd;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 700;
            cursor: pointer;
            letter-spacing: 0.5px;
            transition: all 0.15s;
        }
        .hunt-leave-btn:hover {
            background: #f5f5f5;
            color: #555;
            border-color: #bbb;
        }

        /* 활동 타입 필터 칩 */
        .hunt-activity-chips {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            margin-bottom: 16px;
        }
        .hunt-chip {
            padding: 8px 18px;
            background: #1a1a1a;
            color: #999;
            border: 1px solid #333;
            border-radius: 20px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.15s;
            letter-spacing: 1px;
        }
        .hunt-chip:hover { border-color: #d4af37; color: #d4af37; }
        .hunt-chip.active {
            background: linear-gradient(135deg, #d4af37 0%, #b8941f 100%);
            color: #111;
            border-color: #d4af37;
            box-shadow: 0 0 12px rgba(212,175,55,0.3);
        }

        /* 섹션 박스 (즉시 / 예약) */
        .hunt-section-box {
            background: #fff;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 16px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        }
        .hunt-section-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 16px;
            gap: 12px;
        }
        .hunt-section-header h3 {
            margin: 0;
            font-size: 18px;
            font-weight: 800;
            color: #111;
            letter-spacing: 0.5px;
        }
        .hunt-toggle-arrow {
            display: inline-block;
            font-size: 11px;
            color: #999;
            margin-right: 4px;
        }
        .hunt-section-header .hunt-create-btn {
            width: auto;
            padding: 10px 18px;
            font-size: 13px;
            letter-spacing: 1px;
            flex-shrink: 0;
        }
        .hunt-create-instant {
            background: linear-gradient(135deg, #c0392b 0%, #8e2218 100%) !important;
        }
        .hunt-reserved-box { background: #f9f9f9; border: 1px dashed #ddd; }

        /* 파티 카드 내 배지 */
        .hunt-activity-badge {
            display: inline-block;
            padding: 2px 8px;
            border-radius: 10px;
            font-size: 11px;
            font-weight: 700;
            margin-right: 6px;
            vertical-align: middle;
            background: #333;
            color: #fff;
        }
        .hunt-activity-badge.activity-hunt     { background: #2c6e49; }
        .hunt-activity-badge.activity-battle   { background: #8e2218; }
        .hunt-activity-badge.activity-kojang   { background: #b8620f; }
        .hunt-activity-badge.activity-makpi    { background: #5a1a8a; }
        .hunt-activity-badge.activity-vigilante{ background: #1f5582; }
        .hunt-type-badge {
            display: inline-block;
            padding: 2px 6px;
            border-radius: 4px;
            font-size: 10px;
            font-weight: 700;
            margin-right: 6px;
            vertical-align: middle;
            background: #eee;
            color: #555;
        }
        .hunt-type-badge.type-instant { background: #ffe3e0; color: #c0392b; }
        .hunt-type-badge.type-reserved{ background: #e3f0ff; color: #1f5582; }
        .hunt-type-badge.type-private { background: #fff4d6; color: #8a6000; border: 1px solid #e8c97a; }

        /* 최소 장비 */
        .hunt-min-gear {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-top: 8px;
            padding: 6px 10px;
            background: #fffaf0;
            border-left: 3px solid #d4af37;
            border-radius: 4px;
            font-size: 12px;
        }
        .hunt-min-gear-label {
            font-weight: 800;
            color: #8a6000;
            letter-spacing: 0.3px;
        }
        .hunt-min-gear-val {
            color: #555;
            font-weight: 600;
        }

        /* 파티장 인라인 제목 편집 */
        .hunt-party-title-editable {
            cursor: pointer;
            border-bottom: 1px dashed transparent;
            transition: all 0.15s;
        }
        .hunt-party-title-editable:hover {
            color: #c0392b;
            border-bottom-color: #c0392b;
        }

        /* 파티 등록 버튼 */
        .hunt-create-btn {
            width: 100%;
            padding: 14px;
            background: linear-gradient(135deg, #c0392b 0%, #8e2218 100%);
            color: #fff;
            border: none;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 700;
            cursor: pointer;
            letter-spacing: 2px;
            transition: all 0.2s;
            text-shadow: 0 1px 2px rgba(0,0,0,0.3);
        }
        .hunt-create-btn:hover { background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%); box-shadow: 0 4px 16px rgba(192,57,43,0.3); transform: translateY(-1px); }
        .hunt-create-btn.disabled,
        .hunt-create-btn:disabled {
            background: #bbb !important;
            color: #eee !important;
            cursor: not-allowed;
            box-shadow: none !important;
            transform: none !important;
            text-shadow: none;
        }

        /* 날짜별 파티 목록 (흰색 테마) */
        .hunt-day-title {
            font-size: 20px;
            font-weight: 800;
            color: #111;
            margin-bottom: 16px;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .hunt-day-title::before {
            content: '';
            display: inline-block;
            width: 3px;
            height: 20px;
            background: linear-gradient(180deg, #c0392b, #8e2218);
            border-radius: 2px;
        }
        .hunt-party-card {
            background: #fff;
            border: 1px solid #e8e8e8;
            border-top: 3px solid #c0392b;
            border-radius: 10px;
            transition: all 0.2s;
            position: relative;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
            display: flex;
            flex-direction: column;
        }
        .hunt-party-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.1); transform: translateY(-2px); }

        /* 카드 상단: 파티 정보 */
        .hunt-card-top {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            padding: 18px 20px 14px;
            background: linear-gradient(135deg, #fff 0%, #fdfcfa 100%);
            border-bottom: 1px solid #f0f0f0;
        }
        .hunt-card-info { flex: 1; }
        .hunt-party-title {
            font-size: 17px;
            font-weight: 800;
            color: #111;
            margin-bottom: 6px;
        }
        .hunt-card-meta {
            display: flex;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
        }
        .hunt-meta-location {
            font-size: 13px;
            color: #8b6914;
            font-weight: 700;
            display: flex;
            align-items: center;
            gap: 5px;
        }
        .hunt-meta-location::before {
            content: '';
            display: inline-block;
            width: 5px;
            height: 5px;
            background: #c0392b;
            border-radius: 50%;
        }
        .hunt-meta-time {
            font-size: 12px;
            color: #999;
            font-family: monospace;
        }
        .hunt-card-badges {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: 6px;
            flex-shrink: 0;
        }
        .hunt-status {
            display: inline-block;
            padding: 4px 14px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.5px;
        }
        .hunt-status.recruiting { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
        .hunt-status.full { background: #fff3e0; color: #e65100; border: 1px solid #ffe0b2; }
        .hunt-status.closed { background: #f5f5f5; color: #999; border: 1px solid #e0e0e0; }
        .hunt-party-card.is-closed { opacity: 0.5; }
        .hunt-party-card.is-closed:hover { transform: none; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
        .hunt-party-card.is-mine {
            border: 2px solid #f59e0b;
            box-shadow: 0 0 0 1px rgba(245,158,11,0.15), 0 2px 8px rgba(245,158,11,0.1);
        }
        .hunt-party-card.is-mine .hunt-card-top {
            background: linear-gradient(135deg, #fffbeb 0%, #fff 100%);
        }
        .hunt-member-count {
            font-size: 12px;
            color: #999;
            font-weight: 600;
            font-family: monospace;
        }
        .hunt-delete-btn {
            width: 24px;
            height: 24px;
            border: none;
            background: none;
            color: #ccc;
            font-size: 14px;
            cursor: pointer;
            border-radius: 4px;
            transition: all 0.15s;
            line-height: 1;
        }
        .hunt-delete-btn:hover {
            background: #fee2e2;
            color: #c0392b;
        }
        .hunt-extend-btn {
            padding: 2px 8px;
            background: none;
            border: 1px solid #ddd;
            border-radius: 4px;
            color: #888;
            font-size: 11px;
            cursor: pointer;
            transition: all 0.15s;
        }
        .hunt-extend-btn:hover {
            background: #e8f5e9;
            color: #2e7d32;
            border-color: #c8e6c9;
        }

        /* 프로그레스 바 */
        .hunt-card-progress {
            padding: 0 20px;
            padding-top: 12px;
        }
        .hunt-progress-bar {
            height: 4px;
            background: #f0f0f0;
            border-radius: 2px;
            overflow: hidden;
        }
        .hunt-progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #c0392b, #e74c3c);
            border-radius: 2px;
            transition: width 0.3s;
        }

        /* 카드 섹션 */
        .hunt-card-section {
            padding: 14px 20px;
            flex: 1;
        }
        .hunt-section-label {
            font-size: 11px;
            font-weight: 700;
            color: #aaa;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 10px;
        }

        /* 카드 하단: 디스코드 */
        .hunt-card-footer {
            padding: 12px 20px;
            border-top: 1px solid #f0f0f0;
            background: #fafafa;
            border-radius: 0 0 12px 12px;
        }
        .hunt-discord-link {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 8px 16px;
            background: #5865f2;
            color: #fff;
            border-radius: 8px;
            font-size: 13px;
            font-weight: 600;
            text-decoration: none;
            transition: all 0.15s;
        }
        .hunt-discord-link:hover { background: #4752c4; box-shadow: 0 2px 8px rgba(88,101,242,0.3); }
        .hunt-map-btn {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 8px 14px;
            background: #1a1a1a;
            color: #ffd700;
            border: 1px solid #333;
            border-radius: 8px;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.15s;
        }
        .hunt-map-btn:hover { background: #222; border-color: #ffd700; }
        .hunt-discord-icon {
            width: 18px;
            height: 18px;
            border-radius: 3px;
        }

        /* 파티 멤버 슬롯 (흰색 테마) */
        .hunt-slots {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 6px;
            margin-bottom: 14px;
        }
        .hunt-slot {
            border: 1px solid #e8e8e8;
            border-radius: 8px;
            padding: 12px 8px;
            text-align: center;
            font-size: 11px;
            background: #fafafa;
            transition: all 0.15s;
            position: relative;
        }
        .hunt-slot .slot-role {
            font-size: 10px;
            color: #999;
            margin-bottom: 4px;
            letter-spacing: 0.5px;
            font-weight: 600;
        }
        .hunt-slot .slot-name {
            font-weight: 700;
            color: #333;
            font-size: 12px;
        }
        .hunt-slot.filled {
            background: #f8f8f8;
            border: 1px solid #e0e0e0;
        }
        .hunt-slot.empty {
            border-style: dashed;
            border-color: #ddd;
            color: #bbb;
            cursor: pointer;
            background: #fff;
        }
        .hunt-slot.empty .slot-name { color: #ccc; }
        .hunt-slot.empty:hover { background: #fef2f2; border-color: #c0392b; }
        .hunt-slot.empty:hover .slot-name { color: #c0392b; }

        /* 보디가드 섹션 (흰색 테마) */
        .hunt-bodyguard-section {
            border-top: 1px solid #eee;
            padding-top: 14px;
            margin-top: 10px;
        }
        .hunt-bg-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
        }
        .hunt-bg-title {
            font-size: 13px;
            font-weight: 700;
            color: #555;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .hunt-bg-title::before {
            content: '';
            display: inline-block;
            width: 8px;
            height: 8px;
            border: 2px solid #c0392b;
            border-radius: 2px;
        }
        .hunt-bg-pay {
            font-size: 13px;
            color: #b8860b;
            font-weight: 700;
        }
        .hunt-bg-list {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
        }
        .hunt-bg-tag {
            padding: 5px 12px;
            background: #fef2f2;
            color: #555;
            border: 1px solid #fecaca;
            border-radius: 6px;
            font-size: 11px;
            font-weight: 600;
            transition: all 0.15s;
        }
        .hunt-bg-tag:hover { background: #fee2e2; border-color: #fca5a5; }

        /* 참가 버튼 (흰색 테마) */
        .hunt-join-bar {
            display: flex;
            gap: 8px;
            margin-top: 12px;
        }
        .hunt-join-bar input {
            flex: 1;
            padding: 8px 12px;
            border: 1px solid #ddd;
            border-radius: 6px;
            font-size: 13px;
            background: #fff;
            color: #333;
            transition: border-color 0.15s;
        }
        .hunt-join-bar input:focus { border-color: #c0392b; outline: none; }
        .hunt-join-bar select {
            padding: 8px 10px;
            border: 1px solid #ddd;
            border-radius: 6px;
            font-size: 13px;
            background: #fff;
            color: #333;
        }
        .hunt-join-bar button {
            padding: 8px 16px;
            background: linear-gradient(135deg, #c0392b, #8e2218);
            color: #fff;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-size: 13px;
            font-weight: 600;
            white-space: nowrap;
            transition: all 0.15s;
        }
        .hunt-join-bar button:hover { background: linear-gradient(135deg, #e74c3c, #c0392b); box-shadow: 0 2px 10px rgba(192,57,43,0.3); }

        /* 빈 파티 목록 */
        .hunt-empty-state {
            text-align: center;
            padding: 60px 20px;
            grid-column: 1 / -1;
        }
        .hunt-empty-state .hunt-empty-icon {
            font-size: 40px;
            margin-bottom: 12px;
            opacity: 0.3;
        }
        .hunt-empty-state .hunt-empty-text {
            font-size: 14px;
            color: #888;
        }
        .hunt-empty-state .hunt-empty-sub {
            font-size: 12px;
            color: #bbb;
            margin-top: 6px;
        }

        /* 파티 생성 폼 오버레이 */
        /* ==================== 파티 등록 폼 (White Premium) ==================== */
        .hunt-form-overlay {
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(15,15,15,0.55);
            backdrop-filter: blur(6px);
            -webkit-backdrop-filter: blur(6px);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 9999;
            animation: hfFade 0.2s ease-out;
        }
        @keyframes hfFade {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        @keyframes hfPop {
            from { opacity: 0; transform: translateY(12px) scale(0.96); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }
        .hunt-form {
            position: relative;
            background: #ffffff;
            border: 1px solid #ececec;
            border-radius: 16px;
            padding: 32px 32px 28px;
            width: 440px;
            max-width: calc(100vw - 32px);
            max-height: calc(100vh - 64px);
            overflow-y: auto;
            box-shadow:
                0 24px 60px rgba(0,0,0,0.18),
                0 2px 8px rgba(0,0,0,0.06);
            animation: hfPop 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
        }
        .hunt-form::before {
            content: '';
            position: absolute;
            top: 0; left: 20%; right: 20%;
            height: 2px;
            background: linear-gradient(90deg, transparent, #c0392b, transparent);
            border-radius: 2px;
        }
        .hunt-form::-webkit-scrollbar { width: 6px; }
        .hunt-form::-webkit-scrollbar-track { background: transparent; }
        .hunt-form::-webkit-scrollbar-thumb { background: #e0e0e0; border-radius: 3px; }

        .hf-header {
            text-align: center;
            margin-bottom: 24px;
            padding-bottom: 20px;
            border-bottom: 1px solid #f0f0f0;
        }
        .hf-title {
            font-size: 20px;
            font-weight: 800;
            color: #c0392b;
            letter-spacing: 2px;
        }
        .hf-subtitle {
            font-size: 12px;
            color: #999;
            margin-top: 6px;
            letter-spacing: 0.3px;
            font-weight: 500;
        }

        .hf-field {
            margin-bottom: 18px;
        }
        .hf-row {
            display: flex;
            gap: 10px;
        }
        .hf-row .hf-field { margin-bottom: 0; flex: 1; }
        .hf-label {
            font-size: 11px;
            font-weight: 700;
            color: #888;
            text-transform: uppercase;
            letter-spacing: 1.2px;
            margin-bottom: 8px;
        }
        .hf-label-hint {
            font-size: 10px;
            color: #bbb;
            font-weight: 500;
            text-transform: none;
            letter-spacing: 0.2px;
            margin-left: 4px;
        }

        .hf-input {
            display: block;
            width: 100%;
            padding: 12px 14px;
            background: #fafafa;
            border: 1px solid #e4e4e4;
            border-radius: 8px;
            font-size: 13px;
            color: #222;
            font-family: inherit;
            transition: all 0.15s;
            outline: none;
            box-sizing: border-box;
        }
        .hf-input::placeholder { color: #bbb; }
        .hf-input:hover { border-color: #d0d0d0; background: #fff; }
        .hf-input:focus {
            border-color: #c0392b;
            background: #fff;
            box-shadow: 0 0 0 3px rgba(192,57,43,0.08);
        }
        .hf-input[type=number]::-webkit-inner-spin-button,
        .hf-input[type=number]::-webkit-outer-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }

        .hf-chip-group {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
        }
        .hf-chip {
            flex: 1;
            min-width: 60px;
            padding: 10px 8px;
            background: #fafafa;
            border: 1px solid #e4e4e4;
            border-radius: 8px;
            color: #777;
            font-size: 12px;
            font-weight: 700;
            letter-spacing: 0.5px;
            cursor: pointer;
            transition: all 0.15s;
            font-family: inherit;
        }
        .hf-chip:hover {
            border-color: #e5a39a;
            color: #c0392b;
            background: #fff;
        }
        .hf-chip.active {
            background: linear-gradient(135deg, #c0392b 0%, #8e2218 100%);
            border-color: #8e2218;
            color: #fff;
            box-shadow: 0 4px 12px rgba(192,57,43,0.25);
            text-shadow: 0 1px 2px rgba(0,0,0,0.2);
        }
        .hf-chip-group-sm .hf-chip {
            min-width: 44px;
            padding: 8px 4px;
            font-size: 11px;
        }

        .hunt-form-buttons {
            display: flex;
            gap: 10px;
            margin-top: 28px;
            padding-top: 20px;
            border-top: 1px solid #f0f0f0;
        }
        .hunt-btn-ok {
            flex: 2;
            padding: 14px;
            background: linear-gradient(135deg, #c0392b 0%, #8e2218 100%);
            color: #fff;
            border: none;
            border-radius: 10px;
            font-size: 14px;
            font-weight: 800;
            cursor: pointer;
            letter-spacing: 2px;
            transition: all 0.15s;
            text-shadow: 0 1px 2px rgba(0,0,0,0.25);
            font-family: inherit;
            position: relative;
            z-index: 1;
        }
        .hunt-btn-ok:hover {
            background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
            box-shadow: 0 6px 20px rgba(192,57,43,0.35);
            transform: translateY(-1px);
        }
        .hunt-btn-ok:active { transform: translateY(0); }
        .hunt-btn-cancel {
            flex: 1;
            padding: 14px;
            background: #f5f5f5;
            color: #888;
            border: 1px solid #e4e4e4;
            border-radius: 10px;
            font-size: 13px;
            font-weight: 700;
            cursor: pointer;
            letter-spacing: 1px;
            transition: all 0.15s;
            font-family: inherit;
            position: relative;
            z-index: 1;
        }
        .hunt-btn-cancel:hover { background: #ececec; color: #555; border-color: #d8d8d8; }

        /* 사냥 입력 모달 */
        .hunt-modal-overlay {
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(0,0,0,0.6);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10000;
        }
        .hunt-modal {
            background: var(--color-bg-dark);
            border: 1px solid var(--color-border-dark);
            border-radius: 10px;
            padding: 28px;
            width: 340px;
            box-shadow: 0 8px 32px rgba(0,0,0,0.5);
        }
        .hunt-modal-title {
            font-size: var(--font-xl);
            font-weight: 700;
            color: var(--color-gold);
            margin-bottom: 16px;
            text-align: center;
        }
        .hunt-modal-input {
            display: block;
            width: 100%;
            padding: 10px 12px;
            border: 1px solid var(--color-border-dark);
            border-radius: 6px;
            font-size: var(--font-lg);
            background: var(--color-bg-darker);
            color: #fff;
            margin-bottom: 12px;
            outline: none;
        }
        .hunt-modal-input:focus {
            border-color: var(--color-gold);
        }
        .hunt-modal-select {
            display: block;
            width: 100%;
            padding: 10px 12px;
            border: 1px solid var(--color-border-dark);
            border-radius: 6px;
            font-size: var(--font-lg);
            background: var(--color-bg-darker);
            color: #fff;
            margin-bottom: 12px;
            outline: none;
        }
        .hunt-modal-buttons {
            display: flex;
            gap: 10px;
        }
        .hunt-modal-ok {
            flex: 1;
            padding: 10px;
            background: var(--color-primary);
            color: #fff;
            border: none;
            border-radius: 6px;
            font-size: var(--font-lg);
            font-weight: 600;
            cursor: pointer;
        }
        .hunt-modal-ok:hover { background: #a93226; }
        .hunt-modal-cancel {
            flex: 1;
            padding: 10px;
            background: #333;
            color: #999;
            border: 1px solid var(--color-border-dark);
            border-radius: 6px;
            font-size: var(--font-lg);
            cursor: pointer;
        }
        .hunt-modal-cancel:hover { color: #ccc; }

/* ============================================
   드랍 시뮬레이터 (Drop Simulator)
   ============================================ */
        .dropsim-panel {
            display: flex;
            flex: 1;
            overflow: hidden;
        }
        .dropsim-layout {
            display: flex;
            width: 100%;
            height: 100%;
        }
        .dropsim-sidebar {
            width: 240px;
            flex-shrink: 0;
            background: var(--color-bg-panel);
            border-right: 1px solid var(--color-border-light);
            display: flex;
            flex-direction: column;
            padding: 12px;
        }
        .dropsim-sidebar h3 {
            font-size: 14px;
            margin-bottom: 10px;
            color: var(--color-text-primary);
        }
        .dropsim-search {
            padding: 8px 10px;
            border: 1px solid var(--color-border-light);
            border-radius: 4px;
            font-size: 12px;
            margin-bottom: 8px;
        }
        .dropsim-mob-list {
            flex: 1;
            overflow-y: auto;
        }
        .dropsim-mob-entry {
            padding: 8px 10px;
            cursor: pointer;
            font-size: 12px;
            border-bottom: 1px solid #eee;
            color: #333;
        }
        .dropsim-mob-entry:hover { background: #e8e8e8; }
        .dropsim-mob-entry.active { background: #c0392b; color: #fff; }
        .dropsim-main {
            flex: 1;
            padding: 20px;
            overflow-y: auto;
            background: #fff;
        }
        .dropsim-placeholder { color: #999; text-align: center; padding: 40px; }
        .dropsim-selected h3 { font-size: 16px; margin-bottom: 12px; color: #111; }
        .dropsim-controls {
            display: flex;
            align-items: center;
            gap: 12px;
            margin: 16px 0;
            padding: 12px;
            background: #f5f5f5;
            border-radius: 8px;
        }
        .dropsim-controls label { font-size: 13px; color: #555; display: flex; align-items: center; gap: 6px; }
        .dropsim-controls select { padding: 6px 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; }
        .dropsim-run-btn {
            padding: 8px 20px;
            background: linear-gradient(135deg, #c0392b, #8e2218);
            color: #fff;
            border: none;
            border-radius: 6px;
            font-size: 13px;
            font-weight: 700;
            cursor: pointer;
        }
        .dropsim-run-btn:hover { background: linear-gradient(135deg, #e74c3c, #c0392b); }
        .dropsim-drop-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 12px;
            margin-top: 12px;
        }
        .dropsim-drop-table th {
            text-align: left;
            padding: 8px;
            background: #f5f5f5;
            border-bottom: 2px solid #eee;
            font-weight: 600;
            color: #555;
        }
        .dropsim-drop-table td {
            padding: 8px;
            border-bottom: 1px solid #f0f0f0;
            color: #333;
        }
        .dropsim-drop-table .pct { color: #c0392b; font-weight: 700; }
        .dropsim-result-header {
            font-size: 14px;
            font-weight: 700;
            color: #111;
            margin-top: 20px;
            margin-bottom: 8px;
            padding-bottom: 8px;
            border-bottom: 2px solid #c0392b;
        }

/* ============================================
   보스타임 (Boss Timer)
   ============================================ */
        .boss-container {
            width: 100%;
            height: 100%;
            overflow-y: auto;
            background: #f5f5f5;
        }
        .boss-page-inner {
            max-width: 1100px;
            margin: 0 auto;
            padding: 28px 24px;
        }
        .boss-header {
            margin-bottom: 24px;
        }
        .boss-header h2 {
            font-size: 22px;
            font-weight: 800;
            color: #111;
            margin-bottom: 4px;
        }
        .boss-header p {
            font-size: 13px;
            color: #888;
        }
        .boss-group {
            margin-bottom: 24px;
        }
        .boss-group-title {
            font-size: 14px;
            font-weight: 700;
            color: #c0392b;
            margin-bottom: 12px;
            padding-left: 10px;
            border-left: 3px solid #c0392b;
        }
        .boss-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
            gap: 10px;
        }
        .boss-card {
            background: #fff;
            border: 1px solid #eee;
            border-radius: 10px;
            padding: 14px 16px;
            transition: all 0.15s;
            box-shadow: 0 1px 3px rgba(0,0,0,0.04);
        }
        .boss-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); transform: translateY(-1px); }
        .boss-card-name {
            font-size: 15px;
            font-weight: 700;
            color: #111;
            margin-bottom: 2px;
        }
        .boss-card-ename {
            font-size: 11px;
            color: #999;
            margin-bottom: 8px;
        }
        .boss-card-info {
            display: flex;
            align-items: center;
            gap: 6px;
            flex-wrap: wrap;
        }
        .boss-period-badge {
            padding: 2px 8px;
            background: #fef2f2;
            color: #c0392b;
            border: 1px solid #fecaca;
            border-radius: 4px;
            font-size: 11px;
            font-weight: 700;
        }
        .boss-loc {
            font-size: 11px;
            color: #888;
        }
        .boss-map-btn {
            padding: 2px 8px;
            background: #111;
            color: #ffd700;
            border: none;
            border-radius: 4px;
            font-size: 10px;
            cursor: pointer;
            font-weight: 600;
        }
        .boss-map-btn:hover { background: #333; }
        .boss-card-coords {
            font-size: 10px;
            color: #bbb;
            font-family: monospace;
            margin-top: 6px;
        }

/* ============================================
   맵 뷰어 (Map Viewer)
   ============================================ */
        .map-viewer-overlay {
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(0,0,0,0.8);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10000;
        }
        .map-viewer {
            background: #fff;
            border: 1px solid #e0e0e0;
            border-radius: 12px;
            width: 90vw;
            height: 85vh;
            max-width: 1200px;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            box-shadow: 0 12px 40px rgba(0,0,0,0.2);
        }
        .map-viewer-header {
            display: flex;
            align-items: center;
            padding: 14px 20px;
            background: #fff;
            border-bottom: 1px solid #eee;
            gap: 16px;
        }
        .map-viewer-title {
            font-size: 16px;
            font-weight: 800;
            color: #111;
        }
        .map-viewer-coords {
            font-size: 12px;
            color: #2e7d32;
            font-family: monospace;
            background: #e8f5e9;
            padding: 4px 10px;
            border-radius: 4px;
            border: 1px solid #c8e6c9;
        }
        .map-viewer-close {
            margin-left: auto;
            background: none;
            border: none;
            color: #999;
            font-size: 18px;
            cursor: pointer;
            padding: 4px 8px;
        }
        .map-viewer-close:hover { color: #333; }
        .map-viewer-body {
            flex: 1;
            overflow: hidden;
            cursor: grab;
            position: relative;
            background: #f0f0f0;
        }
        .map-viewer-body:active { cursor: grabbing; }
        .map-viewer-body canvas {
            position: absolute;
            image-rendering: pixelated;
        }
        .map-viewer-footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 20px;
            background: #fafafa;
            border-top: 1px solid #eee;
            flex-wrap: wrap;
            gap: 10px;
        }
        .map-viewer-input {
            display: flex;
            align-items: center;
            gap: 10px;
            color: #666;
            font-size: 12px;
            flex-wrap: wrap;
        }
        .map-viewer-input label {
            display: flex;
            align-items: center;
            gap: 4px;
        }
        .map-input-label-my {
            font-weight: 700;
            color: #d97706;
            font-size: 12px;
        }
        .map-viewer-input .map-input-my {
            background: #fffbeb;
            border: 2px solid #f59e0b;
            border-radius: 6px;
            padding: 6px 8px;
            color: #333;
            font-size: 13px;
            font-family: monospace;
            font-weight: 700;
            width: 75px;
        }
        .map-viewer-input .map-input-my:focus { border-color: #d97706; outline: none; box-shadow: 0 0 0 3px rgba(245,158,11,0.15); }
        .map-viewer-input .map-input-my::placeholder { color: #ccc; font-weight: 400; }
        .map-viewer-input input:not(.map-input-my) {
            padding: 5px 8px;
            background: #fff;
            border: 1px solid #ddd;
            border-radius: 4px;
            color: #333;
            font-size: 12px;
            font-family: monospace;
        }
        .map-viewer-input input:not(.map-input-my):focus { border-color: #c0392b; outline: none; }
        .map-viewer-btn {
            padding: 7px 18px;
            background: linear-gradient(135deg, #c0392b, #8e2218);
            color: #fff;
            border: none;
            border-radius: 6px;
            font-size: 12px;
            cursor: pointer;
            font-weight: 700;
        }
        .map-viewer-btn:hover { background: linear-gradient(135deg, #e74c3c, #c0392b); box-shadow: 0 2px 8px rgba(192,57,43,0.3); }
        .map-route-info {
            font-size: 11px;
            color: #2e7d32;
            font-family: monospace;
            font-weight: 600;
        }
        .map-viewer-zoom {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .map-viewer-zoom button {
            width: 28px;
            height: 28px;
            background: #fff;
            border: 1px solid #ddd;
            border-radius: 4px;
            color: #555;
            font-size: 16px;
            cursor: pointer;
        }
        .map-viewer-zoom button:hover { background: #f5f5f5; color: #111; }
        #mapZoomLevel {
            font-size: 12px;
            color: #888;
            font-family: monospace;
            min-width: 30px;
            text-align: center;
        }
        .map-marker {
            position: absolute;
            width: 12px;
            height: 12px;
            background: #c0392b;
            border: 2px solid #fff;
            border-radius: 50%;
            transform: translate(-50%, -50%);
            box-shadow: 0 0 8px rgba(192,57,43,0.6);
            z-index: 10;
            pointer-events: none;
        }
        .map-marker.me {
            background: #4ade80;
            box-shadow: 0 0 8px rgba(74,222,128,0.6);
        }
        .map-marker-label {
            position: absolute;
            top: -20px;
            left: 50%;
            transform: translateX(-50%);
            font-size: 10px;
            color: #fff;
            background: rgba(0,0,0,0.7);
            padding: 1px 6px;
            border-radius: 3px;
            white-space: nowrap;
        }

/* ============================================
   지도 페이지 (Map Page)
   ============================================ */
        .map-page-view {
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            min-height: 0;
        }
        .map-page-canvas-wrap {
            flex: 1;
            overflow: hidden;
            cursor: grab;
            position: relative;
            background: #f0f0f0;
        }
        .map-page-canvas-wrap:active { cursor: grabbing; }
        .map-page-canvas-wrap canvas {
            position: absolute;
            image-rendering: pixelated;
        }
        .map-page-footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px 16px;
            background: #fafafa;
            border-top: 1px solid #eee;
            flex-wrap: wrap;
            gap: 10px;
        }
        .map-page-coords {
            font-size: 12px;
            color: #2e7d32;
            font-family: monospace;
            background: #e8f5e9;
            padding: 4px 10px;
            border-radius: 4px;
            border: 1px solid #c8e6c9;
        }
        .map-page-input {
            display: flex;
            align-items: center;
            gap: 10px;
            color: #666;
            font-size: 12px;
            flex-wrap: wrap;
        }
        .map-page-input label {
            display: flex;
            align-items: center;
            gap: 4px;
        }
        .map-page-input input {
            padding: 5px 8px;
            background: #fff;
            border: 1px solid #ddd;
            border-radius: 4px;
            color: #333;
            font-size: 12px;
            font-family: monospace;
            width: 65px;
        }
        .map-page-input input:focus { border-color: #c0392b; outline: none; }
        .map-page-btn {
            padding: 7px 18px;
            background: linear-gradient(135deg, #c0392b, #8e2218);
            color: #fff;
            border: none;
            border-radius: 6px;
            font-size: 12px;
            cursor: pointer;
            font-weight: 700;
        }
        .map-page-btn:hover { background: linear-gradient(135deg, #e74c3c, #c0392b); box-shadow: 0 2px 8px rgba(192,57,43,0.3); }
        .map-page-route-info {
            font-size: 11px;
            font-family: monospace;
            font-weight: 600;
        }
        .map-page-zoom {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .map-page-zoom button {
            width: 28px;
            height: 28px;
            background: #fff;
            border: 1px solid #ddd;
            border-radius: 4px;
            color: #555;
            font-size: 16px;
            cursor: pointer;
        }
        .map-page-zoom button:hover { background: #f5f5f5; color: #111; }
        .map-page-zoom span {
            font-size: 12px;
            color: #888;
            font-family: monospace;
            min-width: 30px;
            text-align: center;
        }

        /* 던전 탭 */
        #mapDungeonView {
            flex: 1;
            display: flex;
            overflow: hidden;
            min-height: 0;
        }
        .map-dungeon-list {
            width: 160px;
            flex-shrink: 0;
            overflow-y: auto;
            background: #fafafa;
            border-right: 1px solid #eee;
            padding: 8px 0;
        }
        .map-dungeon-item {
            padding: 12px 16px;
            font-size: 13px;
            color: #555;
            cursor: pointer;
            border-left: 3px solid transparent;
            transition: all 0.15s;
        }
        .map-dungeon-item:hover {
            background: #f5f5f5;
            color: #111;
        }
        .map-dungeon-item.active {
            background: #fff;
            color: #c0392b;
            border-left-color: #c0392b;
            font-weight: 700;
        }
        .map-dungeon-detail {
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .map-dungeon-info {
            padding: 12px 20px;
            background: #fafafa;
            border-top: 1px solid #eee;
        }
        .map-dungeon-info h3 {
            font-size: 15px;
            font-weight: 800;
            color: #111;
            margin: 0 0 6px 0;
        }
        .map-dungeon-info p {
            font-size: 12px;
            color: #888;
            margin: 2px 0;
        }

/* ============================================
   도감 페이지 (Encyclopedia)
   ============================================ */
        .encyclopedia-container {
            flex: 1;
            display: flex;
            min-height: 0;
            overflow: hidden;
        }
        .enc-sidebar {
            width: 80px;
            flex-shrink: 0;
            background: var(--color-bg-dark);
            border-right: 1px solid var(--color-border-dark);
            display: flex;
            flex-direction: column;
            padding: 8px 0;
        }
        .enc-tab {
            padding: 14px 12px;
            color: var(--color-text-secondary);
            font-size: var(--font-sidebar);
            font-weight: 600;
            cursor: pointer;
            text-decoration: none;
            border-left: 2px solid transparent;
            transition: all 0.15s;
        }
        .enc-tab:hover { color: #aaa; background: var(--color-bg-darker); }
        .enc-tab.active { color: var(--color-bg-white); border-left-color: var(--color-primary); background: var(--color-bg-darker); }

        .enc-content {
            width: 350px;
            flex-shrink: 0;
            display: flex;
            flex-direction: column;
            background: var(--color-bg-light);
            border-right: 1px solid var(--color-border-light);
        }
        .enc-search-bar { padding: 10px; border-bottom: 1px solid var(--color-border-light); }
        .enc-search {
            width: 100%;
            padding: 8px 10px;
            background: var(--color-bg-white);
            border: 1px solid #ccc;
            color: var(--color-text-primary);
            font-size: 13px;
        }
        .enc-list {
            flex: 1;
            overflow-y: auto;
            padding: 4px;
        }
        .enc-entry {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px 10px;
            cursor: pointer;
            border-bottom: 1px solid #e0e0e0;
        }
        .enc-entry:hover { background: #e8e8e8; }
        .enc-entry.selected { background: #e0e0e0; border-color: var(--color-primary); }
        .enc-entry img { width: 36px; height: 36px; image-rendering: auto; object-fit: contain; }
        .enc-list.tab-monsters .enc-entry img { width: 64px; height: 64px; }
        .enc-entry .enc-name { font-size: 13px; color: var(--color-text-primary); }
        .enc-entry .enc-sub { font-size: 10px; color: var(--color-text-muted); }

        .enc-detail {
            flex: 1;
            background: var(--color-bg-white);
            padding: 24px;
            overflow-y: auto;
            color: var(--color-text-primary);
            font-size: 13px;
            line-height: 1.8;
        }
        .enc-no-select { color: var(--color-text-dark-muted); text-align: center; margin-top: 40px; }
        .enc-detail h2 { color: #222; font-size: 18px; margin-bottom: 16px; }
        .enc-detail .enc-img { width: 64px; height: 64px; margin-bottom: 12px; object-fit: contain; image-rendering: auto; }
        .enc-detail .enc-img.img-large { width: 152px; height: 152px; }
        .enc-item-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
        .enc-item-tag {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 4px 10px;
            background: var(--color-bg-light);
            border: 1px solid var(--color-border-light);
            border-radius: 4px;
            font-size: 12px;
            color: var(--color-text-primary);
            cursor: pointer;
            transition: all 0.15s;
        }
        .enc-item-tag:hover { background: #e0e0e0; border-color: var(--color-primary); }
        .enc-item-tag img { width: 24px; height: 24px; object-fit: contain; }
        .enc-mat-row { display: flex; align-items: center; gap: 8px; width: 100%; }
        .enc-mat-qty { color: var(--color-primary); font-weight: bold; font-size: 13px; }
        .enc-detail .enc-section { margin-top: 16px; padding-top: 12px; border-top: 1px solid #e0e0e0; }
        .enc-detail .enc-section h3 { color: var(--color-primary); font-size: 14px; margin-bottom: 8px; }
        .enc-detail .enc-tag {
            display: inline-block;
            padding: 2px 8px;
            margin: 2px;
            background: var(--color-bg-light);
            border: 1px solid var(--color-border-light);
            font-size: 11px;
            color: #555;
        }

/* ============================================
   광고 배너 (Ad Banner)
   ============================================ */
        .ad-banner {
            width: 100%;
            height: 150px;
            background: var(--color-bg-white);
            display: flex;
            justify-content: center;
            align-items: center;
            color: var(--color-text-dark-muted);
            font-size: 14px;
            flex-shrink: 0;
            border-top: 2px solid var(--color-border-dark);
            border-bottom: 2px solid var(--color-border-dark);
        }

/* ============================================
   홈 페이지
   ============================================ */
        .home-container {
            flex: 1;
            overflow-y: auto;
            background: var(--color-bg-white);
        }
        .home-content {
            max-width: 900px;
            margin: 0 auto;
            padding: 40px 24px;
        }
        .home-hero {
            text-align: center;
            margin-bottom: 48px;
        }
        .home-logo {
            width: 80px;
            height: 80px;
            border-radius: 12px;
            margin-bottom: 16px;
        }
        .home-hero h1 {
            font-size: 32px;
            margin-bottom: 8px;
        }
        .home-subtitle {
            font-size: 15px;
            color: var(--color-text-secondary);
        }
        .home-title-blood {
            font-family: 'Black Han Sans', sans-serif;
            font-size: 40px;
            font-weight: 400;
            color: var(--color-primary);
            margin-bottom: 10px;
            letter-spacing: 4px;
            font-style: italic;
            transform: skewX(-5deg);
        }
        .home-subtitle-blood {
            font-size: 15px;
            font-style: italic;
            font-weight: 600;
            color: var(--color-primary);
            text-shadow: 1px 1px 4px rgba(139, 0, 0, 0.3);
            transform: skewX(-5deg);
            letter-spacing: 2px;
        }
        .home-cards {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
            gap: 16px;
            margin-bottom: 48px;
        }
        .home-card {
            background: var(--color-bg-light);
            border: 1px solid var(--color-border-light);
            border-radius: 8px;
            padding: 24px 16px;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s;
        }
        .home-card:hover {
            border-color: var(--color-primary);
            box-shadow: 0 2px 12px rgba(0,0,0,0.08);
            transform: translateY(-2px);
        }
        .home-card img {
            width: 48px;
            height: 48px;
            object-fit: contain;
            margin-bottom: 12px;
        }
        .home-card h3 {
            font-size: 15px;
            color: var(--color-text-primary);
            margin-bottom: 6px;
        }
        .home-card p {
            font-size: 12px;
            color: var(--color-text-secondary);
        }
        .home-ad {
            margin-bottom: 48px;
        }
        /* 공사중 */
        .wip-container {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            background: var(--color-bg-white);
        }
        .wip-content {
            text-align: center;
        }
        .wip-icon {
            font-size: 64px;
            margin-bottom: 16px;
        }
        .wip-content h2 {
            font-size: 24px;
            color: var(--color-text-primary);
            margin-bottom: 8px;
        }
        .wip-content p {
            font-size: 14px;
            color: var(--color-text-secondary);
            margin-bottom: 16px;
        }
        .wip-badge {
            display: inline-block;
            padding: 6px 20px;
            background: var(--color-bg-light);
            border: 1px solid var(--color-border-light);
            border-radius: 20px;
            font-size: 13px;
            color: var(--color-text-muted);
        }

        .home-footer {
            text-align: center;
            padding: 24px 0;
            border-top: 1px solid var(--color-border-light);
            font-size: 12px;
            color: var(--color-text-muted);
            line-height: 2;
        }

/* ============================================
   시뮬레이터 로딩 오버레이
   ============================================ */
        .sim-loading-overlay {
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(0, 0, 0, 0.92);
            z-index: 9999;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .sim-loading-box {
            text-align: center;
            width: 320px;
        }
        .sim-loading-logo {
            width: 80px;
            height: 80px;
            margin-bottom: 20px;
            border-radius: 8px;
        }
        .sim-loading-text {
            color: var(--color-gold);
            font-size: var(--font-xl);
            font-weight: bold;
            margin-bottom: 16px;
            letter-spacing: 2px;
        }
        .sim-loading-bar-bg {
            width: 100%;
            height: 6px;
            background: #333;
            border-radius: 3px;
            overflow: hidden;
        }
        .sim-loading-bar-fill {
            width: 0%;
            height: 100%;
            background: linear-gradient(90deg, var(--color-primary), var(--color-gold));
            border-radius: 3px;
            transition: width 0.3s ease;
        }
        .sim-loading-percent {
            color: #999;
            font-size: var(--font-md);
            margin-top: 8px;
        }

        .simulator-container {
            position: relative;
            display: flex;
            flex: 1;
            overflow: hidden;
            min-height: 0;
        }

/* ============================================
   좌측 서브 메뉴 (Left Sidebar)
   ============================================ */
        .sub-menu {
            width: 60px;
            flex-shrink: 0;
            background: var(--color-bg-dark);
            display: flex;
            flex-direction: column;
            z-index: 10;
            border-right: 1px solid var(--color-border-dark);
        }
        .sub-item {
            padding: 16px 0;
            text-align: center;
            color: var(--color-text-secondary);
            font-size: var(--font-sidebar);
            font-weight: 600;
            cursor: pointer;
            text-decoration: none;
            border-left: 3px solid transparent;
            transition: all 0.15s;
        }
        .sub-item:hover { color: #aaa; background: var(--color-bg-darker); }
        .sub-item.active { color: var(--color-bg-white); border-left-color: var(--color-primary); background: var(--color-bg-darker); }

        .sub-stats-panel {
            width: 280px;
            flex-shrink: 0;
            background: var(--color-bg-panel);
            border-right: 1px solid var(--color-border-light);
            padding: 20px;
            display: flex;
            flex-direction: column;
            z-index: 10;
            color: var(--color-text-primary);
            font-size: 13px;
            line-height: 2;
        }
        .sub-stats-panel h3 { color: #222; font-size: 16px; margin-bottom: 16px; }
        .sub-stats-panel .label { color: var(--color-text-secondary); }

/* ============================================
   아이템 선택 패널 (Item Select Panel / Shop)
   ============================================ */
        .item-select-panel {
            flex: 0 1 280px;
            min-width: 160px;
            background: var(--color-bg-panel);
            border-right: 1px solid var(--color-border-light);
            display: flex;
            flex-direction: column;
            z-index: 10;
        }

        .item-select-panel h3 {
            color: var(--color-text-primary);
            padding: 12px;
            font-size: 14px;
            border-bottom: 1px solid var(--color-border-light);
        }

        .category-tabs {
            display: flex;
            flex-wrap: wrap;
            gap: 2px;
            padding: 8px;
            border-bottom: 1px solid var(--color-border-light);
        }

        .cat-tab {
            padding: 5px 8px;
            font-size: 11px;
            border: 1px solid #ccc;
            background: var(--color-bg-white);
            color: #777;
            cursor: pointer;
        }

        .cat-tab.active {
            border-color: var(--color-primary);
            color: var(--color-primary);
            background: var(--color-bg-white);
        }

        .item-search {
            margin: 8px;
            padding: 6px 8px;
            background: var(--color-bg-white);
            border: 1px solid #ccc;
            color: var(--color-text-primary);
            font-size: 12px;
            width: calc(100% - 16px);
        }

        .item-list {
            flex: 1;
            overflow-y: auto;
            padding: 4px;
        }

        .item-entry {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 6px 8px;
            cursor: pointer;
            border: 1px solid transparent;
            border-bottom: 1px solid #e0e0e0;
            transition: all 0.1s;
        }

        .item-entry:hover {
            background: #e8e8e8;
        }

        .item-entry.selected {
            background: #e0e0e0;
            border-color: var(--color-primary);
        }

        .item-entry img {
            width: 36px;
            height: 36px;
            image-rendering: auto;
        }

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

        .item-entry .item-name {
            font-size: 12px;
            color: var(--color-text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .item-entry .item-cat {
            font-size: 10px;
            color: var(--color-text-secondary);
        }

/* ============================================
   수량 선택 (Quantity Controls)
   ============================================ */
        .item-entry .qty-controls {
            display: none;
            align-items: center;
            gap: 3px;
        }

        .item-entry.selected .qty-controls {
            display: flex;
        }

        .qty-btn {
            width: 20px;
            height: 20px;
            border: 1px solid var(--color-border-dark);
            background: var(--color-bg-darker);
            color: var(--color-gold);
            cursor: pointer;
            font-size: 14px;
            line-height: 18px;
            text-align: center;
            padding: 0;
        }

        .qty-btn:hover { background: var(--color-border-dark); }

        .qty-input {
            width: 30px;
            height: 20px;
            background: var(--color-bg-dark);
            border: 1px solid var(--color-border-dark);
            color: var(--color-gold);
            text-align: center;
            font-size: 11px;
        }

/* ============================================
   구매 바 (Shop Buy Bar)
   ============================================ */
        .shop-buy-bar {
            padding: 10px 12px;
            border-top: 1px solid var(--color-border-light);
            background: #e8e8e8;
        }

        .shop-total {
            font-size: 12px;
            color: var(--color-text-secondary);
            margin-bottom: 8px;
        }

        .shop-total span {
            color: var(--color-primary);
            font-weight: bold;
        }

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

        .buy-btn {
            flex: 1;
            padding: 8px;
            border: 1px solid #cc0000;
            background: var(--color-destroy);
            color: var(--color-bg-white);
            font-size: 13px;
            font-weight: bold;
            cursor: pointer;
        }

        .buy-btn:hover { background: #dd0000; }
        .buy-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============================================
   강화 모드 (Enchant Mode)
   ============================================ */
        .enchant-mode .inventory-grid-container,
        .enchant-mode .inventory-grid-container * {
            cursor: url('/img/cursor_glasses.png') 16 16, crosshair !important;
        }

        .enchant-mode .inv-slot:hover {
            border: 1px solid #ff0 !important;
            box-shadow: inset 0 0 12px rgba(255, 255, 0, 0.4);
        }

        .enchant-mode-banner {
            display: none;
            position: absolute;
            bottom: 45px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(0,0,0,0.85);
            color: var(--color-gold);
            padding: 6px 16px;
            font-size: 12px;
            z-index: 10;
            white-space: nowrap;
            border: 1px solid var(--color-border-dark);
        }

        .enchant-mode .enchant-mode-banner {
            display: block;
        }

        .cancel-btn {
            padding: 8px 12px;
            border: 1px solid var(--color-border-dark);
            background: var(--color-bg-darker);
            color: var(--color-text-dark-muted);
            font-size: 13px;
            cursor: pointer;
        }

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

/* ============================================
   중앙 게임 화면 (Game Screen)
   ============================================ */
        .game-screen {
            position: relative;
            flex-shrink: 1;
            flex-grow: 1;
            min-width: 200px;
            height: 100%;
            pointer-events: none;
            display: flex;
            align-items: center;
            justify-content: center;
            background: #c0b8a0;
            overflow: hidden;
        }
        .game-crt {
            position: relative;
            width: 96%;
            height: 96%;
            background: linear-gradient(145deg, #c8bfa8 0%, #b0a890 25%, #9a9278 50%, #b0a890 75%, #c0b8a0 100%);
            border-radius: 20px;
            padding: 26px;
            box-shadow:
                inset 3px 3px 6px rgba(255,255,255,0.25),
                inset -3px -3px 6px rgba(0,0,0,0.3),
                6px 6px 16px rgba(0,0,0,0.5),
                2px 2px 4px rgba(0,0,0,0.3);
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
        }
        /* 모니터 외곽 홈 */
        .game-crt::before {
            content: '';
            position: absolute;
            top: 6px;
            left: 6px;
            right: 6px;
            bottom: 6px;
            border: 2px solid #8a8270;
            border-radius: 14px;
            box-shadow:
                inset 1px 1px 2px rgba(0,0,0,0.2),
                1px 1px 2px rgba(255,255,255,0.15);
            pointer-events: none;
        }
        .game-frame {
            position: relative;
            width: 100%;
            height: 100%;
            border: 3px solid #1a1a1a;
            border-radius: 20px;
            overflow: hidden;
            background: #000;
            box-shadow:
                inset 0 0 80px rgba(0,0,0,0.6),
                inset 0 0 160px rgba(0,0,0,0.25),
                0 0 3px rgba(0,0,0,0.6);
        }
        /* CRT 유리 오목 + 스캔라인 + 반사광 */
        .game-frame::before {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            background: repeating-linear-gradient(
                0deg,
                transparent,
                transparent 2px,
                rgba(0,0,0,0.03) 2px,
                rgba(0,0,0,0.03) 4px
            );
            pointer-events: none;
            z-index: 3;
        }
        .game-frame::after {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            border-radius: 8px;
            background:
                /* 유리 반사광 */
                radial-gradient(
                    ellipse 60% 40% at 30% 20%,
                    rgba(255,255,255,0.06) 0%,
                    transparent 60%
                ),
                /* 오목 비네팅 */
                radial-gradient(
                    ellipse 70% 60% at 50% 50%,
                    transparent 40%,
                    rgba(0,0,0,0.35) 65%,
                    rgba(0,0,0,0.7) 100%
                );
            pointer-events: none;
            z-index: 2;
        }

        .game-frame .bg-layer {
            position: absolute;
            top: 20px; left: 20px;
            right: 20px; bottom: 20px;
            border-radius: 6px;
            background-size: cover;
            background-position: center center;
            background-repeat: no-repeat;
            opacity: 0;
            transition: none;
            box-shadow: inset 0 0 40px rgba(0,0,0,0.5);
        }
        .game-frame .bg-layer.active {
            opacity: 1;
        }

/* ============================================
   인벤토리 (Inventory)
   ============================================ */
        .inventory-wrapper {
            position: absolute;
            top: 0;
            right: 0;
            width: 540px;
            height: 823px;
            flex-shrink: 0;
            transform-origin: top right;
            z-index: 10;
            pointer-events: auto;
        }

        .inventory-bg {
            position: absolute;
            top: 0; left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 1;
        }

        .inventory-grid-container {
            position: absolute;
            top: 42px;
            left: 100px;
            width: 361px;
            height: 709px;
            overflow: hidden;
            z-index: 2;
        }

        .inventory-grid {
            display: grid;
            /* 칸84 + 세로줄3 = 87px 반복, 마지막 칸은 세로줄 없음 */
            grid-template-columns: 88px 3px 88px 3px 88px 3px 88px;
            grid-auto-rows: auto;
            /* 칸82 + 가로줄3 */
            gap: 0px;
        }

        .inv-row {
            display: contents;
        }

        /* 인벤토리 슬롯 (병합됨) */
        .inv-slot {
            position: relative;
            width: 88px;
            height: 86px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: url('/img/inven_cannes.png') no-repeat center;
            background-size: 88px 86px;
            cursor: pointer;
            border: 1px solid transparent;
            transition: border-color 0.15s;
        }

        .inv-vline {
            width: 3px;
            height: 86px;
            background: url('/img/inven_stripe.png') no-repeat center;
            background-size: 3px 85px;
        }

        .inv-hline {
            height: 3px;
            grid-column: 1 / -1;
            background: url('/img/inven_rank.png') repeat-x;
            background-size: 91px 3px;
        }

        /* 스크롤바 히트 영역 - 골드 바 위치에 맞춤 */
        .inv-scrollbar {
            position: absolute;
            top: 75px;
            left: 495px;
            width: 30px;
            height: 740px;
            z-index: 4;
            cursor: pointer;
        }

        .inv-scroll-thumb {
            position: absolute;
            left: 2px;
            width: 26px;
            height: 120px;
            cursor: grab;
            top: 0;
            background: url('/img/scroll.png') no-repeat center;
            background-size: contain;
        }

        .inv-scroll-thumb:active { cursor: grabbing; }

        .inventory-wrapper, .inventory-wrapper * { cursor: url('/img/cursor.png') 2 2, auto; }
        .inventory-wrapper.dragging, .inventory-wrapper.dragging * { cursor: none !important; }

        #dragCursor {
            display: none;
            position: fixed;
            width: 24px;
            height: 41px;
            pointer-events: none;
            z-index: 9999;
            image-rendering: auto;
        }
        .inv-slot:hover { border-color: rgba(255, 215, 0, 0.2); }

        .inv-slot.drop-hover { border: 1px solid var(--color-gold) !important; }
        .inv-slot.selected {
            background: url('/img/inven_select.png') no-repeat center !important;
            background-size: 88px 86px !important;
        }

        .blessed-img {
            filter:
                drop-shadow(0 0 3px #999790)
                drop-shadow(0 0 6px #999790)
                drop-shadow(0 0 1px #999790);
        }

        .inv-slot img {
            max-width: 80%;
            max-height: 80%;
            image-rendering: auto;
            pointer-events: none;
        }

        .inv-slot .item-count {
            position: absolute;
            bottom: 4px;
            right: 6px;
            font-size: 11px;
            font-weight: bold;
            color: var(--color-bg-white);
            text-shadow: 1px 1px 2px #000, -1px -1px 2px #000;
        }

        .inv-slot .enchant-level {
            position: absolute;
            top: 2px;
            left: 4px;
            font-size: 11px;
            font-weight: bold;
            color: var(--color-enchant-level);
            text-shadow: 1px 1px 2px #000;
        }

        .inv-slot .item-name-label {
            position: absolute;
            bottom: 2px;
            left: 50%;
            transform: translateX(-50%);
            font-size: 9px;
            color: #ccc;
            text-shadow: 1px 1px 2px #000;
            white-space: nowrap;
        }

/* ============================================
   툴팁 (Tooltips)
   ============================================ */
        /* 호버 이름 툴팁 */
        #hoverName {
            display: none;
            position: fixed;
            background: rgba(0, 0, 0, 0.85);
            color: var(--color-bg-white);
            padding: 4px 10px;
            font-size: 18px;
            pointer-events: none;
            z-index: 9998;
            white-space: nowrap;
            border: 1px solid #555;
        }

        /* 클릭 상세 툴팁 */
        #itemTooltip {
            display: none;
            position: fixed;
            background: rgba(0, 0, 0, 0.92);
            color: var(--color-bg-white);
            padding: 10px 14px;
            font-size: 18px;
            z-index: 9997;
            min-width: 200px;
            border: 1px solid #666;
            line-height: 1.7;
        }

        #itemTooltip, #itemTooltip * {
            color: var(--color-bg-white);
        }

        #itemTooltip .tt-name {
            font-size: 18px;
            font-weight: bold;
            margin-bottom: 4px;
        }

        #itemTooltip .tt-desc {
            font-size: 18px;
            margin-top: 4px;
        }

/* ============================================
   강화 패널 (Enchant Panel)
   ============================================ */
        .enchant-panel {
            flex-shrink: 0;
            background: var(--color-bg-dark);
            border-left: 2px solid var(--color-border-dark);
            padding: 16px;
            overflow-y: auto;
            z-index: 10;
            height: 100%;
            font-size: 13px;
        }

        .enchant-panel h2 {
            text-align: center;
            color: var(--color-gold);
            font-size: 20px;
            margin-bottom: 20px;
        }

        .selected-item-display {
            text-align: center;
            padding: 20px;
            border: 1px solid var(--color-border-dark);
            background: rgba(0, 0, 0, 0.4);
            margin-bottom: 16px;
            min-height: 120px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }

        .selected-item-display img {
            width: 64px; height: 64px;
            image-rendering: auto;
            margin-bottom: 8px;
        }

        .selected-item-display .no-selection { color: var(--color-text-secondary); font-size: 13px; }

        .enchant-info {
            margin-bottom: 16px;
            padding: 12px;
            background: rgba(0, 0, 0, 0.3);
            border: 1px solid var(--color-border-dark);
            font-size: 13px;
            line-height: 1.8;
        }

        .enchant-info .label { color: var(--color-text-dark-muted); }
        .enchant-info .value { color: var(--color-gold); font-weight: bold; }
        .enchant-info .value.danger { color: var(--color-fail); }

/* ============================================
   확률표 패널 (Rate Panel)
   ============================================ */
        .rate-panel {
            flex-shrink: 0;
            background: var(--color-bg-dark);
            border-left: 2px solid var(--color-border-dark);
            padding: 12px;
            overflow-y: auto;
            z-index: 10;
            height: 100%;
            font-size: 11px;
        }

        .rate-panel h3 {
            color: var(--color-gold);
            font-size: 14px;
            margin-bottom: 10px;
            text-align: center;
        }

        .rate-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 11px;
        }

        .rate-table th {
            background: rgba(255,215,0,0.1);
            color: var(--color-gold);
            padding: 4px 3px;
            border: 1px solid var(--color-border-dark);
            font-weight: bold;
            text-align: center;
        }

        .rate-table td {
            padding: 3px;
            border: 1px solid var(--color-border-dark);
            text-align: center;
            color: var(--color-text-dark);
        }

        .rate-table tr:hover td {
            background: rgba(255,215,0,0.05);
        }

        .rate-table .highlight td {
            background: rgba(255,215,0,0.15);
            color: var(--color-gold);
        }

        .rate-panel .no-rate {
            color: var(--color-text-secondary);
            font-size: 12px;
            text-align: center;
            margin-top: 20px;
        }

/* ============================================
   강화 타입/스크롤 선택 (Enchant Type & Scroll)
   ============================================ */
        .type-select {
            margin-bottom: 12px;
        }

        .type-select label {
            display: block;
            font-size: 13px;
            color: var(--color-text-dark-muted);
            margin-bottom: 6px;
        }

        .type-buttons {
            display: flex;
            gap: 6px;
        }

        .type-btn {
            flex: 1;
            padding: 8px 6px;
            border: 1px solid var(--color-border-dark);
            background: linear-gradient(180deg, #333 0%, var(--color-bg-darker) 100%);
            color: var(--color-text-dark);
            cursor: pointer;
            font-size: 11px;
            text-align: center;
        }

        .type-btn:hover { background: linear-gradient(180deg, #444 0%, #333 100%); }
        .type-btn.active { border-color: var(--color-gold); color: var(--color-gold); }

        .scroll-select { margin-bottom: 16px; }
        .scroll-select label { display: block; font-size: 13px; color: var(--color-text-dark-muted); margin-bottom: 6px; }
        .scroll-buttons { display: flex; gap: 8px; }

        .scroll-btn {
            flex: 1;
            padding: 10px 8px;
            border: 1px solid var(--color-border-dark);
            background: linear-gradient(180deg, #333 0%, var(--color-bg-darker) 100%);
            color: var(--color-text-dark);
            cursor: pointer;
            font-size: 12px;
            text-align: center;
            transition: all 0.15s;
        }

        .scroll-btn:hover { background: linear-gradient(180deg, #444 0%, #333 100%); border-color: #555; }
        .scroll-btn.active { border-color: var(--color-gold); color: var(--color-gold); }

        .enchant-btn {
            width: 100%;
            padding: 14px;
            font-size: 16px;
            font-weight: bold;
            border: 2px solid #555;
            background: linear-gradient(180deg, #333 0%, var(--color-bg-darker) 100%);
            color: var(--color-gold);
            cursor: pointer;
            margin-bottom: 16px;
        }

        .enchant-btn:hover { background: linear-gradient(180deg, #444 0%, #222 100%); box-shadow: 0 0 12px rgba(255, 215, 0, 0.3); }
        .enchant-btn:disabled { opacity: 0.4; cursor: not-allowed; }
        .enchant-btn:active:not(:disabled) { transform: scale(0.98); }

/* ============================================
   결과 로그 (Result Log)
   ============================================ */
        .result-log {
            height: 200px;
            overflow-y: auto;
            border: 1px solid var(--color-border-dark);
            background: rgba(0, 0, 0, 0.5);
            padding: 8px;
            font-size: 12px;
            line-height: 1.6;
        }

        .result-log .success { color: var(--color-success); }
        .result-log .fail { color: var(--color-fail); }
        .result-log .destroy { color: var(--color-destroy); font-weight: bold; }
        .result-log .info { color: var(--color-text-muted); }

/* ============================================
   강화 이펙트 (Enchant Effect)
   ============================================ */
        .enchant-effect {
            position: fixed;
            top: 0; left: 0;
            width: 100%; height: 100%;
            pointer-events: none;
            z-index: 9999;
            display: none;
        }

        .enchant-effect.success { display: block; animation: flashGreen 0.6s ease-out; }
        .enchant-effect.fail { display: block; animation: flashRed 0.6s ease-out; }

        @keyframes flashGreen { 0% { background: rgba(242, 229, 173, 0.3); } 100% { background: transparent; } }
        @keyframes flashRed { 0% { background: rgba(255, 0, 0, 0.3); } 100% { background: transparent; } }

/* ============================================
   통계 패널 (Stats Panel)
   ============================================ */
        .stats-panel {
            margin-top: 16px;
            padding: 12px;
            background: rgba(0, 0, 0, 0.3);
            border: 1px solid var(--color-border-dark);
            font-size: 12px;
            line-height: 1.8;
            color: var(--color-text-dark);
        }

        .stats-panel h3 { color: var(--color-gold); font-size: 13px; margin-bottom: 4px; }
        .stats-panel .label { color: var(--color-text-dark-muted); }

        .reset-btn {
            margin-top: 8px;
            padding: 6px 12px;
            font-size: 11px;
            border: 1px solid var(--color-border-dark);
            background: var(--color-bg-darker);
            color: var(--color-text-dark-muted);
            cursor: pointer;
        }

        .reset-btn:hover { color: var(--color-text-dark); border-color: #555; }

/* ============================================
   스크롤바 (Scrollbar)
   ============================================ */
        ::-webkit-scrollbar { width: 6px; }
        ::-webkit-scrollbar-track { background: var(--color-bg-darker); }
        ::-webkit-scrollbar-thumb { background: #444; border-radius: 3px; }

/* ============================================
   채팅 로그 (Chat Log)
   ============================================ */
        .enchant-log {
            height: 200px;
            overflow-y: auto;
            border: 1px solid var(--color-border-dark);
            background: rgba(0, 0, 0, 0.7);
            padding: 8px 10px;
            font-size: 13px;
            line-height: 1.8;
        }

        .enchant-log::-webkit-scrollbar { width: 4px; }
        .enchant-log::-webkit-scrollbar-thumb { background: #444; }

        .chat-msg { padding: 2px 0; }
        .chat-msg .log-time { color: var(--color-text-secondary); font-size: 11px; margin-right: 4px; }

        .chat-msg.success { color: var(--color-chat-text); }
        .chat-msg.fail { color: var(--color-chat-text); }
        .chat-msg.destroy { color: var(--color-chat-text); }
        .chat-msg.info { color: var(--color-chat-text); }
        .chat-msg.system { color: var(--color-chat-text); font-style: italic; }

/* ============================================
   삭제 확인 다이얼로그 (Confirm Dialog)
   ============================================ */
        .confirm-dialog-overlay {
            display: none;
            position: fixed;
            top: 0; left: 0;
            width: 100%; height: 100%;
            background: rgba(0,0,0,0.4);
            z-index: 10000;
            justify-content: center;
            align-items: center;
        }

        .confirm-dialog-overlay.show {
            display: flex;
        }

        .confirm-dialog {
            background: linear-gradient(180deg, #444 0%, #333 5%, #222 50%, #333 95%, #444 100%);
            border: 3px solid #a09070;
            padding: 20px 30px;
            min-width: 400px;
            text-align: center;
            box-shadow: 0 4px 20px rgba(0,0,0,0.8);
        }

        .confirm-dialog .confirm-msg {
            color: #000;
            font-size: 16px;
            font-weight: bold;
            margin-bottom: 16px;
            text-shadow: none;
        }

        .confirm-dialog .confirm-buttons {
            text-align: right;
        }

        .confirm-dialog .confirm-buttons span {
            color: #000;
            font-size: 15px;
            cursor: pointer;
            margin-left: 8px;
            font-weight: bold;
        }

        .confirm-dialog .confirm-buttons span:hover {
            color: var(--color-bg-white);
        }

/* ============================================
   인벤토리 컨트롤 (Inventory Controls)
   ============================================ */
        .inv-close-btn {
            position: absolute;
            top: 2px;
            left: 2px;
            width: 80px;
            height: 36px;
            z-index: 5;
            cursor: pointer;
        }
        .inv-close-btn:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        .inven-toggle-btn {
            width: 100%;
            margin-top: 8px;
            padding: 12px;
            border: 1px solid #2a6cb8;
            background: #1a5ca0;
            color: var(--color-bg-white);
            font-size: 14px;
            font-weight: bold;
            cursor: pointer;
        }
        .inven-toggle-btn:hover { background: #2470b8; }

/* ========== 스탯 계산기 ========== */
.statcalc-panel {
    flex: 1;
    padding: 32px 40px;
    background: #fff;
    overflow-y: auto;
    max-width: 720px;
    margin: 0 auto;
}
.statcalc-panel h3 {
    margin: 0 0 8px;
    color: #1a1a1a;
    font-size: 24px;
    font-weight: 700;
    border-bottom: 2px solid #c0392b;
    padding-bottom: 12px;
}
.sc-desc {
    color: #666;
    font-size: 13px;
    margin: 12px 0 24px;
}
.sc-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #fafafa;
    padding: 24px;
    border: 1px solid #e0e0e0;
}
.sc-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.sc-row label {
    flex: 0 0 140px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}
.sc-hint {
    font-weight: 400;
    color: #888;
    font-size: 11px;
}
.sc-row input[type="number"],
.sc-row select {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #ccc;
    background: #fff;
    font-size: 14px;
    font-family: inherit;
    color: #1a1a1a;
}
.sc-row input[type="number"]:focus,
.sc-row select:focus {
    outline: none;
    border-color: #c0392b;
}
.sc-stepper {
    flex: 1;
    display: flex;
    align-items: stretch;
    border: 1px solid #ccc;
    background: #fff;
}
.sc-stepper button {
    width: 36px;
    border: none;
    background: #1a1a1a;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
}
.sc-stepper button:hover { background: #c0392b; }
.sc-stepper input {
    flex: 1;
    padding: 8px 10px;
    border: none !important;
    background: #fff;
    font-size: 14px;
    text-align: center;
    -moz-appearance: textfield;
}
.sc-stepper input::-webkit-outer-spin-button,
.sc-stepper input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.sc-calc-btn {
    margin-top: 8px;
    padding: 14px;
    border: none;
    background: linear-gradient(180deg, #c0392b, #8e2218);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: filter .15s;
}
.sc-calc-btn:hover { filter: brightness(1.15); }
.sc-result-area { margin-top: 24px; }
.sc-result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.sc-result-card {
    border: 1px solid #1a1a1a;
    background: #fff;
    padding: 20px;
    text-align: center;
}
.sc-result-title {
    font-size: 13px;
    color: #666;
    font-weight: 600;
    margin-bottom: 14px;
}
.sc-grade-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 18px 0;
    color: #fff;
    margin-bottom: 14px;
}
.sc-grade-letter {
    font-size: 44px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 2px;
}
.sc-grade-label {
    font-size: 13px;
    margin-top: 6px;
    opacity: .9;
}
.sc-result-stats {
    font-size: 13px;
    color: #333;
    line-height: 1.7;
}
.sc-result-stats b { color: #c0392b; font-size: 16px; }
.sc-result-range {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eee;
    color: #888;
    font-size: 12px;
}
.sc-result-meta {
    margin-top: 16px;
    text-align: center;
    color: #888;
    font-size: 12px;
}
.sc-error {
    padding: 14px;
    background: #fdecea;
    border: 1px solid #c0392b;
    color: #8e2218;
    font-size: 13px;
    text-align: center;
}
@media (max-width: 600px) {
    .statcalc-panel { padding: 20px 16px; }
    .sc-result-grid { grid-template-columns: 1fr; }
    .sc-row { flex-direction: column; align-items: stretch; gap: 6px; }
    .sc-row label { flex: none; }
}
