
/* OJS K-APT Premium Skin v1.4.0 ENERGY BASELINE
   기능/DOM 이벤트는 건드리지 않고 클래스가 붙은 기존 요소만 시각적으로 개선합니다. */

body.ojs-kapt-premium-active{
  --kp-ink:#10213f;
  --kp-text:#485a73;
  --kp-muted:#708098;
  --kp-blue:#2f6feb;
  --kp-blue2:#4f86f7;
  --kp-cyan:#20a4c7;
  --kp-green:#2aa67b;
  --kp-line:#dbe5f1;
  --kp-soft:#f3f7fc;
  --kp-card:#ffffff;
  background:
    radial-gradient(circle at 50% -120px,rgba(47,111,235,.10),transparent 420px),
    linear-gradient(180deg,#fbfdff 0%,#f5f8fc 58%,#f8fafc 100%) !important;
  color:var(--kp-ink);

  font-family:"Pretendard","Apple SD Gothic Neo","Noto Sans KR","Malgun Gothic",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif !important;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  text-rendering:optimizeLegibility;
}


/* 관리자바는 손대지 않음 */
body.ojs-kapt-premium-active #wpadminbar{
  z-index:999999 !important;
}

/* 전용 상단바 */
body.ojs-kapt-premium-active .kp-site-header{
  background:rgba(255,255,255,.92) !important;
  border-bottom:1px solid #e7edf5 !important;
  box-shadow:0 5px 24px rgba(15,34,65,.035) !important;
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
}
body.ojs-kapt-premium-active .kp-site-header a,
body.ojs-kapt-premium-active .kp-site-header strong,
body.ojs-kapt-premium-active .kp-site-header span{
  color:#18345f;
}
body.ojs-kapt-premium-active .kp-site-header .kp-brand-accent{
  color:var(--kp-blue) !important;
}

/* 주요 화면 폭 */
body.ojs-kapt-premium-active .kp-screen{
  width:min(1180px,calc(100% - 34px)) !important;
  max-width:1180px !important;
  margin-left:auto !important;
  margin-right:auto !important;
}

/* 히어로 */
body.ojs-kapt-premium-active .kp-hero{
  position:relative;
  text-align:center;
  padding:50px 18px 26px !important;
}
body.ojs-kapt-premium-active .kp-hero::before{
  content:"";
  position:absolute;
  left:50%;
  top:14px;
  width:190px;
  height:190px;
  transform:translateX(-50%);
  border-radius:50%;
  background:radial-gradient(circle,rgba(47,111,235,.10),rgba(47,111,235,0) 68%);
  pointer-events:none;
}
body.ojs-kapt-premium-active .kp-eyebrow{
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  gap:8px;
  margin:0 0 10px !important;
  padding:7px 12px !important;
  border:1px solid #d9e5ff;
  border-radius:999px;
  background:linear-gradient(180deg,#f7faff,#eef4ff);
  color:#315fb7 !important;
  font-size:11px !important;
  font-weight:900 !important;
  letter-spacing:1.15px !important;
  box-shadow:0 6px 18px rgba(47,111,235,.06);
}
body.ojs-kapt-premium-active .kp-title{
  position:relative;
  margin:0 !important;
  color:#0c1e3a !important;
  font-size:clamp(34px,4vw,48px) !important;
  line-height:1.12 !important;
  font-weight:900 !important;
  letter-spacing:-1.8px !important;
}
body.ojs-kapt-premium-active .kp-subtitle{
  max-width:820px;
  margin:14px auto 0 !important;
  color:#465a78 !important;
  font-size:16px !important;
  line-height:1.75 !important;
  font-weight:500 !important;
}

/* 신뢰 배지: JS가 삽입 */
body.ojs-kapt-premium-active .kp-trust-row{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:8px;
  margin:20px auto 0;
}
body.ojs-kapt-premium-active .kp-trust-chip{
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:34px;
  padding:0 12px;
  border:1px solid #dce6f2;
  border-radius:999px;
  background:rgba(255,255,255,.92);
  color:#3f5470;
  font-size:11.5px;
  font-weight:750;
  box-shadow:0 5px 16px rgba(20,48,86,.045);
}
body.ojs-kapt-premium-active .kp-trust-chip::before{
  content:"";
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--kp-blue);
  box-shadow:0 0 0 4px rgba(47,111,235,.08);
}
body.ojs-kapt-premium-active .kp-trust-chip:nth-child(2)::before{background:var(--kp-cyan)}
body.ojs-kapt-premium-active .kp-trust-chip:nth-child(3)::before{background:var(--kp-green)}
body.ojs-kapt-premium-active .kp-trust-chip:nth-child(4)::before{background:#8065e8}

/* 검색 본체 */
body.ojs-kapt-premium-active .kp-search-card{
  position:relative;
  overflow:visible;
  margin:0 auto !important;
  padding:28px 28px 24px !important;
  border:1px solid #dbe6f2 !important;
  border-radius:26px !important;
  background:
    linear-gradient(180deg,rgba(255,255,255,.98),rgba(249,252,255,.98)) !important;
  box-shadow:
    0 24px 70px rgba(31,61,101,.10),
    0 2px 9px rgba(31,61,101,.035) !important;
}
body.ojs-kapt-premium-active .kp-search-card::before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:4px;
  border-radius:26px 26px 0 0;
  background:linear-gradient(90deg,#2f6feb 0%,#53a5f8 48%,#27b487 100%);
}
body.ojs-kapt-premium-active .kp-search-card::after{
  content:"K-APT VERIFIED APARTMENT SEARCH";
  position:absolute;
  right:26px;
  top:20px;
  color:#9aa8ba;
  font-size:9px;
  font-weight:850;
  letter-spacing:1.05px;
}

/* 선택 영역 제목 */
body.ojs-kapt-premium-active .kp-search-card .kp-find-title{
  display:flex !important;
  align-items:center;
  gap:8px;
  margin:0 0 18px !important;
  color:#18345f !important;
  font-size:16px !important;
  font-weight:900 !important;
}
body.ojs-kapt-premium-active .kp-search-card .kp-find-title::before{
  content:"";
  width:9px;
  height:9px;
  border-radius:3px;
  background:linear-gradient(135deg,var(--kp-blue),#70a3ff);
  box-shadow:0 0 0 5px rgba(47,111,235,.07);
}

/* 폼 라벨 */
body.ojs-kapt-premium-active .kp-search-card label,
body.ojs-kapt-premium-active .kp-search-card .kp-label{
  color:#253a59 !important;
  font-size:12.5px !important;
  font-weight:780 !important;
  letter-spacing:-.1px;
}

/* 입력·선택 공통 */
body.ojs-kapt-premium-active .kp-search-card select,
body.ojs-kapt-premium-active .kp-search-card input[type="text"],
body.ojs-kapt-premium-active .kp-search-card input[type="search"]{
  min-height:50px !important;
  height:50px !important;
  padding:0 15px !important;
  border:1px solid #d5e0ed !important;
  border-radius:13px !important;
  outline:none !important;
  background:#ffffff !important;
  color:#152b49 !important;
  font-size:14.5px !important;
  font-weight:700 !important;
  box-shadow:inset 0 1px 2px rgba(15,34,65,.02),0 3px 10px rgba(15,34,65,.025) !important;
  transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease;
}
body.ojs-kapt-premium-active .kp-search-card select:focus,
body.ojs-kapt-premium-active .kp-search-card input[type="text"]:focus,
body.ojs-kapt-premium-active .kp-search-card input[type="search"]:focus{
  border-color:#76a0f7 !important;
  box-shadow:0 0 0 4px rgba(47,111,235,.09),0 8px 18px rgba(47,111,235,.06) !important;
}
body.ojs-kapt-premium-active .kp-search-card select:disabled{
  background:#f5f7fb !important;
  color:#a2adbc !important;
  border-color:#e1e7ef !important;
}

/* 일반 검색 버튼 */
body.ojs-kapt-premium-active .kp-search-card button,
body.ojs-kapt-premium-active .kp-search-card input[type="submit"]{
  min-height:46px;
  border-radius:12px !important;
  font-weight:800 !important;
  transition:transform .16s ease,box-shadow .16s ease,filter .16s ease;
}
body.ojs-kapt-premium-active .kp-search-card .kp-main-search-button{
  min-width:86px !important;
  min-height:50px !important;
  padding:0 20px !important;
  border:0 !important;
  border-radius:13px !important;
  background:linear-gradient(135deg,#2f6feb,#4f86f7) !important;
  color:#fff !important;
  font-size:14.5px !important;
  box-shadow:0 9px 20px rgba(47,111,235,.22) !important;
}
body.ojs-kapt-premium-active .kp-search-card .kp-main-search-button:hover{
  transform:translateY(-1px);
  filter:saturate(1.08);
  box-shadow:0 12px 26px rgba(47,111,235,.27) !important;
}

/* 서울/대구/경기/부산 빠른 선택 */
body.ojs-kapt-premium-active .kp-quick-region{
  border:1px solid #d9e4f1 !important;
  background:#fff !important;
  color:#456180 !important;
  padding:7px 12px !important;
  min-height:34px !important;
  border-radius:999px !important;
  font-size:12.5px !important;
  font-weight:750 !important;
  box-shadow:0 4px 12px rgba(15,34,65,.025) !important;
}
body.ojs-kapt-premium-active .kp-quick-region:hover{
  border-color:#a9c3f5 !important;
  background:#f4f8ff !important;
  color:#285bb7 !important;
}

/* 보조 설명 */
body.ojs-kapt-premium-active .kp-search-card small,
body.ojs-kapt-premium-active .kp-search-card .kp-help,
body.ojs-kapt-premium-active .kp-search-card .kp-muted{
  color:#536680 !important;
  font-size:12.5px !important;
  line-height:1.6 !important;
}

/* 구분선 */
body.ojs-kapt-premium-active .kp-search-card hr{
  border:0 !important;
  border-top:1px solid #e6edf5 !important;
  margin:18px 0 !important;
}

/* 직접검색 블록 */
body.ojs-kapt-premium-active .kp-direct-search{
  margin-top:18px !important;
  padding-top:18px !important;
  border-top:1px solid #e5edf5 !important;
}
body.ojs-kapt-premium-active .kp-direct-title{
  color:#18345f !important;
  font-size:14.5px !important;
  font-weight:900 !important;
}

/* 하단 원칙/검증 안내 */
body.ojs-kapt-premium-active .kp-principle{
  position:relative;
  margin:18px auto 0 !important;
  padding:16px 19px 16px 54px !important;
  border:1px solid #dce6f1 !important;
  border-radius:17px !important;
  background:linear-gradient(135deg,#f8fbff,#f4f8fc) !important;
  color:#43566f !important;
  box-shadow:0 7px 22px rgba(15,34,65,.035) !important;
}
body.ojs-kapt-premium-active .kp-principle::before{
  content:"✓";
  position:absolute;
  left:18px;
  top:50%;
  width:25px;
  height:25px;
  transform:translateY(-50%);
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:8px;
  background:#e9f1ff;
  color:#2f6feb;
  font-size:13px;
  font-weight:900;
}
body.ojs-kapt-premium-active .kp-principle strong{
  color:#163a68 !important;
  font-weight:900 !important;
}

/* 동적 검색 결과가 생겼을 때 */
body.ojs-kapt-premium-active .kp-search-card table{
  width:100%;
  border-collapse:separate !important;
  border-spacing:0 !important;
  overflow:hidden;
  border:1px solid #e0e8f1 !important;
  border-radius:14px !important;
  background:#fff;
}
body.ojs-kapt-premium-active .kp-search-card table th{
  background:#f3f7fc !important;
  color:#233b5e !important;
  font-size:12.5px !important;
  font-weight:800 !important;
}
body.ojs-kapt-premium-active .kp-search-card table th,
body.ojs-kapt-premium-active .kp-search-card table td{
  padding:11px 12px !important;
  border-color:#e7edf4 !important;
}

/* 접근성/고정 툴바가 있으면 조금 더 정돈 */
body.ojs-kapt-premium-active .kp-floating-tools{
  border:1px solid #dce5f0 !important;
  background:rgba(255,255,255,.96) !important;
  box-shadow:0 9px 28px rgba(22,50,87,.13) !important;
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
}

/* 반응형 */
@media (max-width:900px){
  body.ojs-kapt-premium-active .kp-screen{
    width:min(100% - 22px,1180px) !important;
  }
  body.ojs-kapt-premium-active .kp-hero{
    padding-top:34px !important;
  }
  body.ojs-kapt-premium-active .kp-search-card{
    padding:24px 20px 21px !important;
    border-radius:21px !important;
  }
  body.ojs-kapt-premium-active .kp-search-card::after{
    display:none;
  }
}

@media (max-width:640px){
  body.ojs-kapt-premium-active .kp-title{
    font-size:31px !important;
    letter-spacing:-1.1px !important;
  }
  body.ojs-kapt-premium-active .kp-subtitle{
    font-size:14.5px !important;
  }
  body.ojs-kapt-premium-active .kp-search-card{
    padding:20px 15px 18px !important;
  }
  body.ojs-kapt-premium-active .kp-search-card select,
  body.ojs-kapt-premium-active .kp-search-card input[type="text"],
  body.ojs-kapt-premium-active .kp-search-card input[type="search"]{
    font-size:16px !important; /* iOS 자동확대 방지 */
  }
  body.ojs-kapt-premium-active .kp-principle{
    padding:15px 15px 15px 48px !important;
  }
}

body.ojs-kapt-premium-active .kp-search-card,
body.ojs-kapt-premium-active .kp-search-card p,
body.ojs-kapt-premium-active .kp-search-card div,
body.ojs-kapt-premium-active .kp-search-card li{
  color:#445b78;
}

body.ojs-kapt-premium-active .kp-search-card input::placeholder,
body.ojs-kapt-premium-active .kp-search-card textarea::placeholder{
  color:#6a7d98 !important;
  opacity:1 !important;
  font-weight:600;
}

body.ojs-kapt-premium-active .kp-search-card select,
body.ojs-kapt-premium-active .kp-search-card input[type="text"],
body.ojs-kapt-premium-active .kp-search-card input[type="search"],
body.ojs-kapt-premium-active .kp-search-card button,
body.ojs-kapt-premium-active .kp-search-card input[type="submit"],
body.ojs-kapt-premium-active .kp-principle,
body.ojs-kapt-premium-active .kp-trust-chip{
  text-shadow:none !important;
}

body.ojs-kapt-premium-active .kp-title,
body.ojs-kapt-premium-active .kp-direct-title,
body.ojs-kapt-premium-active .kp-find-title,
body.ojs-kapt-premium-active .kp-search-card label,
body.ojs-kapt-premium-active .kp-search-card .kp-label,
body.ojs-kapt-premium-active .kp-principle strong{
  letter-spacing:-0.02em !important;
}

body.ojs-kapt-premium-active .kp-principle{
  border-color:#d4dfeb !important;
  background:linear-gradient(135deg,#f8fbff,#f2f7fc) !important;
}


/* ===== SAFE RESTORE GUARANTEE =====
   이 버전은 검색 결과/자동완성/API/버튼 동작을 숨기거나 가로채지 않습니다. */
body.ojs-kapt-premium-active input,
body.ojs-kapt-premium-active select,
body.ojs-kapt-premium-active button,
body.ojs-kapt-premium-active a{
  pointer-events:auto !important;
}

/* 기존 K-APT가 생성하는 자동완성/검색결과는 그대로 표시 */
body.ojs-kapt-premium-active [role="listbox"],
body.ojs-kapt-premium-active [class*="autocomplete"],
body.ojs-kapt-premium-active [class*="suggest"],
body.ojs-kapt-premium-active [class*="dropdown"]{
  visibility:visible;
}

/* 기존 페이지의 고유 결과영역은 숨기지 않음 */
body.ojs-kapt-premium-active [class*="result"],
body.ojs-kapt-premium-active [id*="result"]{
  visibility:visible;
}


/* fallback 작동 시에도 기존 디자인 유지 */
body.ojs-kapt-premium-active [data-kp-local-fallback="1"] select{
  opacity:1 !important;
}


/* ===== v1.4.1 RECENT 12 VALID MONTHS SUMMARY REPLACE ===== */
body.ojs-kapt-premium-active .kp-energy-baseline{
  margin:18px 0 16px;
  padding:20px;
  border:1px solid #d9e4f0;
  border-radius:20px;
  background:linear-gradient(135deg,#ffffff 0%,#f6faff 100%);
  box-shadow:0 10px 28px rgba(24,57,98,.055);
}

body.ojs-kapt-premium-active .kp-energy-baseline-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  margin-bottom:14px;
}

body.ojs-kapt-premium-active .kp-energy-baseline-kicker{
  color:#2b63bd;
  font-size:10px;
  font-weight:900;
  letter-spacing:1px;
}

body.ojs-kapt-premium-active .kp-energy-baseline-title{
  margin-top:3px;
  color:#102b4c;
  font-size:20px;
  line-height:1.3;
  font-weight:900;
  letter-spacing:-.03em;
}

body.ojs-kapt-premium-active .kp-energy-baseline-sub{
  margin-top:4px;
  color:#5c6f87;
  font-size:12px;
  line-height:1.5;
  font-weight:600;
}

body.ojs-kapt-premium-active .kp-energy-period{
  padding:8px 11px;
  border:1px solid #d9e5f2;
  border-radius:12px;
  background:#fff;
  color:#355679;
  font-size:11.5px;
  line-height:1.45;
  font-weight:750;
}

body.ojs-kapt-premium-active .kp-energy-cards{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:9px;
}

body.ojs-kapt-premium-active .kp-energy-card{
  min-width:0;
  padding:13px 12px;
  border:1px solid #dce6f0;
  border-radius:15px;
  background:#fff;
}

body.ojs-kapt-premium-active .kp-energy-card-label{
  color:#6a7890;
  font-size:10.5px;
  line-height:1.35;
  font-weight:750;
}

body.ojs-kapt-premium-active .kp-energy-card-value{
  margin-top:7px;
  color:#102b4c;
  font-size:20px;
  line-height:1.15;
  font-weight:900;
  letter-spacing:-.035em;
  word-break:break-word;
}

body.ojs-kapt-premium-active .kp-energy-card-unit{
  margin-left:3px;
  color:#62728a;
  font-size:10px;
  font-weight:700;
}

body.ojs-kapt-premium-active .kp-energy-card-note{
  margin-top:5px;
  color:#8591a3;
  font-size:9.5px;
  line-height:1.35;
  font-weight:600;
}

body.ojs-kapt-premium-active .kp-energy-saving{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-top:11px;
  padding:11px 13px;
  border-radius:13px;
  background:#eef5ff;
  color:#355679;
  font-size:11.5px;
  line-height:1.5;
  font-weight:650;
}

body.ojs-kapt-premium-active .kp-energy-saving strong{
  color:#184f9f;
  font-weight:900;
}

body.ojs-kapt-premium-active .kp-energy-table-wrap{
  margin-top:13px;
  overflow:auto;
  border:1px solid #e0e8f1;
  border-radius:14px;
  background:#fff;
}

body.ojs-kapt-premium-active .kp-energy-table{
  width:100%;
  min-width:760px;
  border-collapse:collapse;
}

body.ojs-kapt-premium-active .kp-energy-table th{
  padding:9px 10px;
  background:#f3f7fc;
  color:#405875;
  font-size:10.5px;
  font-weight:850;
  text-align:right;
  border-bottom:1px solid #e3eaf2;
}

body.ojs-kapt-premium-active .kp-energy-table th:first-child,
body.ojs-kapt-premium-active .kp-energy-table td:first-child{
  text-align:left;
}

body.ojs-kapt-premium-active .kp-energy-table td{
  padding:8px 10px;
  color:#40536d;
  font-size:11px;
  font-weight:650;
  text-align:right;
  border-bottom:1px solid #edf1f6;
  white-space:nowrap;
}

body.ojs-kapt-premium-active .kp-energy-table tr:last-child td{
  border-bottom:0;
}

body.ojs-kapt-premium-active .kp-energy-rule{
  margin-top:9px;
  color:#74839a;
  font-size:10.5px;
  line-height:1.55;
  font-weight:600;
}

body.ojs-kapt-premium-active .kp-energy-empty{
  padding:16px;
  border:1px dashed #d8e2ed;
  border-radius:14px;
  background:#fafcff;
  color:#61738c;
  font-size:12px;
  font-weight:650;
}

@media (max-width:980px){
  body.ojs-kapt-premium-active .kp-energy-cards{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}

@media (max-width:640px){
  body.ojs-kapt-premium-active .kp-energy-baseline{
    margin-top:12px;
    padding:14px 11px;
    border-radius:16px;
  }
  body.ojs-kapt-premium-active .kp-energy-baseline-title{
    font-size:18px;
  }
  body.ojs-kapt-premium-active .kp-energy-cards{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:7px;
  }
  body.ojs-kapt-premium-active .kp-energy-card{
    padding:11px 9px;
  }
  body.ojs-kapt-premium-active .kp-energy-card-value{
    font-size:17px;
  }
}


/* ===== v1.4.1 기존 0 요약카드 교체 ===== */
body.ojs-kapt-premium-active .kp-legacy-summary-grid{
  display:none !important;
}

body.ojs-kapt-premium-active .kp-energy-baseline.kp-inline-summary{
  margin:12px 0 14px !important;
  padding:16px 16px 14px !important;
  border-radius:18px !important;
}

body.ojs-kapt-premium-active .kp-inline-summary .kp-energy-baseline-head{
  margin-bottom:10px !important;
}

body.ojs-kapt-premium-active .kp-inline-summary .kp-energy-baseline-title{
  font-size:18px !important;
}

body.ojs-kapt-premium-active .kp-inline-summary .kp-energy-baseline-sub{
  font-size:11.5px !important;
}

body.ojs-kapt-premium-active .kp-inline-summary .kp-energy-cards{
  grid-template-columns:repeat(6,minmax(0,1fr)) !important;
  gap:7px !important;
}

body.ojs-kapt-premium-active .kp-inline-summary .kp-energy-card{
  padding:11px 10px !important;
  border-radius:13px !important;
}

body.ojs-kapt-premium-active .kp-inline-summary .kp-energy-card-value{
  font-size:18px !important;
}

body.ojs-kapt-premium-active .kp-inline-summary .kp-energy-saving,
body.ojs-kapt-premium-active .kp-inline-summary .kp-energy-table-wrap,
body.ojs-kapt-premium-active .kp-inline-summary .kp-energy-rule{
  display:none !important;
}

body.ojs-kapt-premium-active .kp-energy-details{
  margin-top:10px;
}

@media (max-width:980px){
  body.ojs-kapt-premium-active .kp-inline-summary .kp-energy-cards{
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  }
}

@media (max-width:640px){
  body.ojs-kapt-premium-active .kp-inline-summary .kp-energy-cards{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}
