:root{--navy:#1b3a5c;--org:#f28c28;--grn:#2e9e5b;--red:#d64545;--blue:#2563eb;--bg:#f4f6f9;--tx:#1a2433;--mut:#667;--line:#dfe5ec}
*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
html,body{height:100%}
body{font-family:"Noto Sans KR","Malgun Gothic","Apple SD Gothic Neo",sans-serif;background:var(--bg);color:var(--tx);font-size:15px;line-height:1.45}
button{font:inherit;cursor:pointer;border:0;background:none;color:inherit}
input,select{font:inherit;color:inherit}
#app{max-width:520px;margin:0 auto;min-height:100%;background:var(--bg);position:relative}
.boot{padding:40px;text-align:center;color:var(--mut)}
.top{background:var(--navy);color:#fff;padding:calc(10px + env(safe-area-inset-top)) 14px 10px;display:flex;align-items:center;gap:8px;position:sticky;top:0;z-index:20}
.top h1{font-size:17px;flex:1}
.top .sub{font-size:11px;opacity:.8}
.top button{color:#fff;font-size:13px;padding:6px 8px;border-radius:8px;background:rgba(255,255,255,.15)}
.back{font-size:20px!important;padding:2px 10px!important}
.back.home-btn{font-size:15px!important;font-weight:700;white-space:nowrap}
.pad{padding:12px 14px}
.search{background:#fff;padding:8px 14px;position:relative;border-bottom:1px solid var(--line)}
.search input{width:100%;border:1px solid #cfd6de;border-radius:10px;padding:10px 12px}
#sr{position:absolute;left:14px;right:14px;top:52px;background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:0 6px 18px rgba(20,32,46,.18);z-index:15;max-height:55vh;overflow:auto}
#sr .it{padding:10px 12px;border-bottom:1px solid #eef1f4;display:block;width:100%;text-align:left}
#sr .it small{display:block;color:var(--mut);font-size:12px}
.wsr{border:1px solid var(--line);border-radius:10px;margin-top:6px;overflow:hidden;background:#fff}
.wsr .it{padding:10px 12px;border-bottom:1px solid #eef1f4;display:block;width:100%;text-align:left}
.wsr .it:last-child{border-bottom:none}
.fbar{background:#fff;padding:8px 14px 10px;border-bottom:1px solid var(--line)}
.fbar .row{display:flex;justify-content:space-between;align-items:center;font-size:13px}
.fbar b{color:var(--navy)}
.fbtn.on{background:var(--navy);color:#fff}
.fbtn{font-size:12px;padding:5px 10px;border-radius:14px;background:#eef2f7;color:var(--navy);font-weight:700}
.chips{display:grid;gap:0;margin-top:8px;border:1px solid #cfe3d4;border-radius:6px;overflow:hidden}
.chips.d{grid-template-columns:repeat(7,1fr)}.chips.t{grid-template-columns:repeat(6,1fr)}
.chip{padding:9px 0;text-align:center;font-size:12.5px;background:#fff;border:1px solid #e3efe6}
.chip.in{background:#c9ecd0}.chip.on{background:#4f9d4a;color:#fff;font-weight:700}
.hint{font-size:11.5px;color:#1e7a46;margin-top:6px}
.lab{font-size:12.5px;font-weight:700;margin-top:10px}
.map{height:300px;background:#e9eef0;position:relative;overflow:hidden}
.map.fallback{background:#e4eaee linear-gradient(#fff3 1px,transparent 1px) 0 0/100% 25%,linear-gradient(90deg,#fff3 1px,transparent 1px) 0 0/25% 100%}
.mapmsg{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--mut);gap:4px}
.mapmsg.mtop{inset:6px 6px auto 6px;display:block;text-align:center;pointer-events:none}.mapmsg small{font-size:11px}
.pin{position:absolute;transform:translate(-50%,-50%);min-width:30px;height:30px;padding:0 6px;border-radius:15px;color:#fff;font-weight:700;font-size:15px;display:flex;align-items:center;justify-content:center;border:2px solid #fff;box-shadow:0 1px 4px rgba(0,0,0,.35);cursor:pointer}
div.map>.pin,.map .pin{position:absolute}
.pin.g{background:var(--grn)}.pin.o{background:var(--org)}.pin.n{background:#9aa5b1}.pin.sel{outline:3px solid var(--navy)}
.legend{font-size:11px;color:#556;padding:6px 14px;background:#fff;border-bottom:1px solid var(--line)}
.count{padding:10px 14px 2px;font-size:13px}
.tag{display:inline-block;font-size:11px;font-weight:700;padding:2px 7px;border-radius:6px;margin:0 4px 2px 0;white-space:nowrap}
.t-g{background:#e3f4ea;color:#1e7a46}.t-o{background:#fff1de;color:#b86a00}.t-r{background:#fde8e8;color:#c0392b}.t-b{background:#e3edf8;color:var(--navy)}.t-y{background:#eceff3;color:#556}
.card{background:#fff;border-radius:12px;margin:8px 14px 0;padding:11px 12px;box-shadow:0 1px 3px rgba(20,32,46,.12)}
.card h3{font-size:15px}.card .addr{font-size:12px;color:var(--mut)}
.card .rm{border-top:1px solid #eef1f4;margin-top:8px;padding-top:8px;font-size:13.5px}
.memobox{background:#fff8dc;border:1px solid #f0d77a;border-left:5px solid var(--org);border-radius:8px;padding:9px 12px;margin-top:8px;font-size:14.5px;color:#4a3a00}
.memobox b{display:block;font-size:12px;color:#8a6a00;margin-bottom:2px}
.memobox div{white-space:pre-wrap;word-break:break-word;font-weight:500}
.sumv{color:var(--navy);font-weight:800}
.adjh{color:var(--blue);font-weight:700}
.btn{display:block;width:100%;background:var(--navy);color:#fff;font-weight:700;padding:13px;border-radius:12px;text-align:center}
.btn.o{background:#fff;color:var(--navy);border:1px solid var(--navy)}.btn.g{background:#e8f3ec;color:#1e7a46}.btn.r{background:var(--red)}.btn.s{padding:8px;font-size:13px;border-radius:9px}
.btn:disabled{opacity:.5}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.inp{width:100%;background:#fff;border:1px solid #cfd6de;border-radius:10px;padding:11px 12px;margin-top:4px}
.field{margin-top:10px}.field label{font-size:12.5px;font-weight:700;color:#445}
.priv{border:1px solid #f0c9c9;background:#fff}
.priv a{color:var(--red);font-weight:700;text-decoration:none}
.opt{display:grid;gap:10px;padding:12px 0}
.opt.c2{grid-template-columns:1fr 1fr}
.big{background:#fff;border:1px solid #cfd6de;border-radius:12px;padding:18px 0;text-align:center;font-size:15px;font-weight:700}
.big.on{background:var(--navy);color:#fff;border-color:var(--navy)}
.prog{display:flex;gap:4px;align-items:center;padding:12px 14px 0}
.prog i{height:6px;width:10px;border-radius:3px;background:var(--line)}.prog i.on{background:var(--org)}.prog i.cur{width:26px}.prog span{margin-left:auto;font-size:11px;color:var(--mut)}
.foot{position:sticky;bottom:0;background:linear-gradient(transparent,var(--bg) 30%);padding:14px;display:flex;gap:8px}
.foot .btn.o{width:auto;padding:13px 18px;white-space:nowrap;flex:none}
.tel-row{display:flex;gap:6px;align-items:center}.tel-row input{flex:1;min-width:0}
.tel-pick{flex:none;width:42px;height:42px;border-radius:10px;border:1px solid var(--line);background:#fff;font-size:18px;line-height:1}
#modal:empty{display:none}
#modal{position:fixed;inset:0;background:rgba(20,32,46,.5);z-index:50;display:flex;align-items:flex-end;justify-content:center}
.sheet{background:#fff;width:100%;max-width:520px;border-radius:18px 18px 0 0;padding:16px 14px calc(16px + env(safe-area-inset-bottom));max-height:86vh;overflow-y:auto;overscroll-behavior:contain}
.sheet h2{font-size:17px;margin-bottom:6px}.sheet p{font-size:13px;color:var(--mut);margin-bottom:8px}
.sheet .stack{display:grid;gap:8px;margin-top:10px}
.sheet .why{background:#fff;border:1px solid #cfd6de;border-radius:12px;padding:12px;text-align:left;width:100%;font-weight:700}
.sheet .why small{display:block;font-weight:400;color:var(--mut);font-size:12px}
.sheet .why.on{background:var(--navy);color:#fff}.sheet .why.on small{color:#cfe0f2}
#toast{position:fixed;left:50%;bottom:calc(24px + env(safe-area-inset-bottom));transform:translateX(-50%);background:#1a2433;color:#fff;padding:10px 16px;border-radius:20px;font-size:13px;z-index:60;opacity:0;transition:opacity .2s;pointer-events:none;max-width:90%}
#toast.show{opacity:.95}#toast.err{background:var(--red)}
.login{padding:48px 22px}.login h1{font-size:24px;color:var(--navy);margin-bottom:4px}.login p{color:var(--mut);margin-bottom:18px;font-size:13px}
.err{color:var(--red);font-size:13px;margin-top:10px}
.muted{color:var(--mut);font-size:12.5px}
.empty{padding:30px 14px;text-align:center;color:var(--mut)}

/* 사진 */
.strip{display:flex;gap:6px;overflow-x:auto;margin-top:8px;padding-bottom:2px}
.strip.big{flex-wrap:wrap;overflow:visible;margin:12px 0}
.thumb{width:72px;height:72px;object-fit:cover;border-radius:8px;flex:none;background:#eef1f4}
.strip.big .thumb{width:92px;height:92px}
.th{position:relative;display:inline-block}.th .x{position:absolute;top:-6px;right:-6px;width:22px;height:22px;border-radius:50%;background:var(--red);color:#fff;font-weight:700;line-height:22px;padding:0}
.nophoto{margin-top:8px;background:#fde8e8;border:1px dashed #e8a0a0;color:#c0392b;font-weight:700;font-size:12px;text-align:center;padding:8px;border-radius:8px}
.ph-btn{cursor:pointer}
.viewer{position:fixed;inset:0;background:#000;display:flex;flex-direction:column;z-index:60}
.viewer img{flex:1;min-height:0;width:100%;object-fit:contain}
.vbar{display:flex;gap:8px;align-items:center;justify-content:center;padding:12px 12px calc(12px + env(safe-area-inset-bottom));color:#fff}
.vbar button{background:#ffffff22;color:#fff;border-radius:9px;padding:9px 14px;font-weight:700}

/* 임대인 목록 · 길찾기 */
.ll { padding: 8px 0; border-top: 1px solid #eee; margin-top: 6px; }
.ll:first-of-type { border-top: 0; }
.ll-h { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ll-h .lk { margin-left: auto; }
.ll-p { display: flex; align-items: center; gap: 10px; margin-top: 4px; font-size: 16px; }
.ll-m { font-size: 12px; margin-top: 2px; }
.lk { background: none; border: 1px solid #ccd; border-radius: 6px; padding: 3px 9px; font-size: 13px; color: inherit; }
.card.nav a.btn { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.top h1 { white-space: nowrap; }
.top .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.top button { white-space: nowrap; flex-shrink: 0; }
@media (max-width: 420px) { .top > .sub { display: none; } }
ul.xl { margin: 4px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.5; }
ul.xl li { overflow-wrap: anywhere; }
label.btn { display: flex; align-items: center; justify-content: center; cursor: pointer; }

/* ---- 보증금 조절 체크란 (호실 추가·고치기 화면) ---- */
.chk { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; margin-top: 12px; padding: 13px 12px; border: 2px solid #e2b07a; border-radius: 12px; background: #fff8ee; }
.chk .box { flex: none; width: 26px; height: 26px; border: 2px solid #c98a3c; border-radius: 7px; background: #fff; color: #fff; font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.chk .tx b { font-size: 14.5px; color: #8a5312; }
.chk .tx small { display: block; margin-top: 3px; font-size: 12px; line-height: 1.5; color: #7a6450; font-weight: 400; }
.chk.on { border-color: var(--org); background: #ffeed8; }
.chk.on .box { background: var(--org); border-color: var(--org); }
.chk.on .tx b { color: #8a4a00; }

/* ---- 보증금 조절 가능 알림 띠 (목록·방 화면) ---- */
.band { margin-top: 8px; padding: 9px 11px; border-radius: 10px; background: #fff1de; border-left: 6px solid var(--org); font-size: 13px; color: #8a4a00; }
.band b { color: #7a3f00; }
.band div { margin-top: 2px; font-size: 12.5px; line-height: 1.5; }

/* ---- 관리비 포함 항목 ---- */
.inc { margin-top: 8px; font-size: 13px; line-height: 1.9; }
.inc b { font-size: 12px; color: #445; margin-right: 4px; }

/* ---- 호실 카드: 눌러서 방 화면으로 ---- */
.rhead { display: flex; width: 100%; text-align: left; align-items: center; gap: 8px; background: none; font-size: 13.5px; line-height: 1.6; padding: 0; }
.rhead b { font-size: 16px; }
.rhead .go { margin-left: auto; flex: none; font-size: 24px; color: #9aa7b4; }
.rcard { padding-top: 12px; }

/* ---- 방 하나 크게 보기 ---- */
.pgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 8px 14px 0; }
.pgrid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; background: #eef1f4; }
.pgrid img:first-child:nth-last-child(1) { grid-column: 1 / -1; aspect-ratio: 3/2; }
.price { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.price span { background: #f4f7fa; border-radius: 10px; padding: 8px 4px; text-align: center; }
.price small { display: block; font-size: 11px; color: var(--mut); }
.price b { font-size: 18px; color: var(--navy); }
.price .sum { background: var(--navy); }
.price .sum small { color: #c6d6e6; }
.price .sum b { color: #fff; }

/* ---------- 스케줄 (달력) ---------- */
.mysched{background:#fff;margin:8px 14px 0;padding:10px 12px;border-radius:12px;box-shadow:0 1px 3px rgba(20,32,46,.12)}
.mysched .ms-row{display:flex;justify-content:space-between;align-items:center;gap:8px}
.mysched .ms-row .btn{width:auto;padding:8px 12px}
.mysched .ms-sub{font-size:12.5px;color:var(--mut);margin-top:4px}
.ms-staff,.schips{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.schips{padding:8px 14px 0;margin:0}
.ms-staff .chip,.schips .chip{display:inline-flex;align-items:center;gap:4px;padding:6px 11px;border-radius:16px;border:1px solid var(--line);font-size:12.5px;background:#fff}
.schips .chip.on{background:var(--navy);color:#fff;border-color:var(--navy)}
.sdot{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:3px;vertical-align:middle}
.calh{display:flex;justify-content:space-between;align-items:center;padding:10px 14px 6px;gap:8px}
.calh b{font-size:16px}.calh .btn{width:auto;padding:7px 12px}
.cal{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;padding:0 10px 8px}
.cal .wk{text-align:center;font-size:11.5px;color:var(--mut);padding:2px 0;font-weight:700}
.cal .sun{color:var(--red)}.cal .sat{color:var(--blue)}
.cd{background:#fff;border-radius:8px;min-height:54px;padding:4px 2px;display:flex;flex-direction:column;align-items:center;gap:2px;border:1px solid transparent}
.cd.blank{background:transparent}
.cd .dn{font-size:13px;font-weight:700}
.cd.td{border-color:var(--org)}
.cd.on{background:var(--navy);color:#fff}.cd.on.sun,.cd.on.sat{color:#fff}
.cd .dots{display:flex;gap:2px}.cd .dots i{width:6px;height:6px;border-radius:50%;display:block}
.cd .dc{font-size:10.5px;font-weight:700;color:var(--org)}.cd.on .dc{color:#ffd9a8}
.sch-it{display:block;width:calc(100% - 28px);text-align:left}
.sch-it.done{opacity:.55}
.rm.warn,.warn{color:var(--red);font-weight:700;font-size:12.5px}
#modal select.inp{width:100%}
.grid2>*{min-width:0}
.linegrp{margin-top:10px}
.linehd{display:flex;align-items:center;gap:6px;font-size:12.5px;font-weight:700;color:var(--lc);margin-bottom:5px}
.linehd .ldot{width:9px;height:9px;border-radius:50%;background:var(--lc);display:inline-block}
.stchips{display:flex;flex-wrap:wrap;gap:6px}
.stchip{padding:7px 11px;border-radius:14px;border:1.5px solid var(--lc);font-size:12.5px;background:#fff;color:var(--lc);display:inline-flex;align-items:center;gap:4px}
.stchip.on{background:var(--lc);color:#fff}
.stchip .exp{font-size:10px;font-weight:700;padding:1px 4px;border-radius:4px;background:rgba(0,0,0,.12)}
.stchip.on .exp{background:rgba(255,255,255,.3)}
/* 환승역(두 노선 이상 겹치는 역): 테두리를 두 노선 색으로 반반 나눠서 한눈에 알아보게 */
.stchip.multi{border:1.5px solid transparent;border-image:linear-gradient(90deg,var(--lc) 50%,var(--lc2) 50%) 1}
.stchip.multi.on{background:linear-gradient(90deg,var(--lc) 50%,var(--lc2) 50%);border-image:none;border-color:transparent;color:#fff}

.flbox{background:#eef3f9;border:1px solid var(--line);border-radius:8px;padding:8px 10px;margin-top:6px;font-size:14px}
.flbox .tag{margin:2px 2px 0 0}
.rcbox{background:#eaf3ff;border:1px solid #bcd6f5;border-left:5px solid var(--blue);border-radius:8px;padding:8px 12px;margin-top:8px;font-size:14.5px;color:#123b6b}
.rcbox .lk{margin-left:6px}
.qbtns{display:flex;flex-wrap:wrap;gap:6px}
.qbtns .btn{width:auto;padding:6px 12px}
.qbtns .btn.on{background:var(--navy);color:#fff}
a.btn{text-decoration:none}
.focuscard{background:#fff;margin:8px 14px;padding:10px 12px;border-radius:12px;border:2px solid var(--navy);box-shadow:0 4px 14px rgba(20,32,46,.15)}
.focuscard .fc-h{display:flex;justify-content:space-between;align-items:center;font-size:17px}
.focuscard .x{border:0;background:#eef1f5;border-radius:50%;width:30px;height:30px;font-size:20px;line-height:1}
