/* 06 경쟁순위 (competition-ui.js). CSP가 inline style을 막으므로 막대 폭은 클래스로 지정. */
.competition-panel .panel-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap}
.competition-panel .panel-heading h2{font-size:16px;line-height:24px;margin:0}
.competition-panel .panel-heading h2:before{content:"";display:inline-block;width:4px;height:14px;border-radius:2px;background:#ea580c;margin-right:8px;vertical-align:-2px}
.cmp-sub{margin:4px 0 0;font-size:11.5px;color:#64748b;line-height:1.6}
.cmp-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:16px 0}
.cmp-kpis article{border:1px solid #e2e8f0;border-radius:12px;padding:14px 16px;background:#fff;min-width:0}
.cmp-kpis article:first-child{background:#fff7ed;border-color:#fed7aa}
.cmp-kpis span{display:block;font-size:12px;color:#64748b}
.cmp-kpis strong{display:block;font-size:22px;line-height:1.4;color:#1e293b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cmp-kpis small{display:block;font-size:11.5px;color:#94a3b8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cmp-controls{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;padding:12px;border:1px solid #f1f5f9;border-radius:12px;background:#f8fafc}
.cmp-chips{display:inline-flex;gap:3px;padding:3px;border:1px solid #e2e8f0;border-radius:10px;background:#fff}
.cmp-chips button{appearance:none;border:0;background:transparent;color:#475569;font:inherit;font-size:13px;font-weight:600;padding:6px 11px;border-radius:7px;cursor:pointer;min-height:0;white-space:nowrap}
.cmp-chips button.selected{background:#fff4ed;color:#c2410c;box-shadow:inset 0 0 0 1px #fdba74}
.cmp-sort{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:#475569}
.cmp-sort select{padding:7px 10px;border:1px solid #cbd5e1;border-radius:8px;font:inherit;font-size:13px;background:#fff}
#cmp-search{flex:1 1 200px;min-width:160px;padding:8px 12px;border:1px solid #cbd5e1;border-radius:8px;font:inherit;font-size:13px}
.cmp-count{font-size:12px;color:#64748b;margin:12px 2px 8px}
.cmp-list{display:flex;flex-direction:column;gap:8px}
.cmp-region{border:1px solid #e2e8f0;border-radius:12px;background:#fff;overflow:hidden}
.cmp-region[open]{border-color:#fdba74;box-shadow:0 2px 10px #ea580c14}
.cmp-region summary{list-style:none;display:grid;grid-template-columns:40px minmax(150px,1.3fr) repeat(3,minmax(110px,1fr)) minmax(150px,1.3fr) 18px;align-items:center;gap:14px;padding:12px 16px;cursor:pointer}
.cmp-region summary::-webkit-details-marker{display:none}
.cmp-region summary:hover{background:#fffaf5}
.cmp-region summary:focus-visible{outline:2px solid #ea580c;outline-offset:-2px}
.cmp-rank{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:9px;background:#f1f5f9;color:#334155;font-weight:800;font-size:14px;font-variant-numeric:tabular-nums}
.cmp-region:nth-child(-n+3) .cmp-rank{background:#ea580c;color:#fff}
.cmp-where{min-width:0}.cmp-where strong{display:block;font-size:15px;color:#1e293b}
.cmp-where small{display:block;font-size:12px;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cmp-stage{font-style:normal;font-weight:700}.cmp-stage.stage-1{color:#c2410c}.cmp-stage.stage-2{color:#b45309}.cmp-stage.stage-3{color:#0f766e}.cmp-stage.stage-4{color:#64748b}
.cmp-metric,.cmp-top{display:flex;flex-direction:column;gap:2px;min-width:0}
.cmp-metric small,.cmp-top small{font-size:11px;color:#94a3b8;white-space:nowrap}
.cmp-metric b{font-size:14px;color:#1e293b;font-variant-numeric:tabular-nums;white-space:nowrap}
.cmp-top b{font-size:13px;color:#1e293b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cmp-top em{font-style:normal;font-size:12px;color:#c2410c;font-weight:700}
.cmp-bar{display:block;height:5px;border-radius:3px;background:#f1f5f9;overflow:hidden}
.cmp-bar i{display:block;height:100%;border-radius:3px}
.cmp-bar.pop i{background:#94a3b8}.cmp-bar.single i{background:#2ac1bc}.cmp-bar.comp i{background:#ea580c}
.cmp-chevron{color:#94a3b8;font-size:20px;transition:transform .15s}
.cmp-region[open] .cmp-chevron{transform:rotate(90deg);color:#ea580c}
.cmp-detail{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;padding:4px 16px 16px;border-top:1px solid #fed7aa;background:#fffaf5}
.cmp-pop{display:flex;flex-wrap:wrap;align-items:flex-end;gap:4px 20px}.cmp-pop table{width:100%;max-width:520px;border-collapse:collapse;font-size:12.5px;margin-top:12px;background:#fff;border-radius:10px;overflow:hidden}
.cmp-pop th,.cmp-pop td{padding:8px 10px;border-bottom:1px solid #f1f5f9;text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.cmp-pop th:first-child,.cmp-pop thead th{text-align:left}.cmp-pop thead th{color:#64748b;font-weight:600;font-size:11.5px}
.cmp-pop p{font-size:12px;color:#475569;margin:10px 0 0;line-height:1.6;flex:1 1 220px}
.cmp-table-wrap{overflow-x:auto;margin-top:12px;border:1px solid #f1f5f9;border-radius:10px;background:#fff}
.cmp-table{width:100%;border-collapse:collapse;font-size:12.5px;min-width:760px}
.cmp-table th,.cmp-table td{padding:9px 10px;border-bottom:1px solid #f1f5f9;text-align:left;vertical-align:top}
.cmp-table thead th{font-size:11.5px;color:#64748b;font-weight:600;background:#f8fafc;white-space:nowrap}
.cmp-table tbody th{font-weight:400;min-width:220px;max-width:320px}
.cmp-table tbody th b{font-size:13px;color:#1e293b}
.cmp-table small{display:block;font-size:11px;color:#94a3b8;margin-top:2px}
.cmp-table .cmp-memo{color:#a16207;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.cmp-table .cmp-money{font-weight:700;color:#c2410c;white-space:nowrap}
.cmp-pick{display:inline-block;margin-left:6px;padding:1px 7px;border-radius:999px;background:#ecfdf5;color:#047857;font-size:11px;font-weight:700;vertical-align:1px}
.cmp-empty{padding:24px;text-align:center;color:#94a3b8;font-size:13px}
.cmp-foot{font-size:11.5px;color:#94a3b8;margin:14px 2px 0;line-height:1.6}
@media (max-width:1100px){.cmp-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.cmp-region summary{grid-template-columns:36px minmax(0,1.4fr) repeat(2,minmax(0,1fr)) 18px}.cmp-region summary .m-pop,.cmp-region summary .cmp-top{display:none}.cmp-detail{grid-template-columns:1fr}}
@media (max-width:640px){.cmp-region summary{grid-template-columns:32px minmax(0,1fr) minmax(0,1fr) 14px;gap:10px;padding:10px 12px}.cmp-region summary .m-single{display:none}.cmp-kpis strong{font-size:18px}}
.cmp-bar i.w0{width:0%}
.cmp-bar i.w5{width:5%}
.cmp-bar i.w10{width:10%}
.cmp-bar i.w15{width:15%}
.cmp-bar i.w20{width:20%}
.cmp-bar i.w25{width:25%}
.cmp-bar i.w30{width:30%}
.cmp-bar i.w35{width:35%}
.cmp-bar i.w40{width:40%}
.cmp-bar i.w45{width:45%}
.cmp-bar i.w50{width:50%}
.cmp-bar i.w55{width:55%}
.cmp-bar i.w60{width:60%}
.cmp-bar i.w65{width:65%}
.cmp-bar i.w70{width:70%}
.cmp-bar i.w75{width:75%}
.cmp-bar i.w80{width:80%}
.cmp-bar i.w85{width:85%}
.cmp-bar i.w90{width:90%}
.cmp-bar i.w95{width:95%}
.cmp-bar i.w100{width:100%}

/* 보기 전환(목록/지도) */
.cmp-head-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.cmp-view{display:inline-flex;gap:3px;padding:3px;border:1px solid #e2e8f0;border-radius:10px;background:#fff}
.cmp-view button{appearance:none;border:0;background:transparent;color:#475569;font:inherit;font-size:13px;font-weight:700;padding:6px 14px;border-radius:7px;cursor:pointer;min-height:0}
.cmp-view button.selected{background:#ea580c;color:#fff}

/* 목록 페이지 나누기 */
.cmp-pager{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:6px;margin:18px 0 4px}
.cmp-pager button{appearance:none;min-width:36px;min-height:36px;padding:0 10px;border:1px solid #e2e8f0;border-radius:9px;background:#fff;color:#334155;font:inherit;font-size:14px;font-weight:700;cursor:pointer;font-variant-numeric:tabular-nums}
.cmp-pager button.selected{background:#ea580c;border-color:#ea580c;color:#fff}
.cmp-pager button:disabled{opacity:.35;cursor:default}
.cmp-pager .cmp-pager-all{margin-left:8px;font-size:12.5px;color:#c2410c;border-color:#fdba74;background:#fff7ed}
.cmp-to-map{margin-top:12px}

/* 지도 보기 */
.cmp-mapview{position:relative}
.cmp-map-frame{position:relative;border:1px solid #e2e8f0;border-radius:14px;overflow:hidden;background:#eef4f7}
.cmp-map{display:block;width:100%;height:min(72vh,760px);min-height:420px;touch-action:none;cursor:grab;user-select:none}
.cmp-map.is-dragging{cursor:grabbing}
.cmp-sea{fill:#e7eff3}
.land-gg{fill:#f6f5f0;stroke:#cfd6d3;stroke-width:.7;vector-effect:non-scaling-stroke}
.land-ic{fill:#eeeee8;stroke:#cfd6d3;stroke-width:.7;vector-effect:non-scaling-stroke}
.land-se{fill:#fbefe6;stroke:#e3c3ad;stroke-width:.7;vector-effect:non-scaling-stroke}
.cmp-map-label{fill:#94a3b8;text-anchor:middle;dominant-baseline:central;pointer-events:none;font-weight:600}
.cmp-map-tools{position:absolute;z-index:2;top:12px;left:12px;display:flex;gap:4px;padding:4px;border-radius:11px;background:#ffffffe6;box-shadow:0 1px 4px #0f172a1f}
.cmp-map-tools button{appearance:none;min-width:34px;min-height:32px;padding:0 9px;border:0;border-radius:8px;background:transparent;color:#334155;font:inherit;font-size:13px;font-weight:700;cursor:pointer}
.cmp-map-tools button:hover{background:#f1f5f9}
.cmp-map-hint{position:absolute;left:12px;bottom:10px;margin:0;padding:4px 9px;border-radius:8px;background:#ffffffd9;font-size:11.5px;color:#64748b}
.cmp-flag{cursor:pointer;outline:none}
.cmp-flag .flag-shadow{fill:#0f172a33}
.cmp-flag .flag-pole{stroke:#5b3a1e;stroke-width:1.6;stroke-linecap:round}
.cmp-flag .flag-cloth{fill:#ea580c;stroke:#fff;stroke-width:.8;stroke-linejoin:round;transition:fill .15s}
.cmp-flag .flag-base{fill:#5b3a1e}
.cmp-flag .flag-rank{font-size:7.5px;font-weight:800;fill:#fff;text-anchor:middle;font-variant-numeric:tabular-nums;pointer-events:none}
.cmp-flag:hover .flag-cloth,.cmp-flag:focus-visible .flag-cloth{fill:#c2410c}
.cmp-flag:focus-visible .flag-pole{stroke:#0f172a;stroke-width:2.4}
.cmp-flag.is-selected .flag-cloth{fill:#7c2d12}
.cmp-flag.is-selected .flag-shadow{fill:#ea580c66;rx:8;ry:3}
.cmp-flag.is-dim{opacity:.22;pointer-events:none}

/* 오른쪽 상권 패널 */
.cmp-drawer{position:fixed;z-index:70;top:0;right:0;bottom:0;width:min(440px,100%);display:flex;flex-direction:column;background:#fff;box-shadow:-12px 0 32px #0f172a29;transform:translateX(104%);visibility:hidden;transition:transform .28s ease,visibility 0s linear .28s}
.cmp-drawer.is-open{transform:none;visibility:visible;transition:transform .28s ease}
.cmp-drawer-head{display:flex;gap:12px;align-items:center;padding:18px 18px 14px;border-bottom:1px solid #f1f5f9;background:#fff7ed}
.cmp-drawer-head>div{flex:1;min-width:0}
.cmp-drawer-head h3{margin:2px 0 0;font-size:21px;line-height:1.25;color:#0f172a}
.cmp-drawer-head p{margin:0;font-size:12.5px;color:#64748b}
.cmp-drawer-head .cmp-drawer-eyebrow{font-weight:700;color:#c2410c}
.cmp-drawer-head img{flex:0 0 auto;border-radius:50%}
.cmp-drawer-close{appearance:none;flex:0 0 auto;width:36px;height:36px;min-height:0;padding:0;border:0;border-radius:10px;background:#fff;color:#334155;font-size:22px;line-height:1;cursor:pointer;box-shadow:0 0 0 1px #fed7aa}
.cmp-drawer-body{flex:1 1 auto;overflow-y:auto;padding:16px 18px 8px;overscroll-behavior:contain}
.cmp-dk{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.cmp-dk>div{padding:10px 12px;border-radius:11px;background:#f8fafc;border:1px solid #f1f5f9;min-width:0}
.cmp-dk span{display:block;font-size:11.5px;color:#64748b}
.cmp-dk b{display:block;margin-top:2px;font-size:17px;color:#0f172a;font-variant-numeric:tabular-nums;white-space:nowrap}
.cmp-dk small{font-size:11px;color:#0f766e;font-weight:600}
.cmp-dt{width:100%;border-collapse:collapse;margin:12px 0 4px;font-size:12.5px}
.cmp-dt th,.cmp-dt td{padding:7px 8px;border-bottom:1px solid #f1f5f9;text-align:right;font-variant-numeric:tabular-nums}
.cmp-dt th:first-child,.cmp-dt thead th:first-child{text-align:left}
.cmp-dt thead th{font-size:11.5px;color:#64748b;font-weight:600}
.cmp-drawer-body h4{margin:16px 0 8px;font-size:14px;color:#0f172a}
.cmp-drawer-body h4 small{font-weight:500;color:#94a3b8;font-size:11.5px;margin-left:4px}
.cmp-dcs{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.cmp-dc{padding:10px 12px;border:1px solid #f1f5f9;border-radius:11px}
.cmp-dc-top{display:flex;align-items:baseline;gap:6px;margin-bottom:6px}
.cmp-dc-top b{font-size:13.5px;color:#0f172a;min-width:0;overflow-wrap:anywhere}
.cmp-dc-no{flex:0 0 auto;font-size:11.5px;color:#94a3b8;font-weight:700}
.cmp-dc-sale{margin-left:auto;flex:0 0 auto;font-size:13px;color:#c2410c;font-variant-numeric:tabular-nums}
.cmp-dc-meta,.cmp-dc-addr,.cmp-dc-memo{margin:6px 0 0;font-size:12px;color:#475569;line-height:1.5}
.cmp-dc-addr{color:#94a3b8}
.cmp-dc-memo{color:#92400e}
.cmp-drawer-note{margin:14px 0 6px;font-size:11.5px;color:#64748b;line-height:1.6}
.cmp-drawer-nav{display:flex;justify-content:space-between;gap:8px;padding:12px 18px 16px;border-top:1px solid #f1f5f9}
.cmp-drawer-nav button{font-size:12.5px;padding:8px 12px;min-height:0}
@media (max-width:700px){.cmp-map{height:62vh;min-height:360px}.cmp-drawer{top:auto;left:0;right:0;height:82vh;width:auto;border-radius:16px 16px 0 0;transform:translateY(104%)}}
@media (prefers-reduced-motion:reduce){.cmp-drawer,.cmp-drawer.is-open{transition:none}}

/* 선택 지역 핵심 4가지 */
.cmp-summary{margin:14px 0 4px;padding:14px 16px;border:1px solid #fed7aa;border-radius:14px;background:#fffaf5}
.cmp-summary-title{margin:0 0 10px;font-size:13px;color:#64748b}
.cmp-summary-title b{font-size:16px;color:#0f172a;margin-right:6px}
.cmp-tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.cmp-tiles article{min-width:0;padding:11px 13px;border-radius:11px;background:#fff;border:1px solid #f1f5f9}
.cmp-tiles span{display:block;font-size:12px;color:#64748b}
.cmp-tiles strong{display:block;margin-top:3px;font-size:20px;line-height:1.25;color:#0f172a;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cmp-tiles strong small{font-size:12px;font-weight:600;color:#94a3b8;margin-left:2px}
.cmp-tiles article>small{display:block;margin-top:2px;font-size:11.5px;color:#c2410c;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cmp-tiles-empty{margin:0;font-size:13px;color:#94a3b8}
.cmp-drawer .cmp-tiles{grid-template-columns:1fr 1fr;justify-content:stretch;gap:8px}
.cmp-drawer .cmp-tiles strong{font-size:17px}
.cmp-region.is-current>summary{box-shadow:inset 3px 0 0 #ea580c;background:#fffaf5}
@media (max-width:900px){.cmp-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:480px){.cmp-tiles{grid-template-columns:1fr 1fr}}

/* 패널이 열리면 넓은 화면에서는 본문을 왼쪽으로 비켜 데이터가 가려지지 않게 */
@media (min-width:1100px){body{transition:padding-right .28s ease}body.cmp-drawer-open{padding-right:min(440px,100vw)}}
@media (prefers-reduced-motion:reduce){body{transition:none}}

/* 운영시간 */
.cmp-tiles .cmp-tile-hours{grid-column:1/-1}
.cmp-tile-hours span em{font-style:normal;font-size:10.5px;color:#94a3b8;margin-left:4px}
.cmp-tile-hours ul{list-style:none;margin:4px 0 0;padding:0;display:flex;flex-wrap:wrap;gap:2px 14px}
.cmp-tile-hours li{font-size:15px;font-weight:800;color:#0f172a;font-variant-numeric:tabular-nums}
.cmp-tile-hours .cmp-hours-missing{font-size:15px;color:#94a3b8}
.cmp-dc-hours{margin:6px 0 0;font-size:12px;color:#0f766e;line-height:1.5}
.cmp-dc-hours.is-missing{color:#94a3b8}
.cmp-table .cmp-hours{color:#0f766e}

/* 카카오맵 바탕지도 (키가 있을 때) */
.cmp-kmap{display:none;width:100%;height:min(72vh,760px);min-height:420px}
.cmp-map-frame.is-kakao .cmp-kmap{display:block}
.cmp-map-frame.is-kakao .cmp-map{display:none}
.cmp-map-hint .hint-kakao{display:none}
.cmp-map-frame.is-kakao .cmp-map-hint .hint-svg{display:none}
.cmp-map-frame.is-kakao .cmp-map-hint .hint-kakao{display:inline}
.cmp-map-frame.is-kakao .cmp-map-tools,.cmp-map-frame.is-kakao .cmp-map-hint{z-index:5}
.cmp-kflag{cursor:pointer;line-height:0}
.cmp-kflag-svg{display:block;overflow:visible}
.cmp-kflag:focus-visible{outline:2px solid #0f172a;outline-offset:2px;border-radius:4px}
@media (max-width:700px){.cmp-kmap{height:62vh;min-height:360px}}

/* 사업자 정보 */
.cmp-dc-biz{margin:6px 0 0;font-size:12px;color:#475569;font-variant-numeric:tabular-nums}
.cmp-table .cmp-biz{color:#475569}
