/* 여기바방 — 회원 화면. 색은 변수로만 쓴다. 노랑은 '여기' 표시와 가장 중요한 버튼에만. */
:root {
  --ink: #15191f; --ink2: #3a424e; --mute: #6c7683; --line: #e2e6eb; --line2: #eef1f4; --bg: #f5f6f8; --card: #fff;
  --pin: #ffcf1a; --pin-ink: #1c1600; --pin-soft: #fff6cc; --blue: #1d5fd1; --ok: #0f7a55; --ok-soft: #e3f5ec;
  --warn: #a8560a; --warn-soft: #fdf0dc; --bad: #bf3528; --bad-soft: #fde9e6; --gray-soft: #eef0f3;
  --r: 10px; --head: 56px; --font: "Pretendard", -apple-system, "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 15px/1.5 var(--font); color: var(--ink); background: var(--bg); -webkit-text-size-adjust: 100%; word-break: keep-all; overflow-wrap: anywhere; }
#app { min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.3; }
[hidden] { display: none !important; }

/* 로고: 검은 글자 + 노란 '여기' 핀 */
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; letter-spacing: -.02em; color: var(--ink); text-decoration: none !important; white-space: nowrap; }
.logo i { width: 22px; height: 22px; border-radius: 50% 50% 50% 2px; transform: rotate(-45deg); background: var(--pin); box-shadow: inset 0 0 0 6px var(--pin), inset 0 0 0 11px var(--ink); flex: none; }
.logo small { font-weight: 600; font-size: 12px; color: var(--mute); letter-spacing: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); cursor: pointer; font-weight: 600; white-space: nowrap; }
.btn:hover { border-color: #c5ccd5; }
.btn.pri { background: var(--pin); border-color: var(--pin); color: var(--pin-ink); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.sm { min-height: 30px; padding: 0 10px; font-size: 13px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.danger { color: var(--bad); }
.btn:disabled { opacity: .5; cursor: default; }
.in, .sel, textarea.in { width: 100%; min-height: 40px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.in:focus, .sel:focus, textarea.in:focus, .btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
label.f { display: block; margin: 0 0 12px; font-size: 13px; font-weight: 600; color: var(--ink2); }
label.f .in, label.f .sel { margin-top: 5px; font-weight: 400; font-size: 15px; }
label.f small { font-weight: 400; color: var(--mute); }
.hint { font-size: 13px; color: var(--mute); }
.err { color: var(--bad); font-size: 14px; min-height: 20px; margin: 6px 0; }
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 6px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--gray-soft); color: var(--ink2); }
.badge.ok { background: var(--ok-soft); color: var(--ok); } .badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); } .badge.pin { background: var(--pin); color: var(--pin-ink); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.card + .card { margin-top: 14px; }
.card h2 { font-size: 17px; margin-bottom: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--mute); }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 90; font-size: 14px; max-width: 90vw; }

/* 들어오기 전 화면 */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); }
.auth .side { background: var(--ink); color: #fff; padding: 56px 48px; display: flex; flex-direction: column; justify-content: center; gap: 20px; }
.auth .side .logo { color: #fff; font-size: 26px; }
.auth .side h1 { font-size: 30px; letter-spacing: -.02em; }
.auth .side ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; color: #c9d0d9; }
.auth .side li::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--pin); margin-right: 10px; }
.auth .box { padding: 40px 36px; background: var(--card); overflow: auto; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs button { border: 0; background: none; padding: 10px 12px; font-weight: 700; color: var(--mute); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--pin); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }

/* 틀 */
.top { position: sticky; top: 0; z-index: 30; height: var(--head); display: flex; align-items: center; gap: 16px; padding: 0 18px; background: var(--card); border-bottom: 1px solid var(--line); }
.top .search { flex: 1; max-width: 420px; position: relative; }
.top .search .in { padding-left: 36px; background: var(--bg); border-color: transparent; }
.top .search::before { content: ""; position: absolute; left: 12px; top: 12px; width: 12px; height: 12px; border: 2px solid var(--mute); border-radius: 50%; }
.top nav { display: flex; gap: 2px; margin-left: auto; }
.top nav a { padding: 8px 12px; border-radius: 8px; color: var(--ink2); font-weight: 700; text-decoration: none; white-space: nowrap; }
.top nav a.on { background: var(--ink); color: #fff; }
.top .who { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink2); white-space: nowrap; }
.page { max-width: 980px; margin: 0 auto; padding: 22px 18px 60px; }
.page > h1 { font-size: 22px; margin-bottom: 16px; }
.foot { max-width: 980px; margin: 0 auto; padding: 0 18px 40px; font-size: 12px; color: var(--mute); }
.foot a { color: var(--mute); text-decoration: underline; margin-right: 10px; }
.draft { background: var(--warn-soft); color: var(--warn); padding: 8px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; margin-bottom: 10px; }

/* 공실 검색 */
.filters { position: sticky; top: var(--head); z-index: 20; background: var(--card); border-bottom: 1px solid var(--line); padding: 10px 18px; display: grid; gap: 8px; }
.frow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.frow > b { font-size: 13px; color: var(--mute); width: 44px; flex: none; }
.chip { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 0 11px; border: 1px solid var(--line); border-radius: 16px; background: #fff; cursor: pointer; font-size: 14px; white-space: nowrap; user-select: none; }
.chip small { color: var(--mute); font-size: 12px; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; } .chip.on small { color: #aab3bf; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 6px 12px; cursor: pointer; font-weight: 600; font-size: 14px; border-right: 1px solid var(--line); white-space: nowrap; }
.seg button:last-child { border-right: 0; } .seg button.on { background: var(--ink); color: #fff; }
.num { width: 78px; min-height: 32px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; text-align: right; }
.filters .sel { width: auto; min-height: 32px; padding: 4px 8px; }
.more-dongs { max-height: 0; overflow: hidden; } .more-dongs.open { max-height: none; }
.bar { display: flex; align-items: center; gap: 10px; padding: 10px 18px; flex-wrap: wrap; }
.bar .count { font-weight: 800; font-size: 16px; } .bar .count small { font-weight: 500; color: var(--mute); font-size: 13px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; align-items: start; padding: 0 18px 80px; }
.split.open { grid-template-columns: minmax(0, 1fr) 400px; gap: 14px; }
.tablewrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: auto; }
table.rooms { width: 100%; border-collapse: collapse; font-size: 14px; }
table.rooms th { position: sticky; top: 0; background: #fafbfc; text-align: left; font-size: 12px; color: var(--mute); font-weight: 700; padding: 9px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.rooms td { padding: 8px; border-bottom: 1px solid var(--line2); vertical-align: middle; white-space: nowrap; }
table.rooms tr { cursor: pointer; } table.rooms tbody tr:hover { background: #fafbfc; } table.rooms tr.cur { background: var(--pin-soft); }
table.rooms td.addr b { font-weight: 700; } table.rooms td.price { font-weight: 800; font-size: 15px; }
table.rooms td.opts, table.rooms td.note { white-space: normal; max-width: 180px; color: var(--ink2); font-size: 13px; }
table.rooms .sel { min-height: 30px; padding: 2px 6px; width: 96px; font-size: 13px; }
.star { border: 0; background: none; cursor: pointer; font-size: 18px; line-height: 1; color: #c3cad3; padding: 2px; } .star.on { color: #f0b400; }
.tel { font-weight: 700; }
.detail { position: sticky; top: calc(var(--head) + 12px); max-height: calc(100vh - var(--head) - 24px); overflow: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.detail header { position: sticky; top: 0; background: var(--card); padding: 14px 16px 10px; border-bottom: 1px solid var(--line2); display: flex; gap: 8px; align-items: flex-start; z-index: 2; }
.detail header h2 { font-size: 17px; } .detail section { padding: 14px 16px; border-bottom: 1px solid var(--line2); }
.detail section h3 { font-size: 12px; color: var(--mute); margin-bottom: 8px; letter-spacing: .02em; }
.offer { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; } .offer + .offer { margin-top: 8px; }
.offer .p { font-weight: 800; font-size: 18px; } .offer.gone { opacity: .6; }
.kv { display: grid; grid-template-columns: 92px 1fr; gap: 4px 10px; font-size: 14px; } .kv dt { color: var(--mute); } .kv dd { margin: 0; }
.photos { display: flex; gap: 6px; overflow-x: auto; } .photos img { height: 120px; border-radius: 8px; flex: none; background: var(--gray-soft); }
.selbar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 40; background: var(--ink); color: #fff; border-radius: 12px; padding: 8px 10px 8px 16px; display: flex; gap: 8px; align-items: center; box-shadow: 0 6px 24px rgba(0,0,0,.25); max-width: calc(100vw - 20px); }
.selbar .btn { background: #2a313b; border-color: #2a313b; color: #fff; min-height: 34px; } .selbar .btn.pri { background: var(--pin); border-color: var(--pin); color: var(--pin-ink); }
.cards { display: none; } .rc { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; } .rc + .rc { margin-top: 8px; }
.rc .t { font-weight: 700; } .rc .p { font-size: 20px; font-weight: 800; margin: 2px 0; } .rc .m { color: var(--ink2); font-size: 14px; }
.rc .acts { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-top: 10px; } .rc .acts .btn { min-height: 44px; }
.bld { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line2); cursor: pointer; } .bld:hover { background: #fafbfc; }
.bld .n { min-width: 44px; height: 30px; border-radius: 8px; background: var(--pin); color: var(--pin-ink); font-weight: 800; display: grid; place-items: center; }
.empty { padding: 48px 16px; text-align: center; color: var(--mute); }
table.plain { width: 100%; border-collapse: collapse; font-size: 14px; } table.plain th { text-align: left; font-size: 12px; color: var(--mute); padding: 6px 8px; border-bottom: 1px solid var(--line); }
table.plain td { padding: 9px 8px; border-bottom: 1px solid var(--line2); }
.plan { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: flex; align-items: center; gap: 12px; } .plan + .plan { margin-top: 8px; }
.plan .price { font-size: 20px; font-weight: 800; }
.modal { position: fixed; inset: 0; background: rgba(15, 20, 28, .5); z-index: 80; display: grid; place-items: center; padding: 16px; }
.modal > div { background: var(--card); border-radius: 14px; max-width: 640px; width: 100%; max-height: 86vh; overflow: auto; padding: 22px; }
.modal pre { white-space: pre-wrap; font: inherit; margin: 0; }

@media (max-width: 899px) {
  .auth { grid-template-columns: 1fr; } .auth .side { padding: 28px 22px; } .auth .side h1 { font-size: 22px; } .auth .side ul { display: none; } .auth .box { padding: 24px 18px; }
  html, body { overflow-x: hidden; }
  .top { gap: 6px; padding: 0 10px; overflow: hidden; } .top .search, .top > .grow { display: none; } .top .who span, .top .who .btn { display: none; } .logo small { display: none; }
  .top .logo { font-size: 17px; gap: 5px; } .top .logo i { width: 18px; height: 18px; box-shadow: inset 0 0 0 5px var(--pin), inset 0 0 0 9px var(--ink); }
  .top nav { flex: 1; min-width: 0; margin-left: 4px; overflow-x: auto; scrollbar-width: none; } .top nav::-webkit-scrollbar { display: none; }
  .top nav a { padding: 7px 8px; font-size: 14px; }
  .mlogout { display: block !important; }
  .filters { padding: 8px 12px; top: var(--head); } .filters.folded .fold { display: none; } .frow > b { display: none; }
  .frow { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .frow::-webkit-scrollbar { display: none; }
  .msearch { display: flex !important; }
  .bar { padding: 10px 12px; } .split, .split.open { display: block; padding: 0 12px 90px; }
  .tablewrap { display: none; } .cards { display: block; }
  .detail { position: fixed; inset: 0; z-index: 60; max-height: none; border-radius: 0; border: 0; }
  .two { grid-template-columns: 1fr; } .page { padding: 16px 12px 60px; }
  .selbar { bottom: 10px; padding: 6px 8px 6px 12px; font-size: 13px; }
}
.msearch, .mlogout { display: none; }
.detail .row .sel { width: auto; min-width: 120px; }
@media print {
  .top, .filters, .bar .btn, .selbar, .detail, .foot, .star, .noprint { display: none !important; }
  body { background: #fff; font-size: 11px; } .split { padding: 0; display: block; } .tablewrap { display: block !important; border: 0; overflow: visible; } .cards { display: none !important; }
  table.rooms th { position: static; } table.rooms td, table.rooms th { padding: 4px 5px; }
}
