:root {
  --ink: #11135C;          /* 딸깍 네이비 (홈페이지와 같은 톤) */
  --text: #172033;
  --ink-2: #3a4152;
  --muted: #6b7385;
  --line: #E3EAF7;
  --bg: #F5F6FB;
  --card: #ffffff;
  --brand: #2D2AE0;        /* 주 버튼 파랑 */
  --brand-ink: #ffffff;
  --brand-soft: #EEEDFF;
  --accent: #5CC8FF;       /* 포인트 노랑 */
  --yellow-soft: #fff4dc;
  --blue: #2D2AE0;
  --blue-soft: #e8f0ff;
  --green: #16a067;
  --green-soft: #e3f6ee;
  --red: #e0453a;
  --red-soft: #fdeceb;
  --gray-soft: #eef0f3;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 24, 35, .06), 0 4px 14px rgba(20, 24, 35, .05);
  --nav-h: 62px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.3; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- 스플래시 / 로그인 ---------- */
.splash { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 10px; color: var(--muted); }
.splash img { width: 72px; height: 72px; border-radius: 18px; }
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--ink); }
.auth-card { width: 100%; max-width: 380px; background: var(--card); border-radius: 20px; padding: 28px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.auth-card .logo { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.auth-card .logo img { width: 48px; height: 48px; border-radius: 12px; }
.auth-card .logo b { font-size: 19px; display: block; }
.auth-card .logo span { color: var(--muted); font-size: 13px; }
.auth-switch { margin-top: 14px; text-align: center; color: var(--muted); font-size: 14px; }
.auth-switch a { color: var(--blue); font-weight: 600; }

/* ---------- 앱 레이아웃 ---------- */
.shell { min-height: 100vh; padding-bottom: calc(var(--nav-h) + var(--safe-b)); }
.topbar {
  position: sticky; top: 0; z-index: 20; background: var(--ink); color: #fff;
  display: flex; align-items: center; gap: 10px; padding: 0 12px 0 16px; height: 54px;
  padding-top: env(safe-area-inset-top, 0px); box-sizing: content-box;
}
.topbar .back { background: none; border: 0; color: #fff; font-size: 22px; padding: 4px 8px 4px 0; cursor: pointer; }
.topbar h1 { font-size: 17px; font-weight: 700; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .brand { display: flex; align-items: center; gap: 8px; }
.topbar .brand img { width: 28px; height: 28px; border-radius: 7px; }
.icon-btn { position: relative; background: none; border: 0; color: #fff; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { background: rgba(255,255,255,.08); }
.icon-btn svg { width: 22px; height: 22px; }
.dot { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }

.content { max-width: 880px; margin: 0 auto; padding: 16px; }
.content.wide { max-width: 1100px; }

.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line);
  display: flex; height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
}
.bottomnav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 11.5px; font-weight: 600; position: relative; }
.bottomnav a svg { width: 23px; height: 23px; }
.bottomnav a.on { color: var(--ink); }
.bottomnav a.on svg { color: var(--ink); }
.bottomnav a .dot { top: 6px; right: calc(50% - 22px); }

@media (min-width: 960px) {
  .shell { padding-bottom: 0; padding-left: 220px; }
  .bottomnav { top: 0; bottom: 0; right: auto; width: 220px; height: auto; flex-direction: column; justify-content: flex-start; padding: 70px 10px 10px; border-top: 0; border-right: 1px solid var(--line); gap: 2px; }
  .bottomnav a { flex: 0 0 auto; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 11px 14px; border-radius: 10px; font-size: 14.5px; }
  .bottomnav a.on { background: var(--gray-soft); }
  .bottomnav a .dot { position: static; margin-left: auto; }
  .shell .bottomnav a.nav-desktop-only { display: flex; }
  .topbar { margin-left: -220px; padding-left: 236px; }
}
.bottomnav a.nav-desktop-only { display: none; }
.dot[hidden] { display: none !important; }

/* ---------- 공통 요소 ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 12px; }
.card h2 { font-size: 16px; margin-bottom: 12px; }
.card h3 { font-size: 14px; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 18px 2px 10px; }
.section-title h2 { font-size: 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.right { text-align: right; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 10px; }
.hr { height: 1px; background: var(--line); margin: 12px 0; }
.empty { text-align: center; color: var(--muted); padding: 36px 10px; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 11px;
  padding: 11px 16px; font-weight: 700; font-size: 15px; cursor: pointer; background: var(--gray-soft); color: var(--ink);
  min-height: 44px; transition: filter .15s, transform .05s; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:hover { filter: brightness(.97); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--brand); color: var(--brand-ink); }
.btn.dark { background: var(--ink); color: #fff; }
.btn.blue { background: var(--blue); color: #fff; }
.btn.green { background: var(--green); color: #fff; }
.btn.red { background: var(--red-soft); color: var(--red); }
.btn.ghost { background: transparent; border: 1px solid var(--line); }
.btn.sm { min-height: 34px; padding: 6px 11px; font-size: 13.5px; border-radius: 9px; }
.btn.block { width: 100%; }
.btn svg { width: 18px; height: 18px; }

label.f, div.f { display: block; margin-bottom: 12px; }
label.f > span, div.f > span { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.input, select.input, textarea.input {
  width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 11px 12px; min-height: 44px; outline: none;
}
.input:focus { border-color: var(--ink-2); box-shadow: 0 0 0 3px rgba(28,33,46,.08); }
textarea.input { min-height: 80px; resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 520px) { .grid2.collapse { grid-template-columns: 1fr; } }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.err { color: var(--red); font-size: 13.5px; margin: 6px 0; min-height: 1em; }

.chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 13px; font-size: 13.5px; font-weight: 600; cursor: pointer; color: var(--ink-2); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip .n { margin-left: 4px; opacity: .7; }

.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.st-received  { background: var(--gray-soft); color: var(--ink-2); }
.st-assigned  { background: var(--yellow-soft); color: #9a6200; }
.st-accepted  { background: var(--blue-soft); color: var(--blue); }
.st-visiting  { background: var(--blue); color: #fff; }
.st-completed { background: #fff0e6; color: #c25a00; }
.st-paid      { background: var(--green-soft); color: var(--green); }
.st-canceled  { background: var(--red-soft); color: var(--red); }
.role-owner { background: var(--ink); color: #fff; }
.role-manager { background: var(--blue-soft); color: var(--blue); }
.role-tech { background: var(--gray-soft); color: var(--ink-2); }

/* ---------- 오더 ---------- */
.search { position: relative; margin-bottom: 10px; }
.search input { padding-left: 38px; }
.search svg { position: absolute; left: 12px; top: 13px; width: 18px; height: 18px; color: var(--muted); }
.olist { display: grid; gap: 10px; }
.oitem { display: block; background: #fff; border-radius: var(--radius); padding: 14px 15px; box-shadow: var(--shadow); border-left: 4px solid transparent; }
.oitem.urgent { border-left-color: var(--brand); }
.oitem .top { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.oitem .name { font-weight: 700; font-size: 16px; }
.oitem .type { font-size: 13px; color: var(--muted); }
.oitem .addr { color: var(--ink-2); font-size: 14px; }
.oitem .meta { display: flex; gap: 10px; font-size: 12.5px; color: var(--muted); margin-top: 6px; flex-wrap: wrap; }

.contact-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 4px; }
.contact-bar a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border-radius: 12px; font-weight: 700; font-size: 13.5px; }
.contact-bar a svg { width: 22px; height: 22px; }
.contact-bar .call { background: var(--green); color: #fff; }
.contact-bar .sms { background: var(--blue); color: #fff; }
.contact-bar .map { background: var(--gray-soft); color: var(--ink); }

.kv { display: grid; grid-template-columns: 84px 1fr; gap: 7px 10px; font-size: 14.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-all; }

.timeline { display: flex; gap: 0; margin: 4px 0 2px; }
.timeline .s { flex: 1; text-align: center; font-size: 11.5px; color: var(--muted); position: relative; padding-top: 16px; }
.timeline .s::before { content: ""; position: absolute; top: 4px; left: 50%; width: 10px; height: 10px; border-radius: 50%; background: var(--line); transform: translateX(-50%); z-index: 1; }
.timeline .s::after { content: ""; position: absolute; top: 8px; left: -50%; width: 100%; height: 2px; background: var(--line); }
.timeline .s:first-child::after { display: none; }
.timeline .s.done { color: var(--ink); font-weight: 600; }
.timeline .s.done::before, .timeline .s.done::after { background: var(--brand); }

.items-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.items-table td, .items-table th { padding: 8px 4px; border-bottom: 1px solid var(--line); text-align: left; }
.items-table th { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.item-row { display: grid; grid-template-columns: 1fr 70px 36px; gap: 6px; margin-bottom: 8px; align-items: center; }
.qty { text-align: center; }
.x-btn { border: 0; background: var(--gray-soft); border-radius: 9px; height: 44px; cursor: pointer; font-size: 18px; color: var(--muted); }

.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
.photos .ph { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--gray-soft); }
.photos .ph img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.photos .ph button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; }
.photo-add { aspect-ratio: 1; border: 2px dashed var(--line); border-radius: 10px; display: grid; place-content: center; justify-items: center; color: var(--muted); cursor: pointer; font-size: 12.5px; gap: 2px; background: #fff; }
.photo-add svg { width: 24px; height: 24px; }

.sum-box { background: var(--ink); color: #fff; border-radius: 12px; padding: 14px 16px; margin: 12px 0; }
.sum-box .r { display: flex; justify-content: space-between; font-size: 14px; padding: 2px 0; color: #c9cdd6; }
.sum-box .r b { color: #fff; }
.sum-box .r.big { font-size: 17px; color: #fff; margin-top: 6px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.15); }
.sum-box .r.big b { color: var(--accent); }

.sticky-actions { position: sticky; bottom: calc(var(--nav-h) + var(--safe-b) + 8px); display: flex; gap: 8px; margin-top: 14px; z-index: 5; }
.sticky-actions .btn { flex: 1; box-shadow: 0 6px 18px rgba(20,24,35,.18); }
@media (min-width: 960px) { .sticky-actions { bottom: 16px; } }

/* ---------- 표 ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -16px; padding: 0 16px; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
table.t th, table.t td { padding: 10px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
table.t th { font-size: 12.5px; color: var(--muted); font-weight: 600; background: #fafbfc; }
table.t td.n, table.t th.n { text-align: right; font-variant-numeric: tabular-nums; }
table.t tr.total td { font-weight: 700; background: #fafbfc; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 12px; }
.stat { background: #fff; border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.stat .l { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stat .v { font-size: 21px; font-weight: 800; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat.hl { background: var(--ink); color: #fff; }
.stat.hl .l { color: #b8bdc8; }
.stat.hl .v { color: var(--accent); }

.list { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 12px; }
.list .li { display: flex; align-items: center; gap: 12px; padding: 13px 15px; border-bottom: 1px solid var(--line); cursor: pointer; }
.list .li:last-child { border-bottom: 0; }
.list .li .ic { width: 36px; height: 36px; border-radius: 10px; background: var(--gray-soft); display: grid; place-items: center; flex: 0 0 auto; }
.list .li .ic svg { width: 19px; height: 19px; }
.list .li .chev { color: var(--muted); }
.list .li.unread { background: #fffaf0; }

.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--ink-2); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13.5px; flex: 0 0 auto; }

/* ---------- 단체방 ---------- */
.chat-page { display: flex; flex-direction: column; height: calc(100vh - 54px - var(--nav-h) - var(--safe-b) - env(safe-area-inset-top, 0px)); height: calc(100dvh - 54px - var(--nav-h) - var(--safe-b) - env(safe-area-inset-top, 0px)); }
@media (min-width: 960px) { .chat-page { height: calc(100dvh - 54px); } }
.notice-bar { display: flex; gap: 8px; align-items: flex-start; background: var(--yellow-soft); padding: 10px 14px; font-size: 14px; border-bottom: 1px solid #f3e1b5; cursor: pointer; }
.notice-bar svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 1px; color: #9a6200; }
.notice-bar .t { flex: 1; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.msgs { flex: 1; overflow-y: auto; padding: 14px 12px; background: #e9ecf1; }
.day-sep { text-align: center; margin: 12px 0; }
.day-sep span { background: rgba(0,0,0,.08); color: var(--ink-2); font-size: 12px; padding: 3px 10px; border-radius: 999px; }
.msg { display: flex; gap: 8px; margin-bottom: 10px; align-items: flex-start; }
.msg.me { flex-direction: row-reverse; }
.msg .body { max-width: 76%; }
.msg .who { font-size: 12.5px; color: var(--ink-2); margin-bottom: 3px; font-weight: 600; }
.msg.me .who { display: none; }
.msg .line { display: flex; align-items: flex-end; gap: 5px; }
.msg.me .line { flex-direction: row-reverse; }
.bubble { background: #fff; border-radius: 4px 14px 14px 14px; padding: 8px 11px; word-break: break-word; font-size: 14.5px; position: relative; }
.msg.me .bubble { background: #D6E2FF; border-radius: 14px 4px 14px 14px; }
.bubble .txt { white-space: pre-wrap; }
.bubble img { border-radius: 8px; max-height: 260px; margin: 2px 0; cursor: zoom-in; }
.bubble .quote { border-left: 3px solid rgba(0,0,0,.2); padding: 2px 8px; margin-bottom: 6px; font-size: 12.5px; color: rgba(0,0,0,.6); max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bubble .mention { color: var(--blue); font-weight: 700; }
.msg.me .bubble .mention { color: #7a4a00; }
.bubble.deleted { color: var(--muted); font-style: italic; }
.msg .side { display: flex; flex-direction: column; align-items: flex-start; font-size: 11px; color: var(--muted); white-space: nowrap; }
.msg.me .side { align-items: flex-end; }
.msg .side .unread { color: #c98a00; font-weight: 700; }
.msg .tools { display: none; gap: 4px; margin-top: 3px; }
.msg.show-tools .tools { display: flex; }
.msg .tools button { border: 0; background: rgba(255,255,255,.9); border-radius: 7px; font-size: 12px; padding: 3px 8px; cursor: pointer; }
.msg.me .tools { justify-content: flex-end; }
.pinned-mark { font-size: 11px; color: #9a6200; font-weight: 700; }
.composer { background: #fff; border-top: 1px solid var(--line); padding: 8px; }
.composer .reply-preview { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding: 4px 6px 8px; }
.composer .reply-preview b { color: var(--ink); }
.composer .reply-preview button { margin-left: auto; border: 0; background: none; font-size: 18px; cursor: pointer; color: var(--muted); }
.composer form { display: flex; gap: 6px; align-items: flex-end; }
.composer textarea { flex: 1; resize: none; min-height: 42px; max-height: 120px; border: 1px solid var(--line); border-radius: 21px; padding: 10px 14px; outline: none; }
.composer .attach, .composer .send { width: 42px; height: 42px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; flex: 0 0 auto; }
.composer .attach { background: var(--gray-soft); }
.composer .send { background: var(--ink); color: #fff; }
.composer svg { width: 20px; height: 20px; }
.mention-pop { position: absolute; bottom: 100%; left: 8px; right: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); max-height: 200px; overflow-y: auto; }
.mention-pop div { padding: 10px 14px; cursor: pointer; }
.mention-pop div:hover, .mention-pop div.on { background: var(--gray-soft); }

/* ---------- 모달 / 토스트 ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(15,18,26,.5); z-index: 100; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
@media (min-width: 640px) { .modal-bg { align-items: center; } }
.modal { background: #fff; width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto; border-radius: 20px 20px 0 0; padding: 20px 18px calc(18px + var(--safe-b)); animation: up .2s ease-out; }
@media (min-width: 640px) { .modal { border-radius: 18px; } }
.modal h2 { font-size: 18px; margin-bottom: 14px; }
.modal .actions { display: flex; gap: 8px; margin-top: 16px; }
.modal .actions .btn { flex: 1; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 120; display: grid; place-items: center; cursor: zoom-out; }
.lightbox img { max-width: 96vw; max-height: 92vh; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(30px); opacity: .5; } }

#toast-wrap { position: fixed; left: 50%; transform: translateX(-50%); top: calc(64px + env(safe-area-inset-top, 0px)); z-index: 200; display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 12px 15px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.25); font-size: 14px; pointer-events: auto; animation: up .2s; cursor: pointer; }
.toast b { display: block; color: var(--accent); }
.toast.err { background: var(--red); }
.toast.err b { color: #fff; }

#update-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + var(--safe-b) + 12px); z-index: 150; background: var(--blue); color: #fff; padding: 9px 9px 9px 16px; border-radius: 999px; display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; box-shadow: 0 8px 24px rgba(47,111,237,.35); }
#update-bar button { border: 0; background: #fff; color: var(--blue); border-radius: 999px; padding: 6px 13px; font-weight: 700; cursor: pointer; }
#update-bar[hidden] { display: none; }

.banner { border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-bottom: 12px; display: flex; gap: 10px; align-items: center; }
.banner.info { background: var(--blue-soft); color: #1d4fb8; }
.banner.warn { background: var(--yellow-soft); color: #7a4a00; }
.banner .btn { margin-left: auto; }

.file-row { display: flex; align-items: center; gap: 12px; padding: 12px 15px; border-bottom: 1px solid var(--line); }
.file-row:last-child { border-bottom: 0; }
.file-row .ic { width: 38px; height: 38px; border-radius: 9px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; font-size: 11px; font-weight: 800; flex: 0 0 auto; }

/* 원가표 제품 사진 */
.pthumb { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; background: var(--gray-soft); cursor: zoom-in; }
.empty-thumb { display: grid; place-items: center; color: var(--muted); cursor: default; }
.empty-thumb svg { width: 20px; height: 20px; }
.pimg-box { width: 92px; height: 92px; border-radius: 12px; background: var(--gray-soft); display: grid; place-items: center; overflow: hidden; color: var(--muted); flex: 0 0 auto; }
.pimg-box img { width: 100%; height: 100%; object-fit: cover; }
.pimg-box svg { width: 28px; height: 28px; }

/* 일정 · 미수 · 출장비 */
.badge.trip { background: #f1e8ff; color: #6d28d9; margin-right: 2px; }
.oitem .meta .when { color: var(--blue); font-weight: 700; }
.oitem .meta .late, .late { color: #b45309; font-weight: 700; }
.late-pill { font-size: 12.5px; font-weight: 700; color: #b45309; background: var(--yellow-soft); padding: 4px 9px; border-radius: 999px; }
.sitem { display: flex; gap: 12px; padding: 12px 15px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.sitem:last-child { border-bottom: 0; }
.sitem .t { width: 48px; flex: 0 0 auto; font-weight: 800; font-size: 15.5px; padding-top: 1px; }
.sitem.clash { background: #fff8ec; }
.sitem.done { opacity: .55; }
.bottomnav a span { white-space: nowrap; }

/* 결제 방법 */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--gray-soft); padding: 4px; border-radius: 12px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; text-align: center; padding: 10px; border-radius: 9px; font-weight: 700; color: var(--muted); cursor: pointer; }
.seg input:checked + span { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.badge.cash { background: var(--green-soft); color: var(--green); }

/* 현장 현금 고객 서명 */
.sign-amount { background: #111; color: #fff; border-radius: 14px; padding: 14px 16px; text-align: center; }
.sign-amount .v { font-size: 38px; font-weight: 800; letter-spacing: -.5px; margin: 2px 0; color: #ffd84d; }
.sign-amount .small { opacity: .85; }
.sign-wrap { position: relative; border: 2px dashed #c9ced6; border-radius: 14px; background: #fff; height: 220px; }
.sign-wrap canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
.sign-ph { position: absolute; inset: 0; display: grid; place-items: center; color: #b3b9c2; font-size: 18px; pointer-events: none; }
.sign-thumb { max-width: 220px; width: 100%; border: 1px solid var(--line, #e5e7eb); border-radius: 8px; cursor: zoom-in; background: #fff; }
@media (orientation: landscape) and (max-height: 520px) { .sign-wrap { height: 160px; } .sign-amount .v { font-size: 30px; } }

/* 고객 이력 */
.badge.revisit { background: #e0f2fe; color: #0369a1; margin-right: 2px; }
.hist .hn { font-size: 14px; color: var(--ink-3, #6b7280); font-weight: 600; margin-left: 4px; }
.hitem { border-top: 1px solid var(--line, #eceef1); padding: 10px 0; display: grid; gap: 3px; }
.hitem:first-of-type { border-top: 0; }
.hitem .top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: inherit; text-decoration: none; }
.hitem .top .d { font-weight: 700; font-variant-numeric: tabular-nums; }
.hitem .top .w { font-weight: 600; }
.hitem .top .grow { flex: 1; }
.hitem .note { white-space: pre-wrap; color: var(--ink-2, #374151); }
.hphotos { display: flex; gap: 6px; overflow-x: auto; margin-top: 4px; }
.hphotos img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: #eef0f3; flex: none; cursor: zoom-in; }
.revisit-box { background: #eff8ff; border: 1px solid #bae0fd; border-radius: 12px; padding: 10px 12px; margin: -4px 0 14px; display: grid; gap: 4px; }
.revisit-box b { color: #075985; }

/* 출발 알림 · 체크리스트 */
button.photo-add { font: inherit; font-size: 12.5px; }
.meta .when.go { color: var(--green); font-weight: 700; }
.msg-preview { white-space: pre-wrap; background: #f4f6f9; border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.55; }
.checklist { display: grid; gap: 8px; }
.checklist .ck { display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; border: 1.5px solid var(--line, #e5e7eb); border-radius: 12px; cursor: pointer; font-size: 15px; line-height: 1.4; background: #fff; }
.checklist .ck input { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--green, #16a34a); }
.checklist .ck:has(input:checked) { border-color: var(--green, #16a34a); background: #f0fdf4; }
.checklist .ck.need:not(:has(input:checked)) { border-color: var(--red, #dc2626); background: #fef2f2; }
.ck-done { margin: 4px 0 10px; font-size: 14px; }
.ck-done summary { cursor: pointer; color: var(--green, #16a34a); font-weight: 700; display: flex; align-items: center; gap: 6px; }
.ck-done summary svg { width: 16px; height: 16px; }
.ck-done ul { margin: 8px 0 0; padding-left: 4px; list-style: none; display: grid; gap: 4px; }
.ck-done li.no { color: var(--red, #dc2626); }
#eta.seg { grid-template-columns: repeat(5, 1fr); display: grid; }

/* 휴무 · 자재·재고 */
.badge.off { background: #fee2e2; color: #b91c1c; font-size: 12px; vertical-align: middle; }
.banner.off-banner { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; font-size: 14px; }
.list.stock .sq { min-width: 40px; text-align: right; font-size: 18px; margin-right: 6px; }
.list.stock .sq.low { color: #b45309; }
.list.stock .sq.neg { color: var(--red, #dc2626); }
.li.req .col-btns { display: flex; flex-direction: column; gap: 6px; }
.badge.rq-requested { background: #fff4dc; color: #b45309; }
.badge.rq-done { background: var(--green-soft, #dcfce7); color: var(--green, #16a34a); }
.badge.rq-rejected { background: #f1f2f4; color: #6b7280; }

/* 바로 촬영 */
.photo-add.cam { border-style: solid; border-color: var(--brand, #f5b301); color: var(--ink, #111); background: #EEF3FF; font-weight: 700; }
.photo-add.busy { cursor: default; }
.photo-add .spin { width: 22px; height: 22px; border: 3px solid #e5e7eb; border-top-color: var(--brand, #f5b301); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.list.stock .sq.zero { color: #b3b9c2; }

/* ---------- 홈 대시보드 · 오늘 (2026-11) ---------- */
.hello { display: flex; align-items: center; gap: 12px; background: var(--ink); color: #fff; border-radius: 18px; padding: 14px 16px; margin-bottom: 12px; position: relative; overflow: hidden; }
.hello::after { content: ""; position: absolute; right: -30px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, rgba(92,200,255,.35), transparent 70%); }
.hello > div { flex: 1; position: relative; z-index: 1; }
.hello .small { color: #B4C3DE; }
.hello b { font-size: 16.5px; }
.hello .char { width: 46px; height: 46px; border-radius: 50%; object-fit: contain; flex: none; position: relative; z-index: 1; }
.hello .btn { position: relative; z-index: 1; }
.dgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
@media (max-width: 420px) { .dgrid:not(.three) { grid-template-columns: repeat(2, 1fr); } }
.dtile { background: #fff; border-radius: 14px; padding: 12px 13px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; border-top: 3px solid transparent; min-width: 0; }
.dtile .l { font-size: 13px; color: var(--muted); font-weight: 700; }
.dtile .v { font-size: 26px; font-weight: 800; line-height: 1.15; color: var(--ink); }
.dtile .s { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dtile.red { border-top-color: var(--red); } .dtile.red .v { color: var(--red); }
.dtile.blue { border-top-color: var(--brand); } .dtile.blue .v { color: var(--brand); }
.dtile.warn { border-top-color: var(--accent); } .dtile.warn .v { color: #b45309; }
.dtile.zero .v { color: #9aa6bd; }
.dnew { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.pill-link { display: flex; align-items: center; gap: 8px; background: var(--brand-soft); color: var(--ink); border-radius: 12px; padding: 11px 14px; font-size: 14.5px; }
.pill-link svg { width: 18px; height: 18px; color: var(--brand); flex: none; }
.pill-link.y { background: var(--yellow-soft); } .pill-link.y svg { color: #b45309; }
.list.tl .time { width: 52px; font-weight: 800; color: var(--ink); font-size: 15px; flex: none; }
.badge.go { background: #dcfce7; color: #15803d; }
.nowcard { background: #fff; border-radius: 18px; padding: 16px; box-shadow: 0 6px 24px rgba(17,19,92,.12); border: 2px solid var(--brand); margin-bottom: 14px; }
.nowcard > .small:first-child { color: var(--brand); font-weight: 800; }
.nowcard .who { display: block; font-size: 19px; margin-top: 2px; color: var(--ink); }
.nowcard .addr { color: var(--text); margin: 2px 0; }
.nowcard .small { color: var(--muted); }
.nowcard .row .btn { flex: 1; }
.btn.big { min-height: 58px; font-size: 18px; margin-top: 12px; border-radius: 14px; }
.badge.src-web { background: var(--brand-soft); color: var(--brand); margin-right: 2px; }
.badge.src-naver { background: #dcfce7; color: #15803d; margin-right: 2px; }
.badge.src-referral, .badge.src-b2b, .badge.src-etc { background: #f1f5f9; color: #475569; margin-right: 2px; }
.badge.pst-new { background: #fee2e2; color: #b91c1c; }
.badge.pst-contacted { background: var(--brand-soft); color: var(--brand); }
.badge.pst-quoted { background: var(--yellow-soft); color: #b45309; }
.badge.pst-won { background: #dcfce7; color: #15803d; }
.badge.pst-hold { background: #f1f5f9; color: #64748b; }
.photos .ph button.pub { top: auto; bottom: 4px; left: 4px; right: 4px; width: auto; height: 26px; border-radius: 8px; font-size: 11.5px; font-weight: 700; background: rgba(17,19,92,.78); }
.photos .ph button.pub.on { background: var(--accent); color: var(--ink); }
.auth-card .logo img.char { border-radius: 50%; object-fit: contain; }

/* ---------- 오더 단순화 (2026-11) ---------- */
.oseg { display: grid; background: #E8EEFA; border-radius: 12px; padding: 4px; gap: 4px; margin: 10px 0 12px; }
.oseg button { border: 0; background: transparent; border-radius: 9px; padding: 7px 0 6px; font-size: 13.5px; font-weight: 600; color: #51607d; cursor: pointer; display: flex; flex-direction: column; align-items: center; line-height: 1.25; }
.oseg button em { font-style: normal; font-size: 18px; font-weight: 800; }
.oseg button.on { background: #fff; color: var(--ink); font-weight: 800; box-shadow: 0 1px 4px rgba(17,19,92,.12); }
.oseg button.alert em { color: var(--red); }
.ocard { display: block; background: #fff; border-radius: 14px; padding: 12px 14px 12px 17px; margin-bottom: 8px; position: relative; box-shadow: 0 1px 3px rgba(17,19,92,.06); }
.ocard::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--gc); }
.ocard .l1 { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ocard .l1 > b:first-child { font-size: 16.5px; white-space: nowrap; }
.ocard .l1 > span { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ocard .amt { margin-left: auto; font-size: 15px; white-space: nowrap; }
.ocard .sdot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); flex: none; }
.ocard .sdot.rv { background: #0ea5e9; box-shadow: inset 0 0 0 2px #fff, 0 0 0 1px #0ea5e9; width: 9px; height: 9px; }
.ocard .l2 { color: #475569; font-size: 14px; margin: 2px 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ocard .l3 { font-size: 13.5px; font-weight: 700; color: var(--gt); }
.g-red { --gc: var(--red); --gt: var(--red); } .g-blue { --gc: var(--brand); --gt: var(--brand); }
.g-y { --gc: #f5b301; --gt: #b45309; } .g-gray { --gc: #cbd5e1; --gt: #64748b; }
.fab-new { position: fixed; right: 16px; bottom: calc(var(--nav-h) + var(--safe-b) + 16px); z-index: 15; display: flex; align-items: center; gap: 6px; background: var(--brand); color: #fff; font-weight: 800; font-size: 16px; border-radius: 999px; padding: 14px 20px; box-shadow: 0 10px 24px -8px rgba(45,42,224,.7); }
.fab-new svg { width: 20px; height: 20px; }
@media (min-width: 960px) { .fab-new { bottom: 24px; right: 28px; } }
.olist { padding-bottom: 70px; }

.ohero { background: #fff; border-radius: 16px; padding: 16px; margin-bottom: 10px; box-shadow: var(--shadow); }
.ohero .st4 { display: flex; gap: 6px; margin-bottom: 12px; }
.ohero .st4 div { flex: 1; text-align: center; font-size: 12.5px; color: #9aa3b5; font-weight: 600; }
.ohero .st4 div::before { content: ""; display: block; height: 5px; border-radius: 3px; background: #E3EAF7; margin-bottom: 6px; }
.ohero .st4 div.d { color: var(--ink); } .ohero .st4 div.d::before { background: var(--brand); }
.ohero .st4 div.c { color: var(--brand); font-weight: 800; } .ohero .st4 div.c::before { background: var(--accent); }
.ohero .canceled { display: inline-block; background: var(--gray-soft); color: #64748b; font-weight: 700; font-size: 13px; padding: 4px 10px; border-radius: 999px; margin-bottom: 10px; }
.ohero h2 { margin: 0; font-size: 22px; }
.ohero .sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.ohero .addr { margin-top: 6px; font-size: 15px; }
.ohero .cbar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.ohero .cbar a { display: flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 0; font-weight: 700; font-size: 14px; color: var(--ink); }
.ohero .cbar a svg { width: 17px; height: 17px; }
.btn.big { min-height: 56px; font-size: 17.5px; border-radius: 14px; }
.nhint { text-align: center; font-size: 12.5px; color: var(--muted); margin: 6px 0 12px; }
.pair { display: flex; gap: 8px; margin-bottom: 12px; } .pair .btn.red { flex: 0 0 96px; } .pair .btn.big { flex: 1; }
.oinfo { background: #fff; border-radius: 14px; padding: 2px 14px; margin: 0 0 10px; box-shadow: var(--shadow); }
.oinfo .r { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid #EEF2F9; font-size: 14.5px; }
.oinfo .r:last-child { border-bottom: 0; }
.oinfo .r > span { color: var(--muted); flex: none; }
.oinfo .r > b { font-weight: 600; text-align: right; }
.oinfo .r.memo > b { white-space: pre-wrap; font-weight: 500; }
.oinfo img.sign-thumb { height: 40px; display: inline-block; }
.ofold { background: #fff; border-radius: 14px; margin-bottom: 8px; box-shadow: var(--shadow); }
.ofold > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 13px 14px; font-weight: 700; font-size: 14.5px; }
.ofold > summary::-webkit-details-marker { display: none; }
.ofold > summary span { color: var(--muted); font-weight: 500; font-size: 13.5px; }
.ofold > summary span::after { content: " ›"; display: inline-block; transition: transform .2s; }
.ofold[open] > summary span::after { transform: rotate(90deg); }
.ofold-in { padding: 0 14px 14px; }
.omore { width: 100%; border: 1.5px dashed #C9D7F2; background: transparent; border-radius: 12px; padding: 13px; color: var(--ink); font-weight: 700; font-size: 15px; cursor: pointer; margin: 6px 0 10px; }
.sheet-list { display: flex; flex-direction: column; margin: -4px 0 0; }
.sheet-list .si { text-align: left; background: none; border: 0; border-bottom: 1px solid #EEF2F9; padding: 14px 4px; font-size: 15.5px; font-weight: 600; color: var(--text); cursor: pointer; display: block; }
.sheet-list .si small { display: block; color: var(--muted); font-weight: 400; font-size: 12.5px; margin-top: 2px; }
.sheet-list .si.danger { color: var(--red); }
.pick { display: flex; flex-wrap: wrap; gap: 6px; }
.pick label { cursor: pointer; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick span { display: inline-block; border: 1.5px solid #D5DEEE; border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 600; color: #475569; background: #fff; }
.pick input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.pick input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.oform .f > span { display: block; }
.more-f { border-top: 1px solid #EEF2F9; margin: 4px 0 12px; }
.more-f > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 13px 0; font-weight: 700; color: var(--ink); }
.more-f > summary::-webkit-details-marker { display: none; }
.more-f > summary span { color: var(--muted); font-weight: 500; font-size: 12.5px; }
.more-f[open] > summary { margin-bottom: 4px; }

/* ---------- 일정 달력 ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head b { font-size: 18px; color: var(--ink); }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; background: #fff; border-radius: 16px; padding: 8px; box-shadow: var(--shadow); }
.cal-w { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); padding: 4px 0 6px; }
.cal-w.sun, .cal-d.sun .dn { color: var(--red); } .cal-w.sat, .cal-d.sat .dn { color: var(--brand); }
.cal-d { position: relative; border: 0; background: #F7F8FC; border-radius: 10px; min-height: 64px; padding: 5px 4px 4px; display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; font: inherit; color: var(--text); }
.cal-d:hover { background: var(--brand-soft); }
.cal-d.out { opacity: .38; }
.cal-d.today { background: #fff; box-shadow: inset 0 0 0 2px var(--brand); }
.cal-d.today .dn { background: var(--brand); color: #fff !important; border-radius: 999px; padding: 0 6px; }
.cal-d .dn { font-size: 13px; font-weight: 700; line-height: 18px; }
.cal-d .cnt { font-size: 12.5px; font-weight: 800; color: var(--ink); }
.cal-d .cnt.alldone { color: #94a3b8; }
.cal-d .dots { display: flex; gap: 3px; }
.cal-d .dots i, .cal-legend i { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
i.p { background: var(--brand); } i.c { background: #94a3b8; } i.w { background: var(--red); }
.offm { font-size: 10.5px; font-weight: 800; color: #b45309; background: var(--yellow-soft); border-radius: 4px; padding: 0 4px; line-height: 15px; }
.cal-d .offm { position: absolute; top: 4px; right: 3px; }
@media (max-width: 420px) { .cal-d .offm { position: static; } }
.cal-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--muted); margin-top: 8px; padding: 0 4px; }
.cal-legend span { display: inline-flex; align-items: center; gap: 5px; }
@media (min-width: 960px) { .cal-d { min-height: 88px; } .cal-d .cnt { font-size: 14px; } }

/* ---------- 홈 3칸 ---------- */
.htabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.htab { border: 0; background: #fff; border-radius: 14px; padding: 12px 10px 10px; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: flex-start; gap: 2px; cursor: pointer; border-top: 3px solid transparent; font: inherit; color: var(--text); text-align: left; }
.htab .l { font-size: 13.5px; font-weight: 700; color: var(--muted); }
.htab .v { font-size: 28px; font-weight: 800; line-height: 1.1; color: var(--ink); }
.htab.need .v { color: var(--red); } .htab.prog .v { color: var(--brand); } .htab.done .v { color: #64748b; }
.htab.on { box-shadow: 0 6px 18px -8px rgba(17,19,92,.35); }
.htab.need.on { border-top-color: var(--red); background: #fff5f5; }
.htab.prog.on { border-top-color: var(--brand); background: var(--brand-soft); }
.htab.done.on { border-top-color: #94a3b8; background: #f4f6fa; }
.hchips { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 10px; scrollbar-width: none; }
.hchips::-webkit-scrollbar { display: none; }
.hchip { flex: none; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; color: var(--text); white-space: nowrap; }
.hchip b { color: var(--ink); } .hchip.red b { color: var(--red); }

/* ---------- 재고 입출고 기록 ---------- */
.mv-day { font-size: 13px; font-weight: 800; color: var(--muted); margin: 12px 2px 6px; }
.list.mv .mvrow { gap: 12px; }
.mvd { width: 46px; text-align: center; font-size: 17px; font-weight: 800; border-radius: 10px; padding: 6px 0; flex: none; }
.mvd.in { color: #15803d; background: #dcfce7; } .mvd.out { color: var(--red); background: #fee2e2; }
/* 홈 탭 (오더 목록 겸용) */
.oseg button small { font-size: 11px; font-weight: 600; color: var(--muted); }
.have { font-size: 13px; color: var(--muted); margin: -4px 0 10px 2px; }
.have b { color: var(--ink); } .have.low, .have.low b { color: var(--red); font-weight: 700; }

/* ===== 위치 동의 · 지도 · 동선 ===== */
.consent { margin: 0 0 14px; padding-left: 18px; font-size: 14px; line-height: 1.6; }
.consent li { margin-bottom: 6px; }
.content.wide { max-width: 1280px; }
.mtop { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.mtop .chips { margin: 0; }
.mtabs:empty { display: none; }
.mtabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.mtabs::-webkit-scrollbar { display: none; }
.mtab { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; }
.mtab i { width: 9px; height: 9px; border-radius: 50%; }
.mtab span { font-size: 12px; color: var(--muted); font-weight: 700; }
.mtab.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.mtab.on span { color: #C9CCF5; }
.mgrid { display: grid; gap: 12px; }
.mapbox { height: 44vh; min-height: 280px; border-radius: 16px; overflow: hidden; background: var(--brand-soft); position: relative; }
@media (min-width: 960px) {
  .mgrid { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
  .mapbox { position: sticky; top: 12px; height: calc(100dvh - 190px); min-height: 420px; }
  .mpanel { max-height: calc(100dvh - 190px); overflow-y: auto; padding-right: 2px; }
}
.map-msg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 14px; }
.mcard { display: block; width: 100%; text-align: left; font: inherit; color: inherit; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 10px; padding: 0; }
button.mcard { cursor: pointer; }
.mhead { display: flex; align-items: center; gap: 8px; padding: 12px 14px; flex-wrap: wrap; }
.mhead i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.mhead b { font-size: 16px; }
.msum { font-size: 13px; color: var(--muted); flex-basis: 100%; padding-left: 18px; margin-top: -4px; }
.mtech-sum .mhead { position: relative; padding-right: 34px; }
.mtech-sum .chev { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.mr { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; min-height: 44px; box-sizing: border-box; white-space: nowrap; }
.mr.done { opacity: .55; }
.mr .mt { width: 42px; flex: none; font-size: 14px; font-variant-numeric: tabular-nums; }
.mr .mn { font-weight: 700; font-size: 15px; flex: none; }
.mr .ms { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.mno { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; }
.mbadge { flex: none; font-size: 11px; font-weight: 700; color: var(--brand); background: var(--brand-soft); padding: 2px 7px; border-radius: 999px; }
.mbadge.gray { color: var(--muted); background: #EEF0F5; }
.mleg { font-size: 11.5px; color: var(--muted); padding: 0 14px 0 49px; margin: -2px 0; line-height: 16px; position: relative; }
.mleg::before { content: ""; position: absolute; left: 24px; top: -6px; bottom: -6px; border-left: 2px dotted #C9CDD8; }
.mempty { padding: 10px 14px 14px 32px; font-size: 13px; color: var(--muted); }
.mneed { border-top: 1px solid var(--line); }
.mneed .mr { border-top: 0; padding-bottom: 4px; }
.massign { display: flex; gap: 6px; padding: 0 14px 10px 44px; flex-wrap: wrap; }
.massign button { font: inherit; font-size: 13px; font-weight: 700; height: 34px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--brand); background: var(--brand); color: #fff; cursor: pointer; }
.massign button.ghost { background: #fff; color: var(--brand); }
.mmore { display: block; width: 100%; font: inherit; font-size: 13px; font-weight: 700; color: var(--brand); background: #FAFAFF; border: 0; border-top: 1px solid var(--line); padding: 10px; cursor: pointer; }
.mpin { display: inline-flex; align-items: center; gap: 0; height: 28px; border-radius: 999px; background: #fff; box-shadow: 0 2px 8px rgba(17,19,92,.28); text-decoration: none; color: var(--c); font: 800 12px/1 Pretendard, system-ui, sans-serif; white-space: nowrap; }
.mpin b { width: 28px; height: 28px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; font-size: 13px; }
.mpin span { padding: 0 9px 0 6px; color: #11135C; }
.mpin.need span { color: #B91C1C; }
.mpin.done { width: 22px; height: 22px; justify-content: center; background: #C9CDD8; color: #fff; font-size: 11px; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.mcar { width: 26px; height: 26px; border-radius: 50%; background: #fff; color: var(--c); display: grid; place-items: center; box-shadow: 0 0 0 3px var(--c), 0 2px 8px rgba(0,0,0,.25); }
.routecard { background: #fff; border: 1px solid var(--line); border-radius: 16px; margin-top: 12px; overflow: hidden; }
.routecard .rc-h { display: flex; align-items: baseline; gap: 8px; padding: 12px 14px 10px; }
.rc-h a { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--brand); text-decoration: none; }
.mfree-h { font-size: 12px; font-weight: 700; color: var(--muted); padding: 10px 14px 6px; border-top: 1px solid var(--line); background: #FAFAFD; letter-spacing: .02em; }
.mr.mfree { background: #FAFAFD; }
.mrec { margin-left: auto; flex: none; text-align: right; font-size: 13px; font-weight: 800; color: var(--brand); line-height: 1.15; }
.mrec small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); }
.mrec.tight { color: #B45309; }
.mpin.free { background: #fff; }
.mpin.free b { background: #fff; color: var(--c); box-shadow: inset 0 0 0 2px var(--c); }
/* 시간 미정 칸: 빨간 배경 + 살짝 좌우로 흔들림 (눈에 띄게) */
.mr.mfree { background: #FEE2E2; border-top-color: #FECACA; animation: mfree-wiggle 1.6s ease-in-out infinite; }
.mr.mfree .mno { background: #fff !important; color: #DC2626 !important; box-shadow: inset 0 0 0 2px #DC2626 !important; }
.mr.mfree .mn { color: #991B1B; }
.mr.mfree .ms { color: #B45454; }
.mr.mfree .mrec, .mr.mfree .mrec.tight { color: #DC2626; }
.mr.mfree .mrec small { color: #B45454; }
.mfree-h { color: #DC2626; background: #FFF5F5; }
@keyframes mfree-wiggle { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-3px); } 40% { transform: translateX(3px); } 60% { transform: translateX(-2px); } 80% { transform: translateX(1px); } }
@media (prefers-reduced-motion: reduce) { .mr.mfree { animation: none; } }
