/* おうち探し (hf-*) — builds on community.css tokens. */
.hf-hero { background: radial-gradient(circle at 90% 10%, #d8f0df 0, transparent 45%), linear-gradient(135deg, #f1faf3, #fffaf2); }
.hf-hero .hamu-hero__eyebrow { color: var(--hc-accent); }
.hf-kinds { margin-bottom: 12px; }
.hf-kinds small { font-weight: 400; font-size: .75rem; }
.hf-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.hf-filter select { padding: 10px 12px; border: 1.5px solid var(--hc-line); border-radius: 10px; font: inherit; font-size: 16px; background: #fff; }

.hf-badge { display: inline-flex; align-items: baseline; gap: 4px; font-size: .75rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; }
.hf-badge small { font-weight: 400; font-size: .68rem; }
.hf-badge--give { background: #ffe8d6; color: #a2470d; }
.hf-badge--want { background: #e3f1fb; color: #1f5c99; }
.hf-badge--match { background: #fbe6f0; color: #9b2a62; }

.hf-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 620px) { .hf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .hf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.hf-grid__ad { grid-column: 1 / -1; }
.hf-card { background: var(--hc-surface); border: 1px solid var(--hc-line); border-radius: var(--hc-radius); overflow: hidden; transition: box-shadow .15s, transform .15s; }
.hf-card:hover { box-shadow: var(--hc-shadow); transform: translateY(-2px); }
.hf-card__link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.hf-card__thumb { aspect-ratio: 4 / 3; background: #fff3e3; display: grid; place-items: center; overflow: hidden; }
.hf-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hf-card__noimg { font-size: 3rem; }
.hf-card__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.hf-card__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.hf-card__pref { font-size: .8rem; font-weight: 700; color: var(--hc-muted); }
.hf-card__title { margin: 0; font-size: 1.05rem; line-height: 1.4; }
.hf-card__facts { margin: 0; display: grid; gap: 2px; font-size: .82rem; }
.hf-card__facts div { display: flex; gap: 8px; }
.hf-card__facts dt { color: var(--hc-muted); min-width: 2.5em; }
.hf-card__facts dd { margin: 0; }
.hf-card__msg { margin: 0; font-size: .85rem; color: var(--hc-muted); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hf-card__meta { margin: auto 0 0; font-size: .75rem; color: var(--hc-muted); }

.hf-safety { margin: 32px 0; background: var(--hc-accent-soft); border-radius: var(--hc-radius); padding: 18px 20px; }
.hf-safety h2 { margin: 0 0 10px; font-size: 1.05rem; }
.hf-safety ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: .88rem; line-height: 1.6; }
@media (min-width: 720px) { .hf-safety ul { grid-template-columns: 1fr 1fr; } }
.hf-safety strong { display: block; }

.hf-detail { display: grid; gap: 20px; background: var(--hc-surface); border: 1px solid var(--hc-line); border-radius: calc(var(--hc-radius) + 4px); padding: 18px; }
@media (min-width: 760px) { .hf-detail { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); padding: 24px; } }
.hf-detail .hamu-gallery { grid-template-columns: repeat(2, 1fr); margin: 0; }
.hf-detail .hamu-gallery__item:first-child { grid-column: 1 / -1; aspect-ratio: 4 / 3; }
.hf-detail__noimg { aspect-ratio: 4 / 3; display: grid; place-items: center; font-size: 5rem; background: #fff3e3; border-radius: 12px; }
.hf-detail__title { margin: 8px 0 12px; font-size: clamp(1.3rem, 4vw, 1.7rem); }
.hf-facts { margin: 0; border-top: 1px solid var(--hc-line); }
.hf-facts div { display: grid; grid-template-columns: 8.5em 1fr; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--hc-line); font-size: .92rem; }
.hf-facts dt { color: var(--hc-muted); font-weight: 700; }
.hf-facts dd { margin: 0; overflow-wrap: anywhere; }
.hf-owner { display: flex; gap: 10px; align-items: center; margin-top: 14px; font-size: .9rem; line-height: 1.5; }
.hf-message { margin: 24px 0; background: var(--hc-surface); border: 1px solid var(--hc-line); border-radius: var(--hc-radius); padding: 18px 20px; }
.hf-inquiry { margin: 24px 0; border: 2px solid var(--hc-primary-soft); }
.hf-owner-panel { margin: 24px 0; }
.hf-owner-panel__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hf-report { display: flex; justify-content: flex-end; gap: 8px; margin: 12px 0 24px; }

.hf-kind-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hf-kind-pick__item input { position: absolute; opacity: 0; }
.hf-kind-pick__item span { display: flex; flex-direction: column; align-items: center; padding: 12px 6px; border: 2px solid var(--hc-line); border-radius: 12px; cursor: pointer; text-align: center; background: #fff; }
.hf-kind-pick__item small { color: var(--hc-muted); font-size: .75rem; }
.hf-kind-pick__item input:checked + span { border-color: var(--hc-primary); background: var(--hc-primary-soft); }
.hf-kind-pick__item input:focus-visible + span { outline: 2px solid var(--hc-primary); }
.hf-row { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 620px) { .hf-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
[data-hf-show] { display: grid; gap: 16px; }
[data-hf-show][hidden] { display: none; }
.hf-date { display: flex; gap: 6px; }
.hf-date select { flex: 1; min-width: 0; }
.hf-pledges { background: var(--hc-bg); border: 1px solid var(--hc-line) !important; border-radius: 12px; padding: 14px !important; }
.hf-current-images { display: flex; flex-wrap: wrap; gap: 8px; }
.hf-current-images label { position: relative; cursor: pointer; }
.hf-current-images img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; display: block; }
.hf-current-images input { position: absolute; top: 4px; left: 4px; width: 18px; height: 18px; }
.hf-current-images input:checked + img { opacity: .35; outline: 3px solid var(--hc-danger); }

.hf-status { display: inline-block; font-size: .72rem; font-weight: 800; padding: 2px 8px; border-radius: 6px; background: #eee; color: #555; margin-right: 6px; }
.hf-status--open, .hf-status--publish { background: var(--hc-primary-soft); color: var(--hc-primary); }
.hf-status--agreed { background: var(--hc-accent-soft); color: #1f6a44; }
.hf-status--pending { background: var(--hc-warn); color: #6b5300; }

.hf-threads { list-style: none; margin: 0; padding: 0; background: var(--hc-surface); border: 1px solid var(--hc-line); border-radius: var(--hc-radius); overflow: hidden; }
.hf-threads li + li { border-top: 1px solid var(--hc-line); }
.hf-thread-row a { display: flex; gap: 12px; align-items: center; padding: 12px 14px; color: inherit; text-decoration: none; }
.hf-thread-row a:hover { background: var(--hc-primary-soft); }
.hf-thread-row.is-unread { background: #fffaf0; }
.hf-thread-row.is-unread strong { color: var(--hc-primary); }
.hf-thread-row__body { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: .88rem; line-height: 1.5; }
.hf-thread-row__role { font-size: .72rem; color: var(--hc-muted); }
.hf-thread-row__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--hc-muted); }
.hf-thread-row__side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: .72rem; color: var(--hc-muted); }

.hf-thread-head { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.hf-thread-head__name { font-size: 1.2rem; margin: 0; }
.hf-thread-head__listing { font-size: .85rem; }
.hf-contact { background: var(--hc-accent-soft); border: 2px solid #9fd3b3; border-radius: var(--hc-radius); padding: 16px 18px; margin-bottom: 16px; }
.hf-contact h2 { margin: 0 0 10px; font-size: 1.05rem; }
.hf-contact__grid { display: grid; gap: 10px; }
@media (min-width: 620px) { .hf-contact__grid { grid-template-columns: 1fr 1fr; } }
.hf-contact__grid > div { background: #fff; border-radius: 10px; padding: 10px 12px; }
.hf-contact__label { margin: 0; font-size: .75rem; color: var(--hc-muted); }
.hf-contact__value { margin: 2px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.hf-chat { list-style: none; margin: 0 0 16px; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: #f7f3ee; border-radius: var(--hc-radius); }
.hf-chat__item { display: flex; gap: 8px; align-items: flex-end; max-width: 85%; }
.hf-chat__item.is-mine { align-self: flex-end; flex-direction: row-reverse; }
.hf-chat__item.is-system { align-self: center; max-width: 100%; }
.hf-chat__bubble { background: #fff; border-radius: 16px 16px 16px 4px; padding: 10px 14px; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); min-width: 0; }
.hf-chat__item.is-mine .hf-chat__bubble { background: #ffe9d2; border-radius: 16px 16px 4px 16px; }
.hf-chat__item.is-system .hf-chat__bubble { background: transparent; box-shadow: none; text-align: center; font-size: .82rem; color: var(--hc-muted); padding: 4px; }
.hf-chat__bubble .hamu-text { line-height: 1.7; font-size: .95rem; }
.hf-chat__bubble time { display: block; font-size: .68rem; color: var(--hc-muted); margin-top: 2px; text-align: right; }
.hf-chat-form { margin-bottom: 16px; }
.hf-agree { margin-bottom: 16px; }
.hf-agree__other { color: var(--hc-accent); }
.hf-thread-foot { display: flex; justify-content: flex-end; gap: 8px; }

.hf-guide { background: var(--hc-surface); border: 1px solid var(--hc-line); border-radius: calc(var(--hc-radius) + 4px); padding: 20px; line-height: 1.9; }
@media (min-width: 720px) { .hf-guide { padding: 32px 40px; } }
.hf-guide h2 { font-size: 1.25rem; margin: 2em 0 .6em; padding: 10px 14px; background: var(--hc-primary-soft); border-left: 5px solid var(--hc-primary); border-radius: 8px; }
.hf-steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: 10px; }
.hf-steps li { counter-increment: s; position: relative; padding: 10px 12px 10px 48px; background: var(--hc-bg); border-radius: 10px; }
.hf-steps li::before { content: counter(s); position: absolute; left: 12px; top: 12px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--hc-primary); color: #fff; font-weight: 800; font-size: .85rem; }
.hf-steps strong { display: block; }
.hf-pledge-doc { border: 2px solid var(--hc-text); padding: 20px 24px; background: #fff; font-size: .92rem; }
.hf-pledge-doc__title { text-align: center; font-size: 1.2rem; font-weight: 800; letter-spacing: .2em; }
@media print {
	.site-header, .site-footer, .hamu-crumbs, .to-top, .hamu-cta, .toc, .ad { display: none !important; }
	.hf-guide > *:not(#pledge-doc) { display: none; }
	.hf-guide { border: 0; padding: 0; }
}
