/* ==========================================
   더보다 AI - 현장 점검 (field) 전용 스타일
   라이트 테마 오버라이드 · 모바일 퍼스트
   ========================================== */

/* ==========================================
   A1 — Storage Persist 경고 배너
   ========================================== */
#field-persist-banner {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  /* 기본은 숨김 — JS 에서 hidden 해제 */
}

#field-persist-banner[hidden] {
  display: none !important;
}

/* 저장 불보장 (denied) — 빨간 경고 */
#field-persist-banner.field-persist-banner--denied {
  background: #fff0f0;
  color: #c0392b;
  border-left: 4px solid #c0392b;
}

/* 확인 불가 (unknown) — 회색 안내 */
#field-persist-banner.field-persist-banner--unknown {
  background: #f4f7fb;
  color: #4a6a8a;
  border-left: 4px solid #4a6a8a;
}

.field-persist-banner__msg {
  flex: 1;
  min-width: 0;
}

.field-persist-banner__backup-btn {
  flex-shrink: 0;
  font-size: 12px;
  padding: 6px 12px;
  min-height: 32px;
  /* denied 상태에서 버튼 색상 상속 방지 */
  color: #4a6a8a;
  background: #ffffff;
  border: 1px solid rgba(10, 22, 40, 0.14);
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}

.field-persist-banner__backup-btn:hover {
  border-color: #4a90d9;
  color: #4a90d9;
}

body.field-body {
  /* 라이트 테마 토큰 오버라이드 */
  --bg-deep: #f4f7fb;
  --bg-dark: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f4f7fb;
  --bg-input: #ffffff;
  --bg-input-focus: rgba(74, 144, 217, 0.08);

  --text-primary: #0a1628;
  --text-secondary: #4a6a8a;
  --text-muted: #8b9bab;

  --border: rgba(10, 22, 40, 0.08);
  --border-hover: rgba(74, 144, 217, 0.35);
  --border-focus: rgba(74, 144, 217, 0.60);

  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-family);
  letter-spacing: var(--letter-spacing);
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}

/* 모바일 컨테이너 */
.field-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px;
}

/* 상단 헤더 */
.field-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 0 16px;
}
.field-header-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.field-header-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}
.field-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* 아이콘 버튼 */
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-family);
}
.icon-btn:hover {
  border-color: var(--border-hover);
  color: var(--primary);
}
.icon-btn svg {
  width: 20px;
  height: 20px;
}

/* 검색 */
.field-search {
  margin-bottom: 16px;
  position: relative;
}
.field-search input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 15px;
  font-family: var(--font-family);
  outline: none;
  transition: all 0.15s;
}
.field-search input:focus {
  border-color: var(--border-focus);
  background: var(--bg-input-focus);
}
.field-search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  pointer-events: none;
}

/* 장소 카드 */
.place-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 40px;
}
.place-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary-light);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  color: inherit;
}
.place-card:hover, .place-card:active {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}
.place-card.active {
  border-left-color: var(--primary);
  box-shadow: 0 2px 12px rgba(74, 144, 217, 0.12);
}
.place-icon {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(74, 144, 217, 0.10);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.place-icon svg {
  width: 24px;
  height: 24px;
}
.place-body {
  flex: 1;
  min-width: 0;
}
.place-address {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}
.place-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.place-progress {
  flex: 0 0 auto;
  min-width: 56px;
  height: 32px;
  padding: 0 12px;
  border-radius: 9999px;
  background: rgba(74, 144, 217, 0.10);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.place-progress.complete {
  background: rgba(39, 174, 96, 0.12);
  color: var(--status-good);
}

/* 배정 작업자 배지 */
.place-meta-badge {
  display: inline-block;
  padding: 1px 8px;
  margin-right: 4px;
  border-radius: 9999px;
  background: rgba(74, 144, 217, 0.10);
  color: var(--primary);
  font-size: 11px;
  font-weight: 600;
  border: 1px solid rgba(74, 144, 217, 0.20);
}
.place-meta-badge.me {
  background: rgba(74, 144, 217, 0.22);
  color: #1a3669;
  font-weight: 700;
}
.place-meta-badge.muted {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-muted);
  border-color: rgba(0, 0, 0, 0.06);
}

/* 빈 상태 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state h3 {
  font-size: 17px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 700;
}
.empty-state p {
  font-size: 13px;
  margin-bottom: 20px;
}
.empty-state .btn-cta {
  display: inline-flex;
  padding: 12px 20px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-family);
}

/* 로딩 스켈레톤 */
.loading-skeleton {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.skeleton-card {
  height: 82px;
  border-radius: 14px;
  background: linear-gradient(90deg, #f0f0f0 0%, #f7f7f7 50%, #f0f0f0 100%);
  background-size: 200% 100%;
  animation: skel 1.4s ease-in-out infinite;
}
@keyframes skel {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ==========================================
   rooms.html — 방 목록 페이지
   ========================================== */

/* 상단 액션바 (← 장소 / 모드) */
.field-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0 12px;
}

.btn-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-family);
  cursor: pointer;
  transition: all 0.15s;
  min-height: 36px;
}
.btn-chip:hover {
  border-color: var(--border-hover);
  color: var(--primary);
}
.btn-chip svg {
  width: 16px;
  height: 16px;
}
/* 2026-06-17 — 아이콘 전용 chip(클라우드 저장). 텍스트 제거로 폭 축소 → 상단 오터치 감소(사용자 요청). */
.btn-chip.btn-chip-icon {
  padding: 8px;
  gap: 0;
}

/* 장소 헤더 */
.field-place-head {
  padding: 4px 0 16px;
}
.field-address {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
  line-height: 1.4;
}
.field-page-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* 평면도 영역 — 접기/펴기 wrapper */
.blueprint-section {
  margin-bottom: 24px;
}
.blueprint-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #1a3669;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.blueprint-toggle:hover {
  background: var(--bg-card-hover);
  border-color: #4a90d9;
}
.blueprint-section:not(.collapsed) .blueprint-toggle {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom: 0;
}
.bp-toggle-caret {
  display: inline-block;
  font-size: 12px;
  color: #4a90d9;
  transition: transform 0.2s ease;
}
.blueprint-section.collapsed .bp-toggle-caret {
  transform: rotate(-90deg);
}
.bp-toggle-label {
  flex: 1;
  text-align: left;
}
.bp-toggle-hint {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}
.blueprint-section.collapsed .blueprint-area {
  display: none;
}

/* 평면도 영역 */
.blueprint-area {
  border-radius: 0 0 14px 14px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 0;
}
.blueprint-placeholder {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
}
.blueprint-placeholder svg {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  color: var(--text-muted);
  opacity: 0.5;
}
.blueprint-placeholder-text {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}
.blueprint-view {
  position: relative;
  background: #fff;
}
.blueprint-viewport {
  position: relative;
  width: 100%;
  height: min(70vh, 480px);
  overflow: hidden;
  background: #fff;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.blueprint-canvas {
  position: absolute;
  top: 0; left: 0;
  transform-origin: 0 0;
  /* transform 은 JS 에서 inline 으로 설정 */
}
.blueprint-image {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
  pointer-events: none;
}
@media (pointer: fine) {
  .blueprint-viewport { height: min(82vh, 720px); }
}
.blueprint-toolbar {
  display: flex;
  gap: 6px;
  padding: 8px 10px;
  border-top: 1px solid var(--border);
  background: var(--bg-deep);
  align-items: center;
  flex-wrap: wrap;
}

/* 평면도 라벨 레이어 */
.label-layer {
  position: absolute;
  inset: 0;
  pointer-events: none; /* 라벨 자체만 클릭 받음 */
}

.bp-label {
  position: absolute;
  transform: translate(-50%, -50%) scale(var(--label-inv, 1));
  min-height: 28px;
  padding: 4px 12px;
  background: rgba(26, 54, 105, 0.92); /* Brand Deep */
  color: #fff;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  pointer-events: none; /* 기본: 클릭·드래그 비활성 */
  cursor: default;
}
.bp-label-editable {
  padding: 4px 8px 4px 12px;
  pointer-events: auto;
  cursor: grab;
  transition: transform 0.12s, box-shadow 0.12s;
  white-space: nowrap;
  max-width: 50%;
}
.bp-label-editable:hover {
  transform: translate(-50%, -50%) scale(calc(var(--label-inv, 1) * 1.04));
  box-shadow: 0 4px 16px rgba(26, 54, 105, 0.35);
}
.bp-label.dragging {
  cursor: grabbing;
  opacity: 0.92;
  transform: translate(-50%, -50%) scale(calc(var(--label-inv, 1) * 1.08));
  box-shadow: 0 6px 20px rgba(26, 54, 105, 0.5);
  z-index: 10;
}
.bp-label-text {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.bp-label-x {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex: 0 0 auto;
  transition: background 0.15s;
}
.bp-label-x:hover {
  background: var(--status-danger);
}
.bp-label-x svg { width: 10px; height: 10px; }

/* 드래그 중 돋보기 (모바일 전용) */
#bp-magnifier {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 2px solid #1a3669;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  background-repeat: no-repeat;
  background-color: #fff;
  pointer-events: none;
  z-index: 20;
  transition: left 0.12s, right 0.12s, top 0.12s;
}
#bp-magnifier::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(#1a3669, #1a3669) center/1px 16px no-repeat,
    linear-gradient(#1a3669, #1a3669) center/16px 1px no-repeat;
}
#bp-magnifier[hidden] { display: none; }
@media (pointer: fine) {
  #bp-magnifier { display: none !important; }
}

/* 라벨 인라인 편집 input */
.bp-label-input {
  min-width: 100px;
  height: 22px;
  padding: 0 8px;
  border-radius: 9999px;
  border: 2px solid #fff;
  background: rgba(26, 54, 105, 0.95);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-family);
  outline: none;
}
.bp-label-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

/* 블루프린트 툴바 보조 버튼 */
.btn-line-sm.btn-primary-ghost {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(74, 144, 217, 0.06);
}
.btn-line-sm.btn-primary-ghost:hover {
  background: rgba(74, 144, 217, 0.14);
}
.btn-line-sm.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ==========================================
   탭 모드 — 캔버스·힌트·확인 시트
   ========================================== */

.blueprint-canvas.tap-mode {
  cursor: crosshair;
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}
.tap-mode-hint {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 14px;
  background: rgba(26, 54, 105, 0.92);
  color: #fff;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  pointer-events: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

/* 탭 확인 시트 */
.sheet-action-primary {
  background: rgba(74, 144, 217, 0.10) !important;
  color: var(--primary) !important;
  border: 1px solid rgba(74, 144, 217, 0.25);
  margin-bottom: 8px;
}
.sheet-action-primary svg {
  color: var(--primary) !important;
}
.sheet-action-primary:hover:not(:disabled) {
  background: rgba(74, 144, 217, 0.18) !important;
}

.tap-alt-label {
  padding: 12px 16px 8px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}
.tap-alt-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 0 4px 8px;
}
.tap-alt-btn {
  padding: 12px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-family);
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}
.tap-alt-btn:hover {
  border-color: var(--primary);
  background: rgba(74, 144, 217, 0.06);
  color: var(--primary);
}
.tap-alt-btn-muted {
  color: var(--text-muted);
  font-weight: 500;
}
.tap-alt-btn-muted:hover {
  color: var(--text-secondary);
}

/* 배정 카운터 (툴바) */
.bp-counter {
  font-size: 12px;
  color: var(--text-muted);
  padding: 0 8px;
  font-weight: 600;
}

/* 탭 시트 빈 상태 */
.tap-empty {
  text-align: center;
  padding: 20px 16px;
  color: var(--text-secondary);
}
.tap-empty p {
  margin: 4px 0;
  font-size: 14px;
}

/* 평면도 로딩 스피너 */
.blueprint-spinner {
  width: 32px;
  height: 32px;
  margin: 0 auto 12px;
  border: 3px solid rgba(74, 144, 217, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 위험(삭제) 인라인 버튼 */
.btn-line-sm.btn-danger {
  color: var(--status-danger);
  border-color: rgba(192, 57, 43, 0.3);
}
.btn-line-sm.btn-danger:hover {
  background: rgba(192, 57, 43, 0.08);
  border-color: var(--status-danger);
}

/* 방 목록 헤더 */
.room-list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 4px 4px 12px;
}
.room-list-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}
.room-list-count {
  font-size: 12px;
  color: var(--text-muted);
}

/* 방 카드 래퍼 (카드 + 메뉴 버튼) */
.room-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.room-card-wrap {
  position: relative;
  display: flex;
}
.room-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 56px 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  font-family: var(--font-family);
  color: inherit;
}
.room-card:hover, .room-card:active {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}
.room-menu-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.room-menu-btn:hover {
  color: var(--primary);
  background: var(--bg-input-focus);
}
.room-menu-btn svg {
  width: 20px;
  height: 20px;
}
.room-icon {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: rgba(74, 144, 217, 0.08);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.room-icon svg {
  width: 18px;
  height: 18px;
}
.room-body {
  flex: 1;
  min-width: 0;
}
.room-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}
.room-type {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.room-progress {
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

/* 하단 액션 */
.field-bottom-actions {
  display: flex;
  gap: 8px;
  padding: 8px 0 40px;
}

.btn-line {
  flex: 1;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px dashed var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-family);
  cursor: pointer;
  transition: all 0.15s;
}
.btn-line:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--bg-input-focus);
}
.btn-line:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-line-sm {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-family);
  cursor: pointer;
}
.btn-line-sm:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ==========================================
   모달 (방 추가/편집)
   ========================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 40, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  animation: modal-fade 0.15s ease-out;
  backdrop-filter: blur(2px);
}
.modal-overlay[hidden] { display: none; }

@keyframes modal-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  animation: modal-pop 0.18s cubic-bezier(0.2, 0.8, 0.4, 1);
}
@keyframes modal-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 8px;
}
.modal-header h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.modal-close:hover {
  background: rgba(10, 22, 40, 0.06);
  color: var(--text-primary);
}
.modal-close svg { width: 18px; height: 18px; }

.modal-body {
  padding: 8px 20px 16px;
}

.modal-footer {
  display: flex;
  gap: 8px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--border);
}

/* 폼 요소 */
.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.field-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 15px;
  font-family: var(--font-family);
  outline: none;
  transition: all 0.15s;
}
.field-input:focus {
  border-color: var(--border-focus);
  background: var(--bg-input-focus);
}
.field-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* 버튼 (모달 내부) */
.btn-primary, .btn-secondary {
  flex: 1;
  height: 44px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-family);
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: -0.01em;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--border-hover); color: var(--text-primary); }

/* ==========================================
   Bottom Sheet (방 액션)
   ========================================== */

.modal-overlay.sheet-overlay {
  align-items: flex-end;
  padding: 0;
}
.sheet {
  width: 100%;
  max-width: 560px;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 6px 12px 12px;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
  animation: sheet-slide 0.22s cubic-bezier(0.2, 0.8, 0.4, 1);
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}
@keyframes sheet-slide {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.sheet-handle {
  width: 40px;
  height: 4px;
  background: rgba(10, 22, 40, 0.15);
  border-radius: 99px;
  margin: 6px auto 10px;
}
.sheet-title {
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  padding: 4px 12px 14px;
}
.sheet-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 8px;
}
.sheet-action {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: none;
  background: transparent;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-family);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
}
.sheet-action:hover:not(:disabled) {
  background: rgba(74, 144, 217, 0.08);
}
.sheet-action:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.sheet-action svg {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
  flex: 0 0 auto;
}
.sheet-action.danger {
  color: var(--status-danger);
}
.sheet-action.danger svg {
  color: var(--status-danger);
}
.sheet-action.danger:hover:not(:disabled) {
  background: rgba(192, 57, 43, 0.08);
}
.sheet-cancel {
  width: 100%;
  padding: 14px 16px;
  margin-top: 8px;
  border: none;
  background: rgba(10, 22, 40, 0.04);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-family);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}
.sheet-cancel:hover {
  background: rgba(10, 22, 40, 0.08);
  color: var(--text-primary);
}

/* ==========================================
   프리셋 카드 (일괄 추가)
   ========================================== */

.modal.modal-lg {
  max-width: 480px;
}

.preset-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.preset-list-compact { gap: 6px; }

.preset-card {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-family);
  color: inherit;
}
.preset-card:hover:not(:disabled) {
  border-color: var(--primary);
  background: var(--bg-input-focus);
}
.preset-card:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.preset-card.preset-card-sm {
  padding: 10px 14px;
}

.preset-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.preset-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.preset-badge {
  flex: 0 0 auto;
  padding: 3px 10px;
  border-radius: 9999px;
  background: rgba(74, 144, 217, 0.12);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
}
.preset-badge.muted {
  background: rgba(10, 22, 40, 0.06);
  color: var(--text-muted);
}
.preset-hint {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}
.preset-note {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  font-style: italic;
}

/* ==========================================
   세부위치 칩
   ========================================== */

.row-gap-6 {
  display: flex;
  gap: 8px;
}
.row-gap-6 .field-input { flex: 1; }

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 36px;
}
.chip-empty {
  font-size: 12px;
  color: var(--text-muted);
  padding: 8px 0;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px 6px 12px;
  background: rgba(74, 144, 217, 0.10);
  border: 1px solid rgba(74, 144, 217, 0.25);
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  line-height: 1;
}
.chip-x {
  width: 20px;
  height: 20px;
  border: none;
  background: transparent;
  color: var(--primary);
  opacity: 0.65;
  cursor: pointer;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.15s;
}
.chip-x:hover {
  opacity: 1;
  background: rgba(192, 57, 43, 0.12);
  color: var(--status-danger);
}
.chip-x svg { width: 12px; height: 12px; }

/* ==========================================
   점검 입력 (inspection.html)
   ========================================== */

.ins-section {
  margin-bottom: 20px;
}
.ins-section-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

/* 점검 위치 박스 */
.ins-location-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
}
.ins-location-row {
  display: flex;
  align-items: center;
  padding: 6px 0;
  gap: 12px;
  border-bottom: 1px dashed var(--border);
}
.ins-location-row:last-child { border-bottom: none; }
.ins-loc-key {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 60px;
}
.ins-loc-val {
  flex: 1;
  font-size: 14px;
  color: var(--text-primary);
  text-align: right;
}
/* 세부 위치 (칩 선택 + 직접 입력) */
.ins-subloc-section {
  padding: 8px 0 4px;
}
.ins-subloc-section .ins-loc-key {
  display: block;
  margin-bottom: 8px;
}
.ins-subloc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.ins-subloc-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 16px;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}
.ins-subloc-chip.active {
  background: #4a90d9;
  border-color: #4a90d9;
  color: #fff;
}
.ins-subloc-custom {
  height: 36px;
  font-size: 13px;
  border-radius: 8px;
}

/* 점검 유형 그리드 (2x2) */
.ins-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.ins-type-btn {
  padding: 14px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}
.ins-type-btn:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}
.ins-type-btn.active {
  border: 2px solid var(--primary);
  background: rgba(74, 144, 217, 0.32);
  color: var(--primary);
  box-shadow: inset 0 0 0 1px rgba(74, 144, 217, 0.5);
}
.ins-type-btn.active .ins-type-label::before {
  content: '●';
  margin-right: 6px;
  font-size: 10px;
  vertical-align: middle;
}

/* 육안 세부 유형 (2열 체크박스) */
.ins-subtype-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
}
.ins-subtype-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-primary);
  user-select: none;
}
.ins-subtype-item input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.ins-subtype-dot {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(74, 144, 217, 0.4);
  border-radius: 50%;
  flex: 0 0 auto;
  position: relative;
  transition: all 0.15s;
}
.ins-subtype-item input:checked + .ins-subtype-dot {
  border-color: var(--primary);
  background: var(--primary);
}
.ins-subtype-item input:checked + .ins-subtype-dot::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

/* 측정값 필드 */
.ins-measure-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}
.ins-measure-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ins-measure-field .ins-measure-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}
.ins-measure-field .ins-measure-label em {
  font-style: normal;
  color: var(--text-muted);
  font-weight: 500;
}
.ins-measure-field .field-input {
  height: 40px;
  font-size: 14px;
}

/* 측정 결과 카드 (라디오 그리드) */
.ins-mitem-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
}
.ins-mitem {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ins-mitem-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}
.ins-mitem-remove {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: #c0392b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.ins-mitem-remove svg { width: 22px; height: 22px; }

/* 라디오 그리드 — 2열 */
.ins-mitem-radios {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
}
.ins-mitem-radio {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 4px 0;
}
.ins-mitem-radio input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: #4a90d9;
  margin: 0;
  flex-shrink: 0;
}
.ins-mitem-radio-label {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.3;
}

/* 값 입력 */
.ins-mitem-value {
  height: 44px;
  font-size: 15px;
}
.ins-mitem-custom {
  height: 40px;
  font-size: 14px;
}

/* 추가 버튼 */
.ins-mitem-add {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  font-size: 14px;
  font-weight: 600;
}

/* 메모 */
.ins-memo {
  min-height: 100px;
  padding: 12px 14px;
  line-height: 1.5;
  resize: vertical;
  font-family: var(--font-family);
}

/* 사진 */
.ins-photo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  font-size: 15px;
  margin-bottom: 12px;
}
.ins-photo-btn svg { width: 18px; height: 18px; }
.ins-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.ins-photo-thumb {
  position: relative;
  aspect-ratio: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.ins-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
  display: block;
}
.ins-photo-thumb-x {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s;
}
.ins-photo-thumb-x:hover { background: var(--status-danger); }
.ins-photo-thumb-x svg { width: 12px; height: 12px; }
.ins-photo-uploading {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-deep);
}
.ins-photo-missing {
  background: rgba(192, 57, 43, 0.08);
  border-color: rgba(192, 57, 43, 0.3);
}

/* 사진 미리보기 모달 */
.photo-preview-content {
  position: relative;
  max-width: 95vw;
  max-height: 95vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-preview-content img {
  max-width: 100%;
  max-height: 95vh;
  display: block;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.photo-preview-close {
  position: absolute;
  top: -44px;
  right: 0;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}
.photo-preview-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* 저장 액션 */
.ins-save-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 40px;
  margin-top: 8px;
}
.ins-save-actions .btn-primary,
.ins-save-actions .btn-secondary,
.ins-save-actions .btn-line:not(.tf-cancel) {
  min-height: 64px;
  font-size: 18px;
  padding: 18px 20px;
  font-weight: 600;
}
.ins-save-actions .btn-text {
  min-height: 56px;
  font-size: 16px;
  padding: 14px 20px;
}
.ins-save-actions .tf-save-row {
  display: flex;
  gap: 14px;
}
.ins-save-actions .tf-save-row > .btn-line {
  flex: 1;
}
.ins-save-actions .btn-line.btn-danger {
  margin-top: 8px;
  color: var(--status-danger);
  border-color: rgba(192, 57, 43, 0.3);
}
.ins-save-actions .btn-line.btn-danger:hover:not(:disabled) {
  background: rgba(192, 57, 43, 0.08);
  border-color: var(--status-danger);
}

/* ==========================================
   점검 기록 리스트 (defects.html)
   ========================================== */

/* 상단 "새 점검" 버튼 */
.btn-chip.btn-chip-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-chip.btn-chip-primary:hover {
  background: var(--primary-dark);
  color: #fff;
}
.btn-chip.btn-chip-primary svg { width: 14px; height: 14px; }

/* 필터 탭 */
.defect-filter-tabs {
  display: flex;
  gap: 6px;
  padding: 4px 0 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.defect-filter-tab {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-family);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.15s;
}
.defect-filter-tab:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}
.defect-filter-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.defect-filter-count {
  padding: 1px 8px;
  border-radius: 9999px;
  background: rgba(10, 22, 40, 0.08);
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}
.defect-filter-tab.active .defect-filter-count {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* 종류 서브필터 (칩) */
.type-subfilter-row {
  display: flex;
  gap: 6px;
  padding: 0 0 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.type-subfilter-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.type-subfilter-chip:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}
.type-subfilter-chip.active {
  background: var(--chip-color, var(--primary));
  color: #fff;
  border-color: var(--chip-color, var(--primary));
}
.type-subfilter-count {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 9999px;
  background: rgba(74, 144, 217, 0.14);
  color: var(--primary);
}
.type-subfilter-chip.active .type-subfilter-count {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* 정렬/그룹/검색 컨트롤 */
.defect-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 14px;
}
.defect-controls:empty {
  display: none;
}
.defect-ctrl-row {
  display: flex;
  gap: 8px;
}
.defect-ctrl {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.defect-ctrl-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  flex: 0 0 auto;
}
.defect-ctrl-select {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-family);
  outline: none;
  cursor: pointer;
  min-width: 0;
}

.defect-search-row {
  position: relative;
  display: flex;
  align-items: center;
}
.defect-search-icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}
.defect-search-input {
  width: 100%;
  height: 40px;
  padding: 0 38px 0 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  font-size: 14px;
  font-family: var(--font-family);
  color: var(--text-primary);
  outline: none;
}
.defect-search-input:focus {
  border-color: var(--primary);
}
.defect-search-clear {
  position: absolute;
  right: 6px;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  border-radius: 50%;
}
.defect-search-clear:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-primary);
}

/* 그룹 레이아웃 */
.defect-group {
  margin-bottom: 16px;
}
.defect-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #f4f7fb;
  border-radius: 8px;
  margin-bottom: 8px;
  position: sticky;
  top: 0;
  z-index: 5;
}
.defect-group-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}
.defect-group-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 9999px;
  background: var(--bg-card);
}
.defect-group-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 기록 리스트 */
.defect-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 80px;
}

/* 기록 카드 */
.defect-card {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-family);
  color: inherit;
  position: relative;
}
.defect-delete-btn {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  z-index: 2;
  transition: all 0.15s;
}
.defect-delete-btn:hover {
  background: rgba(192, 57, 43, 0.12);
  color: #c0392b;
}
.defect-card:hover, .defect-card:active {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
  box-shadow: 0 2px 10px rgba(10, 22, 40, 0.06);
}

.defect-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

/* 점검 유형 뱃지 */
.defect-type-badge {
  flex: 0 0 auto;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.defect-type-visual {
  background: rgba(74, 144, 217, 0.12);
  color: var(--primary);
}
.defect-type-insulation {
  background: rgba(230, 126, 34, 0.12);
  color: #e67e22;
}
.defect-type-leak {
  background: rgba(52, 152, 219, 0.14);
  color: #2980b9;
}
.defect-type-equipment {
  background: rgba(122, 143, 163, 0.15);
  color: #5a6c7e;
}

.defect-subtype-line {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.defect-date {
  flex: 0 0 auto;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.defect-room-name {
  font-size: 12px;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 4px;
}
.defect-sublocation,
.defect-measure-line {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
  line-height: 1.3;
}
.defect-card-type {
  border-left: 4px solid var(--accent, #4a90d9);
}

.defect-memo {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-top: 4px;
  white-space: pre-wrap;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.defect-thumbs {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.defect-thumb {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  flex: 0 0 auto;
  position: relative;
}
.defect-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.defect-thumb-more {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-input-focus);
}
.defect-thumb-missing {
  background: rgba(192, 57, 43, 0.08);
  border-color: rgba(192, 57, 43, 0.3);
}

/* ==========================================
   종류 중심 — 9종 카드 그리드
   ========================================== */
.type-card-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 20px;
}
/* 2026-08-21 표준 항목 체크리스트 — 상단 요약 배지 + 미작성 카드 강조 (표시 전용) */
.standard-checklist {
  padding: 8px 12px;
  margin-bottom: 12px;
  border-radius: 8px;
  background: #fff8e1;
  font-size: 14px;
  color: var(--text-secondary);
}
.standard-checklist b { color: #e67e22; }
.standard-checklist.is-complete {
  background: #f0fff4;
  color: #27ae60;
  font-weight: 600;
}
.type-card-missing::after {
  content: '●';
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 10px;
  color: #e67e22;
}
.type-card-missing .type-card-count {
  color: #e67e22;
  font-weight: 700;
}

.type-section-head {
  margin-bottom: 10px;
  padding-left: 4px;
}
.type-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}
.type-section-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.type-section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.type-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 16px 14px 12px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, #fff) 0%, #fff 100%);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06), 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent);
  cursor: pointer;
  text-align: left;
  font-family: var(--font-family);
  transition: transform 0.15s, box-shadow 0.15s;
  overflow: hidden;
}
.type-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent, #4a90d9);
  border-radius: 14px 0 0 14px;
}
.type-card:active {
  transform: scale(0.97);
  box-shadow: 0 2px 12px color-mix(in srgb, var(--accent) 20%, transparent);
}
.type-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 12%, #fff);
  font-size: 22px;
  margin-bottom: 6px;
}
.type-card-count {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  background: color-mix(in srgb, var(--accent) 12%, #f4f7fb);
  color: var(--accent, #4a6a8a);
}
.type-card-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}
.type-card-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}
.type-card-bar {
  width: 100%;
  height: 4px;
  background: color-mix(in srgb, var(--accent) 10%, #e8ecf0);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}
.type-card-bar-fill {
  height: 100%;
  background: var(--accent, #4a90d9);
  border-radius: 2px;
  transition: width 0.3s;
}
/* 2026-08-21 Phase B2 Task 3 — '추가 점검' 섹션 회색 톤(특이 상황 카드 구분) */
.type-section[data-group="extra"] .type-card {
  filter: saturate(0.35);
  opacity: .85;
}

/* ==========================================
   종류 중심 — type-form 입력 화면
   ========================================== */
.tf-room-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.tf-room-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}
.tf-room-chip.active {
  background: #4a90d9;
  border-color: #4a90d9;
  color: #fff;
}
/* 2026-08-21 Phase D P1-2 — 편집 재진입 시 soft-delete 방 선택 보존용 비활성 칩 */
.tf-room-chip-ghost {
  opacity: 0.55;
  cursor: default;
}
/* 2026-08-21 하자 방 변경 — 방 선택 시트 (inspection.html 편집 모드) */
.defmove-sheet {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10, 22, 40, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.defmove-sheet-card {
  background: var(--bg-card, #fff);
  border-radius: 14px;
  padding: 20px;
  max-width: 420px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.defmove-sheet-title {
  font-size: 15px;
  font-weight: 700;
}
.defmove-sheet-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* 2026-08-21 Phase D — 위치 입력 통일: 위치 제안 칩(활성 방 + 항목별 프리셋) */
.tf-loc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 8px;
}
.tf-loc-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 12px;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}
.tf-loc-chip:active {
  background: #4a90d9;
  border-color: #4a90d9;
  color: #fff;
}
.tf-no-rooms {
  padding: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}
.tf-photo-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.tf-photo-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  font-size: 14px;
  font-weight: 600;
}
/* 2026-04-26: HTML hidden 속성 강제 — .tf-photo-btn 의 display:flex 가
   UA 기본 [hidden]{display:none} 과 동일 특정성(0,1,0)이라 author 규칙이 이겨
   btn.hidden=true 설정해도 버튼이 계속 노출되던 버그 수정. panelSpec 등에서
   FLIR 버튼 숨김이 실제로 동작하게 함. */
.tf-photo-btn[hidden] {
  display: none !important;
}
/* [#14 옵션 B] .tf-photo-row 의 display: grid 가 UA [hidden] 을 이김 — !important 로 강제
   (기존 .tf-photo-btn[hidden] 패턴과 동일 이유) */
.tf-photo-row[hidden] {
  display: none !important;
}

/* [#14 옵션 B] 연속 액션 바 강조 — primary 색 + 약간 다른 배경으로 "연속 모드" 명시 */
.tf-photo-row-continue {
  background: var(--brand-lightbg, #eef5ff);
  border-radius: 8px;
  padding: 8px;
  margin-bottom: 10px;
}

.tf-photo-btn-primary {
  background: var(--brand-blue, #4a90d9);
  color: white;
  border-color: var(--brand-blue, #4a90d9);
}

.tf-photo-btn-primary:disabled {
  background: var(--text-muted, #999);
  border-color: var(--text-muted, #999);
  cursor: not-allowed;
}

.tf-photo-quota {
  font-size: 13px;
  color: var(--text-muted, #666);
  display: inline-block;
  margin-top: 6px;
}

/* type-form 의 FLIR row — 기본 행과 독립 */
.tf-photo-row-flir {
  margin-bottom: 8px;
}
.tf-fields-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 16px;
}
.tf-fields-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.tf-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.tf-field-group-title {
  grid-column: 1 / -1;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 8px 0 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2px;
}
.tf-field-group-title:first-child {
  padding-top: 0;
}
.tf-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tf-field-full {
  grid-column: 1 / -1;
}
.tf-field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}
.tf-field-unit {
  font-weight: 500;
  color: var(--text-muted);
}
.tf-field-input {
  height: 44px;
  font-size: 15px;
}
.tf-field-textarea {
  width: 100%;
  min-height: 76px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: var(--font-family);
  resize: vertical;
}
/* 쌍 입력 (사양 + 참고) */
.tf-field-pair .tf-field-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.tf-pair-row {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 8px;
}
.tf-pair-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.tf-pair-sublabel {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}
/* 2026-06-17 — 단위 힌트(예: 분전반 차단기 '(A)'). 숫자만 입력하면 보고서에 단위 자동 부착. */
.tf-pair-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.tf-pair-input-wrap .tf-field-input {
  flex: 1;
  min-width: 0;
}
.tf-pair-unit {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
}
/* 라디오 (정상/비정상) */
.tf-radio-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tf-radio-chip {
  flex: 1 1 80px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.15s;
}
.tf-radio-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.tf-radio-chip:hover {
  border-color: var(--border-hover);
}
/* :has(input:checked) 로 강제 — active 클래스 토글 시점에 의존 안 함 */
.tf-radio-chip.tf-radio-normal:has(input:checked),
.tf-radio-chip.tf-radio-normal.active {
  background: #b6f1c7 !important;
  color: #1a6b3b !important;
  border: 2px solid #27ae60 !important;
  box-shadow: inset 0 0 0 1px #27ae60;
}
.tf-radio-chip.tf-radio-abnormal:has(input:checked),
.tf-radio-chip.tf-radio-abnormal.active {
  background: #ffc4c4 !important;
  color: #7a1a13 !important;
  border: 2px solid #c0392b !important;
  box-shadow: inset 0 0 0 1px #c0392b;
}
.tf-radio-chip.tf-radio-absent:has(input:checked),
.tf-radio-chip.tf-radio-absent.active {
  background: #d4dce4 !important;
  color: #2c3e50 !important;
  border: 2px solid #8a99ab !important;
  box-shadow: inset 0 0 0 1px #8a99ab;
}
/* 색상 변종 없는 generic — primary 파란색 */
.tf-radio-chip:not(.tf-radio-normal):not(.tf-radio-abnormal):not(.tf-radio-absent):has(input:checked),
.tf-radio-chip.active:not(.tf-radio-normal):not(.tf-radio-abnormal):not(.tf-radio-absent) {
  background: rgba(74, 144, 217, 0.32) !important;
  color: var(--primary) !important;
  border: 2px solid var(--primary) !important;
  box-shadow: inset 0 0 0 1px var(--primary);
}
.tf-memo-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 16px;
}
.tf-save-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.tf-cancel {
  display: block;
  width: 100%;
  text-align: center;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
}
.btn-text {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-family);
}

/* ==========================================
   OCR (측정기 이미지 자동 기입)
   ========================================== */
.tf-fields-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.tf-fields-title-row .tf-fields-title {
  margin-bottom: 0;
}
.tf-ocr-btn {
  font-size: 12px;
  padding: 8px 12px;
  height: auto;
  border-radius: 8px;
  white-space: nowrap;
  border: 1px dashed rgba(74, 144, 217, 0.6);
  color: #1a3669;
  background: rgba(74, 144, 217, 0.08);
  font-weight: 700;
  cursor: pointer;
}
.tf-ocr-btn:hover {
  background: rgba(74, 144, 217, 0.14);
}

/* OCR 모달 */
.ocr-modal {
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
.ocr-modal-body {
  overflow-y: auto;
  padding: 12px 20px 16px;
}
.ocr-modal-footer {
  border-top: 1px solid var(--border);
}

/* 진행 영역 */
.ocr-progress-img-wrap {
  width: 100%;
  max-height: 220px;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f4f7fb;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ocr-progress-img-wrap img {
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
}
.ocr-progress-status {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  text-align: center;
}
.ocr-progress-bar-wrap {
  height: 6px;
  border-radius: 4px;
  background: rgba(10, 22, 40, 0.08);
  overflow: hidden;
  margin-bottom: 8px;
}
.ocr-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #4a90d9, #1a3669);
  width: 0%;
  transition: width 0.2s ease;
}
.ocr-progress-note {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

/* 결과 영역 */
.ocr-result-hint {
  font-size: 13px;
  color: var(--text-secondary);
  background: #f4f7fb;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  line-height: 1.5;
}
.ocr-result-hint b {
  color: #1a3669;
}
.ocr-result-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ocr-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}
.ocr-row-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
}
.ocr-row-checkbox {
  width: 18px;
  height: 18px;
  accent-color: #4a90d9;
  cursor: pointer;
}
.ocr-row-label {
  flex: 1;
}
.ocr-row-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 26px;
}
.ocr-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  color: var(--text-secondary);
}
.ocr-row-from {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}
.ocr-row-from b {
  color: #1a3669;
}
.ocr-existing {
  background: rgba(10, 22, 40, 0.06);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 11px;
}
.ocr-existing-empty {
  color: var(--text-muted);
  font-style: italic;
}
.ocr-convert-badge {
  background: rgba(230, 126, 34, 0.14);
  color: #b9530a;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}
.ocr-row-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ocr-row-input {
  flex: 1;
  height: 40px;
  font-size: 14px;
}
.ocr-row-unit {
  font-size: 12px;
  color: var(--text-muted);
  min-width: 40px;
}

/* 메모 섹션 */
.ocr-memo-section {
  margin-top: 12px;
  padding: 12px;
  border: 1px dashed var(--border-hover);
  border-radius: 10px;
  background: rgba(74, 144, 217, 0.04);
}
.ocr-memo-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.ocr-memo-hint {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}
.ocr-memo-check {
  font-size: 13px;
  margin-bottom: 6px;
}
.ocr-memo-list {
  list-style: disc;
  padding-left: 32px;
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.ocr-memo-list b {
  color: var(--text-primary);
}
.ocr-unmatched {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
}
.ocr-unmatched-tag {
  display: inline-block;
  background: rgba(192, 57, 43, 0.08);
  color: #9a2a1f;
  padding: 2px 8px;
  border-radius: 6px;
  margin-right: 4px;
  margin-bottom: 4px;
}

/* 빈 결과 */
.ocr-empty-area {
  text-align: center;
  padding: 16px 0;
}
.ocr-empty-icon {
  font-size: 40px;
  margin-bottom: 8px;
}
.ocr-empty-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.ocr-empty-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}
.ocr-empty-inline {
  padding: 12px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* 원문 텍스트 details */
.ocr-raw-details {
  margin-top: 12px;
  font-size: 12px;
}
.ocr-raw-details summary {
  cursor: pointer;
  color: var(--text-secondary);
  padding: 4px 0;
}
.ocr-raw-pre {
  background: #0a1628;
  color: #c5d4e6;
  padding: 10px;
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 160px;
  overflow-y: auto;
}

/* ==========================================
   FLIR 열화상 자동 기입
   ========================================== */
.flir-photo-btn {
  border: 1px solid rgba(231, 76, 60, 0.45) !important;
  color: #c0392b !important;
  background: rgba(231, 76, 60, 0.06) !important;
}
.flir-photo-btn:hover {
  background: rgba(231, 76, 60, 0.12) !important;
}

.flir-modal {
  max-width: 560px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}
.flir-modal-body {
  overflow-y: auto;
  padding: 12px 20px 16px;
}
.flir-modal-footer {
  border-top: 1px solid var(--border);
}

/* 진행 영역 */
.flir-preview-wrap {
  width: 100%;
  max-height: 240px;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0a1628;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.flir-preview-img {
  max-width: 100%;
  max-height: 240px;
  object-fit: contain;
}
.flir-progress-status {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  text-align: center;
}
.flir-progress-bar-wrap {
  height: 6px;
  border-radius: 4px;
  background: rgba(10, 22, 40, 0.08);
  overflow: hidden;
  margin-bottom: 8px;
}
.flir-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #e67e22, #c0392b);
  width: 0%;
  transition: width 0.2s ease;
}
.flir-crop-note {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

/* 결과 영역 */
.flir-image-preview-wrap {
  width: 100%;
  max-height: 220px;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0a1628;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.flir-image-preview {
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
}
.flir-hint {
  font-size: 13px;
  color: var(--text-secondary);
  background: #f4f7fb;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  line-height: 1.5;
}
.flir-hint b { color: #1a3669; }

.flir-spots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.flir-spot-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.15s;
}
.flir-spot-card--ref {
  border-color: rgba(192, 57, 43, 0.6);
  background: rgba(231, 76, 60, 0.04);
  box-shadow: 0 0 0 1px rgba(192, 57, 43, 0.4) inset;
}
.flir-spot-card--suspect {
  border-color: rgba(41, 128, 185, 0.6);
  background: rgba(74, 144, 217, 0.04);
  box-shadow: 0 0 0 1px rgba(41, 128, 185, 0.4) inset;
}
.flir-spot-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.flir-spot-number {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}
.flir-spot-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
}
.flir-spot-tag--ref {
  background: #c0392b;
  color: #fff;
}
.flir-spot-tag--suspect {
  background: #2980b9;
  color: #fff;
}
.flir-spot-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.flir-spot-value-row {
  display: flex;
  align-items: center;
  gap: 4px;
}
.flir-spot-value-input {
  flex: 1;
  width: 100%;
  height: 40px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-family: var(--font-family);
  outline: none;
  text-align: right;
  transition: all 0.15s;
  /* 모바일에서 number input 의 spinner 숨김 */
  -moz-appearance: textfield;
}
.flir-spot-value-input::-webkit-outer-spin-button,
.flir-spot-value-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.flir-spot-value-input:focus {
  border-color: var(--border-focus);
  background: var(--bg-input-focus);
}
.flir-spot-value-unit {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-secondary);
}
.flir-spot-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.flir-spot-btn {
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-family);
}
.flir-spot-btn:hover {
  border-color: var(--border-hover);
}
.flir-spot-btn--ref.active {
  background: #c0392b;
  color: #fff;
  border-color: #c0392b;
}
.flir-spot-btn--suspect.active {
  background: #2980b9;
  color: #fff;
  border-color: #2980b9;
}

.flir-summary {
  background: #f4f7fb;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
}
.flir-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  padding: 4px 0;
  color: var(--text-secondary);
}
.flir-summary-row b {
  color: var(--text-primary);
  font-size: 14px;
}
.flir-summary-diff {
  border-top: 1px solid var(--border);
  margin-top: 4px;
  padding-top: 8px;
}
.flir-summary-diff b {
  color: #c0392b;
  font-size: 16px;
}
.flir-summary-empty {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  padding: 4px 0;
}
.flir-summary-skip {
  color: var(--text-muted);
  font-size: 12px;
  font-style: italic;
  font-weight: 500;
}

/* 디버그 영역 (전처리 크롭 + 원문) */
.flir-debug-block {
  background: #f4f7fb;
  border-radius: 8px;
  padding: 10px;
  margin-top: 6px;
}
.flir-debug-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.flir-debug-img {
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
}

/* 비활성 primary 버튼 — 모든 모달 공통 (FLIR·Licote OCR 등) */
.modal-overlay .btn-primary:disabled,
.modal-overlay .btn-primary:disabled:hover {
  background: rgba(10, 22, 40, 0.15);
  border-color: transparent;
  color: rgba(10, 22, 40, 0.45);
  cursor: not-allowed;
}

.flir-save-photo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}
.flir-save-photo input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #4a90d9;
  cursor: pointer;
}

/* 빈 결과 */
.flir-empty-area {
  text-align: center;
  padding: 16px 0;
}
.flir-empty-icon {
  font-size: 40px;
  margin-bottom: 8px;
}
.flir-empty-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.flir-empty-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}
.flir-raw-details {
  margin-top: 12px;
  font-size: 12px;
  text-align: left;
}
.flir-raw-details summary {
  cursor: pointer;
  color: var(--text-secondary);
  padding: 4px 0;
}
.flir-raw-pre {
  background: #0a1628;
  color: #c5d4e6;
  padding: 10px;
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 160px;
  overflow-y: auto;
}

/* ==========================================
   반응형
   ========================================== */
@media (max-width: 480px) {
  .field-header-title { font-size: 24px; }
  .field-page-title { font-size: 20px; }
  .place-address { font-size: 15px; }
}

/* ==========================================
   동기화 상태 배지 (상단바)
   ========================================== */
.field-sync-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid transparent;
  white-space: nowrap;
  margin-left: auto;
}
.field-sync-badge.fc-pending {
  background: #fff8e1; color: #e67e22; border-color: rgba(230, 126, 34, 0.3);
}
.field-sync-badge.fc-syncing {
  background: #eaf3ff; color: #1a3669; border-color: rgba(74, 144, 217, 0.3);
}
.field-sync-badge.fc-synced {
  background: #f0fff4; color: #27ae60; border-color: rgba(39, 174, 96, 0.3);
}
.field-sync-badge.fc-error {
  background: #fff0f0; color: #c0392b; border-color: rgba(192, 57, 43, 0.3);
}
.field-sync-badge.fc-offline {
  background: #f4f7fb; color: var(--text-muted); border-color: var(--border);
}
/* stale = 대기 1분 초과 — fc-error 와 동일 스타일, 클래스 별칭 */
.field-sync-badge.fc-stale {
  background: #fff0f0; color: #c0392b; border-color: rgba(192, 57, 43, 0.3);
}

/* ==========================================
   점검 완료 버튼 (A2)
   ========================================== */
.field-complete-btn {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, opacity 0.15s;
  /* 기본: 비활성 회색 */
  background: #d0d0d0;
  color: #888;
  pointer-events: none;
}

.field-complete-btn:not(:disabled) {
  background: #27ae60;
  color: #fff;
  pointer-events: auto;
}

.field-complete-btn:not(:disabled):hover {
  background: #219a52;
}

.field-complete-btn:disabled {
  background: #d0d0d0;
  color: #888;
  cursor: not-allowed;
}

/* 2026-04-28: 잠금 상태 시각 구분 */
/* 본인이 잠근 상태 — 해제 가능 (주황색) */
.field-complete-btn.locked-by-me {
  background: #e67e22 !important;
  color: #fff !important;
  pointer-events: auto !important;
  opacity: 1 !important;
  cursor: pointer !important;
}
.field-complete-btn.locked-by-me:hover { background: #ca6a1a !important; }

/* 다른 직원이 잠근 상태 — 클릭 가능(안내 팝업), 시각은 회색·자물쇠 */
.field-complete-btn.locked-by-other {
  background: #7a8fa3 !important;
  color: #fff !important;
  pointer-events: auto !important;
  opacity: 1 !important;
  cursor: help !important;
}
.field-complete-btn.locked-by-other:hover { background: #5a6b7a !important; }

/* ==========================================
   오프라인 CTA 강조 (A2)
   ========================================== */
.field-offline-cta {
  background: #4a90d9 !important;
  color: #fff !important;
  border-color: #4a90d9 !important;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(74, 144, 217, 0.35);
  animation: field-cta-pulse 1.6s ease-in-out infinite;
}

@keyframes field-cta-pulse {
  0%, 100% { box-shadow: 0 2px 8px rgba(74, 144, 217, 0.35); }
  50%       { box-shadow: 0 2px 16px rgba(74, 144, 217, 0.60); }
}

/* ==========================================
   작업자 배지 (defect 카드 헤더)
   ========================================== */
.defect-inspector,
.defect-inspector-me {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 700;
  margin-left: auto;
}
.defect-inspector {
  background: #f4f7fb;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.defect-inspector-me {
  background: rgba(74, 144, 217, 0.12);
  color: var(--primary);
  border: 1px solid rgba(74, 144, 217, 0.3);
}

/* ==========================================
   FAB 플로팅 버튼 (테스터 메뉴)
   ========================================== */
.ff-fab {
  position: fixed;
  right: 16px;
  bottom: 20px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #1a3669, #4a90d9);
  color: #fff;
  box-shadow: 0 4px 14px rgba(26, 54, 105, 0.35);
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s;
}
.ff-fab:active { transform: scale(0.92); }
.ff-fab-icon { font-size: 22px; }

/* ==========================================
   피드백 모달
   ========================================== */
.ff-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 40, 0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 2000;
  padding: 0;
}
.ff-modal {
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  background: #fff;
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  animation: ff-slide-up 0.25s ease-out;
}
@keyframes ff-slide-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.ff-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.ff-modal-head h3 { margin: 0; font-size: 17px; font-weight: 800; color: var(--text-primary); }
.ff-close {
  width: 32px; height: 32px;
  border: none; background: transparent;
  font-size: 18px; color: var(--text-muted);
  cursor: pointer; border-radius: 50%;
}
.ff-close:hover { background: rgba(0, 0, 0, 0.06); color: var(--text-primary); }
.ff-modal-body {
  padding: 16px 20px 24px;
  overflow-y: auto;
}
.ff-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.ff-tab {
  flex: 1;
  padding: 10px 6px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
}
.ff-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.ff-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
  margin-top: 10px;
}
.ff-tag-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 10px;
}
.ff-tag-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}
.ff-tag-chip input { position: absolute; opacity: 0; pointer-events: none; }
.ff-tag-chip:has(input:checked) {
  background: rgba(74, 144, 217, 0.1);
  color: var(--primary);
  border-color: var(--primary);
}
.ff-textarea {
  width: 100%;
  min-height: 100px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  font-family: var(--font-family);
  color: var(--text-primary);
  resize: vertical;
  outline: none;
}
.ff-textarea:focus { border-color: var(--primary); }
.ff-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.5;
}
.ff-hint code {
  background: #f4f7fb;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
}
.ff-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.ff-btn-primary, .ff-btn-line {
  flex: 1;
  height: 44px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-family);
  cursor: pointer;
  transition: all 0.15s;
}
.ff-btn-primary {
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
}
.ff-btn-line {
  background: #fff;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.ff-btn-line.ff-btn-danger {
  color: var(--status-danger);
  border-color: rgba(192, 57, 43, 0.3);
}
.ff-btn-line.ff-btn-danger:hover {
  background: rgba(192, 57, 43, 0.08);
}

/* 피드백 기록 리스트 */
.ff-log-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 50vh;
  overflow-y: auto;
}
.ff-log-item {
  background: #f4f7fb;
  border-radius: 8px;
  padding: 10px 12px;
}
.ff-log-meta {
  display: flex;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.ff-log-time { font-weight: 600; }
.ff-log-tag {
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
}
.ff-log-tag-bug { background: #fff0f0; color: #c0392b; }
.ff-log-tag-ux  { background: #eaf3ff; color: #1a3669; }
.ff-log-tag-idea { background: #fff8e1; color: #e67e22; }
.ff-log-tag-note { background: var(--bg-card); color: var(--text-muted); }
.ff-log-page {
  margin-left: auto;
  font-family: monospace;
  font-size: 10px;
}
.ff-log-content {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.ff-log-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.ff-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 6px;
}

/* ==========================================
   모바일 추가 반응형
   ========================================== */
@media (max-width: 480px) {
  .field-topbar {
    flex-wrap: wrap;
    gap: 6px;
  }
  .field-sync-badge {
    font-size: 10px;
    padding: 3px 8px;
  }
  .ff-fab {
    width: 48px; height: 48px;
    right: 12px; bottom: 16px;
  }
  .ff-tag-chip {
    font-size: 12px;
    padding: 8px 4px;
  }
  .tf-radio-chip {
    font-size: 13px;
    padding: 0 10px;
    height: 38px;
  }
  /* 저장 버튼은 현장 엄지 터치를 위해 모바일에서도 크게 유지 (2026-04-25) */
  /* font-size 17px 는 버튼 크기 16-18px 사이 — 모바일에서 제목/본문과 차별화하면서 터치 타겟 유지 */
  .ins-save-actions .btn-primary { font-size: 17px; }
  .type-section-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .type-card {
    padding: 14px 12px 10px;
  }
  .type-card-label { font-size: 14px; }
  .type-card-desc { font-size: 10px; }
}

/* ==========================================
   사진 워크플로 (캡션 + 다중 선택)
   ========================================== */
.fp-toolbar {
  margin: 8px 0 6px;
}
.fp-toolbar-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.fp-toolbar-info {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-blue, #4a90d9);
  margin-right: 4px;
}
.fp-toolbar-hint {
  font-size: 12px;
  color: var(--text-muted, #7a8fa3);
}
.fp-toolbar-btn {
  padding: 6px 12px;
  font-size: 13px;
  height: auto;
  min-height: 0;
}
.fp-toolbar-btn[disabled] {
  opacity: 0.45;
  pointer-events: none;
}

/* 썸네일에 캡션 자리를 만들기 위해 aspect-ratio 해제하고 컬럼 레이아웃 */
.ins-photo-grid .fp-thumb {
  aspect-ratio: auto;
  display: flex;
  flex-direction: column;
}
.ins-photo-grid .fp-thumb > img {
  aspect-ratio: 1;
  flex: 0 0 auto;
}
/* 2026-08-21 Phase C Task 2 — 캡션 프리셋 칩(평활도: 창호/문/바닥 레이저·수평계) */
.fp-caption-preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px 8px 0;
  background: rgba(255, 255, 255, 0.92);
}
.fp-caption-preset-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 0 10px;
  border-radius: 9999px;
  border: 1px solid var(--border, #e1e8f0);
  background: var(--bg-card, #fff);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary, #4a6a8a);
  cursor: pointer;
}
.fp-caption-preset-chip:active {
  background: #4a90d9;
  border-color: #4a90d9;
  color: #fff;
}

.fp-caption {
  display: block;
  width: 100%;
  border: none;
  border-top: 1px solid var(--border, #e1e8f0);
  padding: 6px 8px;
  font-size: 11px;
  color: var(--text-primary, #0a1628);
  background: rgba(255, 255, 255, 0.92);
  outline: none;
}
.fp-caption::placeholder {
  color: var(--text-muted, #aab8c2);
  font-size: 10px;
}
.fp-caption:focus {
  background: #fff;
  border-top-color: var(--brand-blue, #4a90d9);
}

/* 선택 모드 — 체크박스 */
.fp-check {
  position: absolute;
  top: 4px;
  left: 4px;
  z-index: 2;
  cursor: pointer;
}
.fp-check input { display: none; }
.fp-check span {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  transition: background 0.15s;
}
.fp-check input:checked + span {
  background: var(--brand-blue, #4a90d9);
  border-color: #fff;
  position: relative;
}
.fp-check input:checked + span::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.fp-grid--select .fp-thumb {
  cursor: pointer;
}
.fp-thumb--selected {
  outline: 2px solid var(--brand-blue, #4a90d9);
  outline-offset: -2px;
}
.fp-thumb--selected > img {
  opacity: 0.7;
}

/* ==========================================
   음성 입력 버튼
   ========================================== */
.ins-memo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.voice-btn {
  padding: 6px 12px;
  font-size: 13px;
  height: auto;
  min-height: 0;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.voice-btn--active {
  background: var(--status-danger, #c0392b);
  color: #fff;
  border-color: var(--status-danger, #c0392b);
  animation: voicePulse 1.4s ease-in-out infinite;
}
@keyframes voicePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(192, 57, 43, 0.45); }
  50% { box-shadow: 0 0 0 6px rgba(192, 57, 43, 0); }
}

/* ==========================================
   OCR 디버그 다운로드
   ========================================== */
.ocr-debug-dl-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 12px;
  font-size: 12px;
  height: auto;
  min-height: 0;
}
.ocr-debug-hint {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-muted, #7a8fa3);
  line-height: 1.45;
}

/* ==========================================
   충돌 배지 (나중에 선택 후 재표시)
   ========================================== */
.badge-conflict {
  display: inline-block;
  padding: 2px 8px;
  margin-left: 6px;
  background: #fff0f0;
  color: #c0392b;
  border: 1px solid #c0392b;
  border-radius: 9999px;
  font-size: 11px;
  cursor: pointer;
}
.badge-conflict:hover { background: #ffe0e0; }

/* dynamicList (환기 흡기 풍량) */
.tf-dynlist-row { display: grid; grid-template-columns: 1fr 120px 40px; gap: 8px; margin-bottom: 8px; align-items: center; }
.tf-dynlist-flow-wrap { display: flex; align-items: center; gap: 4px; }
.tf-dynlist-flow-wrap .tf-field-unit { font-size: 12px; color: var(--text-muted, #666); }
.tf-dynlist-del { padding: 8px; min-width: 40px; }
.tf-dynlist-add { width: 100%; margin-top: 4px; }

/* countOrAbsent (설비 확인) */
.tf-count-absent-row { display: flex; align-items: center; gap: 12px; }
.tf-count-input { max-width: 100px; }
.tf-absent-toggle { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.tf-absent-toggle input { width: 18px; height: 18px; }

/* 평활도 매트릭스 — Phase 1B T-A2 */
.floorlevel-row { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 8px;
                  padding: 12px; border: 1px solid var(--border); border-radius: 8px;
                  background: var(--bg-card, #fff); }
/* 2026-05-15 follow-up #1 — 방별 「측정 안 함」 토글 (skipFloorLevel) */
.floorlevel-row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.floorlevel-room-label { font-weight: 700; color: var(--text-primary); }
.floorlevel-skip-toggle { display: flex; align-items: center; gap: 4px; font-size: 13px;
                          color: var(--text-secondary, #4a6a8a); cursor: pointer; user-select: none; }
.floorlevel-skip-toggle input { margin: 0; }
.floorlevel-row-skip { background: rgba(122,143,163,0.06); border-style: dashed; }
.floorlevel-row-skip .floorlevel-room-label { color: var(--text-secondary, #4a6a8a); text-decoration: line-through; }
.floorlevel-corners { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.floorlevel-corner { display: flex; align-items: center; gap: 6px; }
.floorlevel-corner-idx { font-weight: 700; color: #4a90d9; min-width: 1.2em; }
.floorlevel-corner input { flex: 1; min-width: 0; }
.floorlevel-corner input:disabled { background: rgba(122,143,163,0.08); cursor: not-allowed; color: var(--text-secondary, #4a6a8a); }
.floorlevel-unit { font-size: 12px; color: var(--text-secondary, #4a6a8a); }

/* 수압 위치 sub-entries — Phase 1B T-A3 */
.wp-entry { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 8px;
            padding: 12px; border: 1px solid var(--border); border-radius: 8px;
            background: var(--bg-card, #fff); margin-bottom: 8px; position: relative; }
.wp-entry label { display: flex; align-items: center; gap: 6px; }
.wp-entry input[type="text"],
.wp-entry input[type="number"] { flex: 1; min-width: 0; }
.wp-unit { font-size: 12px; color: var(--text-secondary, #4a6a8a); }
.wp-remove { position: absolute; top: 8px; right: 8px; background: none; border: none;
             font-size: 18px; color: var(--text-secondary, #4a6a8a); cursor: pointer; }
.wp-add { grid-column: 1 / -1; padding: 8px 12px; border: 1px dashed var(--border);
          background: transparent; border-radius: 8px; cursor: pointer; }

/* PR3 §3.3 — visual 권한 사용자가 사양기록 카드 진입 시 read-only 안내 banner.
   브랜드 팔레트 준수: BG Section + Text Secondary + Brand Blue accent.
   「하자 등급」 팔레트와 의미가 다르므로 분리. */
.tf-readonly-banner { background: #f4f7fb; color: #4a6a8a;
                      border-left: 4px solid #4a90d9; padding: 12px 16px;
                      margin: 12px 16px 0; border-radius: 8px;
                      font-weight: 600; font-size: 14px; line-height: 1.4; }

/* #28 — 빈 점검 카드 정리 banner (rooms.html). 디자인 가이드 준수:
   BG Section #f4f7fb + Brand Blue #4a90d9 강조 + border-radius 14px (카드 규격).
   Primary 버튼 (정리하기) 1개 + Secondary 버튼 (닫기) 1개. */
.cleanup-banner { margin: 12px 16px; padding: 16px;
                  background: #f4f7fb;
                  border-left: 4px solid #4a90d9;
                  border-radius: 14px; }
.cleanup-banner-msg { margin-bottom: 12px;
                       color: #0a1628; font-weight: 600; font-size: 14px;
                       line-height: 1.4; }
.cleanup-banner-actions { display: flex; gap: 8px; }
.cleanup-banner-actions .btn-primary { background: #1a3669; color: white;
                                        border: none; border-radius: 8px;
                                        padding: 8px 16px; font-size: 14px;
                                        cursor: pointer; }
.cleanup-banner-actions .btn-line { background: white; color: #4a6a8a;
                                     border: 1px solid #d0d7e0; border-radius: 8px;
                                     padding: 8px 16px; font-size: 14px;
                                     cursor: pointer; }

/* ============================================================ */
/* 2026-05-25 #14 옵션 C — 인앱 카메라 모달                     */
/* Spec: docs/superpowers/specs/2026-05-25-14-photo-burst-option-c-design.md */
/* ============================================================ */
.inapp-camera-modal {
  position: fixed;
  inset: 0;
  /* 노란 "업로드 필요" 배너 z-index = 99999 (field-cloud.js) 보다 위.
     모달은 풀스크린 카메라 — 항상 가장 위. */
  z-index: 100000;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: env(safe-area-inset-bottom);
}
.inapp-camera-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.inapp-camera-shutter {
  position: absolute;
  bottom: calc(40px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 4px solid #fff;
  background: rgba(255, 255, 255, 0.9);
  color: #1a3669;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}
.inapp-camera-shutter:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.inapp-camera-close {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top));
  left: 16px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}
.inapp-camera-counter {
  position: absolute;
  top: calc(20px + env(safe-area-inset-top));
  right: 20px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 16px;
}
.inapp-camera-done {
  position: absolute;
  bottom: calc(56px + env(safe-area-inset-bottom));
  /* 셔터 중앙(left:50%, width 72px) 우측 — 셔터와 약 32px 간격 */
  left: calc(50% + 36px + 32px);
  height: 40px;
  padding: 0 18px;
  border-radius: 9999px;
  border: 2px solid #fff;
  background: rgba(255, 255, 255, 0.9);
  color: #1a3669;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}
/* 2026-05-25 fu5 — 셔터 freeze 피드백 (사진 0.3초 정지 표시) */
.inapp-camera-freeze {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;       /* video 와 동일한 잘림 방식 */
  background: #000;
  z-index: 1;                /* video (default 0) 위. 0.3초 동안 컨트롤 가려짐 = 의도된 UX */
  display: none;             /* default hidden */
  pointer-events: none;      /* 사용자 터치가 컨트롤까지 통과 */
}

.inapp-camera-freeze.is-visible {
  display: block;
}

/* 2026-05-27 fu6/T3 — 흰 플래시 (셔터 시각 강화 — 다중 채널 ②) */
.inapp-camera-flash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
  z-index: 2;                /* freeze(z-index:1) 위 */
  transition: opacity 80ms ease-out;
}

.inapp-camera-flash.is-flashing {
  opacity: 1;
}
