/* ============================================================
   현대론파트너스 5대 핵심 정보 조회 위젯 — 독립 스타일
   2026-04-15: 프로젝트 초기 생성
   2026-07-09 #046: C 하이브리드 — 검색 전 다크 프리미엄 / 검색 후 라이트 모던
   분리 원칙: 홈페이지 변수 import 금지, --hiw-* 자체 재선언 (값만 벤치마크)
   ============================================================ */

/* 폰트 — 기존 widget.css 9행 URL 그대로 유지 */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');

/* ============================================================
   §1 디자인 토큰 — :root 자체 변수 (분리 원칙)
   HEX 하드코딩 금지 — 모든 색상은 이 토큰 참조
   ============================================================ */
:root {
    /* 브랜드 */
    --hiw-navy: #002c5f;
    --hiw-navy-light: #004080;
    --hiw-orange: #FF6000;
    --hiw-orange-light: #FF8533;
    --hiw-green: #006241;
    --hiw-gold: #B68D4C;
    --hiw-red: #d32f2f;
    /* 다크 프리미엄 (시안3 hero-dark) */
    --hiw-dark-1: #0c1220;
    --hiw-dark-2: #080e1a;
    --hiw-dark-3: #040810;
    /* 텍스트/배경 */
    --hiw-text-primary: #111111;
    --hiw-text-secondary: #444444;
    --hiw-text-muted: #64748b;
    --hiw-text-light: #94a3b8;
    --hiw-bg: #ffffff;
    --hiw-bg-warm: #f8f9fb;
    /* 그라디언트 */
    --hiw-grad-navy: linear-gradient(135deg, #002c5f 0%, #004080 100%);
    --hiw-grad-orange: linear-gradient(135deg, #FF6000 0%, #FF8533 100%);
    --hiw-grad-dark: linear-gradient(180deg, #0c1220 0%, #080e1a 50%, #040810 100%);
    /* 그림자 */
    --hiw-shadow-sm: 0 4px 20px rgba(0,0,0,0.03);
    --hiw-shadow-md: 0 10px 40px rgba(0,52,120,0.08);
    --hiw-shadow-lg: 0 20px 60px rgba(0,52,120,0.10);
    --hiw-shadow-hover: 0 20px 50px rgba(0,52,120,0.15);
    --hiw-shadow-orange: 0 8px 30px rgba(255,96,0,0.35);
    /* 라운드 */
    --hiw-radius-sm: 12px;
    --hiw-radius-md: 18px;
    --hiw-radius-lg: 24px;
    --hiw-radius-pill: 40px;
    /* 모션 */
    --hiw-ease: cubic-bezier(0.16, 1, 0.3, 1);
    --hiw-ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --hiw-transition: all 0.4s var(--hiw-ease);
    /* 상태 색 (오푸스 필수① — 토큰화, 예외 없음) */
    --hiw-warn-bg: #FFF7ED;
    --hiw-warn-border: #F59E0B;
    --hiw-warn-text: #92400E;
    --hiw-empty-bg: #f1f5f9;
    --hiw-empty-border: #94a3b8;
    --hiw-empty-text: #475569;
}

/* ============================================================
   전체 컨테이너
   ============================================================ */
.hiw-container {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    max-width: 720px;
    margin: 0 auto;
    padding: 24px;
    background: var(--hiw-bg-warm);
    border-radius: 20px;
    box-shadow: var(--hiw-shadow-md);
}

/* ============================================================
   검색 전 — 다크 히어로 (#046)
   ============================================================ */
.hiw-hero-dark {
    position: relative;
    background: var(--hiw-grad-dark);
    border-radius: var(--hiw-radius-lg);
    padding: 48px 28px 36px;
    /* #046 후속: overflow:hidden 제거 (오푸스 자문회신). 자동완성 드롭다운이
       히어로 박스 밖으로 나갈 때 잘리는 버그 원천 차단. 오브 격리는 아래
       .hiw-hero-bg 클리핑 레이어로 이관. */
}

/* #046 후속: 오브 전용 클리핑 레이어 (오푸스 자문회신). 히어로에서
   overflow:hidden을 빼면 오브가 박스 밖으로 삐져나오므로, 오브만 따로 격리. */
.hiw-hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: inherit;
    pointer-events: none;
}

/* 글로우 오브 (장식, pointer-events:none) */
.hiw-glow-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(60px);
    will-change: transform;
}
.hiw-glow-orb.hiw-glow-1 {
    width: 300px;
    height: 300px;
    top: -80px;
    left: -60px;
    background: radial-gradient(circle, rgba(77,163,255,0.18) 0%, transparent 70%);
    animation: hiw-orb-float-a 11s var(--hiw-ease) infinite;
}
.hiw-glow-orb.hiw-glow-2 {
    width: 340px;
    height: 340px;
    bottom: -100px;
    right: -80px;
    background: radial-gradient(circle, rgba(255,96,0,0.15) 0%, transparent 70%);
    animation: hiw-orb-float-b 9s var(--hiw-ease) infinite;
}
@keyframes hiw-orb-float-a {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(20px, 30px); }
}
@keyframes hiw-orb-float-b {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-25px, -20px); }
}

/* 히어로 콘텐츠 */
.hiw-hero-content {
    position: relative;
    z-index: 1;
}
.hiw-hero-eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    padding: 5px 14px;
    border-radius: var(--hiw-radius-pill);
    margin-bottom: 18px;
}

/* 마스크 라인 리빌 제목 (회전 5도 — 홈페이지에이전트 권고 §3-1) */
.hiw-hero-title {
    font-size: 30px;
    font-weight: 800;
    color: #fff;
    line-height: 1.3;
    margin: 0 0 12px 0;
    letter-spacing: -0.5px;
}
.hiw-mask-line {
    overflow: hidden;
    display: block;
    padding-bottom: 2px;
}
.hiw-mask-inner {
    display: block;
    transform: translateY(110%) rotate(5deg);
    transition: transform 0.9s var(--hiw-ease);
}
/* 1회 모션: hiw-animated 플래그 있을 때만 (필수④ — 첫 방문 1회) */
.hiw-hero-dark.hiw-loaded.hiw-animated .hiw-mask-inner {
    transform: translateY(0) rotate(0);
}
.hiw-hero-dark.hiw-loaded.hiw-animated .hiw-mask-line:nth-child(2) .hiw-mask-inner {
    transition-delay: 0.15s;
}
/* 재조회(hiw-animated 없음) — 즉시 표시 (모션 생략) */
.hiw-hero-dark.hiw-loaded:not(.hiw-animated) .hiw-mask-inner {
    transform: translateY(0) rotate(0);
    transition: none;
}

/* 그라디언트 텍스트 */
.hiw-grad-text {
    background: var(--hiw-grad-orange);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hiw-hero-sub {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    margin: 0 0 20px 0;
    line-height: 1.6;
}

/* 글래스 검색창 */
.hiw-search-glass {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--hiw-radius-pill);
    padding: 8px;
}
.hiw-autocomplete-container {
    flex: 1;
    position: relative;
}
.hiw-input-glass {
    width: 100%;
    box-sizing: border-box;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 16px;
    font-family: inherit;
    padding: 12px 18px;
    outline: none;
}
.hiw-input-glass::placeholder {
    color: rgba(255,255,255,0.5);
}

/* 조회 버튼 — 정적 그림자만 (ctaGlow 무한 펄스 제외 — 홈페이지에이전트 권고 §2-3) */
.hiw-btn-primary {
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    color: #fff;
    background: var(--hiw-grad-orange);
    border: none;
    border-radius: var(--hiw-radius-pill);
    cursor: pointer;
    box-shadow: var(--hiw-shadow-orange);
    transition: transform 0.2s var(--hiw-ease);
    white-space: nowrap;
}
.hiw-btn-primary:hover {
    transform: translateY(-2px);
}
.hiw-btn-primary:active {
    transform: scale(0.97);
}
.hiw-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.hiw-hero-hint {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    margin: 10px 0 0 4px;
}

/* ============================================================
   자동완성 드롭다운 — 라이트 톤 고정 (홈페이지에이전트 권고 §4-1)
   다크 위 다크 글래스는 대비 부족 → 솔리드 화이트 카드
   ============================================================ */
.hiw-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--hiw-bg);
    border: 1px solid #e2e8f0;
    border-radius: var(--hiw-radius-sm);
    box-shadow: var(--hiw-shadow-md);
    z-index: 100;
    max-height: 280px;
    overflow-y: auto;
}
.hiw-suggestion-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s;
}
.hiw-suggestion-item:last-child {
    border-bottom: none;
}
.hiw-suggestion-item:hover {
    background: var(--hiw-bg-warm);
}
.hiw-suggestion-icon {
    font-size: 16px;
    flex-shrink: 0;
}
.hiw-suggestion-text {
    font-size: 13px;
    color: var(--hiw-text-primary);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================================
   로딩 / 에러
   ============================================================ */
.hiw-loading {
    text-align: center;
    padding: 40px 0;
    color: var(--hiw-text-muted);
}
.hiw-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top-color: var(--hiw-navy);
    border-radius: 50%;
    animation: hiw-spin 0.8s linear infinite;
    margin: 0 auto 12px;
}
@keyframes hiw-spin {
    to { transform: rotate(360deg); }
}

.hiw-error {
    background: #fff0f0;
    border: 1px solid #ffcccc;
    border-radius: var(--hiw-radius-sm);
    padding: 16px;
    text-align: center;
    color: var(--hiw-red);
    font-size: 14px;
}

/* ============================================================
   검색 후 — 라이트 결과 카드
   ============================================================ */
.hiw-result {
    display: flex;
    flex-direction: column;
    gap: 12px;
    /* #046 후속: 컴팩트 바(접힌 검색창) 아래 첫 카드(도로명 주소 포함)가
       히어로 라운드 모서리/그림자에 가려지지 않도록 위쪽 여백 확보.
       검색 전엔 display:none 이라 이 여백은 효과 없음 → 상시 적용 안전. */
    margin-top: 20px;
}

/* 카드 공통 — anim-ready 하위에서만 숨김 초기상태 (오푸스 필수③ — JS 죽어도 카드 표시) */
.hiw-card {
    background: var(--hiw-bg);
    border-radius: var(--hiw-radius-md);
    border: 1px solid #f1f5f9;
    overflow: hidden;
    box-shadow: var(--hiw-shadow-md);
    transition: transform 0.3s var(--hiw-ease-bounce), box-shadow 0.3s ease;
}
/* hover lift PC 전용 (홈페이지에이전트 권고 §4-2 — 모바일 터치엔 무의미) */
@media (hover: hover) {
    .hiw-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--hiw-shadow-hover);
    }
}

/* 카드 언폴드 — anim-ready 스코프 (오푸스 필수③) + 35도 (홈페이지에이전트 §2-1) */
.hiw-anim-ready .hiw-card {
    opacity: 0;
    transform: rotateX(-35deg) translateY(20px);
    transform-origin: top center;
    transition: opacity 0.5s var(--hiw-ease), transform 0.6s var(--hiw-ease);
}
.hiw-anim-ready .hiw-result.hiw-revealed .hiw-card {
    opacity: 1;
    transform: none;
}
/* #047 버그픽스: 로그인 카드는 결과 언폴드 대상 아님 — anim-ready 투명 규칙(368행) 예외
   (증상: 로그인 화면이 빈 배경만 표시. 원인: .hiw-login-card가 .hiw-card 클래스 재사용) */
.hiw-anim-ready .hiw-login-view .hiw-card {
    opacity: 1;
    transform: none;
}
/* data-card-idx stagger (DOM 구조 무관 — 홈페이지에이전트 §2-2 권고 (a)) */
.hiw-anim-ready .hiw-result.hiw-revealed .hiw-card[data-card-idx="0"] { transition-delay: 0.05s; }
.hiw-anim-ready .hiw-result.hiw-revealed .hiw-card[data-card-idx="1"] { transition-delay: 0.12s; }
.hiw-anim-ready .hiw-result.hiw-revealed .hiw-card[data-card-idx="2"] { transition-delay: 0.19s; }
.hiw-anim-ready .hiw-result.hiw-revealed .hiw-card[data-card-idx="3"] { transition-delay: 0.26s; }
.hiw-anim-ready .hiw-result.hiw-revealed .hiw-card[data-card-idx="4"] { transition-delay: 0.33s; }

/* 카드 헤더 — 상단 액센트 바 + 라운드 아이콘 박스 */
.hiw-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
    background: var(--hiw-bg);
    position: relative;
}
.hiw-card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--hiw-grad-navy);
}
.hiw-card-icon-box {
    width: 32px;
    height: 32px;
    border-radius: var(--hiw-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    flex-shrink: 0;
}
.hiw-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--hiw-navy);
}
.hiw-card-body {
    padding: 16px 18px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--hiw-text-primary);
}

/* 카드별 액센트 (아이콘 박스 배경) */
.hiw-card-accent-1 .hiw-card-icon-box { background: rgba(0,44,95,0.1); color: var(--hiw-navy); }
.hiw-card-accent-2 .hiw-card-icon-box { background: rgba(255,96,0,0.12); color: var(--hiw-orange); }
.hiw-card-accent-3 .hiw-card-icon-box { background: rgba(182,141,76,0.15); color: var(--hiw-gold); }
.hiw-card-accent-4 .hiw-card-icon-box { background: rgba(0,98,65,0.12); color: var(--hiw-green); }
.hiw-card-accent-5 .hiw-card-icon-box { background: rgba(255,255,255,0.2); color: #fff; }

/* 카드 5 (상담 안내 멘트) 강조 — 비즈니스 요구 (그라디언트 헤더 상향만, 구조 불변) */
.hiw-card-highlight {
    border: 2px solid var(--hiw-navy);
}
.hiw-card-highlight .hiw-card-header {
    background: var(--hiw-grad-navy);
}
.hiw-card-highlight .hiw-card-header::before {
    display: none;
}
.hiw-card-highlight .hiw-card-title {
    color: #fff;
}
.hiw-card-highlight .hiw-card-body {
    background: var(--hiw-bg-warm);
}

/* ============================================================
   카드 내부 항목
   ============================================================ */
.hiw-item {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
}
.hiw-label {
    font-weight: 600;
    color: var(--hiw-text-muted);
    min-width: 80px;
    flex-shrink: 0;
}
.hiw-value {
    color: var(--hiw-text-primary);
}

/* 2026-07-31: 방공제 값 강조 — 진한 파랑 계열 + 굵게 + 확대(주황 금지: 주황=적극 경고 전용) */
.hiw-deposit-em {
    font-weight: 700;
    font-size: 1.2em;
    color: var(--hiw-navy);
}

/* 2026-07-31: 방공제 범위 표시("~" 포함, 예: 남양주 다산동) 경고 강조 — 주황 계열
   (hiw-deposit-em 대신 교체 적용 — 두 클래스 동시 적용 아님) */
.hiw-deposit-warn {
    font-weight: 700;
    font-size: 1.2em;
    color: var(--hiw-orange);
}

/* 물건유형 배지 */
.hiw-property-type-badge {
    font-weight: 700;
    color: var(--hiw-navy);
    background: rgba(0,44,95,0.08);
    padding: 2px 10px;
    border-radius: 6px;
    font-size: 14px;
}

/* 세움터(건축물대장) 발급 링크 — 사용승인일 원본 확인용 */
.hiw-eais-link {
    display: inline-block;
    margin-left: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--hiw-navy);
    background: rgba(0,44,95,0.06);
    border: 1px solid rgba(0,44,95,0.18);
    padding: 2px 8px;
    border-radius: 999px;
    text-decoration: none;
    white-space: nowrap;
}
.hiw-eais-link:hover {
    background: rgba(0,44,95,0.14);
    text-decoration: underline;
}

/* #051: 실시간 확인 뱃지 (국가 토지이용계획으로 확정된 '해당없음'에만 표기) */
.hiw-source-tag {
    display: inline-block;
    margin-left: 6px;
    font-size: 10px;
    font-weight: 600;
    color: var(--hiw-text-light);
    background: var(--hiw-bg-soft, rgba(0,44,95,0.05));
    padding: 1px 6px;
    border-radius: 999px;
}

/* 상태 색 라벨 */
.hiw-status-ok {
    color: var(--hiw-green);
    font-weight: 600;
}
.hiw-status-warn {
    color: var(--hiw-orange);
    font-weight: 600;
}
.hiw-status-danger {
    color: var(--hiw-red);
    font-weight: 600;
}

/* 안내/팁 박스 */
.hiw-guide-text {
    background: rgba(0,44,95,0.05);
    padding: 12px 14px;
    border-radius: var(--hiw-radius-sm);
    border-left: 3px solid var(--hiw-navy);
    white-space: pre-line;
}
.hiw-tip-text {
    background: rgba(255,96,0,0.06);
    padding: 10px 14px;
    border-radius: var(--hiw-radius-sm);
    border-left: 3px solid var(--hiw-orange);
    margin-top: 8px;
    font-size: 13px;
    color: var(--hiw-text-secondary);
    white-space: pre-line;
}

/* 상태 박스 — 오푸스 필수① (토큰화, 분기 로직은 widget.js 불변) */
.hiw-deal-warn-box {
    background: var(--hiw-warn-bg);
    border-left: 3px solid var(--hiw-warn-border);
    border-radius: 4px;
    padding: 10px 12px;
    color: var(--hiw-warn-text);
    font-size: 13px;
    line-height: 1.6;
}
.hiw-deal-empty-box {
    background: var(--hiw-empty-bg);
    border-left: 3px solid var(--hiw-empty-border);
    border-radius: 4px;
    padding: 10px 12px;
    color: var(--hiw-empty-text);
    font-size: 13px;
    line-height: 1.6;
}
.hiw-deal-warming-box {
    display: flex; align-items: flex-start; gap: 10px;
    background: rgba(0,44,95,0.045);          /* 회색 → 옅은 네이비 틴트: '죽은 화면' 인상 제거 */
    border-left: 3px solid var(--hiw-navy);
    border-radius: 4px; padding: 10px 12px;
    color: var(--hiw-navy); font-size: 13px; line-height: 1.6;
}
.hiw-spinner-sm {
    width: 16px; height: 16px; flex: 0 0 auto; margin-top: 3px;
    border: 2px solid #dbe3ee; border-top-color: var(--hiw-navy);
    border-radius: 50%;
    animation: hiw-spin 0.8s linear infinite;  /* 기존 키프레임(widget.css:323) 재사용 — 신규 0 */
}
.hiw-deal-warming-hint {
    display: block; margin-top: 4px;
    font-size: 12px; color: rgba(0,44,95,0.65);
}
.hiw-deal-action-box {
    background: linear-gradient(135deg, #FFF7ED 0%, #FFE4C4 100%);
    border-left: 4px solid var(--hiw-orange);   /* #FF6000 브랜드 컬러 — 기존 #F59E0B보다 강렬 */
    border-radius: 4px; padding: 12px 14px;
    color: #7C2D12; font-size: 14.5px; font-weight: 600; line-height: 1.6;
}
.hiw-deal-action-title {
    font-size: 13px; font-weight: 700; letter-spacing: -0.2px;
    margin-bottom: 4px; color: #9A3412;
}
.hiw-deal-retry-btn {
    display: block; width: 100%; margin-top: 10px;
    padding: 11px 16px; border: 0; border-radius: var(--hiw-radius-pill);
    background: linear-gradient(135deg, #C2410C 0%, #9A3412 100%);
    color: #fff; font-size: 15px; font-weight: 700; cursor: pointer;
    animation: hiw-attention 2s cubic-bezier(.4,0,.2,1) infinite;
}
@keyframes hiw-attention {
    0%   { box-shadow: 0 0 0 0    rgba(255,96,0,.50), var(--hiw-shadow-orange); }
    60%  { box-shadow: 0 0 0 12px rgba(255,96,0,0),   var(--hiw-shadow-orange); }
    100% { box-shadow: 0 0 0 0    rgba(255,96,0,0),   var(--hiw-shadow-orange); }
}

/* ============================================================
   v5.13.6 평형별 시세표 — 인라인 style → 클래스 이관 (등가, PC 무변화)
   오푸스 자문회신 §3: 원래 widget.js에 인라인으로 박혀있던 값을 그대로 옮김.
   값 변경 없음 → PC 화면 동일. 모바일 전용 오버라이드는 @media 블록에서.
   ============================================================ */
.hiw-deal-summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.hiw-deal-summary-thead-tr {
    background: var(--hiw-bg-warm);
    color: var(--hiw-empty-text);
}
.hiw-deal-summary-th {
    padding: 5px 6px;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
}
.hiw-deal-summary-th-area { text-align: left; }
.hiw-deal-summary-th-num  { text-align: right; }
.hiw-deal-summary-tbody-tr {
    border-bottom: 1px solid var(--hiw-empty-bg);
}
.hiw-deal-summary-td {
    padding: 5px 6px;
}
.hiw-deal-summary-td-area { text-align: left; }
.hiw-deal-summary-td-avg { text-align: right; font-weight: 700; color: var(--hiw-navy); }
.hiw-deal-summary-td-range { text-align: right; color: var(--hiw-empty-text); }
.hiw-deal-summary-td-count { text-align: right; color: var(--hiw-text-muted); }

/* v5.13.8: "주변 시세" 카드화 — 각 거래를 카드로 묶어 단위 구분 (사용자 폰 실물 확인).
   평형표 모바일 카드(.hiw-deal-summary-tbody-tr)와 동일 패턴.
   v5.13.7 인라인 값(padding-left:12px;font-size:13px)을 name 블록으로 승계 → PC 무변경. */
.hiw-nearby-deal-card {
    padding-left: 12px;       /* v5.13.7 인라인 값 승계 (PC 글머리 들여쓰기 유지) */
}
.hiw-nearby-deal-name {
    font-size: 13px;          /* v5.13.7 인라인 값 승계 */
}
.hiw-nearby-deal-meta {
    font-size: 12px;
    color: var(--hiw-text-muted);
}

/* 하단 조회 정보 */
.hiw-footer {
    text-align: center;
    padding: 12px;
    font-size: 12px;
    color: var(--hiw-text-light);
    border-top: 1px solid #f1f5f9;
    margin-top: 4px;
}

/* 2026-07-15: 오늘 남은 조회 횟수 (1인/일 50회) */
.hiw-remaining-badge {
    text-align: center;
    padding: 8px 12px;
    font-size: 11px;
    color: var(--hiw-text-muted);
    margin-top: 4px;
}
.hiw-remaining-badge strong {
    color: var(--hiw-navy);
    font-weight: 700;
}

/* 2026-07-23: 요약 복사 버튼 — 카드1 위. 메신저 붙여넣기용 1회용 요약본 복사 */
.hiw-summary-copy-row {
    text-align: right;
    margin-bottom: 6px;
}
.hiw-summary-copy-btn {
    background: var(--hiw-navy);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}
.hiw-summary-copy-btn:hover {
    background: var(--hiw-navy-dark, #1e3a5f);
}

/* ============================================================
   스크롤 Reveal (#046 §5.3)
   ============================================================ */
.hiw-reveal {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 0.8s var(--hiw-ease), transform 0.8s var(--hiw-ease);
}
.hiw-reveal.hiw-show {
    opacity: 1;
    transform: none;
}

/* ============================================================
   시세 바로가기 섹션 (그라디언트 헤더 상향)
   ============================================================ */
.hiw-price-links-section {
    margin-top: 12px;
    background: var(--hiw-bg);
    border: 1.5px solid var(--hiw-navy);
    border-radius: var(--hiw-radius-md);
    overflow: hidden;
    box-shadow: var(--hiw-shadow-sm);
}
.hiw-price-links-header {
    background: var(--hiw-grad-navy);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 16px;
    letter-spacing: 0.3px;
}
.hiw-price-links-body {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.hiw-price-link-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.hiw-price-link-label {
    font-size: 13px;
    color: var(--hiw-text-primary);
    min-width: 160px;
    flex-shrink: 0;
}
.hiw-price-link-btn {
    display: inline-block;
    padding: 6px 14px;
    background: var(--hiw-grad-orange);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--hiw-radius-pill);
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 12px rgba(255,96,0,0.25);
}
.hiw-price-link-btn:hover {
    transform: translateY(-1px);
    text-decoration: none;
}
.hiw-price-link-keyword-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--hiw-bg-warm);
    border-radius: var(--hiw-radius-sm);
    padding: 8px 12px;
    flex-wrap: wrap;
}
.hiw-price-link-keyword-label {
    font-size: 13px;
    color: var(--hiw-text-muted);
    flex-shrink: 0;
}
.hiw-price-link-keyword-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--hiw-navy);
    flex: 1;
    min-width: 80px;
    word-break: break-all;
}
.hiw-price-link-copy-btn {
    padding: 5px 12px;
    background: var(--hiw-navy);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s;
}
.hiw-price-link-copy-btn:hover {
    background: var(--hiw-navy-light);
}
.hiw-price-link-guide {
    font-size: 12px;
    color: var(--hiw-text-light);
    padding-top: 2px;
}
.hiw-copy-toast {
    position: fixed;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 44, 95, 0.92);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 26px;
    border-radius: var(--hiw-radius-pill);
    z-index: 9999;
    pointer-events: none;
    white-space: nowrap;
}

/* ============================================================
   Q&A 업무기준 검색 탭 (주황 액센트 유지)
   ============================================================ */
.hiw-qa-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid var(--hiw-navy);
}
.hiw-qa-header {
    text-align: center;
    margin-bottom: 16px;
}
.hiw-qa-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--hiw-navy);
    margin: 0 0 6px 0;
}
.hiw-qa-subtitle {
    font-size: 13px;
    color: var(--hiw-text-light);
    margin: 0;
}
.hiw-qa-input-wrapper {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}
.hiw-qa-input {
    flex: 1;
    padding: 12px 16px;
    font-size: 14px;
    font-family: inherit;
    border: 2px solid var(--hiw-orange);
    border-radius: var(--hiw-radius-sm);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.hiw-qa-input:focus {
    border-color: var(--hiw-orange-light);
    box-shadow: 0 0 0 3px rgba(255, 96, 0, 0.15);
}
.hiw-qa-input::placeholder {
    color: var(--hiw-text-light);
    font-size: 13px;
}
.hiw-qa-btn {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    color: #fff;
    background: var(--hiw-orange);
    border: none;
    border-radius: var(--hiw-radius-sm);
    cursor: pointer;
    transition: transform 0.15s;
    white-space: nowrap;
}
.hiw-qa-btn:hover {
    transform: translateY(-1px);
}
.hiw-qa-btn:active {
    transform: scale(0.97);
}
.hiw-qa-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}
.hiw-qa-filter-row {
    margin-bottom: 10px;
}
.hiw-qa-group-select {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    border: 2px solid var(--hiw-orange);
    border-radius: var(--hiw-radius-sm);
    outline: none;
    background: var(--hiw-bg);
    color: var(--hiw-text-primary);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.hiw-qa-group-select:focus {
    border-color: var(--hiw-orange-light);
    box-shadow: 0 0 0 3px rgba(255, 96, 0, 0.15);
}
.hiw-qa-loading {
    text-align: center;
    padding: 20px 0;
    color: var(--hiw-text-light);
    font-size: 13px;
}
.hiw-qa-result {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.hiw-qa-card {
    background: var(--hiw-bg);
    border-radius: var(--hiw-radius-sm);
    border: 1px solid #f1f5f9;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}
.hiw-qa-card:hover {
    box-shadow: 0 4px 16px rgba(255, 96, 0, 0.1);
    transform: translateY(-1px);
}
.hiw-qa-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255,96,0,0.05);
    border-bottom: 1px solid rgba(255,96,0,0.1);
}
.hiw-qa-card-category {
    font-size: 12px;
    font-weight: 700;
    color: var(--hiw-orange);
    background: rgba(255,96,0,0.1);
    padding: 3px 10px;
    border-radius: var(--hiw-radius-pill);
}
.hiw-qa-card-source {
    font-size: 11px;
    color: var(--hiw-text-light);
}
.hiw-qa-card-body {
    padding: 14px 16px;
}
.hiw-qa-card-question {
    font-size: 14px;
    font-weight: 700;
    color: var(--hiw-navy);
    margin-bottom: 8px;
    line-height: 1.5;
}
.hiw-qa-card-answer {
    font-size: 13px;
    color: var(--hiw-text-secondary);
    line-height: 1.7;
    white-space: pre-line;
    background: var(--hiw-bg-warm);
    padding: 12px 14px;
    border-radius: var(--hiw-radius-sm);
    border-left: 3px solid var(--hiw-orange);
}
.hiw-qa-ments {
    margin-top: 12px;
}
.hiw-qa-ments-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--hiw-navy);
    margin-bottom: 8px;
}
.hiw-qa-ment-item {
    background: rgba(0,44,95,0.04);
    padding: 10px 14px;
    border-radius: var(--hiw-radius-sm);
    border-left: 3px solid var(--hiw-navy);
    margin-bottom: 8px;
}
.hiw-qa-ment-guide {
    font-size: 13px;
    color: var(--hiw-text-primary);
    line-height: 1.6;
    white-space: pre-line;
}
.hiw-qa-ment-tip {
    font-size: 12px;
    color: var(--hiw-text-muted);
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid rgba(0,44,95,0.08);
    line-height: 1.5;
    white-space: pre-line;
}
.hiw-qa-no-result {
    text-align: center;
    padding: 24px;
    color: var(--hiw-text-light);
    font-size: 14px;
    background: var(--hiw-bg-warm);
    border-radius: var(--hiw-radius-sm);
}
.hiw-qa-count {
    font-size: 12px;
    color: var(--hiw-text-light);
    margin-bottom: 10px;
}

/* ============================================================
   접근성 — prefers-reduced-motion (모션 가이드 필수)
   사유: 모션 민감 사용자 보호. !important는 이 블록만 허용
   오브 숨김 포함 (홈페이지에이전트 권고 + 오푸스 권고① — 성능+민감도)
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .hiw-mask-inner {
        transform: none !important;
    }
    .hiw-card {
        opacity: 1 !important;
        transform: none !important;
    }
    .hiw-reveal {
        opacity: 1 !important;
        transform: none !important;
    }
    .hiw-glow-orb {
        display: none !important;
    }
}

/* ============================================================
   반응형 — 모바일
   ============================================================ */
@media (max-width: 600px) {
    .hiw-container {
        padding: 16px;
        border-radius: 0;
        box-shadow: none;
    }
    .hiw-hero-dark {
        padding: 32px 20px 28px;
    }
    .hiw-hero-title {
        font-size: 24px;
    }
    .hiw-search-glass {
        flex-direction: column;
        border-radius: var(--hiw-radius-md);
        padding: 12px;
        gap: 8px;
        /* 2026-07-23: 자동완성 드롭다운의 위치 기준을 '입력칸'이 아니라 '검색박스 전체'로
           바꾸기 위해 기준점 신설. 아래 .hiw-autocomplete-container{position:static}과 한 쌍. */
        position: relative;
    }
    /* 2026-07-23 모바일 결함 수정 — 자동완성이 조회 버튼을 덮는 문제.
       원인: 모바일은 flex-direction:column이라 [입력칸] 위 / [조회] 아래로 쌓이는데,
             드롭다운이 .hiw-autocomplete-container(=입력칸 래퍼) 기준 absolute라
             top:calc(100%+6px) 지점이 정확히 조회 버튼 자리가 된다(z-index:100로 덮음).
       증상: 주소를 끝까지 입력한 뒤 제안이 필요 없어도 조회를 누를 수 없다.
             (제안을 탭하면 hideSuggestions로 닫혀 버튼이 다시 보이므로 완전 차단은 아니나,
              입력한 주소를 그대로 조회하려는 정상 경로가 막힌다.)
       조치: 기준점을 검색박스 전체로 올려 드롭다운이 조회 버튼 '아래'에 뜨게 한다.
             데스크톱(가로 배치)은 이 미디어쿼리 밖이라 영향 0. */
    .hiw-autocomplete-container {
        position: static;
    }
    /* 2026-07-24 v5.13.6: 드롭다운을 흐름에 편입 — [입력칸][팝업][버튼] 순서 완성.
       오푸스 자문회신 §2 — .hiw-suggestions를 position:static으로 흐름에 되돌리면
       DOM 순서(widget.html:64-76) 그대로 입력칸 바로 아래, 그 다음 버튼이 옴.
       v5.13.5(absolute → 검색박스 기준)를 넘어 완전한 세로 흐름으로 전환.
       PC는 미디어쿼리 밖이라 position:absolute 유지 (가로 배치 그대로). */
    .hiw-suggestions {
        position: static;
        margin-top: 6px;        /* absolute 시절 top:calc(100%+6px)의 여백 승계 */
        max-height: 180px;      /* 280px→축소. 키보드 올라온 375×812에서 버튼 가시성 */
    }
    /* v5.13.6 평형 표 모바일 전환 — 4열 가로 → 행 단위 세로 카드.
       오푸스 자문회신 §3 + 제미나이 진단: 좁은 화면에서 가로 표가 찌그러져
       '3억\n3,500\n만원' 분절. 표를 풀어 한 행=한 카드로 직렬화. */
    .hiw-deal-summary-table thead { display: none; }
    .hiw-deal-summary-table,
    .hiw-deal-summary-table tbody,
    .hiw-deal-summary-tbody-tr,
    .hiw-deal-summary-td { display: block; width: 100%; box-sizing: border-box; }
    .hiw-deal-summary-tbody-tr {
        margin-bottom: 6px;
        padding: 6px 8px;
        background: var(--hiw-bg-warm);
        border-radius: var(--hiw-radius-sm);
        border-bottom: none;
    }
    .hiw-deal-summary-td { padding: 2px 0; text-align: left !important; }
    .hiw-deal-summary-td-area::before     { content: "평형 "; color: var(--hiw-text-muted); }
    .hiw-deal-summary-td-avg::before      { content: "평균 "; color: var(--hiw-text-muted); font-weight: 400; }
    .hiw-deal-summary-td-range::before    { content: "범위 "; color: var(--hiw-text-muted); }
    .hiw-deal-summary-td-count::before    { content: "건수 "; color: var(--hiw-text-muted); }
    /* 금액·면적 어절 보존 — 줄바꿈 분절 방지 (제미나이 진단).
       keep-all(어절 보존) + break-word(긴 단지명 넘침 대비).
       anywhere 금지 — 오푸스 회신 §3 반려: keep-all과 의도 상충. */
    .hiw-value,
    .hiw-deal-summary-td {
        word-break: keep-all;
        overflow-wrap: break-word;
    }
    /* v5.13.8: "주변 시세" 카드화 — 각 거래를 작은 카드로 묶어 단위 구분.
       평형표 카드(.hiw-deal-summary-tbody-tr)와 동일 패턴: warm 배경·패딩·라운드·간격.
       오푸스 자문회신 v5.13.6 §2 — 카드값(배경/패딩)은 값 변경이므로 미디어쿼리 안(모바일 전용).
       PC는 공통 .hiw-nearby-deal-card(padding-left만) 그대로 → 글머리 형태 유지, 회귀 0. */
    .hiw-nearby-deal-card {
        padding: 6px 8px;
        margin-bottom: 6px;
        background: var(--hiw-bg-warm);
        border-radius: var(--hiw-radius-sm);
    }
    /* 카드 안 name/meta 어절 보존 — 긴 단지명·금액 분절 방지 (keep-all + break-word). */
    .hiw-nearby-deal-name,
    .hiw-nearby-deal-meta {
        word-break: keep-all;
        overflow-wrap: break-word;
    }
    .hiw-nearby-deal-meta {
        margin-top: 2px;
    }
    .hiw-btn-primary {
        width: 100%;
        padding: 14px;
        border-radius: var(--hiw-radius-sm);
    }
    .hiw-price-link-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .hiw-price-link-label {
        min-width: unset;
    }
    .hiw-label {
        min-width: 70px;
    }
    .hiw-qa-input-wrapper {
        flex-direction: column;
    }
    .hiw-qa-btn {
        width: 100%;
    }
    .hiw-qa-title {
        font-size: 18px;
    }
    .hiw-deal-action-box { font-size: 14px; }
    .hiw-deal-retry-btn { padding: 13px 16px; }
    .hiw-deal-warming-box { gap: 8px; }
}

/* ============================================================
   #047: 상담사 로그인 폼 — 기존 --hiw-* 토큰 재사용
============================================================ */
.hiw-login-view {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-radius: 14px;
    padding: 2rem 1.5rem;
}

.hiw-login-card {
    max-width: 380px;
    width: 100%;
    background: #ffffff;
    border-radius: 16px;
    padding: 1.75rem 1.75rem 1.5rem;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
}

.hiw-login-header {
    text-align: center;
    margin-bottom: 0.875rem;
}

.hiw-login-header .hiw-card-icon-box {
    width: 44px;
    height: 44px;
    margin: 0 auto 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    border-radius: 12px;
    background: rgba(0, 44, 95, 0.1);
}

.hiw-login-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--hiw-navy);
    margin: 0;
}

.hiw-login-sub {
    color: #6b7280;
    font-size: 0.85rem;
    text-align: center;
    margin-bottom: 1rem;
}

.hiw-login-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* #047 버그픽스 2: .hiw-input-glass는 다크 히어로용(흰 글씨·투명 배경) —
   흰 로그인 카드 위에선 칸·글씨가 안 보임 → 로그인 폼 전용 오버라이드 */
.hiw-login-form .hiw-input-glass {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: #0f172a;
    padding: 10px 14px;
}
.hiw-login-form .hiw-input-glass::placeholder {
    color: #94a3b8;
}
.hiw-login-form .hiw-input-glass:focus {
    border-color: var(--hiw-navy, #002c5f);
    background: #ffffff;
}

.hiw-login-error {
    color: #dc2626;
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
    background: #fef2f2;
    border-radius: 8px;
    border: 1px solid #fecaca;
}

.hiw-login-form .hiw-btn-primary {
    margin-top: 0.5rem;
    cursor: pointer;
}

.hiw-login-form .hiw-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* #047 후속: 로그아웃 버튼 — 다크 히어로 우상단 */
.hiw-logout-btn {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.hiw-logout-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}
