/* 비비조경 견적서 PWA — 모바일 전용 */
:root {
  --green: #2D5F3F;
  --green-dk: #1f4a2e;
  --green-lt: #e8f1ea;
  --line: #d8d4cb;
  --bg: #FAFAF5;
  --card: #ffffff;
  --text: #1f2a24;
  --muted: #6b7368;
  --danger: #c44b4b;
  --gold: #b58a2f;
  --rain-1: #dbeafe;
  --rain-2: #93c5fd;
  --rain-2-dk: #1d4ed8;
  --shadow: 0 2px 6px rgba(0,0,0,.06);
  --radius: 14px;
  --tabbar-h: 60px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif; font-size: 15px; }
body { padding-bottom: calc(var(--tabbar-h) + 180px + env(safe-area-inset-bottom, 0px)); -webkit-text-size-adjust: 100%; min-height: 100vh; overflow-x: hidden; }

.app { max-width: 480px; margin: 0 auto; padding: 10px 12px; }
.app[hidden] { display: none; }

/* ===== 견적서 헤더 ===== */
.quote-head {
  background: var(--card);
  border: 2px solid var(--green);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}
.brand-name { font-size: 20px; font-weight: 800; color: var(--green); letter-spacing: -0.5px; }
.brand-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.brand-contact { font-size: 11px; color: var(--text); margin-top: 6px; }
.brand-addr { font-size: 11px; color: var(--muted); }
.quote-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }
.quote-meta label { display: flex; flex-direction: column; font-size: 11px; color: var(--muted); gap: 3px; }
.quote-meta input { padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; background: #fff; }

/* ===== 카드 ===== */
.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 12px 12px 10px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}
.card h2 { font-size: 13px; color: var(--green); margin: 0 0 9px; font-weight: 700; letter-spacing: -0.3px; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; }
.card-head h2 { margin: 0; }

/* ===== 고객 ===== */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grid2 label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--muted); }
.grid2 .full { grid-column: 1 / -1; }
.grid2 input { padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; background: #fff; }

/* ===== 라인 ===== */
.lines-table { width: 100%; border-collapse: collapse; font-size: 12px; table-layout: fixed; }
.lines-table th { text-align: left; padding: 4px 3px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); font-size: 10px; }
.lines-table td { padding: 5px 3px; border-bottom: 1px dashed var(--line); vertical-align: top; word-break: break-all; }
.lines-table tr:last-child td { border-bottom: none; }
.col-item { width: 34%; }
.col-price { width: 22%; }
.col-qty { width: 22%; }
.col-sub { width: 18%; text-align: right; font-weight: 700; font-size: 11px; word-break: keep-all; }
.col-del { width: 22px; text-align: center; }
.lines-table select, .lines-table input { width: 100%; max-width: 100%; padding: 6px 4px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; background: #fff; min-width: 0; }
.lines-table input[type="number"] { text-align: right; }
.lines-table .line-label { margin-top: 4px; }
.col-qty { position: relative; }
.col-qty .unit { position: absolute; right: 4px; top: 12px; font-size: 10px; color: var(--muted); pointer-events: none; }
.col-qty input { padding-right: 16px; }
.btn-del { background: transparent; border: none; font-size: 20px; color: var(--muted); cursor: pointer; padding: 0 2px; line-height: 1; }
.btn-add { background: var(--green-lt); color: var(--green-dk); border: 1px solid var(--green); padding: 5px 9px; border-radius: 7px; font-size: 11px; font-weight: 600; cursor: pointer; }

/* ===== 출장비 ===== */
.travel-form { display: grid; gap: 7px; }
.travel-form label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--muted); }
.travel-form input { padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; background: #fff; }
.travel-form input[readonly] { background: #f5f3ed; color: var(--muted); }
.btn-calc { background: var(--green); color: #fff; border: none; padding: 11px 14px; border-radius: 10px; font-size: 14px; font-weight: 700; cursor: pointer; }
.btn-calc:disabled { background: #9bb09f; cursor: wait; }
.btn-settings { background: transparent; border: 1px solid var(--line); width: 30px; height: 30px; border-radius: 7px; font-size: 14px; cursor: pointer; color: var(--muted); }
.settings-row { display: none; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 7px; padding: 7px; background: #faf8f2; border-radius: 7px; }
.settings-row.open { display: grid; }
.settings-row label { font-size: 10px; color: var(--muted); display: flex; flex-direction: column; gap: 3px; }
.settings-row input { padding: 6px 7px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; }
.error { color: var(--danger); font-size: 11px; margin-top: 2px; min-height: 12px; }
.travel-result { margin-top: 8px; padding: 9px 11px; background: var(--green-lt); border-radius: 9px; font-size: 12px; }
.travel-result.empty { background: #f5f3ed; }
.travel-result .row { display: flex; justify-content: space-between; padding: 2px 0; }
.travel-result .row.total { border-top: 1px solid #c5d6ca; margin-top: 3px; padding-top: 5px; font-size: 13px; color: var(--green-dk); font-weight: 700; }

/* ===== 합계 ===== */
.summary .sum-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13px; border-bottom: 1px dashed var(--line); }
.summary .sum-row:last-of-type { border-bottom: none; }
.summary .sum-row.grand { border-top: 2px solid var(--green); margin-top: 5px; padding-top: 11px; font-size: 17px; font-weight: 800; color: var(--green); }
.quote-note { font-size: 10px; color: var(--muted); margin-top: 7px; padding-top: 7px; border-top: 1px dotted var(--line); }
.quote-foot { display: flex; justify-content: space-between; align-items: center; padding: 10px 6px 2px; font-size: 11px; color: var(--muted); }
.quote-foot .seal { font-weight: 700; color: var(--green); font-size: 13px; }

/* ===== 히스토리 ===== */
.history .card-head { cursor: pointer; user-select: none; }
.history-body { display: none; }
.history-body.open { display: block; }
#historyList { list-style: none; padding: 0; margin: 0; }
#historyList li { display: flex; justify-content: space-between; align-items: center; padding: 8px 4px; border-bottom: 1px dashed var(--line); gap: 6px; }
#historyList li:last-child { border-bottom: none; }
.h-title { font-weight: 700; font-size: 12px; }
.h-meta { font-size: 10px; color: var(--muted); margin-top: 2px; }
.h-actions { display: flex; gap: 4px; flex-shrink: 0; }
.h-actions button { background: transparent; border: 1px solid var(--line); border-radius: 6px; padding: 4px 7px; font-size: 11px; cursor: pointer; }

/* ===== 액션 ===== */
.actions {
  position: fixed; bottom: var(--tabbar-h); left: 0; right: 0;
  background: rgba(250, 250, 245, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 7px 12px 9px;
  box-shadow: 0 -2px 8px rgba(0,0,0,.06);
  z-index: 40;
  max-width: 480px;
  margin: 0 auto;
}
.actions .primary { width: 100%; background: var(--green); color: #fff; border: none; padding: 11px; border-radius: 11px; font-size: 14px; font-weight: 700; cursor: pointer; }
.actions .primary:active { background: var(--green-dk); }
.actions-row { display: flex; gap: 6px; margin-top: 5px; }
.actions-row button { flex: 1; background: #fff; border: 1px solid var(--line); padding: 7px 4px; border-radius: 9px; font-size: 11px; cursor: pointer; min-width: 0; }
#scheduleBtn { background: var(--green-lt); color: var(--green-dk); border-color: var(--green); font-weight: 600; }

.muted { color: var(--muted); font-size: 11px; }

/* ===== 탭바 ===== */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--tabbar-h);
  padding-bottom: env(safe-area-inset-bottom);
  background: #ffffff;
  border-top: 1px solid var(--line);
  display: flex;
  z-index: 50;
  max-width: 480px;
  margin: 0 auto;
}
.tabbar .tab {
  flex: 1; background: transparent; border: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; color: var(--muted); font-size: 11px; padding: 6px 0;
}
.tabbar .tab .ic { font-size: 20px; }
.tabbar .tab.active { color: var(--green); font-weight: 700; }
.tabbar .tab.active .ic { transform: scale(1.1); }

/* ===== 캘린더 ===== */
.cal-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 8px 12px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}
.cal-nav {
  background: transparent; border: 1px solid var(--line); border-radius: 8px;
  width: 36px; height: 36px; font-size: 20px; cursor: pointer; color: var(--green-dk);
}
.cal-title-wrap { display: flex; align-items: center; gap: 8px; }
.cal-toolbar h1 { font-size: 16px; margin: 0; color: var(--green-dk); font-weight: 800; }
.btn-today { background: var(--green-lt); color: var(--green-dk); border: 1px solid var(--green); padding: 4px 10px; border-radius: 7px; font-size: 11px; font-weight: 600; cursor: pointer; }

.cal-grid {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 6px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.cal-dow-row { display: grid; grid-template-columns: repeat(7, 1fr); padding: 2px 0 6px; }
.cal-dow { text-align: center; font-size: 11px; color: var(--muted); font-weight: 600; }
.cal-dow.sun { color: var(--danger); }
.cal-dow.sat { color: #2563eb; }

.cal-grid-inner { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-cell {
  min-height: 62px; background: #fff; border: 1px solid transparent; border-radius: 6px;
  padding: 3px 3px 2px; display: flex; flex-direction: column; cursor: pointer;
  transition: background .12s;
}
.cal-cell.empty { background: transparent; cursor: default; }
.cal-cell.today { background: #fffbea; border-color: var(--gold); }
.cal-cell.selected { outline: 2px solid var(--green); outline-offset: -2px; }
.cal-cell.rain-1 { background: var(--rain-1); }
.cal-cell.rain-2 { background: var(--rain-2); }
.cal-cell.rain-2 .day-num { color: var(--rain-2-dk); font-weight: 800; }
.cal-cell.sun .day-num { color: var(--danger); }
.cal-cell.sat .day-num { color: #2563eb; }

.cal-cell-top { display: flex; justify-content: space-between; align-items: center; }
.day-num { font-size: 12px; font-weight: 700; }
.rain-mark { font-size: 11px; }

.cal-cell-dots { display: flex; flex-direction: column; gap: 1px; margin-top: 2px; overflow: hidden; }
.cal-cell-dots .dot {
  font-size: 9px; padding: 1px 3px; border-radius: 3px;
  background: var(--green); color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
  font-weight: 600;
}
.cal-cell-dots .dot.done { background: var(--muted); }
.cal-cell-dots .dot.cancel { background: var(--danger); opacity: .7; text-decoration: line-through; }
.cal-cell-dots .dot.more { background: #fff; color: var(--muted); border: 1px solid var(--line); }

.rain-legend {
  display: flex; gap: 12px; flex-wrap: wrap; justify-content: center;
  font-size: 10px; color: var(--muted); padding: 8px 4px;
}
.rain-legend .lg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: middle; margin-right: 4px; }
.rain-legend .lg.rain-1 { background: var(--rain-1); border: 1px solid #bfdbfe; }
.rain-legend .lg.rain-2 { background: var(--rain-2); }

/* ===== Day panel ===== */
.day-panel { margin-top: 4px; }
.day-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.day-head h2 { margin: 0; font-size: 14px; color: var(--green-dk); font-weight: 800; }
.day-weather { font-size: 12px; margin-bottom: 8px; }
.day-weather .day-weather-line.w-2 { color: var(--rain-2-dk); font-weight: 600; }
.day-weather .day-weather-line.w-1 { color: #2563eb; }

/* 시간대별 비 슬롯 */
.rain-slots {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}
.rain-slot {
  display: flex;
  align-items: center;
  padding: 7px 11px;
  background: var(--rain-1);
  border-left: 4px solid var(--rain-2-dk);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--rain-2-dk);
  letter-spacing: 0.2px;
  font-variant-numeric: tabular-nums;
}

.sch-list { list-style: none; padding: 0; margin: 0; }
.sch-item { display: flex; gap: 8px; padding: 10px 8px; border-radius: 9px; background: #f9f7f0; margin-bottom: 6px; border-left: 3px solid var(--green); }
.sch-item.done { opacity: .65; border-left-color: var(--muted); }
.sch-item.cancelled { opacity: .5; border-left-color: var(--danger); }
.sch-main { flex: 1; min-width: 0; }
.sch-line1 { display: flex; align-items: center; gap: 6px; }
.sch-time { font-size: 11px; color: var(--green-dk); font-weight: 700; }
.badge { font-size: 9px; padding: 2px 6px; border-radius: 10px; font-weight: 700; }
.badge.planned { background: var(--green-lt); color: var(--green-dk); }
.badge.done { background: #eef2f4; color: var(--muted); }
.badge.cancel { background: #fee2e2; color: var(--danger); }
.sch-line2 { font-size: 13px; margin-top: 2px; }
.sch-line3 { font-size: 11px; margin-top: 1px; }
.sch-memo { font-size: 11px; margin-top: 3px; padding: 4px 6px; background: #fff; border-radius: 5px; color: var(--text); }
.sch-actions { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
.sch-actions button { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; font-size: 11px; cursor: pointer; }
.sch-actions .btn-done { background: var(--green); color: #fff; border-color: var(--green); }

/* ===== 빠른 계산기 ===== */
.calc-card { padding: 16px 14px 14px; }
.calc-title { font-size: 17px; color: var(--green); margin: 0 0 4px; font-weight: 800; letter-spacing: -0.3px; }
.calc-sub { font-size: 11px; color: var(--muted); margin: 0 0 14px; line-height: 1.45; }

/* hidden 속성 강제 적용 (브라우저별 차이 보정) */
[hidden] { display: none !important; }

/* ===== 우측 상단 설정 버튼 ===== */
.settings-fab {
  position: fixed;
  top: calc(10px + env(safe-area-inset-top, 0px));
  right: 12px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: 1.5px solid var(--line);
  color: var(--green-dk);
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.settings-fab:active { background: var(--green-lt); }

/* ===== 모달 ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.modal-panel {
  position: relative;
  background: var(--card);
  border-radius: 16px;
  max-width: 440px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 16px 40px rgba(0,0,0,0.3);
  z-index: 1;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.modal-head h2 {
  margin: 0;
  font-size: 17px;
  color: var(--green);
  font-weight: 800;
  letter-spacing: 1px;
}
.modal-close {
  background: transparent;
  border: none;
  width: 32px;
  height: 32px;
  font-size: 18px;
  color: var(--muted);
  cursor: pointer;
  border-radius: 8px;
}
.modal-close:active { background: #f5f3ed; }
.modal-body { padding: 12px 14px 16px; }

/* 설정 항목 */
.setting-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #faf8f2;
  border-radius: 10px;
  margin-bottom: 8px;
}
.setting-item .si-info { flex: 1; min-width: 0; }
.setting-item .si-title { font-size: 14px; font-weight: 700; color: var(--text); }
.setting-item .si-desc { font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.setting-item .si-action {
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  min-width: 76px;
}
.setting-item .si-action:active { background: var(--green-dk); }
.setting-item .si-action:disabled {
  background: #cfd6d1;
  cursor: not-allowed;
}
.setting-item .si-action.danger {
  background: var(--danger);
}
.setting-item .si-action.danger:active { background: #a13838; }

/* iOS 안내 박스 */
.setting-info {
  padding: 12px 14px;
  background: #eef6ff;
  border: 1px dashed #93c5fd;
  border-radius: 10px;
  margin-bottom: 8px;
}
.setting-info .ig-title {
  font-size: 13px;
  font-weight: 700;
  color: #1d4ed8;
  margin-bottom: 6px;
}
.setting-info .ig-list {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--text);
}

/* 버전 메타 */
.setting-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  padding: 8px 6px 2px;
  font-size: 11px;
  color: var(--muted);
  border-top: 1px dotted var(--line);
}

/* 모드 토글 (벌초/예초) */
.calc-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  background: #faf8f2;
  border-radius: 12px;
  margin-bottom: 16px;
}
.calc-mode .cm-btn {
  background: transparent;
  border: none;
  padding: 11px 8px;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  letter-spacing: 1px;
  transition: all 0.15s;
}
.calc-mode .cm-btn.active {
  background: var(--green);
  color: #fff;
  box-shadow: 0 2px 6px rgba(45,95,63,.2);
}
.calc-mode .cm-btn:not(.active):active { background: rgba(45,95,63,.08); }

/* 예초 안내 박스 */
.yc-info { display: flex; flex-direction: column; gap: 4px; }
.yc-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  padding: 4px 6px;
  background: #faf8f2;
  border-radius: 5px;
}
.yc-row b { color: var(--green-dk); font-weight: 700; }
.yc-row span { font-variant-numeric: tabular-nums; color: var(--text); }

/* 예초 옵션 체크박스 */
.yc-options { display: flex; flex-direction: column; gap: 6px; }
.yc-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #faf8f2;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.yc-toggle:has(input:checked) {
  background: var(--green-lt);
  border-color: var(--green);
}
.yc-toggle input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--green);
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
}
.yc-toggle span { font-size: 13px; font-weight: 500; color: var(--text); }

/* 폐기물 반출 stepper */
.yc-waste-row { display: flex; flex-direction: column; gap: 8px; }
.yc-waste-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: #faf8f2;
  border: 1.5px solid var(--line);
  border-radius: 10px;
}
.yc-waste-item > span:first-child { font-size: 12px; font-weight: 600; color: var(--text); }
.mini-stepper { display: flex; align-items: center; gap: 4px; }
.mini-stepper .step-btn-mini {
  width: 30px;
  height: 30px;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.mini-stepper .step-btn-mini:active { background: var(--green-dk); }
.mini-stepper input {
  width: 42px;
  height: 30px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  background: #fff;
}
.mini-stepper .mini-unit {
  font-size: 11px;
  color: var(--muted);
  margin-left: 2px;
  font-weight: 600;
}

/* 협의 메시지 */
.bd-row.consult {
  background: #fef2f2;
  border: 1px dashed var(--danger);
  border-radius: 6px;
  padding: 8px;
  margin: 4px 0;
}
.bd-row.consult .consult-msg {
  color: var(--danger);
  font-weight: 600;
  font-size: 12px;
  text-align: center;
  width: 100%;
}

.calc-row { margin-bottom: 12px; }
.calc-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--green-dk);
  letter-spacing: 2px;
  margin-bottom: 6px;
}
.calc-stepper {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #faf8f2;
  border: 1.5px solid var(--green);
  border-radius: 12px;
  padding: 6px;
}
.calc-stepper .step-btn {
  flex: 0 0 50px;
  height: 44px;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 9px;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
}
.calc-stepper .step-btn:active { background: var(--green-dk); }
.calc-stepper input {
  flex: 1;
  height: 44px;
  border: none;
  background: transparent;
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  min-width: 0;
}
.calc-stepper input:focus { outline: none; }
.calc-stepper .unit {
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  padding-right: 12px;
}

.calc-breakdown {
  background: #fafaf5;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 16px 0 12px;
}
.calc-breakdown .bd-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  font-size: 13px;
  border-bottom: 1px dashed var(--line);
}
.calc-breakdown .bd-row:last-child { border-bottom: none; }
.calc-breakdown .bd-row.sub {
  border-top: 1px solid var(--line);
  margin-top: 4px;
  padding-top: 8px;
  font-weight: 700;
}
.calc-breakdown b { font-variant-numeric: tabular-nums; }

.calc-total {
  background: var(--green);
  color: #fff;
  border-radius: 14px;
  padding: 18px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  box-shadow: 0 4px 12px rgba(45,95,63,.25);
}
.calc-total .ct-label {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
}
.calc-total .ct-amount {
  font-size: 28px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.calc-presets {
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
}
.calc-presets .cp-title { font-size: 11px; margin-bottom: 6px; }
.calc-presets .cp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px 8px;
}
.calc-presets .cp-grid > div {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  padding: 3px 6px;
  background: #faf8f2;
  border-radius: 5px;
}
.calc-presets .cp-grid b { color: var(--green-dk); font-weight: 700; }
.calc-presets .cp-grid span { font-variant-numeric: tabular-nums; }
.calc-presets .cp-note { font-size: 10px; margin-top: 6px; }

.calc-actions { display: flex; gap: 8px; }
.calc-actions button {
  flex: 1;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 600;
}
.calc-actions #calcCopyBtn { background: var(--green-lt); color: var(--green-dk); border-color: var(--green); }

/* 계산기 탭은 sticky 액션바 가릴 필요 없음 - 콘텐츠 안에 자체 액션 있음 */
#viewCalc { padding-bottom: 30px; }

/* ===== 일정 편집기 ===== */
.editor-wrap { display: none; }
.editor-wrap.open { display: block; }
.schedule-editor h3 { margin: 0 0 10px; font-size: 14px; color: var(--green-dk); font-weight: 800; }
.ed-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ed-grid label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--muted); }
.ed-grid .full { grid-column: 1 / -1; }
.ed-grid input, .ed-grid select, .ed-grid textarea {
  padding: 8px 9px; border: 1px solid var(--line); border-radius: 7px; font-size: 13px; background: #fff;
  font-family: inherit;
}
.ed-actions { display: flex; gap: 6px; margin-top: 12px; }
.ed-actions button { flex: 1; padding: 10px; border-radius: 9px; border: 1px solid var(--line); background: #fff; font-size: 13px; cursor: pointer; }
.ed-actions .primary { background: var(--green); color: #fff; border-color: var(--green); font-weight: 700; }
.ed-actions .btn-del-sch { background: #fee2e2; color: var(--danger); border-color: #fecaca; font-weight: 600; flex: 0 0 70px; }
