/* 사이트 검색 — 머리글 검색 칸·모바일 메뉴 칸·결과 화면. 색·글꼴·모서리는 사이트 변수(hm-tokens.css)와 머리글 알약(.pill) 모양을 따른다. */
.hm-search__label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hm-search { display: flex; align-items: stretch; min-width: 0; font-family: var(--hm-font-body); }
.hm-search__input { box-sizing: border-box; min-width: 0; min-height: 44px; margin: 0; padding: 0 12px; border: 0; border-radius: 0; background: transparent; color: inherit; font: inherit; font-size: 16px; -webkit-appearance: none; appearance: none; }
.hm-search__input::placeholder { color: #767676; opacity: 1; }
.hm-search__input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.hm-search__input:focus-visible, .hm-search__btn:focus-visible { outline: 2px solid currentColor; outline-offset: -3px; }
.hm-search__btn { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; flex: none; min-width: 44px; min-height: 44px; margin: 0; padding: 0 16px; border: 0; border-radius: 0; background: transparent; color: inherit; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }

/* 머리글(1100px 넘는 데스크톱 메뉴 줄) — 흰 알약, 글자 칸은 눌러 두면 넓어진다 */
.hdr__actions .hm-search--hdr { background: #fff; color: #000; border-radius: 3.2px; transition: background .2s ease, color .2s ease; }
.hdr__actions .hm-search--hdr .hm-search__input { width: 96px; font-size: 15px; transition: width .2s ease; }
.hdr__actions .hm-search--hdr .hm-search__input:focus { width: 176px; }
.hdr__actions .hm-search--hdr .hm-search__btn { padding: 0 12px 0 0; }
.hdr__actions .hm-search--hdr:hover, .hdr__actions .hm-search--hdr:focus-within { background: #000; color: #fff; }
.hdr__actions .hm-search--hdr:hover .hm-search__input::placeholder, .hdr__actions .hm-search--hdr:focus-within .hm-search__input::placeholder { color: #bebebe; }
@media (max-width: 1100px) { .hdr__actions .hm-search--hdr .hm-search__input { width: 72px; } .hdr__actions .hm-search--hdr .hm-search__input:focus { width: 132px; } }

/* 모바일 메뉴(검은 바탕) 맨 위 */
.hm-search--mnav { margin-top: 16px; background: #fff; color: #000; border-radius: 3.2px; }
.hm-search--mnav .hm-search__input { flex: 1; min-height: 48px; }
.hm-search--mnav .hm-search__btn { min-height: 48px; }
.mnav .hm-search--mnav + ul { margin-top: 16px; }

/* 결과 화면 */
.hm-search-page { padding-top: clamp(150px, 24vw, 208px); min-height: 70dvh; font-family: var(--hm-font-body); }
.hm-search-page .d-m { margin: 0 0 24px; }
.hm-search--page { max-width: 640px; border: 1px solid var(--hm-color-text); border-radius: var(--hm-radius); background: #fff; color: var(--hm-color-text); }
.hm-search--page .hm-search__input { flex: 1; min-height: 52px; padding: 0 16px; }
.hm-search--page .hm-search__btn { min-height: 52px; background: var(--hm-color-primary); color: var(--hm-color-primary-contrast); padding: 0 24px; }
.hm-search-page__status { margin: 20px 0 0; font-size: 16px; line-height: 1.6; color: var(--hm-color-text); overflow-wrap: anywhere; }
.hm-search-page__status:empty { display: none; }
.hm-search-page__empty { max-width: 640px; margin: 20px 0 0; padding: 20px; background: var(--hm-color-bg); border-radius: var(--hm-radius); font-size: 16px; line-height: 1.7; overflow-wrap: anywhere; }
.hm-search-page__empty[hidden] { display: none; }
.hm-search-page__empty p + p { margin-top: 8px; }
.hm-search-page__empty a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; text-underline-offset: 3px; font-weight: 700; }
.hm-search-res { list-style: none; margin: 24px 0 0; padding: 0; max-width: 820px; }
.hm-search-res__item { border-top: 1px solid var(--hm-color-border); }
.hm-search-res__item:last-child { border-bottom: 1px solid var(--hm-color-border); }
.hm-search-res__link { display: block; padding: 20px 0; color: var(--hm-color-text); }
.hm-search-res__title { display: block; font-size: 20px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.hm-search-res__text { display: block; margin-top: 6px; font-size: 16px; line-height: 1.65; overflow-wrap: anywhere; }
.hm-search-res__url { display: block; margin-top: 6px; font-size: 14px; color: #595959; overflow-wrap: anywhere; }
.hm-search-res__link:hover .hm-search-res__title, .hm-search-res__link:focus-visible .hm-search-res__title { text-decoration: underline; text-underline-offset: 4px; }
.hm-search-res mark { background: var(--hm-color-accent); color: #000; padding: 0 .1em; border-radius: 2px; }
@media (max-width: 899px) { .hm-search-page { padding-left: 20px; padding-right: 20px; } }
