/* 제로방 앱 홈 시안 (/m/) — 모바일 우선, PC 에서는 가운데 480px 기둥 */
:root {
  --b: #2F6BF6; --b-d: #1F4FD1; --b-l: #EAF1FF;
  --ink: #111827; --text: #4B5563; --muted: #9CA3AF; --line: #EEF0F4; --bg: #F5F6F8;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--ink); background: #E9ECF2; -webkit-font-smoothing: antialiased; word-break: keep-all; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
h1, h2, h3, p { margin: 0; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.mh-app { position: relative; max-width: 480px; min-height: 100vh; margin: 0 auto; background: #fff; box-shadow: 0 0 0 1px rgba(17,24,39,.04), 0 20px 60px -20px rgba(17,24,39,.18); }
.mh-main { padding: 0 16px 120px; }

/* 상단 */
.mh-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 16px; background: rgba(255,255,255,.92); backdrop-filter: saturate(1.6) blur(10px); }
.mh-top img { display: block; height: 28px; width: auto; }
.mh-ic-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: #374151; }
.mh-ic-btn:hover { background: var(--bg); }

/* 1. 검색 */
.mh-search { margin-top: 4px; padding: 18px 16px 16px; border-radius: 20px; background: linear-gradient(135deg, #2F6BF6, #1F4FD1); color: #fff; }
.mh-search h1 { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.mh-search-box { display: flex; align-items: center; gap: 8px; height: 48px; margin-top: 12px; padding: 0 14px; border-radius: 14px; background: #fff; color: var(--muted); }
.mh-search-box input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; font: inherit; font-size: 15px; color: var(--ink); background: none; }
.mh-search-box:focus-within { box-shadow: 0 0 0 3px rgba(255,255,255,.45); }

/* 2. 대표 배너 */
.mh-hero { position: relative; overflow: hidden; margin-top: 14px; padding: 22px 20px 24px; min-height: 176px; border-radius: 20px; background: linear-gradient(160deg, #EEF4FF 0%, #F7F9FF 60%, #FFF8E1 100%); }
.mh-hero-eyebrow { font-size: 13px; font-weight: 600; color: var(--text); }
.mh-hero-eyebrow b { color: var(--b); }
.mh-hero h2 { position: relative; z-index: 1; margin-top: 6px; font-size: 27px; line-height: 1.28; font-weight: 800; letter-spacing: -.035em; }
.mh-hero h2 em { font-style: normal; color: var(--b); }
.mh-hero-sub { position: relative; z-index: 1; margin-top: 10px; font-size: 13px; color: var(--text); }
.mh-hero-art { position: absolute; right: -4px; bottom: -6px; width: 132px; }
.mh-hero-art svg { width: 100%; height: auto; stroke: none; }

/* 3. AI 검색 */
.mh-ai { display: flex; align-items: center; gap: 8px; height: 46px; margin-top: 12px; padding: 0 6px 0 14px; border-radius: 14px; background: #111827; color: #E5E7EB; font-size: 14px; }
.mh-ai > svg { width: 18px; height: 18px; color: #93B4FF; }
.mh-ai span { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mh-ai b { flex: none; padding: 7px 12px; border-radius: 10px; background: var(--b); color: #fff; font-size: 13px; }

/* 4. 방 종류 */
.mh-cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.mh-cats a { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 4px 12px; border-radius: 16px; background: var(--bg); font-size: 13px; font-weight: 600; color: #374151; transition: transform .15s, background .15s; }
.mh-cats a:hover { background: #EDEFF3; }
.mh-cats a:active { transform: scale(.96); }
.mh-cats span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; }
.mh-cats .c1 { background: #E3ECFF; color: #2F6BF6; } .mh-cats .c2 { background: #FFF1D6; color: #E08A00; }
.mh-cats .c3 { background: #DDF6EA; color: #0E9F6E; } .mh-cats .c4 { background: #FCE7F3; color: #DB2777; }

/* 5. 전문 중개사 띠 */
.mh-agent-band { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding: 18px 18px; border-radius: 20px; overflow: hidden; color: #fff; background: radial-gradient(120% 140% at 100% 0%, #5B8CFF 0%, #2F6BF6 45%, #1E3FB8 100%); }
.mh-agent-band::after { content: ""; position: absolute; right: -40px; bottom: -60px; width: 160px; height: 160px; border-radius: 50%; border: 26px solid rgba(255,255,255,.08); }
.mh-agent-band small { display: inline-block; padding: 3px 8px; border-radius: 6px; background: rgba(255,255,255,.18); font-size: 11px; font-weight: 700; }
.mh-agent-band strong { display: block; margin-top: 8px; font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.mh-agent-band p { margin-top: 4px; font-size: 12.5px; color: rgba(255,255,255,.82); }
.mh-pill { display: inline-block; margin-top: 10px; padding: 4px 9px; border-radius: 99px; background: rgba(0,0,0,.18); font-size: 11px; font-weight: 600; }
.mh-faces { position: relative; z-index: 1; display: flex; align-items: center; }
.mh-faces i, .mh-faces b { display: grid; place-items: center; width: 34px; height: 34px; margin-left: -10px; border-radius: 50%; border: 2px solid #fff; font-style: normal; font-size: 12px; font-weight: 800; }
.mh-faces i:nth-child(1) { background: #DCE7FF; color: #1E3FB8; } .mh-faces i:nth-child(2) { background: #FFE4C7; color: #9A4B00; }
.mh-faces i:nth-child(3) { background: #D7F5E7; color: #08734F; } .mh-faces b { background: #111827; color: #fff; font-size: 11px; }

/* 6. 내 방 내놓기 */
.mh-list-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; padding: 16px 18px; border: 1.5px solid #DCE6FF; border-radius: 18px; background: #fff; }
.mh-list-card small { font-size: 12px; font-weight: 700; color: var(--b); }
.mh-list-card strong { display: block; margin-top: 2px; font-size: 17px; font-weight: 800; }
.mh-list-card p { margin-top: 4px; font-size: 12.5px; color: var(--text); }
.mh-list-card p b { color: var(--ink); }
.mh-key { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: #FFF4D1; color: #C77700; }

/* 공통 섹션 */
.mh-sec { margin-top: 30px; }
.mh-sec-h { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 12px; }
.mh-sec-h h3 { font-size: 20px; line-height: 1.32; font-weight: 800; letter-spacing: -.03em; }
.mh-sec-h small { display: block; margin-bottom: 2px; font-size: 12px; font-weight: 700; color: var(--b); }
.mh-sec-h > svg { color: var(--muted); }

/* 7. 중개사 목록 */
.mh-agents { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.mh-agents li { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border: 1px solid var(--line); border-radius: 16px; }
.mh-agents li > div { flex: 1; min-width: 0; }
.mh-agents b { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.mh-agents em { padding: 1px 6px; border-radius: 5px; background: var(--b-l); color: var(--b); font-style: normal; font-size: 11px; font-weight: 700; }
.mh-agents small { display: block; margin-top: 2px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; color: var(--muted); }
.mh-agents button { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--b); }
.mh-agents button:hover { background: var(--b-l); }
.mh-agents button svg { width: 19px; height: 19px; }
.mh-av { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font-weight: 800; font-size: 16px; }
.mh-av.a1 { background: #DCE7FF; color: #1E3FB8; } .mh-av.a2 { background: #FFE4C7; color: #9A4B00; }

/* 8. 제휴업체 */
.mh-life { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 16px 18px; border-radius: 18px; background: #F1F5FF; }
.mh-life small { font-size: 12px; font-weight: 600; color: var(--b); }
.mh-life strong { display: block; margin-top: 3px; font-size: 16px; font-weight: 800; }
.mh-life > span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: #fff; color: #0E9F6E; }

/* 9. 인기 방 */
.mh-rooms { display: flex; gap: 10px; margin: 0 -16px; padding: 0 16px 4px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px; scrollbar-width: none; }
.mh-rooms::-webkit-scrollbar { display: none; }
.mh-room { flex: 0 0 158px; min-width: 0; scroll-snap-align: start; }
.mh-room-ph { position: relative; aspect-ratio: 1 / 1; border-radius: 14px; overflow: hidden; background: var(--bg); }
.mh-room-ph img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.mh-room:hover .mh-room-ph img { transform: scale(1.04); }
.mh-room-ph .rk { position: absolute; left: 8px; top: 8px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 7px; background: rgba(17,24,39,.78); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.mh-room-ph .vf { position: absolute; left: 8px; bottom: 8px; padding: 3px 7px; border-radius: 6px; background: #fff; color: var(--b); font-size: 11px; font-weight: 700; }
.mh-room b { display: block; margin-top: 8px; font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.mh-room small { display: block; margin-top: 2px; font-size: 12px; color: var(--text); }
.mh-room p { margin-top: 3px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; color: var(--muted); }

/* 10. 신뢰 */
.mh-trust { display: flex; align-items: center; gap: 12px; margin-top: 26px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; }
.mh-trust > span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #FDECEC; color: #E5484D; }
.mh-trust div { flex: 1; }
.mh-trust small { font-size: 12px; color: var(--muted); font-weight: 600; }
.mh-trust strong { display: block; font-size: 16px; font-weight: 800; }
.mh-trust strong b { color: #E5484D; }
.mh-trust .arr { color: var(--muted); }

/* 푸터 */
.mh-foot { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 11.5px; line-height: 1.6; color: var(--muted); }
.mh-foot nav { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 8px; color: var(--text); }
.mh-foot nav b { color: var(--ink); }
.mh-note { margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: var(--bg); }

/* 하단 탭 */
.mh-tab { position: fixed; left: 50%; bottom: 0; z-index: 30; transform: translateX(-50%); width: 100%; max-width: 480px; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; height: calc(64px + env(safe-area-inset-bottom)); padding: 0 6px env(safe-area-inset-bottom); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
.mh-tab a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 0 10px; font-size: 11px; font-weight: 600; color: #6B7280; }
.mh-tab a:hover { color: var(--ink); }
.mh-tab .mh-home { align-self: start; justify-self: center; width: 54px; height: 54px; margin-top: -18px; padding: 0; justify-content: center; border-radius: 50%; background: var(--b); color: #fff; box-shadow: 0 10px 24px -6px rgba(47,107,246,.6); border: 4px solid #fff; }
.mh-tab .mh-home svg { width: 24px; height: 24px; }

/* 안내 토스트 */
.mh-toast { position: fixed; left: 50%; bottom: 96px; z-index: 40; transform: translate(-50%, 10px); padding: 10px 16px; border-radius: 99px; background: rgba(17,24,39,.9); color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.mh-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

a:focus-visible, button:focus-visible { outline: 2px solid var(--b); outline-offset: 2px; border-radius: 10px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media (max-width: 360px) { .mh-hero h2 { font-size: 24px; } .mh-hero-art { width: 120px; } .mh-cats a { font-size: 12px; } }
/* 방 종류 6칸 (아파트·분양 추가) */
.mh-cats { grid-template-columns: repeat(3, 1fr); }
.mh-cats .c5 { background: #E6EEFF; color: #1F4FD1; } .mh-cats .c6 { background: #FFEDE1; color: #E8590C; }
