/* 🏠 이 집 얼마게? (2026-10-10) — act/homeprice.php 전용 */
#hp-wrap {
  --hp-bg: #fbf7ef; --hp-card: #ffffff; --hp-ink: #2a2118; --hp-sub: #6f6252; --hp-line: #eadfcd;
  --hp-accent: #d9480f; --hp-accent2: #f08c00; --hp-green: #2b8a3e; --hp-red: #c92a2a; --hp-blue: #1c7ed6;
  --hp-chip: #f6efe2; --hp-track: #efe5d3; --hp-shadow: 0 12px 30px rgba(80, 50, 20, .12);
  width: 100%; max-width: none; margin: 0 auto 8px; box-sizing: border-box; color: var(--hp-ink);
}
html[data-theme="dark"] #hp-wrap {
  --hp-bg: #1b1814; --hp-card: #24201b; --hp-ink: #f3ece2; --hp-sub: #b8a993; --hp-line: #3a332a;
  --hp-accent: #ff8a4c; --hp-accent2: #ffc078; --hp-green: #69db7c; --hp-red: #ff8787; --hp-blue: #74c0fc;
  --hp-chip: #2f2922; --hp-track: #3a332a; --hp-shadow: 0 12px 30px rgba(0, 0, 0, .35);
}
#hp-wrap *, #hp-wrap *::before, #hp-wrap *::after { box-sizing: border-box; }
.hp-card {
  background: var(--hp-card); border: 1px solid var(--hp-line); border-radius: 20px; padding: 20px 18px;
  box-shadow: var(--hp-shadow); position: relative; overflow: hidden;
}
.hp-card[hidden], #hp-wrap [hidden] { display: none !important; }
.hp-sign { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; color: var(--hp-accent); }
.hp-sign-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--hp-accent); box-shadow: 0 0 0 4px rgba(217, 72, 15, .15); }
.hp-title { margin: 10px 0 4px; font-size: 26px; font-weight: 900; letter-spacing: -.03em; line-height: 1.3; color: var(--hp-ink); }
.hp-title b { color: var(--hp-accent); }
.hp-lead { margin: 0 0 16px; font-size: 14px; color: var(--hp-sub); word-break: keep-all; }

.hp-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.hp-mode input { position: absolute; opacity: 0; pointer-events: none; }
.hp-mode span {
  display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 48px; border-radius: 14px; cursor: pointer;
  border: 2px solid var(--hp-line); background: var(--hp-chip); font-weight: 800; font-size: 14.5px; color: var(--hp-ink);
}
.hp-mode input:checked + span { border-color: var(--hp-accent); background: rgba(217, 72, 15, .08); color: var(--hp-accent); }
.hp-mode input:focus-visible + span { outline: 3px solid var(--hp-blue); outline-offset: 2px; }
#hp-gu {
  width: 100%; min-height: 46px; border-radius: 12px; border: 1px solid var(--hp-line); padding: 0 12px; margin-bottom: 14px;
  background: var(--hp-card); color: var(--hp-ink); font-size: 15px;
}
#hp-gu:disabled { opacity: .5; }

.hp-btn { display: block; width: 100%; min-height: 50px; border: 0; border-radius: 26px; cursor: pointer; font-size: 16px; font-weight: 900; }
.hp-btn-main { background: linear-gradient(135deg, var(--hp-accent2), var(--hp-accent)); color: #fff; box-shadow: 0 8px 18px rgba(217, 72, 15, .28); }
.hp-btn-main:disabled { opacity: .5; cursor: default; box-shadow: none; }
.hp-btn-ghost { background: transparent; border: 2px solid var(--hp-line); color: var(--hp-ink); }
.hp-btn:active:not(:disabled) { transform: translateY(1px); }
.hp-meta { margin-top: 12px; text-align: center; font-size: 12.5px; color: var(--hp-sub); }
.hp-meta b { color: var(--hp-ink); }

.hp-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 13px; color: var(--hp-sub); font-weight: 700; }
.hp-round-no { padding: 4px 11px; border-radius: 20px; background: var(--hp-ink); color: var(--hp-card); font-weight: 900; font-variant-numeric: tabular-nums; }
.hp-total b { color: var(--hp-accent); font-size: 16px; font-variant-numeric: tabular-nums; }

.hp-listing { padding: 16px 14px; border-radius: 16px; background: var(--hp-bg); border: 1px dashed var(--hp-line); }
.hp-listing.in { animation: hpIn .35s ease-out; }
@keyframes hpIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.hp-loc { display: flex; flex-wrap: wrap; gap: 6px; }
.hp-badge { padding: 4px 10px; border-radius: 8px; background: var(--hp-accent); color: #fff; font-size: 12.5px; font-weight: 800; }
.hp-badge-sub { background: var(--hp-chip); color: var(--hp-ink); border: 1px solid var(--hp-line); }
.hp-bldg { margin: 10px 0 12px; font-size: 22px; font-weight: 900; letter-spacing: -.02em; line-height: 1.3; color: var(--hp-ink); word-break: keep-all; overflow-wrap: anywhere; }
.hp-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.hp-chip { display: flex; align-items: center; gap: 7px; padding: 8px 10px; border-radius: 10px; background: var(--hp-card); border: 1px solid var(--hp-line); font-size: 13px; min-width: 0; }
.hp-chip i { color: var(--hp-accent); width: 14px; text-align: center; flex: none; }
.hp-chip b { font-weight: 800; color: var(--hp-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

#hp-ask { margin-top: 16px; }
.hp-now { text-align: center; }
.hp-now small, .hp-actual small { display: block; font-size: 12px; font-weight: 800; color: var(--hp-sub); letter-spacing: .04em; }
.hp-now strong { display: block; font-size: 30px; font-weight: 900; letter-spacing: -.03em; color: var(--hp-ink); font-variant-numeric: tabular-nums; }
#hp-slider {
  -webkit-appearance: none; appearance: none; width: 100%; height: 44px; margin: 6px 0 0; background: transparent; cursor: pointer; touch-action: pan-y;
  --p: 50%;
}
#hp-slider::-webkit-slider-runnable-track { height: 10px; border-radius: 6px; background: linear-gradient(90deg, var(--hp-accent) var(--p), var(--hp-track) var(--p)); }
#hp-slider::-moz-range-track { height: 10px; border-radius: 6px; background: var(--hp-track); }
#hp-slider::-moz-range-progress { height: 10px; border-radius: 6px; background: var(--hp-accent); }
#hp-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; margin-top: -10px; border-radius: 50%; background: #fff; border: 4px solid var(--hp-accent); box-shadow: 0 3px 8px rgba(0, 0, 0, .25); }
#hp-slider::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 4px solid var(--hp-accent); box-shadow: 0 3px 8px rgba(0, 0, 0, .25); }
#hp-slider:focus-visible { outline: 3px solid var(--hp-blue); outline-offset: 2px; border-radius: 8px; }
.hp-scale { position: relative; height: 16px; font-size: 11px; color: var(--hp-sub); font-weight: 700; }
.hp-scale span { position: absolute; transform: translateX(-50%); }
.hp-scale span:nth-child(1) { left: 2%; transform: none; } .hp-scale span:nth-child(2) { left: 23.9%; } .hp-scale span:nth-child(3) { left: 50%; }
.hp-scale span:nth-child(4) { left: 73.9%; } .hp-scale span:nth-child(5) { left: auto; right: 0; transform: none; }
.hp-inputs { display: grid; grid-template-columns: 1fr 1.3fr; gap: 8px; margin: 12px 0 14px; }
.hp-inputs label { display: flex; align-items: center; gap: 6px; padding: 0 12px; min-height: 48px; border-radius: 12px; border: 1px solid var(--hp-line); background: var(--hp-bg); }
.hp-inputs input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--hp-ink); font-size: 18px; font-weight: 800; text-align: right; outline: none; font-variant-numeric: tabular-nums; }
.hp-inputs label:focus-within { border-color: var(--hp-accent); }
.hp-inputs span { font-weight: 800; color: var(--hp-sub); font-size: 14px; }

#hp-reveal { margin-top: 16px; }
.hp-actual { text-align: center; }
.hp-actual strong { display: block; font-size: 34px; font-weight: 900; letter-spacing: -.03em; color: var(--hp-accent); font-variant-numeric: tabular-nums; line-height: 1.25; }
.hp-actual span { font-size: 12px; color: var(--hp-sub); }
#hp-reveal.done .hp-actual strong { animation: hpPop .35s ease-out; }
@keyframes hpPop { 50% { transform: scale(1.06); } }
.hp-bar { position: relative; height: 46px; margin: 14px 10px 6px; }
.hp-bar-track { position: absolute; left: 0; right: 0; top: 30px; height: 6px; border-radius: 4px; background: var(--hp-track); }
.hp-pin { position: absolute; top: 24px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; border: 3px solid var(--hp-card); }
.hp-pin em { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 11px; font-weight: 900; white-space: nowrap; padding: 1px 6px; border-radius: 6px; color: #fff; }
.hp-pin-actual { background: var(--hp-accent); z-index: 3; } .hp-pin-actual em { background: var(--hp-accent); }
.hp-pin-me { background: var(--hp-blue); z-index: 2; opacity: 0; transition: opacity .3s; } .hp-pin-me em { background: var(--hp-blue); bottom: -22px; }
.hp-pin-crowd { background: var(--hp-green); z-index: 1; opacity: 0; transition: opacity .3s; } .hp-pin-crowd em { background: var(--hp-green); bottom: -22px; }
#hp-reveal.done .hp-pin-me, #hp-reveal.done .hp-pin-crowd { opacity: 1; }
.hp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 22px; opacity: .25; transition: opacity .3s; }
#hp-reveal.done .hp-grid { opacity: 1; }
.hp-grid div { text-align: center; padding: 8px 2px; border-radius: 10px; background: var(--hp-bg); border: 1px solid var(--hp-line); min-width: 0; }
.hp-grid small { display: block; font-size: 11px; color: var(--hp-sub); font-weight: 700; }
.hp-grid b { display: block; font-size: 13.5px; font-weight: 900; color: var(--hp-ink); word-break: keep-all; font-variant-numeric: tabular-nums; }
.hp-crowd { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--hp-bg); font-size: 13px; line-height: 1.6; color: var(--hp-sub); word-break: keep-all; }
.hp-crowd b { color: var(--hp-ink); }
.hp-crowd em { font-style: normal; font-weight: 800; } .hp-crowd .win { color: var(--hp-green); } .hp-crowd .lose { color: var(--hp-red); }
.hp-quip { margin: 12px 0 14px; text-align: center; font-size: 14.5px; font-weight: 800; color: var(--hp-ink); word-break: keep-all; min-height: 22px; }

.hp-final { text-align: center; margin-top: 8px; }
.hp-final strong { font-size: 56px; font-weight: 900; color: var(--hp-accent); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.hp-final span { font-size: 16px; font-weight: 800; color: var(--hp-sub); margin-left: 4px; }
.hp-grade { text-align: center; font-size: 21px; font-weight: 900; color: var(--hp-ink); }
.hp-f-sub { text-align: center; font-size: 13.5px; color: var(--hp-sub); margin: 6px 0 14px; word-break: keep-all; }
.hp-f-sub b { color: var(--hp-ink); }
.hp-table-wrap { overflow-x: auto; margin-bottom: 14px; }
.hp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.hp-table th { font-size: 11.5px; color: var(--hp-sub); font-weight: 800; padding: 6px 4px; border-bottom: 2px solid var(--hp-line); text-align: right; }
.hp-table th:first-child, .hp-table td:first-child { text-align: left; }
.hp-table td { padding: 8px 4px; border-bottom: 1px solid var(--hp-line); text-align: right; color: var(--hp-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hp-table td:first-child { white-space: normal; word-break: keep-all; max-width: 150px; }
.hp-table td small { display: block; font-size: 11px; color: var(--hp-sub); }
.hp-table td.good { color: var(--hp-green); font-weight: 800; } .hp-table td.bad { color: var(--hp-red); font-weight: 800; }
.hp-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.hp-msg { display: none; margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: rgba(201, 42, 42, .1); color: var(--hp-red); font-size: 13.5px; font-weight: 700; text-align: center; }
.hp-msg.on { display: block; }
.hp-source { margin: 12px 4px 0; font-size: 11.5px; line-height: 1.6; color: var(--hp-sub); word-break: keep-all; }

.hp-guide { text-align: left; line-height: 1.7; margin-top: 16px; }
.hp-guide p, .hp-guide li { font-size: .9rem; }
.hp-guide h3 { font-size: 1rem; margin: 10px 0 4px; }
.hp-guide ul { padding-left: 18px; margin: 4px 0; }
.hp-guide small { font-size: .8rem; display: block; margin-top: 8px; }

@media (max-width: 380px) {
  .hp-card { padding: 16px 13px; }
  .hp-title { font-size: 22px; } .hp-bldg { font-size: 19px; }
  .hp-chips { grid-template-columns: 1fr; }
  .hp-now strong { font-size: 26px; } .hp-actual strong { font-size: 28px; }
  .hp-grid { grid-template-columns: 1fr 1fr; }
  .hp-final strong { font-size: 46px; }
}
@media (prefers-reduced-motion: reduce) { .hp-listing.in, #hp-reveal.done .hp-actual strong { animation: none; } }

/* 10-10 게임 영역 폭 100%: 배경·테두리는 꽉 채우고 넓은 화면에서는 안쪽 콘텐츠만 가운데로 모은다 */
@media (min-width: 761px) {
    #hp-wrap .hp-card { padding-left: max(18px, calc((100% - 680px) / 2)); padding-right: max(18px, calc((100% - 680px) / 2)); }
}
