/* hidden 속성은 항상 숨김 (.grid-4 처럼 display 를 정한 요소에도) */
[hidden] { display: none !important; }
:root {
  --bg: #F2F2EF;              /* 시안의 따뜻한 회색 배경 */
  --card: #ffffff;
  --text: #1c2430;
  --muted: #6b7686;
  --line: #E5E5E0;
  /* Woodstone 브랜드 색 (로고에서 추출) */
  --navy: #181B2B;
  --navy-2: #2A2F48;          /* 마우스 올렸을 때 */
  --navy-tint: #EEF0F6;       /* 연한 남색 배경 */
  --orange: #E5853B;
  --orange-ink: #B4561A;      /* 흰 바탕 위 주황 글자·링크 (읽기 쉬운 진한 주황) */
  --orange-tint: #FCF0E6;     /* 연한 주황 배경 */
  --primary: var(--navy);
  --primary-ink: #ffffff;
  --danger: #c4372f;
  --ok-bg: #e7f6ec;
  --ok-ink: #1f6b3a;
  --err-bg: #fdecea;
  --err-ink: #a12a22;
  --radius: 14px;
  /* 상태 색상: 검토전 검토필요 검토중 견적완료 설치중 설치완료 보류 */
  --s1: #8a94a3; --s2: #d9480f; --s3: #e8a400; --s4: #1769d1; --s5: #7048e8; --s6: #2b8a3e; --s7: #495057;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", sans-serif;
}
a { color: var(--orange-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.45rem; margin: 0; }
h2 { font-size: 1.1rem; margin: 0 0 12px; }
h3 { font-size: 1rem; margin: 0 0 6px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }

/* 왼쪽 사이드바 */
:root { --side-w: 236px; --side-bg: var(--navy); --side-ink: #C3C7D6; }
body.with-sidebar { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--side-bg); color: var(--side-ink); display: flex; flex-direction: column;
}
.sidebar a { color: var(--side-ink); }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 10px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff !important; text-decoration: none !important; }
.brand .logo-mark { width: 30px; height: 28px; flex: none; }
.brand-name { font-size: 1.02rem; font-weight: 500; letter-spacing: .01em; white-space: nowrap; }
.brand-name b { font-weight: 800; color: var(--orange); }
.auth-brand { text-align: center; margin-bottom: 18px; }
.auth-logo { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 16px; background: var(--navy); margin-bottom: 12px; }
.auth-logo .logo-mark { width: 38px; height: 35px; }
.auth-brand h1 { font-size: 1.5rem; margin: 0 0 4px; }
.auth-brand h1 span { color: var(--orange-ink); }
.sidebar-body { display: flex; flex-direction: column; flex: 1; padding: 0 10px 14px; }
.side-section { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #7f93ad; padding: 16px 10px 6px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: 8px; font-size: .93rem; }
.side-nav .nav-num { margin-left: auto; color: #8E93A6; font-size: .82rem; font-weight: 600; }
.side-nav .nav-num + .count { margin-left: 6px; }
.side-nav .nav-alert { margin-left: auto; color: var(--orange); font-weight: 800; }
.side-nav .nav-alert.text { font-size: .78rem; }
.muted-side { color: #8E93A6; font-size: .8rem; }
.side-nav a:hover { background: rgba(255,255,255,.07); text-decoration: none; color: #fff; }
.side-nav a.active { background: rgba(255,255,255,.1); color: #fff; font-weight: 700; box-shadow: inset 3px 0 0 var(--orange); }
.side-foot { margin-top: auto; padding: 14px 10px 4px; border-top: 1px solid rgba(255,255,255,.1); display: flex; flex-direction: column; gap: 8px; font-size: .88rem; }
.side-foot .me { display: flex; align-items: center; gap: 8px; }
.side-foot .me-name { color: #fff; font-weight: 600; }
.side-foot form { margin: 0; }
button.link { background: none; border: 0; color: var(--side-ink); cursor: pointer; font: inherit; padding: 0; }
button.link:hover { color: #fff; text-decoration: underline; }
.lang-switch { display: inline-flex; gap: 10px; font-size: .85rem; }
.lang-switch b { color: inherit; }
.sidebar .lang-switch b { color: #fff; }
.auth-lang { display: flex; justify-content: flex-end; padding: 12px 16px 0; }
.page { min-width: 0; display: flex; flex-direction: column; }
.page main { flex: 1; }

.container { width: 100%; max-width: 1040px; margin: 0 auto; padding: 20px 16px 40px; }
.auth { min-height: 85vh; display: grid; place-items: center; padding: 16px; }
.auth-card { width: 100%; max-width: 400px; }
.foot { text-align: center; color: var(--muted); font-size: .8rem; padding: 12px 0 24px; }

.card {
  background: var(--card); border: 1px solid #ECECE7; border-radius: var(--radius);
  padding: 20px 22px; margin-bottom: 14px; box-shadow: 0 1px 2px rgba(24, 27, 43, .03);
}
/* 카드 안 첫·마지막 요소의 기본 여백 때문에 위아래 여백이 달라 보이지 않게 */
.card > :first-child { margin-top: 0; }
.card > :last-child, .card > :last-child > :last-child { margin-bottom: 0; }
.card table.history:last-child tr:last-child td { border-bottom: 0; }
.empty { text-align: center; color: var(--muted); padding: 36px; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.back { display: inline-block; margin-bottom: 10px; font-size: .9rem; }

/* 폼 */
.stack { display: flex; flex-direction: column; gap: 12px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: .88rem; color: #3b4656; font-weight: 600; }
input, select, textarea {
  font: inherit; font-weight: 400; color: var(--text); background: #fff;
  border: 1px solid #cfd6e0; border-radius: 8px; padding: 9px 11px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid #F5C9A4; border-color: var(--orange); }
textarea { resize: vertical; }
/* 바꿀 수 없는 칸: 회색 바탕 + 자물쇠 + 금지 커서로 확실히 구분 */
input:disabled, select:disabled, textarea:disabled, input[readonly].locked {
  background: #eef0f3 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a94a3' stroke-width='2'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") no-repeat right 10px center / 16px;
  color: #6b7380; border-color: #dde1e7; border-style: dashed; cursor: not-allowed; padding-right: 34px; -webkit-text-fill-color: #6b7380; opacity: 1;
}
label:has(> input:disabled), label:has(> select:disabled) { color: #8a94a3; }
/* 이메일 인증: 입력칸 옆 버튼, 아래 인증번호 칸과 카운트다운 */
.field { display: flex; flex-direction: column; gap: 4px; }
.field > label { display: block; font-size: .88rem; color: #3b4656; font-weight: 600; }
.optional { color: var(--muted); font-weight: 400; }
.input-with-btn { display: flex; gap: 8px; align-items: center; }
.input-with-btn input { flex: 1; min-width: 0; }
.input-with-btn .btn { white-space: nowrap; flex: none; }
.code-row { margin-top: 6px; }
.code-row .js-code { letter-spacing: .3em; font-variant-numeric: tabular-nums; }
.countdown { flex: none; min-width: 3.2em; text-align: right; font-weight: 700; color: var(--orange-ink, #b4530d); font-variant-numeric: tabular-nums; }
.js-msg:empty { display: none; }
.grid-2, .grid-3 { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.row { display: flex; gap: 8px; }
.check { flex-direction: row; align-items: center; gap: 6px; font-weight: 400; }
.check input { width: auto; }
.check.danger { color: var(--danger); }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-size: .88rem; font-weight: 600; color: #3b4656; margin-bottom: 6px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  font: inherit; font-weight: 600; padding: 9px 16px; border-radius: 8px; cursor: pointer;
  background: #fff; color: var(--text); border: 1px solid #cfd6e0; white-space: nowrap;
}
.btn:hover { background: #f1f4f8; text-decoration: none; }
.btn.primary { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.btn.primary:hover { background: var(--navy-2); }
.btn.danger { color: var(--danger); border-color: #f1aeb5; }
.btn.small { padding: 4px 10px; font-size: .82rem; }
.btn:disabled { opacity: .6; cursor: wait; }

.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; }
.flash-ok { background: var(--ok-bg); color: var(--ok-ink); }
.flash-error { background: var(--err-bg); color: var(--err-ink); }

/* 역할/상태 배지 */
.role { font-size: .72rem; font-weight: 700; padding: 2px 7px; border-radius: 99px; }
.role-staff { background: var(--navy-tint); color: var(--navy); }
.role-manager { background: #e5dbff; color: #5f3dc4; }
.role-form { margin: 0; }
.role-form select { width: auto; padding: 4px 8px; font-size: .85rem; }
.role-installer { background: #fde8d4; color: #8a4510; }
.badge { display: inline-block; font-size: .82rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; color: #fff; background: var(--s1); white-space: nowrap; }
.status-1 { --c: var(--s1); } .status-2 { --c: var(--s2); } .status-3 { --c: var(--s3); } .status-4 { --c: var(--s4); }
.status-5 { --c: var(--s5); } .status-6 { --c: var(--s6); } .status-7 { --c: var(--s7); }
.badge[class*="status-"] { background: var(--c); }

/* 프로젝트 단계 (9단계) */
.ref-no { font-family: ui-monospace, Menlo, monospace; font-size: .8rem; color: var(--muted); letter-spacing: .02em; }
.ref-line { margin-bottom: 2px; }
.stage-badge { display: inline-flex; align-items: center; gap: 5px; font-size: .8rem; font-weight: 700; padding: 3px 10px 3px 4px;
  border-radius: 99px; background: var(--navy-tint); color: var(--navy); white-space: nowrap; }
.stage-badge b { display: inline-flex; align-items: center; justify-content: center; width: 19px; height: 19px; border-radius: 50%;
  background: var(--navy); color: #fff; font-size: .72rem; }
.stage-badge.stage-6, .stage-badge.stage-7 { background: var(--orange-tint); color: #8A3F0C; }
.stage-badge.stage-6 b, .stage-badge.stage-7 b { background: var(--orange); color: var(--navy); }
.stage-badge.stage-9 { background: var(--ok-bg); color: var(--ok-ink); }
.stage-badge.stage-9 b { background: #2b8a3e; }
.hold-badge { display: inline-block; font-size: .75rem; font-weight: 800; padding: 3px 9px; border-radius: 99px; background: #fdecea; color: var(--err-ink); }
.badges { display: inline-flex; gap: 4px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.chip.stage-1, .chip.stage-2, .chip.stage-3, .chip.stage-4, .chip.stage-5 { --c: #9aa1b8; }
.chip.stage-6, .chip.stage-7 { --c: var(--orange); }
.chip.stage-8 { --c: var(--navy); }
.chip.stage-9 { --c: #2b8a3e; }
.chip.chip-hold { --c: var(--err-ink); }

.stagebar { margin: 12px 0 6px; }
.stagebar-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.stagebar ol { list-style: none; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; margin: 0; padding: 0; }
.stagebar li { font-size: .7rem; color: var(--muted); }
.stagebar li::before { content: ""; display: block; height: 6px; border-radius: 3px; background: #DDE1EA; margin-bottom: 4px; }
.stagebar li.done::before { background: var(--navy); }
.stagebar li.now::before { background: var(--orange); }
.stagebar li.now { color: var(--navy); font-weight: 800; }
.stagebar.on-hold li.now::before { background: repeating-linear-gradient(45deg, var(--orange), var(--orange) 4px, #f7d2b4 4px, #f7d2b4 8px); }
.member-list { list-style: none; margin: 0 0 12px; padding: 0; }
.member-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.member-list form { margin: 0; }
.row.wrap { flex-wrap: wrap; }
.row.wrap form { margin: 0; }

/* 새 소식(N) 표시 */
.new-badge {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 18px; height: 18px; border-radius: 50%; background: #e03131; color: #fff;
  font-size: .68rem; font-weight: 800; line-height: 1; vertical-align: 2px;
}
.house-row.is-new { border-color: #f1aeb5; }
.entry.is-new { box-shadow: 0 0 0 2px #f8c9ce; }
.history tr.is-new td { background: #fff5f5; }
.new-notice {
  display: flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 10px 14px;
  border-radius: 10px; background: #fff5f5; border: 1px solid #f8c9ce; color: #a61e1e; font-weight: 700;
}
.new-notice:hover { text-decoration: none; background: #ffeaea; }
.new-notice .arrow { margin-left: auto; }
.side-nav .count {
  margin-left: auto; min-width: 20px; padding: 1px 7px; border-radius: 99px;
  background: #e03131; color: #fff; font-size: .75rem; font-weight: 800; text-align: center;
}

/* 목록 */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip {
  padding: 5px 12px; border-radius: 99px; background: #fff; border: 1px solid var(--line);
  color: var(--text); font-size: .88rem; border-left: 4px solid var(--c, #c9d1dc);
}
.chip b { margin-left: 3px; }
.chip.active { background: var(--navy); color: #fff; border-color: var(--navy); border-left-color: var(--c, var(--orange)); }
.chip:hover { text-decoration: none; }
.filters { padding: 14px; }
.filter-main { display: flex; gap: 8px; }
.filter-main input { flex: 1; }
.filter-main select { width: auto; }
.filters p { margin: 10px 0 0; }

.house-list { display: flex; flex-direction: column; gap: 8px; }
.house-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--text); margin: 0; padding: 14px 18px; }
.house-row:hover { border-color: var(--orange); text-decoration: none; }
.house-addr { font-weight: 700; }
.house-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; text-align: right; }
.postcode { font-family: ui-monospace, Menlo, monospace; background: #eef1f5; padding: 1px 6px; border-radius: 4px; font-size: .82rem; }
.postcode.big { font-size: .95rem; display: inline-block; margin-top: 6px; }

/* 상세 */
.house-head-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 8px 0; }
.facts div { display: flex; gap: 6px; }
.facts dt { color: var(--muted); font-size: .85rem; }
.facts dd { margin: 0; font-weight: 600; }
.memo, .body { white-space: pre-wrap; margin: 10px 0; }
.memo { background: #f7f9fb; padding: 10px 12px; border-radius: 8px; }
.house-actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 12px; }
.status-form { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; flex: 1; }
.status-form label { width: 150px; }
.status-form input { width: 220px; }

.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.tab {
  font: inherit; background: none; border: 0; border-bottom: 3px solid transparent;
  padding: 8px 12px; cursor: pointer; color: var(--muted); font-weight: 600;
}
.tab.active { color: var(--navy); border-bottom-color: var(--orange); }
.tab:hover { text-decoration: none; color: var(--text); }
.tabs.links { margin-top: 8px; }
.inline-search { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.inline-search input { flex: 1; }

.file-drop {
  border: 2px dashed #c3ccd8; border-radius: 10px; padding: 14px; text-align: center;
  font-weight: 600; color: var(--muted); cursor: pointer; background: #fafbfd;
}
.file-drop input { border: 0; background: none; margin-top: 6px; }

.entry { border-left: 4px solid #c9d1dc; }
.entry-survey { border-left-color: #e8590c; }
.entry-quote { border-left-color: var(--navy); }
.entry-conversation { border-left-color: #2b8a3e; }
.entry-head { display: flex; align-items: center; gap: 10px; }
.entry-type { font-weight: 800; }
.entry-author { flex: 1; font-size: .9rem; }
.entry-times { margin-top: 2px; }
.edited { color: #b35c00; }

.timeline-status {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px;
  padding: 8px 14px; margin: 0 0 14px; border-radius: 8px; background: #eef1f6; font-size: .9rem;
}

.attachments { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.att { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fafbfc; display: flex; flex-direction: column; }
.att img, .att video { width: 100%; height: 130px; object-fit: cover; display: block; background: #e9edf2; }
.file-tile { height: 130px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 2rem; background: #eef1f5; }
.file-tile span { font-size: .8rem; color: var(--muted); }
.att-meta { padding: 6px 8px; font-size: .78rem; display: flex; flex-direction: column; gap: 2px; }
.att-meta a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

table.history { width: 100%; border-collapse: collapse; font-size: .88rem; }
.history th, .history td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.history th { color: var(--muted); font-weight: 600; }
.history tr.inactive { opacity: .5; }
.snapshot summary { cursor: pointer; color: var(--orange-ink); font-size: .82rem; }
.snapshot { margin-top: 4px; background: #f7f9fb; border-radius: 6px; padding: 4px 8px; }

.invite { display: flex; flex-direction: column; gap: 10px; }
.invite-head { display: flex; align-items: center; gap: 12px; }
.invite-head code { font-size: 1.05rem; background: #eef1f5; padding: 4px 10px; border-radius: 6px; user-select: all; }
.invite-link { font-size: .85rem; color: var(--muted); background: #f7f9fb; }
.invite .row { flex-wrap: wrap; }
.push-right { margin: 0 0 0 auto; }
.codes { display: flex; flex-direction: column; gap: 8px; }
.code-box { display: flex; align-items: center; gap: 12px; }
.code-box code { font-size: 1.05rem; background: #eef1f5; padding: 4px 10px; border-radius: 6px; user-select: all; }
.code-box form { margin: 0; }

/* 문자 로그인 */
.auth-tabs { margin: 4px 0 14px; }
.auth-tabs a { padding: 9px; }
.code-input { font-size: 1.6rem !important; letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; padding: 12px; }
.resend { margin: 10px 0 0; }
.link-btn { background: none; border: 0; padding: 0; color: var(--orange-ink); font: inherit; font-weight: 600; cursor: pointer; }
.ok-text { color: var(--ok-ink); font-weight: 600; }
.sms-badge { font-size: .68rem; font-weight: 800; color: #1f6b3a; background: var(--ok-bg); padding: 1px 6px; border-radius: 99px; }
.section-title { margin: 20px 0 8px; }

/* 휴대폰 전용 요소 (PC에서는 숨김) */
.mobile-top, .tabbar, .fab { display: none; }
.me-name-big { font-size: 1.2rem; font-weight: 800; margin-bottom: 4px; }
.seg { display: flex; gap: 8px; }
.seg a { flex: 1; text-align: center; padding: 12px; border: 1px solid #cfd6e0; border-radius: 10px; color: var(--text); font-weight: 600; }
.seg a.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.seg a:hover { text-decoration: none; }
.btn.block { width: 100%; padding: 13px; }

/* ===== 휴대폰 화면 (앱처럼: 위쪽 얇은 바 + 아래 탭 메뉴) ===== */
@media (max-width: 860px) {
  body.with-sidebar { display: block; padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .sidebar, .hide-mobile { display: none !important; }

  .mobile-top {
    display: flex; align-items: center; position: sticky; top: 0; z-index: 30;
    padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: var(--side-bg);
  }
  .mobile-top .brand .logo-mark { width: 26px; height: 24px; }

  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: #fff; border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -2px 10px rgba(18, 36, 61, .06);
  }
  .tabbar a {
    flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; min-height: 58px; color: #7a8698; font-size: .72rem; font-weight: 600;
  }
  .tabbar a:hover { text-decoration: none; }
  .tabbar a.active { color: var(--navy); }
  .tabbar a.active::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--orange); }
  .tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  .tab-count {
    position: absolute; top: 5px; left: calc(50% + 6px); min-width: 18px; padding: 0 5px; border-radius: 99px;
    background: #e03131; color: #fff; font-size: .68rem; line-height: 18px; text-align: center;
  }

  .fab {
    display: flex; align-items: center; justify-content: center; position: fixed; z-index: 35;
    right: 18px; bottom: calc(76px + env(safe-area-inset-bottom));
    width: 56px; height: 56px; border-radius: 50%; background: var(--orange); color: var(--navy);
    font-size: 1.9rem; font-weight: 700; box-shadow: 0 6px 16px rgba(229, 133, 59, .4);
  }
  .fab:hover { text-decoration: none; background: #D8742A; }

  /* 아이폰에서 입력칸을 누르면 화면이 확대되지 않도록 16px */
  input, select, textarea { font-size: 16px; }
  .btn { min-height: 44px; }
  .btn.small { min-height: 34px; }
  .container { padding: 14px 12px 24px; }
  .foot { padding-bottom: 16px; }

  /* 상태 칩: 한 줄, 옆으로 밀어서 보기 */
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -12px 12px; padding: 0 12px 4px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; padding: 7px 13px; }
}
@media (max-width: 720px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  h1 { font-size: 1.3rem; }
  .house-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 14px; }
  .house-main { min-width: 0; }
  .house-meta { display: contents; }
  .house-meta .badge { grid-column: 2; grid-row: 1; align-self: start; }
  .house-meta .small { grid-column: 1 / -1; text-align: left; }
  .filter-main { flex-wrap: wrap; }
  .filter-main select { flex: 1; }
  .filter-main input { flex-basis: 100%; }
  .status-form label, .status-form input { width: 100%; }
  .status-form .btn { width: 100%; }
  .house-actions > .btn { width: 100%; }
  .card { padding: 14px; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .tab { flex: none; }
  .inline-search { flex-wrap: wrap; }
  .attachments { grid-template-columns: repeat(2, 1fr); }
  .stagebar li span { display: none; }   /* 휴대폰: 막대만, 현재 단계 이름은 위에 표시 */

  /* 표 → 카드 */
  table.stackable, table.stackable tbody, table.stackable tr, table.stackable td { display: block; width: 100%; }
  table.stackable thead { display: none; }
  table.stackable tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  table.stackable td { display: flex; gap: 12px; justify-content: space-between; align-items: center; border: 0; padding: 3px 0; white-space: normal; }
  table.stackable td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: .8rem; flex: none; }
  table.stackable td.cell-title { font-weight: 800; font-size: 1rem; }
  table.stackable td.cell-title::before { display: none; }
  table.stackable td.cell-actions:empty { display: none; }
  table.stackable td.cell-body { display: block; }
  table.stackable td.cell-body::before { display: block; margin-bottom: 2px; }
}

/* ===== 현장조사 (시안 p.6~8, p.24) ===== */
.flow-head { display: flex; align-items: center; gap: 12px; margin: 2px 0 10px; }
.flow-head h1 { font-size: 1.25rem; margin: 0; }
.flow-sub { font-size: .82rem; color: var(--muted); }
.back-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px;
  border-radius: 12px; background: #fff; border: 1px solid var(--line); color: var(--navy); font-size: 1.6rem; line-height: 1; }
.back-btn:hover { text-decoration: none; background: var(--navy-tint); }
.flow-steps { display: flex; gap: 4px; margin: 0 0 6px; }
.flow-steps > * { flex: 1; height: 5px; border-radius: 3px; background: #DDE1EA; }
.flow-steps > .done { background: var(--navy); }
.flow-steps > .now { background: var(--orange); }
/* 누를 수 있는 칸: 위아래로 넉넉히 눌리게 (보이는 막대는 그대로) */
.flow-steps > a { position: relative; cursor: pointer; }
.flow-steps > a::after { content: ""; position: absolute; inset: -10px 0; }
.flow-steps > a:hover { background: var(--orange); opacity: .75; }
.flow-hint { font-size: .8rem; color: var(--muted); margin: 0 0 12px; }
.survey-form h3 { font-size: .95rem; margin: 18px 0 8px; }
.room-title { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.room-name-input { flex: 1; min-width: 0; font-size: 1.35rem !important; font-weight: 800; border-color: transparent; background: transparent; padding: 6px 4px; }
.rename-btn { flex: none; }
.room-name-input:hover, .room-name-input:focus { background: #fff; border-color: #cfd6e0; }

/* 선택 버튼 */
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; flex-direction: row; font-weight: 600; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 16px;
  border-radius: 10px; border: 1.5px solid #cfd6e0; background: #fff; color: var(--text); font-size: .95rem; }
.choice input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.choice input:focus-visible + span { outline: 3px solid #F5C9A4; outline-offset: 2px; }
.choices.pills .choice span { border-radius: 99px; min-width: 84px; }
.choices.grid2 { display: grid; grid-template-columns: 1fr 1fr; }
.choices.grid2 .choice span { width: 100%; }
.choices.yesno .choice span { min-width: 64px; padding: 6px 12px; min-height: 38px; }
.choices.icons { display: grid; grid-template-columns: repeat(3, 1fr); }
.choice.tile span { flex-direction: column; width: 100%; min-height: 78px; font-size: .82rem; }
.choice.tile svg { width: 30px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

/* 사진 */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.photo { position: relative; border-radius: 10px; overflow: hidden; background: #e9edf2; aspect-ratio: 4 / 3; }
.photo img, .photo video { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-remove { position: absolute; left: 4px; bottom: 4px; flex-direction: row; gap: 4px; font-size: .72rem; color: #fff;
  background: rgba(24, 27, 43, .75); padding: 2px 6px; border-radius: 6px; }
.photo-remove input { width: auto; }
.photo-add { position: relative; flex-direction: row; align-items: center; justify-content: center; gap: 8px; min-height: 64px;
  border: 2px dashed var(--orange); border-radius: 12px; background: var(--orange-tint); color: #8A3F0C; font-weight: 700; cursor: pointer; }
.photo-add svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; }
/* 기본 파일 선택 버튼은 숨기고 칸 전체를 누르면 열리게 */
.photo-add input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.photo-add.has-files { border-style: solid; background: #FBE3CF; }
.photo-form { margin: 0 0 10px; }
.photo-send { display: none; }

/* 질문 카드 */
.q-card { padding: 14px 16px; }
.q-card h3 { margin: 18px 0 8px; }
.q-card .q-head { margin-top: 18px; }
.q-card .q-head h3 { margin: 0 0 8px; }
.q-card > h3:first-child, .q-card > .q-head:first-child { margin-top: 0; }
.q-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.q-head h2 { margin: 0; }
.q-head form { margin: 0; }
.q-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.q-block { display: flex; flex-direction: column; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.must { color: #8A3F0C; font-weight: 700; }
.apply-all { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; margin-bottom: 12px;
  border-radius: 12px; background: var(--navy-tint); font-size: .88rem; }
.tag { display: inline-block; font-size: .74rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: #eef1f5; }
.tag.ok { background: var(--ok-bg); color: var(--ok-ink); }
.tag.warn { background: var(--orange-tint); color: #8A3F0C; }

/* 하단 고정 버튼 */
/* 하단 고정 버튼 줄 (시안: 흰 바탕 + 윗선) */
.sticky-actions { position: sticky; bottom: 0; z-index: 5; margin: 18px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.link-center { display: block; width: 100%; text-align: center; background: none; border: 0; padding: 8px; font: inherit;
  font-weight: 700; color: var(--orange-ink); cursor: pointer; }
.center { text-align: center; margin: 0; }

/* 조사 목록 */
.survey-status { display: inline-block; font-size: .8rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: #eef1f5; margin-bottom: 10px; }
.survey-status.status-submitted { background: var(--orange-tint); color: #8A3F0C; }
.survey-status.status-reviewed { background: var(--ok-bg); color: var(--ok-ink); }
.room-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--text); padding: 14px 16px; margin-bottom: 8px; }
.room-row:hover { text-decoration: none; border-color: var(--orange); }
.room-row.has-problems { border-left: 4px solid var(--orange); }
.room-name { font-weight: 800; }
.room-state { font-weight: 800; color: var(--ok-ink); white-space: nowrap; }
.has-problems .room-state { color: #8A3F0C; font-size: .82rem; }
.request-note { margin-top: 4px; font-size: .84rem; font-weight: 600; color: #8A3F0C; }
.problem-note { margin-top: 4px; font-size: .8rem; color: var(--err-ink); }
.overview-top { justify-content: space-between; align-items: center; margin-bottom: 12px; }
.overview-top .survey-status { margin: 0; }
.overview-top .add-room { margin-left: auto; }
.add-odu { margin: 0 0 4px; }
.room-tools { display: flex; gap: 8px; justify-content: center; margin: 8px 0 20px; }
.room-tools form { margin: 0; }
.steps-list { padding-left: 18px; }
.flash-warn { background: var(--orange-tint); color: #8A3F0C; }

/* 회사 검토 */
.review-head { align-items: flex-start; flex-wrap: wrap; }
.review-head h1 { font-size: 1.35rem; }
.review-head form { margin: 0; }
.review-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.review-room-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-top: 10px; }
.review-room .photo-grid { grid-template-columns: repeat(3, 1fr); }
.request-form { margin-top: 10px; }
.request-form input { flex: 1; }
.kv { display: grid; gap: 6px; margin: 0; font-size: .88rem; }
.kv div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed var(--line); padding-bottom: 4px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; text-align: right; }
.kv div.wide { flex-direction: column; }
.kv div.wide dd { text-align: left; font-weight: 400; white-space: pre-wrap; }
.work-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.work-card { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.work-card h2 { margin: 0; }
.work-card .q-head { width: 100%; }
.version-list { list-style: none; margin: 0; padding: 0; }
.version-list li { padding: 4px 0; }
.seg.versions a { padding: 6px 14px; flex: none; }

@media (max-width: 860px) {
  .review-grid, .review-room-body, .work-cards { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .sticky-actions { margin: 18px -12px 0; padding-left: 12px; padding-right: 12px; bottom: calc(58px + env(safe-area-inset-bottom)); }
  .choices.icons { gap: 6px; }
  .choice span { padding: 8px 12px; }
}

/* ===== 작업 범위 비교 (시안 p.9) ===== */
.scope-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.scope-meta .seg { margin-left: auto; }
.diff-card { border: 2px solid var(--line); }
.diff-card h3 { margin: 0 0 6px; }
.diff-changed { border-color: var(--orange); }
.diff-added { border-color: #2b8a3e; }
.diff-removed { border-color: #c92a2a; background: #fff8f8; }
.change-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.change-list li { display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.change-list s { color: var(--muted); }
.same-row { display: flex; justify-content: space-between; gap: 10px; padding: 12px 16px; }
.full-scope summary { cursor: pointer; font-weight: 700; color: var(--orange-ink); }
.full-scope[open] summary { margin-bottom: 10px; }
.scope-links { margin: 8px 0 14px; }
.tag.new { background: #E7EBFF; color: #2B3FB0; }
.tag.bad { background: #fdecea; color: var(--err-ink); }
.comment { padding: 8px 0; border-bottom: 1px solid var(--line); }
.comment .body { margin: 4px 0 0; }
.flash-info { background: #E7EBFF; color: #22348F; }
.scope-edit h2 { margin: 18px 0 8px; }
.scope-room.blank { opacity: .75; border-style: dashed; }
.grid-4 { display: grid; gap: 10px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 10px; }
label.inline { flex-direction: row; align-items: center; gap: 6px; font-weight: 400; }
label.inline select { width: auto; }

/* ===== 자료함 (시안 p.18~19) ===== */
.pack-box { border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; font-size: .9rem; }
.pack-box div { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; }
.pack-box p { margin: 6px 0 0; }
.pack-box.ready { background: var(--ok-bg); color: var(--ok-ink); }
.pack-box.missing { background: var(--orange-tint); color: #8A3F0C; }
.doc-row { display: flex; align-items: center; gap: 12px; color: var(--text); padding: 12px 14px; margin-bottom: 8px; }
.doc-row:hover { border-color: var(--orange); }
.doc-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; color: var(--text); }
.doc-link:hover { text-decoration: none; }
.doc-actions { display: flex; gap: 6px; align-items: center; }
.doc-actions form { margin: 0; }
.doc-row.is-new { border: 2px solid #3B5BDB; }
.doc-icon { flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--navy-tint); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.doc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.doc-main b { margin-right: 6px; }
.doc-go { color: var(--muted); font-size: 1.4rem; }
.doc-viewer img { width: 100%; height: auto; display: block; border-radius: 8px; }
.doc-viewer .pdf { width: 100%; height: 70vh; border: 0; border-radius: 8px; background: #eef1f5; }
.sticky-actions.two { flex-direction: row; }
.sticky-actions.two > * { flex: 1; }
.sticky-actions.two form { margin: 0; }
.ok-btn { background: var(--ok-bg); color: var(--ok-ink); border-color: transparent; cursor: default; }

@media (max-width: 1100px) { .work-cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) { .work-cards, .grid-4 { grid-template-columns: 1fr; } }
.doc-main .tag { align-self: flex-start; }

/* ===== 달력 (p.28) ===== */
.container.wide { max-width: 1320px; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-bottom: 10px; }
.kind-dot, .clash-dot, .sel-dot, .busy-dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.kind-dot.kind-survey { background: #DCE4FF; } .kind-dot.kind-install { background: #E3F1E6; border: 1px solid #2b8a3e; }
.kind-dot.kind-other { background: #F1E6FA; }
.kind-dot.kind-commission { background: #FFF1D6; border: 1px solid #E8590C; }
.clash-dot { border: 2px solid #c92a2a; }
.cal-wrap { overflow-x: auto; padding: 0; }
table.cal { width: 100%; border-collapse: collapse; min-width: 900px; font-size: .82rem; }
.cal th, .cal td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 6px; vertical-align: top; text-align: left; }
.cal thead th { background: #f7f9fb; font-weight: 700; }
.cal thead th.is-today { background: var(--orange-tint); color: #8A3F0C; }
.cal th.who { width: 140px; }
.cal th.who span { display: block; font-weight: 400; }
.cal td { width: 13%; height: 70px; }
.cal-item { display: flex; flex-direction: column; gap: 1px; padding: 5px 7px; border-radius: 7px; margin-bottom: 4px; color: var(--text); font-size: .76rem; border: 1px solid transparent; }
.cal-item:hover { text-decoration: none; filter: brightness(.97); }
.cal-item.kind-survey { background: #DCE4FF; } .cal-item.kind-install { background: #E3F1E6; }
.cal-item.kind-other { background: #F1E6FA; }
.cal-item.kind-commission { background: #FFF1D6; }
.cal-item .st { font-weight: 700; }
.cal-item.st-proposed, .cal-item.st-requested, .cal-item.st-options { border: 1px dashed #8A3F0C; }
.cal-item.st-declined { opacity: .6; text-decoration: line-through; }
.cal-item.clash { border: 2px solid #c92a2a; }
.cal-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; }
.warn-box { border: 2px solid #c92a2a; border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; background: #fff8f8; color: var(--err-ink); }
.warn-box p { margin: 4px 0; } .warn-box p.block { font-weight: 800; }
.wait-row { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.wait-row select, .wait-row input { width: auto; }
.wait-row form { margin: 0; }

/* ===== 오늘 할 일 (p.4) ===== */
.today-head h1 { font-size: 1.5rem; }
.task-card { display: flex; flex-direction: column; gap: 6px; }
.task-card h3 { margin: 0; font-size: 1.15rem; }
.task-card p { margin: 0; }
.task-card.main { border: 2px solid var(--navy); }
.task-top { display: flex; justify-content: space-between; align-items: center; }
.row-card { flex-direction: row; align-items: center; justify-content: space-between; color: var(--text); }
.row-card:hover { text-decoration: none; border-color: var(--orange); }
.btn.soft { background: var(--navy-tint); border-color: transparent; color: var(--navy); }
.upcoming { padding: 6px 16px; }
.up-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.up-row:last-child { border-bottom: 0; }
.up-row div { display: flex; flex-direction: column; }
.up-row form { margin: 0; }

/* ===== 날짜 고르기 (p.5) ===== */
.month-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; text-align: center; }
.month-grid .wd { font-size: .78rem; font-weight: 700; color: var(--muted); }
.day { position: relative; display: flex; align-items: center; justify-content: center; height: 44px; border-radius: 9px; font-weight: 700; }
.day.out { visibility: hidden; }
.day.off { color: #b4bcc8; font-weight: 400; }
label.day { flex-direction: row; background: #f1f3f6; cursor: pointer; }
label.day input { position: absolute; opacity: 0; pointer-events: none; }
label.day span { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; border-radius: 9px; }
label.day input:checked + span { background: var(--navy); color: #fff; }
label.day input:disabled + span { opacity: .45; }
label.day.busy::after { content: ""; position: absolute; bottom: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--orange); }
label.day.is-today span { outline: 2px solid var(--navy); outline-offset: -2px; }
.sel-dot { background: var(--navy); } .busy-dot { background: var(--orange); border-radius: 50%; width: 7px; height: 7px; }
.picked-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip-day { padding: 6px 12px; border-radius: 99px; background: var(--navy-tint); font-weight: 700; color: var(--navy); }

/* ===== 현장 도착 후 (p.11) ===== */
.site-head { background: var(--navy); color: #fff; border-radius: 14px; padding: 12px; margin-bottom: 12px; }
.site-top { display: flex; align-items: center; gap: 10px; }
.site-top h1 { font-size: 1.2rem; margin: 0; color: #fff; }
.site-top div { flex: 1; min-width: 0; }
.site-top span { font-size: .82rem; color: #C3C7D6; }
.back-btn.dark { background: rgba(255,255,255,.12); border-color: transparent; color: #fff; }
.docs-btn { position: relative; flex: none; padding: 8px 12px; border-radius: 10px; background: rgba(255,255,255,.12); color: #fff !important; font-weight: 700; font-size: .85rem; }
.docs-btn b { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 99px; background: var(--orange); color: var(--navy); font-size: .7rem; display: flex; align-items: center; justify-content: center; }
.site-arrived { margin-top: 10px; padding: 8px 12px; border-radius: 10px; background: rgba(255,255,255,.1); font-size: .85rem; }
.btn.big { min-height: 56px; font-size: 1.1rem; border-radius: 14px; }
.btn.dark { background: #15171F; border-color: #15171F; color: #fff; }
.btn.dark:hover { background: #2a2d38; }
.shoot-btn { position: relative; flex-direction: row; justify-content: center; align-items: center; min-height: 76px; border-radius: 14px; background: var(--navy); color: #fff; font-size: 1.2rem; font-weight: 800; cursor: pointer; margin-bottom: 10px; }
.shoot-btn input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.tag-card { padding: 12px 14px; }
.tag-card b { display: block; margin-bottom: 8px; font-size: .9rem; }
.site-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 14px; }
.site-actions .act { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border-radius: 12px; border: 1.5px solid #cfd6e0; background: #fff; color: var(--text); font-size: 1.2rem; }
.site-actions .act { cursor: pointer; font: inherit; font-size: 1.2rem; }
.site-actions .act span { font-size: .85rem; font-weight: 700; }
.site-actions .act small { font-size: .7rem; color: var(--muted); font-weight: 400; text-align: center; line-height: 1.3; }
.site-actions .act.on { background: var(--navy-tint); box-shadow: inset 0 0 0 2px currentColor; }
.site-actions .act:hover { text-decoration: none; }
.site-actions .act.problem { border-color: #c92a2a; color: #c92a2a; }
.site-actions .act.change { border-color: var(--orange); color: #8A3F0C; }
.photo-tag, .photo-tag-select { position: absolute; left: 4px; bottom: 4px; font-size: .72rem; color: #fff; background: rgba(24, 27, 43, .78); padding: 2px 6px; border-radius: 6px; }
.photo-tag-select { width: auto; max-width: calc(100% - 8px); padding: 2px 4px; border: 0; font-size: .72rem !important; }
.photo-tags { margin: 0 0 12px; }
.var-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--text); padding: 12px 14px; margin-bottom: 8px; }
.var-row:hover { text-decoration: none; }
.var-badge { display: inline-block; font-size: .75rem; font-weight: 800; padding: 3px 9px; border-radius: 7px; color: #fff; background: #868e96; white-space: nowrap; }
.var-badge.st-pending { background: #c92a2a; } .var-badge.st-approved { background: #2b8a3e; }
.var-card { border: 2px solid var(--line); }
.var-card.st-pending { border-color: #c92a2a; } .var-card.st-approved { border-color: #2b8a3e; }
.var-card h3 { margin: 0; }

/* ===== 오늘 작업 종료 (p.14) ===== */
.problem-choice .choice.ok input:checked + span { background: var(--ok-bg); border-color: #2b8a3e; color: var(--ok-ink); }
.problem-choice .choice.bad span { color: #c92a2a; border-color: #e6a5a5; }
.problem-choice .choice.bad input:checked + span { background: #c92a2a; border-color: #c92a2a; color: #fff; }
.problem-box { margin: 10px 0; }
.leave-check { margin-top: 14px; }
.warn-text { color: #8A3F0C; } .bad-text { color: var(--err-ink); } .link-text { color: var(--orange-ink); font-weight: 700; }

/* ===== 승인 대기 (p.22) ===== */
.approval-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 14px; align-items: start; margin-bottom: 14px; }
.approval-list { display: flex; flex-direction: column; gap: 8px; }
.approval-item { display: flex; flex-direction: column; gap: 3px; color: var(--text); padding: 12px 14px; margin: 0; }
.approval-item:hover { text-decoration: none; border-color: var(--orange); }
.approval-item.active { border: 2px solid var(--navy); }
.approval-item.urgent { border-left: 4px solid #c92a2a; }
.approval-detail h2 { margin: 0; }
.side-nav .count.orange { background: var(--orange); color: var(--navy); }
.links-card { display: flex; flex-direction: column; gap: 10px; }
.links-card a { font-weight: 700; }
.work-cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 0; }
.visit-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.visit-row > div { display: flex; flex-direction: column; }
.visit-row form { margin: 0; }
.visit-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.visit-links { display: inline-flex; gap: 10px; margin-left: 10px; }
.visit-links form { display: inline; }
.visit-links .link-btn { font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.visit-links .danger-link { color: var(--danger); }
.visit-actions { margin-left: auto; justify-content: flex-end; flex-wrap: wrap; }
.fgas-edit summary { list-style: none; }
.fgas-edit[open] form { margin-top: 8px; min-width: 220px; }

@media (max-width: 860px) {
  .cal-grid, .approval-grid, .work-cards.two { grid-template-columns: 1fr; }
}

.reschedule { width: 100%; }
.reschedule form { margin-top: 8px; padding: 10px; border-radius: 10px; background: #f7f9fb; }
.reset-box { border: 2px solid var(--orange); }
.reset-box .invite-link { margin: 6px 0 8px; }

/* ===== 시안 레이아웃 맞추기 ===== */
/* 휴대폰 작업 화면: 흰 머리줄 (뒤로 + 부제 + 제목 + 진행 막대) */
.flow-top { background: #fff; border-bottom: 1px solid var(--line); margin: -20px -16px 14px; padding: 14px 16px 12px; }
.flow-top .flow-head { margin: 0; }
.flow-top .flow-steps { margin: 12px 0 0; }
.flow-top .flow-hint { margin: 8px 0 0; }
.back-btn { background: #F2F2EF; border-color: transparent; }
@media (max-width: 860px) {
  /* 작업 흐름 화면과 '오늘'에서는 위쪽 로고 바를 숨긴다 (시안처럼 화면 자체 머리줄만) */
  body:has(.flow-top) .mobile-top, body:has(.today-head) .mobile-top, body:has(.site-head) .mobile-top { display: none; }
  .flow-top { margin: -14px -12px 14px; padding: calc(12px + env(safe-area-inset-top)) 12px 12px; }
  .today-head { padding-top: env(safe-area-inset-top); }
}

/* 프로젝트 상세 (시안 p.23): 2단 */
.crumb { margin-bottom: 2px; }
.project-head { align-items: flex-start; flex-wrap: wrap; }
.project-head h1 { font-size: 1.5rem; }
.project-head p { margin: 2px 0 0; }
.head-actions form { margin: 0; }
.stage-card { padding: 14px 18px; }
.stage-card .stagebar { margin: 0; }
.stage-move { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.stage-move select, .stage-move input { width: auto; padding: 6px 10px; }
.project-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.project-grid h2 { font-size: 1.05rem; margin: 0 0 10px; }
.project-grid .q-head { margin-bottom: 8px; }
.project-grid .q-head h2 { margin: 0; }
table.mini { font-size: .85rem; }
.line-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--text); }
.line-row:last-of-type { border-bottom: 0; }
.line-row:hover { text-decoration: none; background: #fafaf8; }
.line-row > span:first-child { display: flex; flex-direction: column; min-width: 0; }
.line-row .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; margin-bottom: 10px; border-radius: 10px; background: #EEF1FF; color: #22348F; }
.notice-row b { margin-left: auto; }
.notice-row:hover { text-decoration: none; }
.person-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.person-row > span:first-child { display: flex; flex-direction: column; }
.person-row form { margin: 0; }
.assign-row { margin-top: 10px; }
.activity { list-style: none; margin: 0; padding: 0; font-size: .84rem; display: grid; gap: 5px; }
.btn.block { display: flex; width: 100%; }
@media (max-width: 960px) { .project-grid { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 861px) {
  .flow-top { margin: 0 0 14px; border: 1px solid #ECECE7; border-radius: var(--radius); }
}

/* 로그인 (시안 p.3) */
.auth-step { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 12px; background: #F7F7F4; }
.auth-step b { font-size: .95rem; }
.code-boxes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.code-box { text-align: center; font-size: 1.5rem !important; font-weight: 800; padding: 10px 0; border-radius: 10px; border: 1.5px solid #cfd6e0; }
.code-box:focus { border-color: var(--navy); outline: 2px solid #F5C9A4; }

/* 실내기 형태별 기본값 (바꾸지 않은 상태): 회색 점선 */
.choice.is-default input:checked + span { background: #ECECE7; color: #4b5060; border: 1.5px dashed #9AA0AE; }
table.mini th:first-child, table.mini td:first-child { white-space: nowrap; }

/* 현장조사 검토: 지금 상태에서 다음에 할 일 */
.next-step { border-left: 4px solid var(--orange); background: var(--orange-tint); }
.next-step .sec-label { display: block; font-size: 12px; font-weight: 700; color: var(--orange-ink); letter-spacing: .03em; margin-bottom: 4px; }
.next-step p { margin: 0 0 10px; }
.next-step.is-waiting { border-left-color: var(--line); background: var(--card); }
.next-step .row form { margin: 0; }
.center-row { justify-content: center; margin-top: 8px; }
.err-text { color: var(--err-ink); margin: 2px 0 6px; }
.report-card.is-problem { border-left: 4px solid var(--danger); }
td.muted a { color: var(--muted); }
.ref-no { white-space: nowrap; }
/* 설치업자 '내 작업': 맨 위 검색 */
.search-top { display: flex; gap: 8px; margin: 4px 0 14px; }
.search-top input { flex: 1; min-width: 0; }
/* 프로젝트 화면: 이 프로젝트의 확인할 일 */
.pending-tag { background: var(--orange-tint); color: var(--orange-ink); margin-right: 6px; }
.line-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* 홈 대시보드: 세 구역(지금 처리할 것 / 오늘 방문 / 전체 현황)을 확실히 나눈다 */
.dash-zone { margin: 0 0 28px; padding-top: 18px; border-top: 2px solid var(--line); }
.dash-zone.zone-action { border-top-color: var(--orange); }
.zone-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.zone-head h2 { margin: 0; font-size: 1.25rem; }
.zone-nums { display: flex; gap: 8px; flex-wrap: wrap; }
.znum { background: var(--card); border: 1px solid #ECECE7; border-radius: 999px; padding: 6px 14px; font-size: .88rem; color: var(--muted); }
.znum b { color: var(--text); font-size: 1.05rem; margin-right: 2px; }
.znum em { font-style: normal; color: var(--danger); font-weight: 700; }
.znum.hot { border-color: var(--orange); background: var(--orange-tint); color: var(--orange-ink); }
.znum.hot b { color: var(--orange-ink); }
a.znum:hover { border-color: var(--navy); }
.visit-line .vtime { font-weight: 800; font-size: 1.05rem; width: 56px; flex: none; }
.approval-grid.no-detail { grid-template-columns: minmax(0, 1fr); }
.approval-grid.no-detail .approval-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.approval-grid.no-detail .approval-list .card { margin: 0; }
/* 버튼 옆 뱃지가 버튼 높이만큼 늘어나 글자가 위로 붙던 문제 */
.row > .tag, .row > .var-badge, .q-head .tag, .line-row > .tag { align-self: center; }

/* 홈: 단계별 현황 보드 (단계마다 처리할 일 미리보기) */
.stage-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; }
.board-col { background: #E9E9E4; border-radius: var(--radius); padding: 12px; }
.board-title { margin: 0 0 10px; font-size: 1rem; }
.board-stage + .board-stage { margin-top: 14px; }
.board-stage-head { display: flex; justify-content: space-between; font-size: .85rem; font-weight: 700; color: var(--text); padding: 0 2px 6px; }
.board-stage-head b { background: var(--card); border-radius: 999px; padding: 0 8px; font-size: .8rem; }
.board-card { background: var(--card); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; display: flex; flex-direction: column; gap: 3px; border-left: 3px solid var(--orange); }
.board-card.is-waiting { border-left-color: var(--line); }
.board-card .board-addr { font-weight: 700; color: var(--text); }
.board-card .board-step { margin: 4px 0 6px; font-size: .85rem; line-height: 1.4; }
.board-card.is-waiting .board-step { color: var(--muted); }
.board-card .btn { align-self: flex-start; }
.board-card form { margin: 0; }
.board-empty { margin: 0 0 4px; font-size: .8rem; color: var(--muted); padding: 0 2px; }
.board-more { font-size: .82rem; padding: 0 2px; }
@media (max-width: 1100px) { .stage-board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .stage-board { grid-template-columns: minmax(0, 1fr); } }
.approval-item.is-waiting { background: #FAFAF8; }
.option-dates { display: block; color: var(--orange-ink); }
.confirm-dates { background: var(--orange-tint); border-radius: 10px; padding: 10px 12px; margin: 8px 0 4px; }
.confirm-dates p { margin: 0 0 8px; }
.confirm-dates .choices { margin-bottom: 8px; }
.confirm-dates label.small { flex-direction: row; align-items: center; gap: 6px; }
.visit-row .confirm-dates { flex-basis: 100%; width: 100%; box-sizing: border-box; }
.confirm-dates .choices { display: flex; flex-wrap: wrap; gap: 8px; }
.confirm-dates .choices .choice { width: auto; flex: none; }
.confirm-dates .choices .choice span { padding: 8px 14px; font-size: .92rem; }
.confirm-dates .row { align-items: center; gap: 10px; }
.confirm-dates label.small { white-space: nowrap; font-weight: 600; }
.confirm-dates input[type=time] { width: auto; }
.visit-row .confirm-dates div.choices, .visit-row .confirm-dates div.row { flex-direction: row; }
/* 일정: 방문 눌렀을 때 바로 바꾸는 창 */
.visit-dialog { border: 0; border-radius: var(--radius); padding: 20px 22px; width: min(560px, calc(100vw - 32px)); box-shadow: 0 12px 40px rgba(24, 27, 43, .25); }
.visit-dialog::backdrop { background: rgba(24, 27, 43, .45); }
.visit-dialog h2 { margin: 0; }
.visit-dialog .q-head { align-items: flex-start; margin-bottom: 12px; }
.visit-dialog .dialog-foot { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.visit-dialog .dialog-foot form { margin: 0; }
.book-box { margin: 4px 0 10px; }
.book-box[open] { background: var(--bg); border-radius: 12px; padding: 12px; }
.book-box[open] > summary { margin-bottom: 10px; }
/* 자격증 */
.lic-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.lic-row > span:first-child { display: flex; flex-direction: column; min-width: 0; }
.lic-row form { margin: 0; }
.lic-row input[name=note] { width: 160px; }
.lic-tr td { background: #FAFAF8; padding-top: 2px; }
.lic-upload { margin-top: 10px; }
.lic-upload[open] > summary { margin-bottom: 10px; }
.name-edit { margin-top: 10px; }
.name-edit[open] > summary { margin-bottom: 8px; }
.settings-table input, .settings-table select { width: 100%; min-width: 90px; }
.settings-table td { vertical-align: middle; }
.settings-table .new-row td { background: #FAFAF8; }
.extra-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
/* 사이드바: 상위 메뉴 + 하위 메뉴 */
.side-nav .nav-group { margin-top: 6px; }
.side-nav .nav-parent { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px 4px; font-size: .78rem; font-weight: 700; letter-spacing: .03em; color: rgba(255, 255, 255, .45); }
.side-nav a.sub { padding-left: 26px; font-size: .92rem; }
.settings-table input[type=checkbox] { width: auto; min-width: 0; }
.settings-table label.check { flex-direction: row; align-items: center; gap: 6px; white-space: nowrap; font-weight: 500; }
.settings-table th:last-child, .settings-table td:last-child { width: 80px; }
/* 정산·결제 */
.pay-cell { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pay-cell form { margin: 0; }
.pay-edit { flex-basis: 100%; }
.pay-edit[open] form { margin-top: 6px; background: var(--bg); padding: 10px; border-radius: 10px; }
.pay-table td { vertical-align: top; }
.pay-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.pay-row:first-of-type { border-top: 0; }
.pay-row .pay-cell { justify-content: flex-end; }
.switch-row { flex-direction: row; align-items: center; gap: 10px; font-weight: 500; }
.switch-row input { width: auto; }
.cal .cal-cell { cursor: pointer; }
.cal .cal-cell:hover { background: #FAFAF8; }
.cal .cal-item { cursor: pointer; }
/* 출결 */
.att-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.att-stats > div { background: var(--card); border: 1px solid #ECECE7; border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; }
.att-stats b { font-size: 1.5rem; }
.att-stats span { font-size: .82rem; color: var(--muted); }
.att-stats .ok b { color: var(--ok-ink); }
.att-stats .warn { border-color: var(--orange); background: var(--orange-tint); }
.att-stats .bad { border-color: var(--danger); background: var(--err-bg); }
.att-stats .bad b { color: var(--err-ink); }
.att-table tr.att-no_show td { background: #FDF3F2; }
.att-mini { font-size: .8rem; }
@media (max-width: 960px) { .att-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.stage-back { margin-top: 6px; } .stage-back form { margin-top: 6px; } .stage-back input { flex: 1; min-width: 200px; }
/* 가이드 */
.side-nav .nav-guide { margin-top: 14px; border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 12px; }
.guide p { line-height: 1.6; }
.guide-table td { vertical-align: top; line-height: 1.5; }
.guide-table td:first-child { white-space: nowrap; }
.guide-kv { grid-template-columns: minmax(0, 1fr); }
.guide-kv dd { line-height: 1.55; }
.guide-steps li, .guide-list li { margin-bottom: 8px; line-height: 1.55; }
.guide-kv > div { display: block; padding: 10px 0; }
.guide-kv dt { font-weight: 700; color: var(--text); margin-bottom: 3px; }
.guide-kv dd { text-align: left; font-weight: 400; margin: 0; color: var(--text); }
/* 단계별 현황: 단계마다 한 열 (1~5단계) */
.stage-board { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.board-stage-head { font-size: .95rem; padding-bottom: 10px; }
@media (max-width: 1300px) { .stage-board { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .stage-board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .stage-board { grid-template-columns: minmax(0, 1fr); } }
.guide-sub { margin: 18px 0 6px; font-size: 1rem; }
.status-table td:first-child { width: 170px; }
.status-table td:last-child { width: 32%; }
/* 일정 관리: 표 아래에 펼쳐지는 수정·예약 칸 */
.visit-panel { border: 2px solid var(--navy); margin-top: 12px; scroll-margin-top: 16px; }
.visit-panel h2 { margin: 0; }
.visit-panel .q-head { align-items: flex-start; margin-bottom: 12px; }
.visit-panel .dialog-foot { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.visit-panel .dialog-foot form { margin: 0; }
.cal-item.selected { outline: 3px solid var(--orange); outline-offset: 1px; }
.cal .cal-cell.selected { background: var(--orange-tint); }
/* 모달 (정산·결제 고치기 등) */
dialog.modal { border: 0; border-radius: var(--radius); padding: 20px 22px; width: min(520px, calc(100vw - 32px)); box-shadow: 0 12px 40px rgba(24, 27, 43, .25); }
dialog.modal::backdrop { background: rgba(24, 27, 43, .45); }
dialog.modal h2 { margin: 0; }
dialog.modal .q-head { align-items: flex-start; margin-bottom: 12px; }
dialog.modal form[method=dialog] { margin: 0; }
/* 모달은 어느 화면에서 열어도 한가운데 (부모 칸의 스타일에 밀리지 않게) */
dialog.modal[open] { position: fixed; inset: 0; margin: auto !important; height: fit-content; max-height: calc(100vh - 32px); overflow: auto; }
/* 휴대폰: 아래에서 올라오는 시트 */
@media (max-width: 640px) {
  dialog.modal[open] { inset: auto 0 0 0; margin: 0 !important; width: 100%; max-width: 100%; max-height: 88vh;
    border-radius: 18px 18px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); animation: sheet-up .2s ease-out; }
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
/* 단계별 현황 필터 */
.board-filter .znum.selected { background: var(--navy); border-color: var(--navy); color: #fff; }
.board-filter .znum.selected b { color: #fff; }
.done-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
/* 프로젝트 화면: 진행 카드 + 탭 */
.overview-card > .next-step { margin: 14px 0 0; box-shadow: none; border-radius: 12px; }
.overview-card .stage-auto { margin: 4px 0 0; }
.project-tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 2px solid var(--line); margin: 6px 0 14px; scrollbar-width: none; }
.project-tabs::-webkit-scrollbar { display: none; }
.ptab { background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px; padding: 10px 14px; font: inherit; font-weight: 600;
        color: var(--muted); cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.ptab:hover { color: var(--text); }
.ptab.active { color: var(--text); border-bottom-color: var(--orange); }
.ptab b { background: var(--bg); border-radius: 999px; padding: 0 7px; font-size: .78rem; color: var(--text); }
.ptab b.hot { background: var(--orange-tint); color: var(--orange-ink); }
.ptab .muted { font-weight: 400; font-size: .85rem; }
.ptab .new-badge { width: 18px; height: 18px; font-size: .7rem; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.tab-panel > .card:first-child { margin-top: 0; }
/* 결제 수정 창 */
.pay-modal { width: min(640px, calc(100vw - 32px)); }
.pay-balance { margin: 0; padding: 10px 12px; background: var(--bg); border-radius: 10px; }
.pay-balance b { font-size: 1.1rem; }
.pay-status-table { width: 100%; border-collapse: collapse; }
.pay-status-table th, .pay-status-table td { padding: 6px 4px; text-align: left; font-size: .88rem; }
.pay-status-table tbody th { white-space: nowrap; }
.pay-status-table select, .pay-status-table input { width: 100%; }
.pay-amt { font-size: .95rem; }
.lic-preview { max-width: 100%; max-height: 360px; border-radius: 10px; border: 1px solid var(--line); margin: 6px 0 10px; }

/* 휴대폰 번호 앞 국가 선택 */
.phone-field select.phone-cc { width: auto; flex: none; max-width: 46%; }
.phone-field .cc-other { display: inline-flex; align-items: center; gap: 2px; flex: none; font-weight: 600; }
.phone-field .cc-other[hidden] { display: none; }
.phone-field .cc-other input { width: 4.2em; text-align: center; }

/* 방금 보낸 변경 요청: 보낸 것이 바로 보이게 */
.var-card.just-sent { box-shadow: 0 0 0 3px var(--ok-ink) inset; }
.sent-banner { background: var(--ok-bg); color: var(--ok-ink); font-weight: 700; padding: 8px 12px; border-radius: 8px; margin-bottom: 10px; }
.danger-zone .q-head { align-items: center; }

/* 글자 크기: 화면 전체를 비율로 키운다 (사이드바의 '글자 크게') */
html[data-fs="l"] { zoom: 1.12; }
html[data-fs="xl"] { zoom: 1.25; }
.fs-switch { display: inline-flex; flex-wrap: wrap; gap: 8px; font-size: .85rem; color: #8E93A6; }
.fs-switch .link { color: #c9cede; font-size: .85rem; }
.fs-switch .link.on { color: #fff; font-weight: 700; text-decoration: underline; }

/* 날짜 고르기: 날짜마다 가능한 시간 */
.slot-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.slot-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.slot-row label { flex-direction: row; align-items: center; gap: 6px; font-weight: 500; }
.slot-row input[type=time] { width: auto; }

/* 현장조사: 방 크기·자동 계산·실내기 */
.next-menu.sticky-actions { position: static; }
.next-menu .grid-2 { gap: 8px; }
.room-size .dims select { width: auto; min-width: 5.5em; }
.unit-input { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.calc-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; background: var(--navy-tint); border-radius: 10px; padding: 10px 12px; margin-top: 10px; }
.calc-row b { display: inline-block; min-width: 3em; padding: 2px 8px; background: #fff; border: 1px dashed #b9c1d6; border-radius: 6px; text-align: center; }
.unit-of { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.indoor-unit .grid-2 { margin-top: 10px; }
.q-note { margin: -4px 0 6px; }
.room-group { padding: 0; overflow: hidden; }
.room-group > .room-group-head { display: flex; justify-content: space-between; gap: 10px; padding: 12px 14px 4px; }
.room-group .room-row { margin: 0; border-radius: 0; box-shadow: none; border-top: 1px solid var(--line); }
.room-group .add-unit { padding: 8px 14px 12px; }
.trunking-card label { margin-top: 8px; }

/* 현장 사진: 방별 묶음, 삭제 */
.photo-room { margin: 14px 0 6px; font-size: .95rem; }
.photo .photo-del { display: block; width: 100%; border: 0; border-top: 1px solid var(--line); background: #fff; color: var(--danger); padding: 6px; font: inherit; font-size: .8rem; cursor: pointer; }
a.pack-box { display: block; text-decoration: none; }
.photo-grid.pick .photo span { display: flex; align-items: center; gap: 6px; padding: 4px 6px; font-size: .8rem; font-weight: 500; }
.photo-grid.pick .photo { cursor: pointer; }
.room-size .grid-3.dims { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.room-size .dims select { min-width: 0; width: 100%; }
.room-size .dims .unit-input { display: flex; }
.review-unit { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 14px; }
.room-info { margin-bottom: 4px; }

/* 현장조사 목록: 실내기 줄 옆 ✕ 로 바로 빼기 */
.unit-line { display: flex; align-items: stretch; border-top: 1px solid var(--line); }
.unit-line .room-row { flex: 1; border-top: 0; }
.unit-del { margin: 0; display: flex; }
.unit-del-btn { background: none; border: 0; border-left: 1px solid var(--line); color: var(--muted); font-size: 18px; padding: 0 18px; cursor: pointer; }
.unit-del-btn:hover { color: var(--danger); background: var(--err-bg); }
.room-group-head form { margin: 0; }

/* 어느 방? (문제 보고·변경 요청·회사 연락) */
.room-pick { display: flex; flex-direction: column; gap: 4px; }
.tag.room-tag { background: var(--navy-tint); color: var(--navy); }

/* 알림(저장했습니다 등): 화면 위쪽에 잠깐 뜨는 알림 */
.toasts { position: fixed; top: 16px; right: 16px; z-index: 1000; display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
          width: min(400px, calc(100vw - 32px)); pointer-events: none; }
.flash.toast { pointer-events: auto; margin: 0; width: 100%; box-sizing: border-box; display: flex; align-items: center; gap: 10px; justify-content: space-between;
               box-shadow: 0 6px 20px rgba(24, 27, 43, .18); animation: toast-in .25s ease-out; transition: opacity .3s, transform .3s; }
.flash.toast.out { opacity: 0; transform: translateX(16px); }
.toast-x { background: none; border: 0; color: inherit; opacity: .6; cursor: pointer; font-size: 14px; padding: 2px 4px; }
.toast-x:hover { opacity: 1; }
@keyframes toast-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }

.scope-room .unit-head { margin: 0 0 10px; font-size: 1rem; }

/* 현장 기록: 위치별 시공 사진 칸 */
.shoot-card .q-head h2 { margin: 0; }
.shoot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 10px; }
.shoot-form { margin: 0; }
.shoot-tile { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px; min-height: 96px; border-radius: 12px;
              border: 1.5px dashed #cfd6e0; background: #fff; cursor: pointer; }
.shoot-tile:hover { border-color: var(--navy); }
.shoot-tile.has { border-style: solid; border-color: var(--ok-ink); background: var(--ok-bg); }
.shoot-tile.busy { opacity: .6; pointer-events: none; }
.shoot-tile input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.shoot-loc { font-weight: 800; font-size: 1.05rem; }
.shoot-count { font-size: .85rem; color: var(--muted); }
.shoot-tile.has .shoot-count { color: var(--ok-ink); font-weight: 700; }
.shoot-cam { margin-top: auto; font-size: .85rem; font-weight: 700; color: var(--navy); }
/* 위치 고르기 (문제 보고·변경 요청·회사에 연락) */
.room-pick { flex-direction: row !important; align-items: center; gap: 10px !important; }
.room-pick select { flex: 1; }
/* 시공 사진 섹션 안의 찍은 사진: 작은 썸네일로 여러 장 */
.shoot-card .shoot-sub { margin: 18px 0 4px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 1rem; }
.shoot-card .photo-room { font-size: .9rem; margin: 12px 0 6px; }
.shoot-card .photo-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }

.work-card h2 { margin: 0 0 10px; }
.choices.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; }
@media (max-width: 480px) { .choices.grid3 { grid-template-columns: repeat(2, 1fr); } }
.choices.grid3 .choice span { width: 100%; }

/* 위치별 시공 기록 칸 */
.loc-card { border: 1.5px dashed #cfd6e0; border-radius: 12px; padding: 12px; margin-top: 12px; }
.loc-card.has { border-style: solid; border-color: #b9dcc6; }
.loc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.loc-head b { font-size: 1.05rem; }
.loc-card.has .shoot-count { color: var(--ok-ink); font-weight: 700; }
.loc-work { margin-bottom: 10px; }
.loc-work .choice span { min-height: 36px; padding: 6px 12px; font-size: .9rem; }
.loc-card .photo-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.loc-card .shoot-form { margin: 0; }
.loc-card .shoot-tile { min-height: 100%; aspect-ratio: 1; justify-content: center; align-items: center; padding: 8px; }
.loc-problem { margin-top: 8px; }
.loc-problem summary { cursor: pointer; color: #c92a2a; font-weight: 700; font-size: .9rem; }
.loc-problem form { margin-top: 8px; }
.work-rooms { list-style: none; padding: 0; margin: 6px 0; }
.work-rooms li { margin: 4px 0; }
.loc-card .shoot-cam { margin-top: 0; }

/* 위치 칸 안의 문제 보고·변경 요청·회사에 연락 */
.loc-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.loc-actions .la { font: inherit; font-size: .85rem; font-weight: 700; padding: 9px 4px; border-radius: 10px; border: 1.5px solid #cfd6e0; background: #fff; color: var(--text); cursor: pointer; }
.loc-actions .la.problem { border-color: #e3a3a3; color: #c92a2a; }
.loc-actions .la.change { border-color: #f0c39c; color: #8A3F0C; }
.loc-actions .la.on { background: var(--navy-tint); box-shadow: inset 0 0 0 2px currentColor; }
.loc-card .site-form { margin: 10px 0 0; box-shadow: none; border: 1px solid var(--line); }
.loc-card.general { border-style: solid; background: #fafbfc; }
.form-loc { margin: 0; font-weight: 700; color: var(--navy); }

.loc-done { margin: 0 0 8px; font-size: .9rem; font-weight: 700; color: var(--ok-ink); }
.loc-sent { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; }
.loc-sent li { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 8px; background: #f5f6f8; border-left: 3px solid #cfd6e0; font-size: .9rem; }
.loc-sent li.problem { border-left-color: #c92a2a; background: #fdf1f1; }
.loc-sent li.change { border-left-color: var(--orange); background: var(--orange-tint); }

/* 문제 보고 처리 */
.open-problems { display: block; color: #c92a2a; font-weight: 700; border-left: 4px solid #c92a2a; }
.problem-card { border: 1px solid var(--line); border-left: 4px solid #c92a2a; border-radius: 10px; padding: 12px; margin-top: 10px; }
.problem-card.st-resolved { border-left-color: var(--ok-ink); opacity: .85; }
.problem-handle { margin-top: 8px; }
.problem-reply { margin-top: 4px; padding: 6px 8px; border-radius: 6px; background: #fff; border: 1px solid var(--line); font-size: .88rem; }

/* 회사가 추가 사진을 요청한 현장 조사: 눈에 띄게 */
.task-card.urgent { border: 2px solid #c92a2a; }
.request-alert { margin: 6px 0; padding: 8px 10px; border-radius: 8px; background: #fdecea; color: #a12a22; font-weight: 700; font-size: .9rem; }
.room-row.has-request { border-left: 4px solid #c92a2a; background: #fff7f6; }

/* 자료 보기: PDF를 페이지마다 그림으로 */
.pdf-pages { display: flex; flex-direction: column; gap: 8px; }
.pdf-page { width: 100%; height: auto; background: #fff; box-shadow: 0 0 0 1px var(--line, #e5e5e5); }
.replace-file summary { cursor: pointer; font-weight: 600; }
.replace-file[open] summary { margin-bottom: 8px; }
.hint-box { background: #FFF6E6; border: 1px solid #F2C27B; border-radius: 8px; padding: 8px 10px; margin: 0; }
