        body {
            background-color: #d5e8f7;
        }
        .box-container {
            width: 100%;
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-bottom: 20px;
        }
        .form-control {
            font-size: 12pt;
            margin: 0px !important;
            padding: 2px !important;
        }
        .keyword-box {
            background-color: #fff;
            border: 1px solid #aaa;
            padding: 10px;
            max-width: 198px;
            position: relative;
        }
        .keyword-header {
            font-size: 9pt;
            font-weight: bold;
            margin-bottom: 8px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .keyword-header .auto-btn {
            font-size: 0.75rem;
            cursor: pointer;
            padding: 2px 6px;
            background: #007bff;
            color: white;
            border-radius: 4px;
            border: 1px solid #0056b3;
            font-weight: 600;
            transition: all 0.3s;
        }
        .keyword-header .auto-btn:hover {
            background: #0056b3;
        }
        .keyword-header .auto-btn.active {
            background: #dc3545;
            border-color: #bd2130;
            animation: pulse 1s infinite;
        }
        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.7; }
        }
        .keyword-header .reset-btn {
            font-size: 0.70rem;
            color: #dc3545;
            cursor: pointer;
            padding: 2px 6px;
            border: 1px solid #dc3545;
            border-radius: 4px;
            background: white;
            font-weight: 600;
            transition: all 0.3s;
        }
        .keyword-header .reset-btn:hover {
            background: #dc3545;
            color: white;
        }
        select.keyword-list {
            width: 100%;
            height: 90px;
        }
        .keyword-list-container {
            width: 100%;
            height: 90px;
            overflow-y: auto;
            border: 1px solid #ccc;
            border-radius: 4px;
            background: white;
            padding: 2px;
        }
        .keyword-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 3px 5px;
            margin-bottom: 2px;
            border-radius: 3px;
            cursor: pointer;
            font-size: 0.85rem;
            transition: background 0.2s;
        }
        .keyword-item:hover {
            background: #e8f4ff;
        }
        .keyword-item.selected {
            background: #0d6efd;
            color: white;
        }
        .keyword-item-text {
            flex: 1;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .keyword-item-naver {
            margin-left: 5px;
            font-size: 1rem;
            cursor: pointer;
            opacity: 0.6;
            transition: opacity 0.2s;
        }
        .keyword-item-naver:hover {
            opacity: 1;
        }
        .box-status {
            font-size: 8pt;
            width: 190px;
            min-height: 16px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .slider-wrap {
            margin-top: 6px;
        }
        .slider-wrap label {
            font-size: 0.85rem;
            font-weight: 500;
        }
        .form-control-sm {
            width: 120px;
        }
        .btn-wrap {
            margin-top: 8px;
        }
        .toast-container {
            position: fixed;
            top: 20px;
            right: 20px;
            z-index: 9999;
            display: flex;
            flex-direction: column;
            gap: 5px;
        }
        .toast-msg {
            background: rgba(0,0,0,0.8);
            color: #fff;
            padding: 8px 12px;
            border-radius: 4px;
            animation: fadeInOut 3s forwards;
        }
        @keyframes fadeInOut {
            0% { opacity: 0; transform: translateY(-8px); }
            10% { opacity: 1; transform: translateY(0); }
            80% { opacity: 1; }
            100% { opacity: 0; transform: translateY(-8px); }
        }

        /* 세트 추가 버튼을 좀 더 화려하게 */
        @keyframes pulseBtn {
            0% {
                transform: scale(1);
                box-shadow: 0 0 5px rgba(255, 255, 255, 0.6);
            }
            50% {
                transform: scale(1.07);
                box-shadow: 0 0 15px rgba(255, 255, 255, 0.9);
            }
            100% {
                transform: scale(1);
                box-shadow: 0 0 5px rgba(255, 255, 255, 0.6);
            }
        }

        #fixedSet {
            position: fixed;
            left: 70px;
            top: 345px;
            width: 200px;
            cursor: move;
            z-index: 1000;
        }
        /* [2026-08-03] 접힌 위젯이 결과 테이블을 가리는 문제 — 접힘 상태는 반투명, 올리면 복원 */
        #fixedSet.km-collapsed { opacity: .62; transition: opacity .15s; }
        #fixedSet.km-collapsed:hover, #fixedSet.km-collapsed:focus-within { opacity: 1; }

        #fixedSet .card {
            box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        }

        #fixedSet.dragging {
            opacity: 0.8;
        }

        /* 드래그 핸들 표시 */
        #fixedSet .card-title {
            cursor: move;
            user-select: none;
        }

        #fixedSet .card-title::before {
            content: "⋮⋮ ";
            color: #999;
            margin-right: 5px;
        }

        /* [2026-07-13] 커스텀 키워드 패널 접기 — 첫 로드에 실기능 위젯을 가리지 않도록 기본 접힘 */
        #fixedSet .km-fold-btn {
            float: right;
            border: none;
            background: #eef2ff;
            color: #4f46e5;
            border-radius: 6px;
            font-size: 0.72rem;
            font-weight: 700;
            padding: 2px 8px;
            cursor: pointer;
        }
        #fixedSet .km-fold-btn:hover {
            background: #e0e7ff;
        }
        #fixedSet.km-collapsed #customListTextarea,
        #fixedSet.km-collapsed #btnAddBox {
            display: none;
        }
        #fixedSet.km-collapsed .card-title {
            margin-bottom: 0;
        }

        #btnAddBox {
            background: linear-gradient(to right, #fbc2eb, #a6c1ee);
            color: #fff;
            border: none;
            border-radius: 8px;
            box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.3);
            font-weight: bold;
            margin-top:12px;
            padding: 10px 18px;
            font-size: 1.1rem;
            animation: pulseBtn 1.5s infinite;
        }
        #btnAddBox:hover {
            box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.4);
            opacity: 0.9;
        }

        .btn-success {
            font-size: 0.70rem;
            width: 80px;
        }
        .btn-warning {
            width: 220px;
            font-size: 1.35rem;
            margin-bottom: 10px;
        }
        #pcArea {
            min-height: 250px; /* [2026-07-13] 고정 height는 결과가 길면 아래 콘텐츠와 겹침 */
        }
        /* [2026-07-23] 검색창 바로 아래로 올렸으므로, 검색 전(빈 상태)엔 접어서 트렌딩 위젯이 위로 붙게 함 */
        #pcArea:empty { min-height: 0; margin: 0 !important; }

        .pos-td {
            text-align: center;
        }
        .highlight {
            background-color: #e9f2ff;
        }

        /* CPC 색상 예시 */
        .cpc-lv-none {}
        .cpc-lv0 { background-color: #eef; }
        .cpc-lv1 { background-color: #cce; }
        .cpc-lv2 { background-color: #99d; }
        .cpc-lv3 { background-color: #66c; color:white; }
        .cpc-lv4 { background-color: #339; color:white; }
        .cpc-lv5 { background-color: #227; color:white; }
        .cpc-lv6 { background-color: #004; color:white; }

        .level-table th, .level-table td {
            padding: 6px 10px;
            border: 1px solid #ddd;
            text-align: center;
        }
        .my-level-row {
            background-color: #f6ffa5 !important;
            font-weight: bold;
            color: #d70000;
        }

        /***********************************************
         * textarea(필터 결과) 숨기기
         ***********************************************/
        #filter {
            display: none; /* 숨김 처리 */
        }

        /***********************************************
         * 필터 테이블(화면 표시용) - 반응형
         ***********************************************/
        .table-responsive {
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
        }

        #filterTable {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.9rem;
        }
        #filterTable thead th {
            background-color: #f2f2f2;
            text-align: center;
            border: 1px solid #ddd;
            padding: 6px;
            font-weight: 600;
            cursor: pointer;
            user-select: none;
            position: relative;
            transition: background-color 0.2s;
        }

        #filterTable thead th:hover {
            background-color: #e0e0e0;
        }

        #filterTable thead th.sortable::after {
            content: ' ⇅';
            color: #999;
            font-size: 0.8em;
        }

        #filterTable thead th.sort-asc::after {
            content: ' ▲';
            color: #007bff;
        }

        #filterTable thead th.sort-desc::after {
            content: ' ▼';
            color: #007bff;
        }
        #filterTable tbody td {
            border: 1px solid #ddd;
            padding: 6px;
            font-size: 0.9rem;
        }

        /* 테이블 행 호버 효과 - 선택된 키워드 강조 */
        #filterTable tbody tr {
            transition: all 0.2s ease;
        }

        #filterTable tbody tr:hover td {
            background-color: #fff3cd;
            border-color: #ffc107;
        }

        /* [삭제] 버튼 스타일 */
        .del-btn {
            color: red;
            cursor: pointer;
            margin-right: 4px;
        }

        /* 경쟁률 기반 행 표시 — [2026-08-03] 마젠타 전면도배 → 좌측 컬러바+옅은 배경+경쟁률 셀만 강조 */
        .rate-level-1 td { background-color: #f0faf4; }   /* 0.1~1 매우 낮음(좋음) */
        .rate-level-2 td { background-color: #f7fafd; }   /* 1~10 낮음 */
        .rate-level-3 td { background-color: #fffdf0; }   /* 10~100 보통 */
        .rate-level-4 td { background-color: #fff7f0; }   /* 100~1000 높음 */
        .rate-level-5 td { background-color: #fff1f1; }   /* 1000+ 매우 높음 */
        .rate-level-1 td:first-child { box-shadow: inset 4px 0 0 #10b981; }
        .rate-level-2 td:first-child { box-shadow: inset 4px 0 0 #60a5fa; }
        .rate-level-3 td:first-child { box-shadow: inset 4px 0 0 #f59e0b; }
        .rate-level-4 td:first-child { box-shadow: inset 4px 0 0 #fb923c; }
        .rate-level-5 td:first-child { box-shadow: inset 4px 0 0 #ef4444; }
        /* 경쟁률 값(5열)만 등급색으로 강조 */
        .rate-level-1 td:nth-child(5) { color: #059669; font-weight: 700; }
        .rate-level-2 td:nth-child(5) { color: #2563eb; font-weight: 700; }
        .rate-level-3 td:nth-child(5) { color: #b45309; font-weight: 700; }
        .rate-level-4 td:nth-child(5) { color: #c2410c; font-weight: 700; }
        .rate-level-5 td:nth-child(5) { color: #dc2626; font-weight: 700; }
        /* 숫자 컬럼 우측정렬·고정폭 숫자(쌓여도 자리 흔들림 없음) */
        #filterTable tbody td:nth-child(n+2) { text-align: right; font-variant-numeric: tabular-nums; }
        #filterTable tbody td:first-child { text-align: left; }
        /* 행 호버 — 노란 하이라이트 대신 은은한 강조 */
        #filterTable tbody tr:hover td { background-color: #eef2ff !important; border-color: #c7d2fe; }
        /* 다크모드 대응(페이지 배경·테이블·등급색) */
        body.theme-dark { background-color: #0b1220; color: #c7d2e0; }
        body.theme-dark #filterTable thead th { background-color: #1f2937; color: #e5e7eb; border-color: #374151; }
        body.theme-dark #filterTable thead th:hover { background-color: #273449; }
        body.theme-dark #filterTable tbody td { border-color: #273244; color: #e5e7eb; }
        body.theme-dark #filterTable tbody tr td { background-color: #111827; }
        body.theme-dark .rate-level-1 td { background-color: rgba(16,185,129,.10); }
        body.theme-dark .rate-level-2 td { background-color: rgba(96,165,250,.10); }
        body.theme-dark .rate-level-3 td { background-color: rgba(245,158,11,.10); }
        body.theme-dark .rate-level-4 td { background-color: rgba(251,146,60,.13); }
        body.theme-dark .rate-level-5 td { background-color: rgba(239,68,68,.13); }
        body.theme-dark .rate-level-1 td:nth-child(5) { color: #34d399; }
        body.theme-dark .rate-level-2 td:nth-child(5) { color: #93c5fd; }
        body.theme-dark .rate-level-3 td:nth-child(5) { color: #fbbf24; }
        body.theme-dark .rate-level-4 td:nth-child(5) { color: #fdba74; }
        body.theme-dark .rate-level-5 td:nth-child(5) { color: #f87171; }
        body.theme-dark #filterTable tbody tr:hover td { background-color: #1e2a44 !important; border-color: #3b4a6b; }
        /* 경쟁률 범례 */
        .rate-legend { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 6px 0 8px; font-size: 0.8rem; color: #64748b; }
        .rate-legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
        body.theme-dark .rate-legend { color: #94a3b8; }

        /* 키워드 조합 팝업 스타일 - 완전 개편 */
        #keywordCombiner {
            position: fixed !important;
            left: 300px;
            top: 80px;
            width: 520px;
            max-height: 90vh;
            overflow-y: auto;
            z-index: 10000 !important;
            transition: all 0.3s ease;
            pointer-events: auto !important;
        }

        #keywordCombiner * {
            cursor: default;
        }

        #keywordCombiner .card-header {
            cursor: move !important;
        }

        #keywordCombiner .card-header * {
            cursor: move !important;
        }

        #keywordCombiner button {
            cursor: pointer !important;
        }

        #keywordCombiner input,
        #keywordCombiner textarea {
            cursor: text !important;
        }

        #keywordCombiner.minimized {
            width: auto;
            height: auto;
            overflow: visible;
        }

        #keywordCombiner.minimized .combiner-body,
        #keywordCombiner.minimized .combiner-footer {
            display: none;
        }

        #keywordCombiner .card {
            box-shadow: 0 4px 12px rgba(0,0,0,0.3);
            margin-bottom: 0;
            position: relative;
            z-index: inherit;
            background: white;
        }

        #keywordCombiner.dragging {
            opacity: 0.8;
        }

        #keywordCombiner .card-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            cursor: move;
            user-select: none;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 6px 10px;
        }

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

        .combiner-header-title {
            font-size: var(--combiner-font-size, 0.9rem);
        }

        .combiner-font-controls {
            display: flex;
            gap: 3px;
            align-items: center;
        }

        .combiner-font-btn {
            background: rgba(255,255,255,0.2);
            border: 1px solid rgba(255,255,255,0.4);
            color: white;
            padding: 2px 6px;
            border-radius: 3px;
            cursor: pointer;
            font-size: 0.8rem;
            font-weight: bold;
            transition: all 0.2s;
        }

        .combiner-font-btn:hover {
            background: rgba(255,255,255,0.35);
        }

        #keywordCombiner .card-header::before {
            content: "⋮⋮ ";
            color: rgba(255,255,255,0.7);
            margin-right: 3px;
        }

        #keywordCombiner .card-body {
            padding: 10px;
            font-size: var(--combiner-font-size, 0.9rem);
        }

        .combiner-close-btn {
            background: rgba(255,255,255,0.2);
            border: 1px solid rgba(255,255,255,0.4);
            color: white;
            padding: 2px 6px;
            border-radius: 3px;
            cursor: pointer;
            font-size: var(--combiner-font-size, 0.75rem);
            transition: all 0.3s;
        }

        .combiner-close-btn:hover {
            background: rgba(255,255,255,0.3);
        }

        /* 가로 배치 */
        .combiner-textboxes-row {
            display: flex;
            gap: 8px;
            margin-bottom: 8px;
        }

        .combiner-textbox-col {
            flex: 1;
            min-width: 0;
        }

        .combiner-textbox {
            width: 100%;
            height: 70px;
            margin-bottom: 3px;
            border: 1px solid #ddd;
            border-radius: 3px;
            padding: 4px;
            font-size: var(--combiner-font-size, 0.75rem);
            resize: vertical;
        }

        .combiner-textbox:focus {
            border-color: #667eea;
            outline: none;
        }

        .combiner-label {
            font-weight: 600;
            color: #667eea;
            margin-bottom: 3px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: var(--combiner-font-size, 0.75rem);
        }

        .combiner-count {
            color: #ff6b6b;
            font-weight: bold;
            font-size: var(--combiner-font-size, 0.7rem);
        }

        .combiner-options {
            max-height: 120px;
            overflow-y: auto;
            border: 1px solid #e0e0e0;
            border-radius: 3px;
            padding: 6px;
            background: #f9f9f9;
            margin-bottom: 8px;
        }

        .combiner-option-group {
            margin-bottom: 6px;
        }

        .combiner-option-group-title {
            font-weight: 600;
            color: #555;
            margin-bottom: 3px;
            font-size: var(--combiner-font-size, 0.7rem);
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .combiner-select-all {
            cursor: pointer;
            margin-right: 3px;
        }

        .combiner-checkbox {
            margin-right: 3px;
        }

        .combiner-option-label {
            font-size: var(--combiner-font-size, 0.7rem);
            margin-right: 8px;
            cursor: pointer;
            display: inline-block;
        }

        .combiner-select-all-top {
            background: linear-gradient(135deg, #e63946 0%, #f77f00 100%);
            padding: 8px 12px;
            border-radius: 6px;
            margin-bottom: 8px;
            box-shadow: 0 2px 8px rgba(230, 57, 70, 0.3);
        }

        .combiner-select-all-top label {
            margin: 0;
        }

        .combiner-select-all-top input[type="checkbox"] {
            accent-color: #fff;
        }

        .combiner-select-all-top span {
            color: white;
            text-shadow: 0 1px 2px rgba(0,0,0,0.2);
        }

        .combiner-result {
            width: 100%;
            height: 70px;
            border: 1px solid #667eea;
            border-radius: 3px;
            padding: 5px;
            font-size: var(--combiner-font-size, 0.7rem);
            resize: vertical;
            background: #f0f4ff;
        }

        .combiner-btn-group {
            display: flex;
            gap: 4px;
            margin-top: 6px;
            flex-wrap: wrap;
        }

        .combiner-btn-group .btn {
            font-size: var(--combiner-font-size, 0.65rem);
            padding: 3px 6px;
        }

        .combiner-quick-btn {
            font-size: var(--combiner-font-size, 0.6rem);
            padding: 1px 4px;
            margin-right: 2px;
            margin-bottom: 2px;
            border-radius: 3px;
            border: 1px solid #667eea;
            background: white;
            color: #667eea;
            cursor: pointer;
            transition: all 0.2s;
        }

        .combiner-quick-btn:hover {
            background: #667eea;
            color: white;
        }

        .combiner-quick-btns {
            margin-top: 2px;
            margin-bottom: 3px;
        }

        .combiner-settings-btn {
            background: none;
            border: none;
            font-size: 0.9rem;
            cursor: pointer;
            padding: 2px 4px;
            opacity: 0.6;
            transition: all 0.3s;
            margin-left: 6px;
        }

        .combiner-settings-btn:hover {
            opacity: 1;
            transform: rotate(90deg);
        }

        .combiner-footer {
            padding: 6px 10px;
            background: #f8f9fa;
            border-top: 1px solid #dee2e6;
            display: flex;
            justify-content: center;
        }

        .combiner-footer button {
            padding: 3px 12px;
            font-size: var(--combiner-font-size, 0.7rem);
        }

        /* 자석 기능 애니메이션 */
        #keywordCombiner.snapping {
            transition: all 0.2s ease-out;
        }

        /* 최소화 상태의 아이콘 */
        .combiner-minimized-icon {
            position: fixed;
            left: 20px;
            top: 150px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 10px 15px;
            border-radius: 8px;
            cursor: pointer !important;
            font-weight: 600;
            font-size: 0.9rem;
            box-shadow: 0 4px 8px rgba(0,0,0,0.3);
            z-index: 9999;
            transition: all 0.3s;
            display: none;
        }

        .combiner-minimized-icon:hover {
            transform: scale(1.05);
            box-shadow: 0 6px 12px rgba(0,0,0,0.4);
        }

        .combiner-minimized-icon.active {
            display: block;
        }

        /* 검색 설정 UI */
        .search-settings {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            padding: 15px 20px;
            border-radius: 10px;
            margin-bottom: 15px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        }

        .search-settings label {
            color: white;
            font-weight: 600;
            font-size: 0.95rem;
            margin-right: 12px;
            margin-bottom: 0;
            display: inline-block;
        }

        .search-settings-row {
            display: flex;
            gap: 20px;
            align-items: flex-start;
            flex-wrap: wrap;
        }

        .search-setting-item {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .search-engine-buttons {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }

        .search-engine-btn {
            padding: 8px 16px;
            border: 2px solid rgba(255,255,255,0.4);
            background: rgba(255,255,255,0.2);
            color: white;
            border-radius: 6px;
            cursor: pointer;
            font-size: 0.9rem;
            font-weight: 500;
            transition: all 0.2s;
            outline: none;
        }

        .search-engine-btn:hover {
            background: rgba(255,255,255,0.3);
            border-color: rgba(255,255,255,0.6);
            transform: translateY(-1px);
        }

        .search-engine-btn.active {
            background: white;
            color: #667eea;
            border-color: white;
            font-weight: 700;
            box-shadow: 0 2px 6px rgba(0,0,0,0.2);
        }

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

        .naver-type-btn {
            padding: 6px 12px;
            border: 1px solid rgba(255,255,255,0.4);
            background: rgba(255,255,255,0.15);
            color: white;
            border-radius: 5px;
            cursor: pointer;
            font-size: 0.8rem;
            font-weight: 500;
            transition: all 0.2s;
            outline: none;
        }

        .naver-type-btn:hover {
            background: rgba(255,255,255,0.25);
            border-color: rgba(255,255,255,0.5);
        }

        .naver-type-btn.active {
            background: rgba(255,255,255,0.9);
            color: #667eea;
            border-color: white;
            font-weight: 700;
        }

        /* 사용자 ID 관리 UI */
        .user-id-manager {
            background: linear-gradient(135deg, #43cea2 0%, #185a9d 100%);
            padding: 15px 20px;
            border-radius: 10px;
            margin-bottom: 15px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        }

        .user-id-manager label {
            color: white;
            font-weight: 600;
            font-size: 0.95rem;
            margin-bottom: 8px;
            display: block;
        }

        .user-id-input-row {
            display: flex;
            gap: 10px;
            align-items: center;
            flex-wrap: wrap;
            margin-bottom: 12px;
        }

        .user-id-input {
            flex: 1;
            min-width: 200px;
            padding: 8px 12px;
            border: 2px solid rgba(255,255,255,0.4);
            background: rgba(255,255,255,0.95);
            border-radius: 6px;
            font-size: 0.9rem;
            outline: none;
            transition: all 0.2s;
        }

        .user-id-input:focus {
            border-color: white;
            background: white;
            box-shadow: 0 0 0 3px rgba(255,255,255,0.2);
        }

        .user-id-btn {
            padding: 8px 16px;
            border: 2px solid rgba(255,255,255,0.4);
            background: rgba(255,255,255,0.2);
            color: white;
            border-radius: 6px;
            cursor: pointer;
            font-size: 0.9rem;
            font-weight: 600;
            transition: all 0.2s;
            outline: none;
        }

        .user-id-btn:hover {
            background: rgba(255,255,255,0.3);
            border-color: rgba(255,255,255,0.6);
            transform: translateY(-1px);
        }

        .user-id-btn.primary {
            background: white;
            color: #185a9d;
            border-color: white;
        }

        .user-id-btn.primary:hover {
            background: rgba(255,255,255,0.9);
        }

        .user-id-current {
            color: white;
            font-size: 0.85rem;
            padding: 6px 12px;
            background: rgba(255,255,255,0.2);
            border-radius: 5px;
            display: inline-block;
        }

        .user-id-current strong {
            color: #fff;
            font-weight: 700;
        }

        .saved-keywords-list {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            margin-top: 8px;
        }

        .saved-keyword-item {
            padding: 6px 12px;
            background: rgba(255,255,255,0.2);
            border: 1px solid rgba(255,255,255,0.4);
            border-radius: 5px;
            color: white;
            font-size: 0.85rem;
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .saved-keyword-item:hover {
            background: rgba(255,255,255,0.3);
            border-color: rgba(255,255,255,0.6);
        }

        .saved-keyword-item .keyword-name {
            font-weight: 600;
        }

        .saved-keyword-item .keyword-date {
            font-size: 0.75rem;
            opacity: 0.8;
        }

        .saved-keyword-delete {
            color: #ff6b6b;
            font-weight: bold;
            margin-left: 4px;
            cursor: pointer;
        }

        .saved-keyword-delete:hover {
            color: #ff5252;
        }

        /* 키워드 관리 버튼 스타일 */
        .keyword-management-buttons {
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
        }

        .keyword-mgmt-btn {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 12px 20px;
            border: none;
            border-radius: 12px;
            font-size: 0.95rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            position: relative;
            overflow: hidden;
        }

        .keyword-mgmt-btn::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            border-radius: 50%;
            background: rgba(255,255,255,0.3);
            transform: translate(-50%, -50%);
            transition: width 0.6s, height 0.6s;
        }

        .keyword-mgmt-btn:hover::before {
            width: 300px;
            height: 300px;
        }

        .keyword-mgmt-btn .btn-icon {
            font-size: 1.2rem;
            z-index: 1;
        }

        .keyword-mgmt-btn .btn-text {
            z-index: 1;
        }

        .keyword-mgmt-btn.copy-only {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
        }

        .keyword-mgmt-btn.copy-only:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
        }

        .keyword-mgmt-btn.excel-copy {
            background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
            color: white;
        }

        .keyword-mgmt-btn.excel-copy:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(245, 87, 108, 0.4);
        }

        .keyword-mgmt-btn.excel-download {
            background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
            color: white;
        }

        .keyword-mgmt-btn.excel-download:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(79, 172, 254, 0.4);
        }

        .keyword-mgmt-btn.delete {
            background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
            color: white;
        }

        .keyword-mgmt-btn.delete:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(250, 112, 154, 0.4);
        }

        .keyword-mgmt-btn:active {
            transform: translateY(0);
            box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        }

        /* 키워드 조합 인라인 컨테이너 */
        .combiner-inline-container {
            width: 100%;
            margin: 20px 0;
            display: none;
        }

        .combiner-inline-container.show {
            display: block;
        }

        .combiner-inline-notice {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 30px;
            border-radius: 12px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.1);
            text-align: center;
            margin-bottom: 20px;
        }

        .combiner-inline-notice p {
            font-size: 1.1rem;
            font-weight: 600;
            margin: 0;
        }

        /* 실시간/인기/비싼키워드 UI - 더 작게 (1/4 크기) */
        .trending-keywords-container {
            display: flex;
            gap: 6px;
            margin-bottom: 10px;
            flex-wrap: wrap;
        }

        .trending-box {
            flex: 1;
            min-width: 140px;
            max-width: 180px;
            background: #4169E1;
            border-radius: 8px;
            padding: 8px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            position: relative;
            transition: all 0.3s ease;
        }

        .trending-box:hover {
            transform: scale(1.08);
            box-shadow: 0 4px 12px rgba(0,0,0,0.2);
            z-index: 100;
        }

        .trending-box.minimized {
            max-height: 24px;
            overflow: hidden;
        }

        .trending-box.minimized .trending-list {
            display: none;
        }

        .trending-box.popular {
            background: #FF1493;
        }

        .trending-box.expensive {
            background: #FF6B35;
        }

        /* 플래티넘 전용 위젯 스타일 */
        .trending-box.platinum-exclusive {
            background: #9B59B6;
            border: 2px solid #8E44AD;
        }

        .platinum-badge {
            background: #FFD700;
            color: #8E44AD;
            padding: 2px 6px;
            border-radius: 4px;
            font-size: 0.5rem;
            font-weight: 700;
            margin-left: 4px;
        }

        .trending-header {
            display: flex;
            align-items: center;
            gap: 3px;
            margin-bottom: 5px;
            position: relative;
            z-index: 1;
        }

        .trending-icon {
            font-size: 0.75rem;
        }

        .trending-title {
            color: white;
            font-size: 0.7rem;
            font-weight: 700;
        }

        .trending-close {
            margin-left: auto;
            background: rgba(255,255,255,0.2);
            border: none;
            color: white;
            padding: 1px 4px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 0.6rem;
            transition: all 0.3s;
            position: relative;
            z-index: 1;
            font-weight: 600;
        }

        .trending-close:hover {
            background: rgba(255,255,255,0.3);
        }

        .trending-refresh {
            background: rgba(255,255,255,0.2);
            border: 1px solid rgba(255,255,255,0.3);
            color: white;
            padding: 1px 4px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 0.55rem;
            transition: all 0.3s;
            position: relative;
            z-index: 1;
        }

        .trending-refresh:hover {
            background: rgba(255,255,255,0.3);
            transform: rotate(180deg);
        }

        .trending-list {
            list-style: none;
            padding: 0;
            margin: 0;
            position: relative;
            z-index: 1;
        }

        .trending-item {
            display: flex;
            align-items: center;
            padding: 5px 6px;
            margin-bottom: 3px;
            background: rgba(255,255,255,0.15);
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .trending-item:hover {
            background: rgba(255,255,255,0.25);
            transform: translateX(2px);
        }

        .trending-rank {
            font-size: 0.65rem;
            font-weight: 700;
            color: rgba(255,255,255,0.8);
            min-width: 16px;
            text-align: center;
        }

        .trending-rank.top3 {
            color: #FFD700;
        }

        .trending-keyword {
            flex: 1;
            color: white;
            font-size: 0.7rem;
            font-weight: 600;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .trending-count {
            color: #ffffff;
            font-size: 0.6rem;
            font-weight: 700;
            padding: 2px 6px;
            background: rgba(0,0,0,0.2);
            border-radius: 4px;
            min-width: 32px;
            text-align: center;
        }

        .trending-time {
            color: rgba(255,255,255,0.7);
            font-size: 0.5rem;
            margin-left: 4px;
        }

        .trending-empty {
            color: rgba(255,255,255,0.8);
            text-align: center;
            padding: 20px;
            font-size: 0.9rem;
        }

        /* 검색 항목 요약 위젯 */
        .search-summary-widget {
            position: fixed;
            top: 70px;
            right: 20px;
            width: 280px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 12px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
            z-index: 9998;
            overflow: hidden;
            transition: all 0.3s ease;
        }

        .search-summary-widget.minimized {
            display: none;
        }

        .summary-header {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 12px;
            background: rgba(0, 0, 0, 0.2);
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        .summary-icon {
            font-size: 1.1rem;
        }

        .summary-title {
            color: white;
            font-size: 0.9rem;
            font-weight: 700;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
        }

        .summary-close {
            margin-left: auto;
            background: rgba(255, 255, 255, 0.2);
            border: none;
            color: white;
            padding: 2px 6px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 0.7rem;
            font-weight: 600;
            transition: all 0.3s;
        }

        .summary-close:hover {
            background: rgba(255, 255, 255, 0.3);
        }

        .summary-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 1px;
            background: rgba(255, 255, 255, 0.1);
            padding: 1px;
        }

        .summary-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 12px 8px;
            background: rgba(255, 255, 255, 0.95);
            transition: all 0.2s;
        }

        .summary-item:hover {
            background: white;
            transform: scale(1.05);
        }

        .summary-item.premium-summary {
            background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
        }

        .summary-item.premium-summary:hover {
            background: linear-gradient(135deg, #fdcb6e 0%, #ffeaa7 100%);
        }

        .summary-label {
            font-size: 0.75rem;
            font-weight: 600;
            color: #2d3436;
            margin-bottom: 4px;
        }

        .summary-count {
            font-size: 1.2rem;
            font-weight: 700;
            color: #667eea;
        }

        .summary-item.premium-summary .summary-count {
            color: #d63031;
        }

        .summary-minimized-icon {
            position: fixed;
            top: 70px;
            right: 20px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 10px 15px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 0.8rem;
            font-weight: 700;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
            z-index: 9997;
            display: none;
            transition: all 0.3s;
        }

        .summary-minimized-icon:hover {
            transform: scale(1.05);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
        }

        .summary-minimized-icon.show {
            display: block;
        }

        /* 반응형 디자인 - 모바일 */
        @media (max-width: 768px) {
            /* 검색 결과 테이블 */
            #filterTable {
                font-size: 0.75rem;
            }

            #filterTable thead th {
                padding: 4px;
                font-size: 0.7rem;
            }

            #filterTable tbody td {
                padding: 4px;
                font-size: 0.75rem;
            }

            /* 긴 텍스트 줄바꿈 */
            #filterTable tbody td {
                word-break: break-word;
                white-space: normal;
            }

            /* 키워드 박스 */
            .keyword-box {
                max-width: 100%;
                margin-bottom: 10px;
            }

            .box-container {
                flex-direction: column;
            }

            /* 키워드 관리 버튼 */
            .keyword-management-buttons {
                flex-direction: column;
                gap: 8px;
            }

            .keyword-mgmt-btn {
                width: 100%;
                justify-content: center;
            }

            /* 실시간/인기 검색어 */
            .trending-keywords-container {
                flex-direction: column;
            }

            .trending-box {
                min-width: 100%;
                max-width: 100%;
            }

            /* 키워드 조합 창 */
            .combiner-inline-container {
                padding: 10px;
            }

            .combiner-inline-notice {
                padding: 20px;
            }

            .combiner-inline-notice h3 {
                font-size: 1.1rem;
            }

            .combiner-inline-notice p {
                font-size: 0.9rem;
            }
        }

        /* 태블릿 */
        @media (min-width: 769px) and (max-width: 1024px) {
            #filterTable {
                font-size: 0.85rem;
            }

            #filterTable thead th,
            #filterTable tbody td {
                padding: 5px;
            }

            .keyword-box {
                max-width: 48%;
            }

            .trending-box {
                min-width: 45%;
            }
        }

        /* 큰 화면 최적화 */
        @media (min-width: 1441px) {
            .container-fluid {
                max-width: 1400px;
                margin: 0 auto;
            }

            #filterTable {
                font-size: 1rem;
            }
        }

        /* 버튼 설정 모달 스타일 */
        .button-settings-modal {
            display: none;
            position: fixed;
            z-index: 10001;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            align-items: center;
            justify-content: center;
        }

        .button-settings-modal.show {
            display: flex;
        }

        .button-settings-content {
            background: white;
            border-radius: 12px;
            width: 90%;
            max-width: 600px;
            max-height: 80vh;
            overflow-y: auto;
            box-shadow: 0 8px 24px rgba(0,0,0,0.3);
        }

        .button-settings-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 15px 20px;
            border-radius: 12px 12px 0 0;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .button-settings-header h3 {
            margin: 0;
            font-size: 1.1rem;
        }

        .button-settings-close {
            background: rgba(255,255,255,0.2);
            border: none;
            color: white;
            font-size: 1.5rem;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
        }

        .button-settings-close:hover {
            background: rgba(255,255,255,0.3);
            transform: rotate(90deg);
        }

        .button-settings-body {
            padding: 20px;
        }

        .button-list {
            margin-bottom: 20px;
        }

        .button-list-item {
            display: flex;
            gap: 10px;
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 6px;
            margin-bottom: 10px;
            background: #f8f9fa;
            align-items: center;
        }

        .button-list-item-info {
            flex: 1;
        }

        .button-list-item-name {
            font-weight: 600;
            color: #667eea;
            margin-bottom: 4px;
        }

        .button-list-item-keywords {
            font-size: 0.85rem;
            color: #666;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .button-list-item-actions {
            display: flex;
            gap: 6px;
        }

        .button-list-item-actions button {
            padding: 4px 10px;
            font-size: 0.8rem;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .btn-edit-button {
            background: #667eea;
            color: white;
        }

        .btn-edit-button:hover {
            background: #5568d3;
        }

        .btn-delete-button {
            background: #dc3545;
            color: white;
        }

        .btn-delete-button:hover {
            background: #c82333;
        }

        .button-form {
            border-top: 2px solid #eee;
            padding-top: 20px;
        }

        .button-form h4 {
            font-size: 1rem;
            color: #667eea;
            margin-bottom: 15px;
        }

        .button-form-group {
            margin-bottom: 15px;
        }

        .button-form-group label {
            display: block;
            font-weight: 600;
            margin-bottom: 5px;
            color: #333;
        }

        .button-form-group input,
        .button-form-group textarea {
            width: 100%;
            padding: 8px 12px;
            border: 1px solid #ddd;
            border-radius: 6px;
            font-size: 0.9rem;
        }

        .button-form-group textarea {
            min-height: 100px;
            resize: vertical;
        }

        .button-form-actions {
            display: flex;
            gap: 10px;
        }

        .btn-save-button {
            flex: 1;
            padding: 10px;
            background: #28a745;
            color: white;
            border: none;
            border-radius: 6px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }

        .btn-save-button:hover {
            background: #218838;
        }

        .btn-cancel-button {
            flex: 1;
            padding: 10px;
            background: #6c757d;
            color: white;
            border: none;
            border-radius: 6px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }

        .btn-cancel-button:hover {
            background: #5a6268;
        }

        .button-empty-message {
            text-align: center;
            padding: 20px;
            color: #999;
            font-style: italic;
        }

    /* [2026-07-13] 스폰서 배너 스트립 — 실 기능 위젯(.trending-box)과 시각적으로 분리된 전용 영역 */
    .km-ad-strip{margin:4px 0 14px;padding:10px 12px 12px;background:#f8fafc;border:1px dashed #cbd5e1;border-radius:10px}
    .km-ad-strip-head{display:flex;align-items:center;gap:6px;margin-bottom:8px}
    .km-ad-chip{font-size:.6rem;font-weight:800;letter-spacing:.08em;color:#64748b;background:#e2e8f0;border-radius:4px;padding:2px 6px;line-height:1.4}
    .km-ad-strip-title{font-size:.72rem;font-weight:600;color:#94a3b8}
    .km-ad-strip-row{display:flex;gap:10px;overflow-x:auto;-webkit-overflow-scrolling:touch;padding-bottom:2px}
    .km-ad-card{position:relative;flex:0 0 auto;width:200px;background:#fff;border:1px solid #e2e8f0;border-radius:8px;padding:5px;display:block;text-decoration:none}
    .km-ad-card:hover{border-color:#94a3b8}
    .km-ad-card img{width:100%;height:auto;border-radius:6px;display:block}
    .km-ad-badge{position:absolute;top:9px;right:9px;font-size:.55rem;font-weight:800;color:#fff;background:rgba(15,23,42,.55);border-radius:3px;padding:1px 4px;line-height:1.3;pointer-events:none}
    .km-top-wide{max-width:1120px;margin:12px auto 0;padding:0 12px}
    .km-top-wide img{width:100%;height:auto;border-radius:12px;display:block;box-shadow:0 6px 18px rgba(15,23,42,.10)}
    .km-bottom-cover{max-width:960px;margin:20px auto;padding:0 12px}
    .km-bottom-cover img{width:100%;height:auto;border-radius:14px;display:block;box-shadow:0 10px 30px rgba(15,23,42,.14)}

    /* [2026-07-13] 검색 결과 테이블 기본 스타일 — v1은 Bootstrap CSS 제외 상태라 결과 영역(.table/.alert/.btn-outline-success)이 무스타일로 렌더되던 것 보완 */
    #pcArea .table, #mobileArea .table { width:100%; background:#fff; border-collapse:collapse; margin:0 0 14px; font-size:.9rem; }
    #pcArea .table th, #pcArea .table td,
    #mobileArea .table th, #mobileArea .table td { border:1px solid #dbe4ee; padding:6px 8px; text-align:center; }
    #pcArea .table thead th, #mobileArea .table thead th { background:#f1f5f9; }
    /* quirks 모드(BackCompat)에서는 table이 부모 색을 상속하지 않고 문서 색을 따라가 다크모드에서 흰 글자가 됨 → 중첩 입찰가 테이블 색 명시 */
    #pcArea .table table, #pcArea .table table th, #pcArea .table table td,
    #mobileArea .table table, #mobileArea .table table th, #mobileArea .table table td { color:#1e293b; }
    #pcArea .table-striped tbody tr:nth-child(even) td,
    #mobileArea .table-striped tbody tr:nth-child(even) td { background:#f8fafc; }
    #pcArea .alert, #mobileArea .alert { padding:10px 14px; border-radius:8px; background:#eff6ff; border:1px solid #bfdbfe; color:#1e3a8a; margin:0 0 12px; }
    #pcArea .alert-warning, #mobileArea .alert-warning { background:#fffbeb; border-color:#fde68a; color:#92400e; }
    #pcArea .alert-danger, #mobileArea .alert-danger { background:#fef2f2; border-color:#fecaca; color:#991b1b; }
    #pcArea .btn-outline-success { display:inline-block; margin:1px; padding:3px 9px; border:1px solid #10b981; border-radius:6px; color:#047857; background:#fff; font-size:.78rem; font-weight:600; text-decoration:none; }
    #pcArea .btn-outline-success:hover { background:#ecfdf5; }

    /* [2026-11-03] 07-13 다크모드 가드 제거 — 다크 색은 /assets/km-dark.css 가 담당 */
/* km-widget-polish 2026-07-13: 커스텀 키워드·조합기·모바일 고도화 */
#fixedSet{width:236px}
#fixedSet .card{border-radius:14px;box-shadow:0 16px 44px -16px rgba(15,23,42,.4);border:1.5px solid #dbe3ee;background:#fff;padding:14px!important}
#fixedSet .card-title{font-size:13.5px;font-weight:800;color:#0a2540;display:flex;align-items:center;gap:6px;margin:0 0 9px}
#fixedSet textarea.form-control{font-size:12.5px;line-height:1.5;height:130px;resize:vertical}
.km-fold-btn{margin-left:auto;background:#eef2f8;border:1px solid #dbe3ee;border-radius:7px;padding:3px 10px;font-size:11px;font-weight:700;color:#334155;cursor:pointer}
.km-fold-btn:hover{background:#e2e8f2}
.btn-info{background:#4f46e5!important;color:#fff!important;border:0!important;font-weight:700;border-radius:9px}
.btn-info:hover{background:#4338ca!important}
#keywordCombiner .card{border-radius:16px;box-shadow:0 30px 90px -28px rgba(15,23,42,.55);border:1.5px solid #dbe3ee;background:#fff;padding:16px}
#keywordCombiner h5,#keywordCombiner .card-title{font-size:14px;font-weight:800;color:#0a2540}
.combiner-textbox{width:100%;border:1.5px solid #cbd5e1;border-radius:9px;padding:9px;font-size:12.5px;line-height:1.5;background:#fff}
.combiner-textbox:focus{outline:2px solid #c7d2fe;border-color:#6366f1}
.combiner-count{font-size:11px;color:#64748b;font-weight:600}
.combiner-font-btn,.combiner-close-btn{background:#eef2f8;border:1px solid #dbe3ee;border-radius:7px;padding:3px 10px;font-size:12px;font-weight:700;color:#334155;cursor:pointer}
.combiner-font-btn:hover,.combiner-close-btn:hover{background:#e2e8f2}
@media (max-width:820px){
  #fixedSet,#keywordCombiner{position:static!important;width:auto!important;left:auto!important;top:auto!important;margin:12px 0!important;max-height:none!important}
  #searchForm{gap:8px}
  #searchForm .col-auto{flex:1 1 46%}
  #searchForm .form-control,#searchForm .form-control-lg{width:100%!important;min-width:0!important}
  .container.my-4{padding:10px 10px}
  .km-top-wide{margin-top:8px;padding:0 8px}
  .km-bottom-cover{padding:0 8px}
  .km-ad-card{width:44vw;max-width:200px}
  .trending-keywords-container{gap:8px}
}
        /* 패널 초기화 버튼 */
        #resetPanelBtn {
            position: fixed;
            left: 10px;
            top: 60px;
            z-index: 9998;
            padding: 4px 8px;
            font-size: 10px;
            background: rgba(108, 117, 125, 0.7);
            color: white;
            border: none;
            border-radius: 3px;
            cursor: pointer;
            opacity: 0.5;
            transition: opacity 0.2s;
        }
        #resetPanelBtn:hover {
            opacity: 1;
            background: rgba(108, 117, 125, 0.9);
        }
