/* ================================================
   사냥터 히트박스 뷰어
   팔레트: #3C3744 (어두운 회보라), #B4C5E4 (파랑), #FBFFF1 (밝은 배경)
   ================================================ */

.hh-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 20px 60px;
}

.hh-page-header { margin-bottom: 20px; }
.hh-page-header h1 { font-size: 26px; color: #3C3744; }
.hh-page-sub { color: #777; font-size: 14px; margin-top: 4px; }
.hh-pc-note { color: #aaa; font-size: 12.5px; }
.hh-loading { color: #999; font-size: 14px; padding: 30px 0; text-align: center; }

/* ─── 툴바 (검색 + 심볼 구간 버튼) ─── */
.hh-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px 20px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.hh-search-row {
    display: flex;
    gap: 8px;
    flex: 1 1 300px;
    max-width: 460px;
}
.hh-search-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #d5d2dc;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: #3C3744;
    background: #fff;
    outline: none;
    transition: border-color 0.15s;
}
.hh-search-input:focus { border-color: #B4C5E4; box-shadow: 0 0 0 3px rgba(180, 197, 228, 0.25); }
.hh-search-clear { flex-shrink: 0; }
.hh-map-card-name mark {
    background: #ffe98a;
    color: inherit;
    border-radius: 3px;
    padding: 0 1px;
}

/* ─── 심볼 구간 버튼 ─── */
.hh-tier-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.hh-tier-btn {
    padding: 9px 18px;
    border-radius: 10px;
    border: 1px solid #d5d2dc;
    background: #fff;
    color: #6a7fb0;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    white-space: nowrap;
}
.hh-tier-btn:hover:not(.disabled) { border-color: #B4C5E4; background: #f4f6fb; }
.hh-tier-btn.active {
    background: #6a7fb0;
    border-color: #6a7fb0;
    color: #fff;
}
.hh-tier-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ─── 목록 카드 툴팁 (몬스터 정보) ─── */
.hh-list-tooltip {
    position: fixed;
    z-index: 1200;
    pointer-events: none;
    background: rgba(20, 20, 28, 0.94);
    border: 1px solid rgba(180, 197, 228, 0.5);
    border-radius: 8px;
    padding: 9px 12px;
    max-width: 320px;
}
.hh-ltip-row { color: #ddd; font-size: 12px; line-height: 1.5; white-space: nowrap; }
.hh-ltip-row b { color: #B4C5E4; }
.hh-ltip-row span { display: block; color: #999; font-size: 11.5px; }
.hh-ltip-row + .hh-ltip-row { margin-top: 5px; }

/* ─── 공통 버튼 ─── */
.hh-btn {
    padding: 7px 14px;
    background: #fff;
    border: 1px solid #d5d2dc;
    border-radius: 8px;
    color: #3C3744;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}
.hh-btn:hover { background: #f0eef5; border-color: #B4C5E4; }
.hh-danger-btn { color: #d64545; border-color: rgba(214, 69, 69, 0.4); }
.hh-danger-btn:hover { background: rgba(214, 69, 69, 0.08); border-color: #d64545; }

/* ─── 지역 탭 ─── */
.hh-region-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}
.hh-region-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px 8px 12px;
    border-radius: 20px;
    border: 1px solid #d5d2dc;
    background: #fff;
    color: #555;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}
.hh-region-icon {
    width: 17px;
    height: 17px;
    object-fit: contain;
    flex-shrink: 0;
    image-rendering: -webkit-optimize-contrast;
}
.hh-region-tab:hover { border-color: #B4C5E4; color: #3C3744; }
.hh-region-tab.active {
    background: #3C3744;
    border-color: #3C3744;
    color: #fff;
}

/* ─── 사냥터 그룹 / 카드 ─── */
.hh-group { margin-bottom: 28px; }
.hh-group-title {
    font-size: 16px;
    color: #3C3744;
    font-weight: 700;
    margin-bottom: 12px;
    padding-left: 10px;
    border-left: 4px solid #B4C5E4;
}
.hh-map-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 14px;
}
.hh-map-card {
    background: #fff;
    border: 1px solid #e2dfe8;
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
    font-family: inherit;
}
.hh-map-card:hover {
    border-color: #B4C5E4;
    box-shadow: 0 4px 14px rgba(60, 55, 68, 0.12);
    transform: translateY(-2px);
}
.hh-map-thumb {
    width: 100%;
    height: 96px;
    background: #23202b;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.hh-map-thumb img {
    max-width: 92%;
    max-height: 88px;
    image-rendering: pixelated;
    transform: scale(1.6);
    transform-origin: center;
}
.hh-map-card-name { font-size: 14px; font-weight: 700; color: #3C3744; line-height: 1.35; }
.hh-map-card-meta { font-size: 12px; color: #888; display: flex; gap: 8px; }
.hh-map-card-meta .hh-lv { color: #6a7fb0; font-weight: 600; }

/* ─── 상세 레이아웃 ─── */
.hh-detail-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 18px;
    align-items: start;
}

.hh-canvas-card {
    background: #fff;
    border: 1px solid #e2dfe8;
    border-radius: 14px;
    overflow: hidden;
}
.hh-canvas-top {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid #eee;
}
.hh-map-title {
    flex: 1;
    text-align: center;
    font-size: 17px;
    font-weight: 700;
    color: #3C3744;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hh-map-mobcount { color: #d64545; font-size: 14px; font-weight: 600; margin-left: 6px; }

.hh-canvas-wrap {
    position: relative;
    background: #14171d;
    overflow: auto;
    max-height: 72vh;
    min-height: 320px;
    /* 캔버스가 컨테이너보다 작으면 가운데 정렬, 크면(확대) 스크롤 가능하도록
       flex + margin:auto 조합 사용 (align/justify-center 와 달리 좌상단이 잘리지 않음) */
    display: flex;
}
#hhCanvas { display: block; margin: auto; cursor: crosshair; }
#hhCanvas.hh-dragging { cursor: grabbing; }

.hh-tooltip {
    position: absolute;
    pointer-events: none;
    background: rgba(20, 20, 28, 0.92);
    color: #fff;
    font-size: 12px;
    line-height: 1.45;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid rgba(180, 197, 228, 0.5);
    z-index: 5;
    white-space: nowrap;
}
.hh-tooltip b { color: #B4C5E4; }

.hh-toast {
    position: fixed;
    left: 50%;
    bottom: 46px;
    transform: translateX(-50%);
    width: max-content;
    max-width: 90vw;
    text-align: center;
    background: rgba(20, 20, 28, 0.92);
    color: #ffd6d6;
    border: 1px solid rgba(214, 69, 69, 0.6);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    z-index: 2000;
}
.hh-toast.show { opacity: 1; }

.hh-canvas-bottom {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    padding: 10px 14px;
    border-top: 1px solid #eee;
    font-size: 13px;
}
.hh-check { display: flex; align-items: center; gap: 5px; color: #555; cursor: pointer; user-select: none; }
.hh-check input { accent-color: #3C3744; }
.hh-zoom-controls { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.hh-zoom-btn { padding: 4px 10px; font-size: 14px; line-height: 1; }
.hh-zoom-fit { font-size: 12px; }
.hh-zoom-label { font-size: 12px; color: #777; min-width: 42px; text-align: center; }
.hh-autosave { font-size: 12px; color: #4caf7d; min-width: 70px; text-align: right; }
.hh-saveimg-btn {
    background: #2ecc71;
    border-color: #2ecc71;
    color: #fff;
    font-weight: 700;
}
.hh-saveimg-btn:hover { background: #29b765; border-color: #29b765; color: #fff; }

/* ─── 사이드바 ─── */
.hh-sidebar { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 130px; }

/* 스킬 요청 페이지 연결 배너 (상세 레이아웃 위, 사이드바 폭에 맞춰 우측 정렬) */
.hh-request-banner {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 300px;
    margin: 0 0 18px auto;
    padding: 12px 14px;
    background: linear-gradient(135deg, #4a4557, #3C3744);
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.15s;
    box-sizing: border-box;
}
.hh-request-banner:hover { background: linear-gradient(135deg, #565064, #443f52); transform: translateY(-1px); }
.hh-request-icon {
    flex-shrink: 0;
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(180, 197, 228, 0.22);
    color: #B4C5E4;
    border-radius: 9px;
    font-size: 20px; font-weight: 700;
    line-height: 1;
}
.hh-request-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.hh-request-text b { color: #fff; font-size: 13.5px; font-weight: 700; }
.hh-request-text small { color: rgba(255,255,255,0.6); font-size: 11.5px; }
.hh-request-arrow { color: rgba(255,255,255,0.5); font-size: 20px; flex-shrink: 0; }

.hh-side-card {
    background: #fff;
    border: 1px solid #e2dfe8;
    border-radius: 14px;
    padding: 14px;
}
.hh-side-title { font-size: 15px; color: #3C3744; margin-bottom: 10px; }

.hh-skill-list { display: flex; flex-direction: column; gap: 8px; }
.hh-skill-item {
    border: 1px solid #e2dfe8;
    border-radius: 10px;
    padding: 8px 10px;
    cursor: pointer;
    transition: all 0.15s;
    background: #fbfaff;
}
.hh-skill-item:hover { border-color: #B4C5E4; }
.hh-skill-item.armed {
    border-color: #3C3744;
    background: #f0f3fb;
    box-shadow: 0 0 0 2px rgba(180, 197, 228, 0.5);
}
.hh-skill-main { display: flex; align-items: center; gap: 8px; }
.hh-skill-icon {
    width: 30px; height: 30px;
    border-radius: 6px;
    background: #23202b;
    object-fit: contain;
    flex-shrink: 0;
}
.hh-skill-icon-ph {
    width: 30px; height: 30px;
    border-radius: 6px;
    background: #3C3744;
    color: #B4C5E4;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700;
    flex-shrink: 0;
}
.hh-skill-name { font-size: 13px; font-weight: 700; color: #3C3744; line-height: 1.3; }
.hh-skill-dot { width: 10px; height: 10px; border-radius: 3px; margin-left: auto; flex-shrink: 0; }
.hh-skill-count {
    margin-left: auto;
    font-size: 11px;
    font-weight: 700;
    color: #6a7fb0;
    background: #eef1f9;
    border-radius: 10px;
    padding: 2px 7px;
    flex-shrink: 0;
}
.hh-skill-count.full { color: #d64545; background: rgba(214, 69, 69, 0.1); }
.hh-skill-main .hh-skill-count + .hh-skill-dot { margin-left: 6px; }
.hh-skill-approx { color: #c98a2b; font-weight: 800; margin-left: 3px; }
.hh-variant-row { display: flex; gap: 5px; margin-top: 7px; flex-wrap: wrap; }
.hh-variant-chip {
    padding: 3px 9px;
    font-size: 11.5px;
    font-weight: 600;
    border-radius: 12px;
    border: 1px solid #d5d2dc;
    background: #fff;
    color: #666;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.12s;
}
.hh-variant-chip:hover { border-color: #B4C5E4; }
.hh-variant-chip.active { background: #3C3744; border-color: #3C3744; color: #fff; }

/* ─── 커버리지 / 배치 목록 ─── */
.hh-coverage { text-align: center; padding: 6px 0 10px; }
.hh-coverage-num { font-size: 22px; font-weight: 800; color: #3C3744; }
.hh-coverage-num small { font-size: 13px; color: #999; font-weight: 600; }
.hh-placed-list { display: flex; flex-direction: column; gap: 6px; }
.hh-placed-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: #555;
    background: #f7f6fa;
    border-radius: 8px;
    padding: 6px 9px;
}
.hh-placed-color { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.hh-placed-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hh-placed-count { color: #4caf7d; font-weight: 700; white-space: nowrap; }
.hh-placed-del {
    background: none; border: none; color: #bbb;
    cursor: pointer; font-size: 14px; padding: 0 2px;
    font-family: inherit;
}
.hh-placed-del:hover { color: #d64545; }
.hh-placed-empty { font-size: 12.5px; color: #aaa; text-align: center; padding: 4px 0; }

/* ─── 직업 스킬 섹션 ─── */
.hh-job-section {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed #e2dfe8;
}
.hh-job-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}
.hh-job-head .hh-side-title { margin-bottom: 0; }
.hh-job-select {
    flex: 0 1 auto;
    max-width: 58%;
    font-size: 12.5px;
    color: #3C3744;
    padding: 6px 26px 6px 10px;
    border: 1px solid #d9d5e0;
    border-radius: 8px;
    background: #fbfaff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238a7fa0' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 9px center;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}
.hh-job-select:focus { outline: none; border-color: #b76bff; }
.hh-job-empty { font-size: 12px; color: #999; line-height: 1.6; padding: 4px 2px; }

.hh-tip { font-size: 11.5px; color: #999; margin-top: 10px; line-height: 1.6; }
.hh-side-note p { font-size: 12px; color: #888; line-height: 1.7; }
.hh-side-note b { color: #c98a2b; }

/* ─── 반응형 ─── */
@media (max-width: 980px) {
    .hh-detail-layout { grid-template-columns: 1fr; }
    .hh-sidebar { position: static; }
    .hh-canvas-wrap { max-height: 60vh; }
    .hh-request-banner { width: 100%; margin: 0 0 14px 0; }
}
@media (max-width: 600px) {
    .hh-container { padding: 16px 12px 40px; }
    .hh-map-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .hh-canvas-top { flex-wrap: wrap; }
    .hh-map-title { order: -1; flex-basis: 100%; }
}
