/* =====================================================
   우리집 가계부 - 다크 테마 스타일
   - 배경 #121212, 카드 #1e1e1e, 강조색 청록(teal)
   - 수입 초록 / 지출 빨강, 통화는 $ 표시
   - 모바일 우선, 최대 너비 520px 중앙 정렬
   ===================================================== */
:root {
  --bg: #121212;
  --card: #1e1e1e;
  --card2: #262626;
  --line: #2c2c2c;
  --text: #f5f5f5;
  --muted: #9e9e9e;
  --teal: #2ba8a0;
  --teal-dim: rgba(43, 168, 160, 0.18);
  --green: #4caf50;
  --red: #f44336;
  --radius: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%; /* iOS에서 작은 글씨가 멋대로 커지는 것 방지 */
  font-size: 16px; /* iOS 입력창 자동 확대 방지를 위한 최소 기준 */
}
/* 스크롤 콘텐츠가 FAB(+ 버튼)에 가려지지 않도록 하단 여백 확보 */
#app { max-width: 520px; margin: 0 auto; padding-bottom: 156px; min-height: 100vh; }

/* ---------- 화면 전환 ---------- */
.view { display: none; }
.view.active { display: block; animation: fadein .18s ease; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* ---------- 상단바 ---------- */
.appbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px 2px;
}
.appbar h1 { font-size: 18px; font-weight: 600; margin: 0; flex: 1; text-align: center; }
.icon-btn {
  background: none; border: none; color: var(--teal); font-size: 22px;
  width: 40px; height: 40px; border-radius: 10px; cursor: pointer;
}
.icon-btn:active { background: var(--card2); }

/* ---------- 월 이동 ---------- */
.month-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 18px;
}
.month-nav .mbtn {
  background: none; border: none; color: var(--text); font-size: 26px;
  width: 44px; height: 44px; cursor: pointer; border-radius: 12px;
}
.month-nav .mbtn:active { background: var(--card2); }
.month-nav .mlabel { font-size: 21px; font-weight: 700; }
.month-nav .msub { display: block; text-align: center; font-size: 13px; color: var(--muted); font-weight: 400; }
.month-nav .mcenter { text-align: center; }

/* ---------- 요약 행 (수입/지출/총액/잔액) ---------- */
.sum-row {
  display: flex; justify-content: space-between; text-align: center;
  padding: 6px 10px 12px;
}
.sum-row > div { flex: 1; min-width: 0; }
.sum-row .lbl { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.sum-row .val { display: block; font-size: 17px; font-weight: 800; white-space: nowrap; }
.val.green { color: var(--green); }
.val.red { color: var(--red); }

/* ---------- 세그먼트 탭 (요약/캘린더/일별) ---------- */
.seg-tabs {
  display: flex; background: var(--card2); border-radius: 999px;
  margin: 0 14px 14px; padding: 4px;
}
.seg-tabs button {
  flex: 1; border: none; background: none; color: var(--muted);
  font-size: 15px; padding: 10px 0; border-radius: 999px; cursor: pointer;
}
.seg-tabs button.active { background: #3a3a3a; color: var(--text); font-weight: 600; }

/* ---------- 달력 ---------- */
.cal-card {
  background: var(--card); border-radius: 22px; margin: 0 12px 12px; padding: 14px 10px;
}
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-head { text-align: center; font-size: 14px; margin-bottom: 8px; }
.cal-head .sun { color: var(--red); }
.cal-head .sat { color: #64b5f6; }
.cal-day {
  background: var(--card2); border-radius: 12px; min-height: 62px;
  padding: 6px 4px; text-align: center; cursor: pointer; border: 2px solid transparent;
}
.cal-day .dnum { font-size: 16px; font-weight: 600; display: block; }
.cal-day .dnum.sun { color: #ef9a9a; }
.cal-day .dnum.sat { color: #90caf9; }
.cal-day .inc { display: block; font-size: 10.5px; color: var(--green); line-height: 1.35; }
.cal-day .exp { display: block; font-size: 10.5px; color: var(--red); line-height: 1.35; }
.cal-day.other { background: none; cursor: default; }
.cal-day.other .dnum { color: #616161; font-weight: 400; }
.cal-day.selected { border-color: var(--teal); background: var(--teal-dim); }
.cal-day.today .dnum {
  background: var(--teal); color: #fff; border-radius: 8px;
  display: inline-block; padding: 1px 8px;
}

/* ---------- 선택 날짜 내역 카드 ---------- */
.day-card { background: var(--card); border-radius: 22px; margin: 0 12px 12px; overflow: hidden; }
.day-head {
  padding: 14px 16px; font-size: 17px; font-weight: 700; border-bottom: 1px solid var(--line);
}
.day-head .dow {
  display: inline-block; font-size: 13px; font-weight: 600; border-radius: 8px;
  padding: 2px 8px; margin-left: 8px; vertical-align: middle;
}
.day-head .dow.sun { background: #e57373; color: #fff; }
.day-head .dow.sat { background: #64b5f6; color: #fff; }
.day-head .dow.wd { background: var(--card2); color: var(--muted); }
.day-head .yr { color: var(--muted); font-weight: 400; font-size: 14px; margin-left: 8px; }
.empty-day { text-align: center; padding: 34px 10px; color: var(--muted); }
.empty-day .pig { font-size: 52px; display: block; margin-bottom: 8px; }

/* ---------- 내역 행 ---------- */
.tx-row {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 14px; border-bottom: 1px solid var(--line); cursor: pointer;
}
.tx-row:last-child { border-bottom: none; }
.tx-row .dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.tx-row .info { flex: 1; min-width: 0; }
.tx-row .cat { font-size: 14px; font-weight: 600; }
.tx-row .memo { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-row .who {
  font-size: 11px; color: var(--muted); border: 1px solid var(--line);
  border-radius: 6px; padding: 1px 6px; flex-shrink: 0;
}
.tx-row .amt { font-size: 15px; font-weight: 700; flex-shrink: 0; }
.tx-row .amt.income { color: var(--green); }
.tx-row .amt.expense { color: var(--red); }
.tx-row .thumb { width: 34px; height: 34px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }

/* ---------- 일별 목록 ---------- */
.date-group { margin-bottom: 4px; }
.date-group > h4 {
  margin: 14px 14px 2px; font-size: 14px; color: var(--muted); font-weight: 600;
}
.list-card { background: var(--card); border-radius: 18px; margin: 0 12px 10px; overflow: hidden; }
.toolbar { display: flex; gap: 8px; padding: 0 14px 10px; }
.toolbar input[type="search"] {
  flex: 1; background: var(--card2); border: 1px solid var(--line); color: var(--text);
  border-radius: 12px; padding: 10px 12px; font-size: 14px;
}

/* ---------- 플로팅 버튼 ---------- */
/* 화면 우측, 하단 네비게이션 바로 위에 작게 배치 → 내역 카드와 겹치지 않게 */
.fab {
  position: fixed; right: max(16px, calc(50% - 260px + 16px));
  bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  width: 56px; height: 56px; border-radius: 18px; border: none;
  background: var(--teal); color: #fff; font-size: 28px; line-height: 1;
  cursor: pointer; box-shadow: 0 4px 16px rgba(0,0,0,.5); z-index: 40;
}
.fab:active { transform: scale(.94); }

/* ---------- 모달 / 액션시트 ---------- */
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 60;
  display: flex; align-items: flex-end; justify-content: center;
}
.modal.center { align-items: center; }
.modal-box {
  background: var(--card); border-radius: 22px 22px 0 0; width: 100%; max-width: 520px;
  padding: 18px 16px 26px; max-height: 88vh; overflow-y: auto;
}
.modal.center .modal-box { border-radius: 22px; margin: 0 18px; }
.modal-box h3 { margin: 0 0 14px; font-size: 17px; }
.sheet-btn {
  display: block; width: 100%; text-align: left; background: var(--card2);
  border: none; color: var(--text); font-size: 16px; border-radius: 14px;
  padding: 15px 14px; margin-bottom: 10px; cursor: pointer;
}
.sheet-btn:active { background: #333; }
.sheet-cancel {
  display: block; width: 100%; background: none; border: none; color: var(--muted);
  font-size: 15px; padding: 12px; cursor: pointer;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-grid label { font-size: 13px; color: var(--muted); display: block; }
.form-grid label.full { grid-column: 1 / -1; }
.form-grid input, .form-grid select {
  width: 100%; margin-top: 5px; background: var(--card2); border: 1px solid var(--line);
  color: var(--text); border-radius: 10px; padding: 11px 10px; font-size: 15px;
}
.modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.btn {
  flex: 1; border: none; border-radius: 12px; padding: 13px;
  font-size: 15px; font-weight: 600; cursor: pointer;
  background: var(--card2); color: var(--text);
}
.btn.primary { background: var(--teal); color: #fff; }
.btn.danger { background: #5d2a26; color: #ffab91; }
.row-actions { display: flex; gap: 6px; margin-top: 8px; }
.row-actions button {
  background: var(--card2); border: 1px solid var(--line); color: var(--muted);
  border-radius: 8px; font-size: 12px; padding: 6px 10px; cursor: pointer;
}
.row-actions button.danger { color: #ef9a9a; border-color: #5d2a26; }

/* ---------- 자산 화면 ---------- */
.networth-card {
  margin: 6px 14px 14px; border-radius: 24px; padding: 26px 20px;
  background: linear-gradient(135deg, #2ba8a0, #1f7a76 60%, #2ba8a0);
  position: relative; overflow: hidden;
}
.networth-card::before, .networth-card::after {
  content: ""; position: absolute; border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.networth-card::before { width: 190px; height: 190px; right: -50px; top: -60px; }
.networth-card::after { width: 130px; height: 130px; left: -40px; bottom: -50px; }
.networth-card .lbl { text-align: center; font-size: 15px; opacity: .92; position: relative; }
.networth-card .big { text-align: center; font-size: 38px; font-weight: 800; margin: 6px 0 18px; position: relative; }
.networth-card .row2 { display: flex; justify-content: space-between; position: relative; }
.networth-card .row2 > div { text-align: center; flex: 1; }
.networth-card .row2 .s { display: block; font-size: 14px; opacity: .92; }
.networth-card .row2 .v { display: block; font-size: 24px; font-weight: 800; margin-top: 4px; }
.acct-card { background: var(--card); border-radius: 22px; margin: 0 12px; overflow: hidden; }
.acct-row {
  display: flex; align-items: center; gap: 12px; padding: 15px 16px;
  border-bottom: 1px solid var(--line); cursor: pointer;
}
.acct-row:last-child { border-bottom: none; }
.acct-row .aicon {
  width: 42px; height: 42px; border-radius: 12px; background: var(--card2);
  display: flex; align-items: center; justify-content: center; font-size: 21px; flex-shrink: 0;
}
.acct-row .aname { flex: 1; min-width: 0; }
.acct-row .aname b { display: block; font-size: 15.5px; }
.acct-row .aname span { font-size: 12.5px; color: var(--muted); }
.acct-row .abal { font-size: 17px; font-weight: 700; }
.acct-row .abal.pos { color: var(--green); }
.acct-row .abal.neg { color: var(--red); }
.add-acct {
  display: block; width: calc(100% - 24px); margin: 12px; border: 1.5px dashed var(--line);
  background: none; color: var(--teal); border-radius: 14px; padding: 13px;
  font-size: 15px; cursor: pointer;
}

/* ---------- 통계 화면 ---------- */
.stat-sum { display: flex; justify-content: space-around; text-align: center; padding: 4px 10px 12px; }
.stat-sum .lbl { display: block; font-size: 13px; color: var(--muted); }
.stat-sum .val { display: block; font-size: 21px; font-weight: 800; margin-top: 3px; }
.type-toggle {
  display: flex; background: var(--card2); border-radius: 999px;
  width: 210px; margin: 0 auto 6px; padding: 4px;
}
.type-toggle button {
  flex: 1; border: none; background: none; color: var(--muted);
  font-size: 15px; padding: 9px 0; border-radius: 999px; cursor: pointer;
}
.type-toggle button.active { background: var(--red); color: #fff; font-weight: 700; }
.type-toggle button.active.inc { background: var(--green); }
.donut-wrap { text-align: center; padding: 8px 0 4px; position: relative; }
#donutChart { max-width: 240px; width: 100%; height: auto; } /* 작은 화면에서 찌그러지지 않게 */
.trend-link {
  position: absolute; right: 26px; top: 46%; color: var(--teal);
  font-size: 13px; text-decoration: none; text-align: center;
}
.stat-list { background: var(--card); border-radius: 22px; margin: 12px; overflow: hidden; }
.stat-row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.stat-row:last-child { border-bottom: none; }
.stat-row .cicon {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 20px; color: #fff;
}
.stat-row .cname { flex: 1; font-size: 16px; }
.stat-row .camt { font-size: 16.5px; font-weight: 700; }
.stat-row .cpct { font-size: 13px; color: var(--muted); width: 62px; text-align: right; }
.bar-row2 { display: flex; align-items: center; gap: 10px; padding: 10px 16px; }
.bar-row2 .bname { width: 74px; font-size: 14px; flex-shrink: 0; }
.bar-row2 .btrack { flex: 1; height: 10px; background: var(--card2); border-radius: 6px; overflow: hidden; }
.bar-row2 .bfill { display: block; height: 100%; border-radius: 6px; }
.bar-row2 .bval { width: 92px; text-align: right; font-size: 14px; font-weight: 600; }
.budget-box { background: var(--card); border-radius: 22px; margin: 12px; padding: 18px 16px; }
.budget-box .bigbar { height: 14px; background: var(--card2); border-radius: 8px; overflow: hidden; margin: 12px 0; }
.budget-box .bigbar > span { display: block; height: 100%; background: var(--teal); border-radius: 8px; }
.budget-box .btext { font-size: 14px; color: var(--muted); }

/* ---------- 메모 ---------- */
.memo-box { margin: 6px 14px; }
.memo-box textarea {
  width: 100%; min-height: 46vh; background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; color: var(--text); font-size: 15px; padding: 16px; resize: vertical;
}
.memo-status { font-size: 13px; color: var(--muted); margin-top: 8px; text-align: right; }

/* ---------- 더보기 ---------- */
.more-group { background: var(--card); border-radius: 20px; margin: 0 12px 14px; overflow: hidden; }
.more-group > h3 { margin: 0; padding: 14px 16px 6px; font-size: 15px; }
.more-group .hint { padding: 0 16px 10px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.more-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: none; border: none; border-top: 1px solid var(--line);
  color: var(--text); font-size: 15px; padding: 14px 16px; cursor: pointer; text-align: left;
}
.more-item .arr { margin-left: auto; color: var(--muted); }
.fx-row, .cat-row { padding: 12px 16px; border-top: 1px solid var(--line); }
.fx-row .t1 { display: flex; justify-content: space-between; align-items: center; }
.fx-row .t1 b { font-size: 15px; }
.fx-row .sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.cat-row { display: flex; align-items: center; gap: 10px; }
.cat-row .dot { width: 14px; height: 14px; border-radius: 50%; }
.cat-row .cname { flex: 1; font-size: 15px; }
.mini-form { display: flex; gap: 8px; padding: 10px 16px 14px; }
.mini-form input[type="text"] {
  flex: 1; background: var(--card2); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 10px; font-size: 14px;
}
.mini-form input[type="color"] {
  width: 46px; height: 42px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card2); padding: 4px; cursor: pointer;
}
.mini-form button {
  background: var(--teal); color: #fff; border: none; border-radius: 10px;
  padding: 0 16px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.ocr-status { font-size: 13px; color: var(--teal); min-height: 18px; }
.receipt-preview-wrap img { max-width: 100%; border-radius: 12px; margin-top: 10px; }

/* ---------- 하단 네비게이션 ---------- */
.bnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  max-width: 520px; margin: 0 auto; /* 넓은 화면에서도 앱 너비(520px)에 맞춤 */
  background: #1a1a1a; border-top: 1px solid var(--line);
  display: flex; padding: 8px 4px calc(10px + env(safe-area-inset-bottom, 0px));
}
.bnav button {
  flex: 1; background: none; border: none; color: var(--muted);
  font-size: 11.5px; cursor: pointer; padding: 4px 0;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.bnav button .bi { font-size: 21px; line-height: 1; }
.bnav button.active { color: var(--teal); }
.bnav button.active .bi {
  background: var(--teal-dim); border-radius: 16px; padding: 3px 16px;
}
.empty { text-align: center; color: var(--muted); padding: 26px 10px; font-size: 14px; }

/* ---------- 지출/수입/이체 입력 화면 ---------- */
#app.entry-open { padding-bottom: 0; }
#app.entry-open .bnav,
#app.entry-open .fab { display: none; }
.entry-head {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 8px 4px;
}
.entry-seg {
  flex: 1; display: flex; background: var(--card2); border-radius: 999px;
  padding: 4px; max-width: 340px; margin: 0 auto;
}
.entry-seg button {
  flex: 1; border: none; background: none; color: var(--muted);
  font-size: 15px; padding: 9px 0; border-radius: 999px; cursor: pointer;
}
.entry-seg button.active.inc { background: var(--green); color: #fff; font-weight: 700; }
.entry-seg button.active.exp { background: var(--red); color: #fff; font-weight: 700; }
.entry-seg button.active.tr { background: var(--teal); color: #fff; font-weight: 700; }
.icon-btn.star { color: var(--teal); }
.icon-btn.star.on { color: var(--teal); }
.entry-card {
  background: var(--card); border-radius: 20px; margin: 10px 12px; overflow: hidden;
}
.erow {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; background: none; border: none; border-bottom: 1px solid var(--line);
  color: var(--text); padding: 16px; font-size: 16px; cursor: pointer; text-align: left;
}
.erow:last-child { border-bottom: none; }
.erow.static { cursor: default; }
.elabel { font-size: 16px; flex-shrink: 0; }
.evalue { font-size: 16px; text-align: right; }
.evalue.muted { color: var(--muted); }
.evalue.big { font-size: 19px; font-weight: 700; }
.eamount { text-align: right; min-width: 0; }
.eamount .expr {
  display: block; font-size: 12px; color: var(--muted);
  min-height: 15px; word-break: break-all;
}
#eAmountVal { font-size: 30px; font-weight: 800; }
#eAmountVal.red { color: var(--red); }
#eAmountVal.green { color: var(--green); }
#eAmountVal.teal { color: var(--teal); }
.mini-seg { display: flex; background: var(--card2); border-radius: 999px; padding: 3px; }
.mini-seg button {
  border: none; background: none; color: var(--muted);
  font-size: 14px; padding: 7px 16px; border-radius: 999px; cursor: pointer;
}
.mini-seg button.active { background: var(--teal); color: #fff; font-weight: 700; }
.ememo-input {
  background: none; border: none; color: var(--text); font-size: 16px;
  text-align: right; width: 55%; outline: none; padding: 0;
}
.ememo-input::placeholder { color: var(--muted); }
.toggle-card { background: var(--card); border-radius: 18px; margin: 0 12px 10px; }
.trow {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; font-size: 16px;
}
.qbtn {
  background: none; border: 1.5px solid var(--teal); color: var(--teal);
  width: 22px; height: 22px; border-radius: 50%; font-size: 13px;
  margin-left: 6px; cursor: pointer; vertical-align: middle; padding: 0;
}
.switch {
  width: 58px; height: 34px; border-radius: 999px; border: none;
  background: #616161; position: relative; cursor: pointer;
  transition: background .15s; flex-shrink: 0;
}
.switch .knob {
  position: absolute; top: 4px; left: 4px; width: 26px; height: 26px;
  border-radius: 50%; background: #fff; transition: left .15s;
}
.switch.on { background: var(--teal); }
.switch.on .knob { left: 28px; }
.entry-actions {
  display: flex; gap: 10px; padding: 4px 12px 12px; align-items: stretch;
}
.entry-actions .btn.big { padding: 15px 10px; font-size: 16px; }
.btn.outline { background: none; border: 1.5px solid var(--teal); color: var(--teal); }
.scan-btn {
  background: none; border: none; font-size: 34px; cursor: pointer;
  padding: 0 4px; line-height: 1; flex-shrink: 0;
}
.keypad {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px;
  padding: 4px 12px 16px; width: 100%;
}
.kbtn {
  border: none; border-radius: 16px; font-size: 22px; padding: 15px 0;
  cursor: pointer; color: var(--text); background: #000; min-width: 0;
}
.kbtn.op, .kbtn.fn { background: #616161; }
.kbtn.fn { color: var(--teal); font-weight: 700; }
.kbtn.enter { background: var(--teal); color: #fff; grid-row: span 2; font-size: 26px; }
.kbtn:active { filter: brightness(1.3); }
#eDeleteWrap { padding: 0 12px 18px; }
/* ---------- 공용 피커 바텀시트 ---------- */
.picker-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: none; border: none; border-bottom: 1px solid var(--line);
  color: var(--text); font-size: 16px; padding: 14px 4px;
  cursor: pointer; text-align: left;
}
.picker-row:last-child { border-bottom: none; }
.picker-row .pdot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.picker-row .picon { font-size: 20px; flex-shrink: 0; }
.picker-row .plabel { flex: 1; min-width: 0; }
.picker-row .psub { font-size: 13px; color: var(--muted); }
.picker-row .pcheck { color: var(--teal); font-size: 18px; font-weight: 700; }

/* ---------- 작은 화면(360px 이하) 대응 ---------- */
/* 달력/키패드/통계 차트가 찌그러지지 않고 글씨가 너무 작아지지 않게 */
@media (max-width: 360px) {
  .cal-card { padding: 10px 6px; }
  .cal-day { min-height: 54px; padding: 4px 2px; border-radius: 10px; }
  .cal-day .dnum { font-size: 14px; }
  .cal-day .inc, .cal-day .exp { font-size: 9px; }
  .cal-head { font-size: 12px; }
  .keypad { gap: 7px; padding: 4px 10px 14px; }
  .kbtn { font-size: 19px; padding: 12px 0; border-radius: 13px; }
  .sum-row { padding: 6px 4px 10px; }
  .sum-row .val { font-size: 14.5px; }
  .sum-row .lbl { font-size: 12px; }
  #eAmountVal { font-size: 26px; }
  .stat-sum .val { font-size: 18px; }
  .tx-row .amt { font-size: 14px; }
  .bnav button { font-size: 10.5px; }
}

/* ---------- 카테고리 계층 구조 (대분류/소분류) ---------- */
/* 더보기 > 카테고리 관리: 소분류 들여쓰기 */
.cat-row.child { padding-left: 34px; background: rgba(255,255,255,.02); }
.tree-branch { color: var(--muted); margin-right: 2px; }
/* 입력 화면 카테고리 피커: 소분류 들여쓰기 + 삭제 버튼 + 추가 버튼 */
.picker-row.cat-pick.indent { padding-left: 26px; }
.picker-row.cat-pick.indent .plabel { color: #cfd8dc; }
.cat-del {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--line); background: none; color: var(--muted);
  font-size: 17px; line-height: 1; cursor: pointer;
}
.cat-del:active { background: #3a2a2a; color: var(--red); border-color: var(--red); }
.picker-row.cat-add { justify-content: center; }
/* 고정지출 수입/지출 타입 배지 */
.fx-type {
  font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  margin-left: 8px; flex-shrink: 0;
}
.fx-type.exp { background: rgba(244,67,54,.15); color: var(--red); }
.fx-type.inc { background: rgba(76,175,80,.15); color: var(--green); }
/* 통계: 펼쳐지는 대분류 행 */
.stat-row.expandable { cursor: pointer; }
.stat-row.expandable:active { background: rgba(255,255,255,.04); }
.stat-row.sub { padding: 10px 16px 10px 34px; background: rgba(255,255,255,.02); }
.stat-row .cicon.sm { width: 32px; height: 32px; font-size: 15px; }
.stat-row.sub .cname { font-size: 14.5px; color: #cfd8dc; }
.stat-row.sub .camt { font-size: 14.5px; }
.exp-arrow { color: var(--muted); font-size: 12px; margin-left: 6px; }
/* 더보기 탭 작은 버전 */
.seg-tabs.mini { margin: 0 0 4px; }
.seg-tabs.mini button { font-size: 13px; padding: 8px 0; }
/* mini-form 안의 select */
.mini-form select {
  background: var(--card2); color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 8px; font-size: 14px; max-width: 150px;
}
/* 고정지출 모달의 구분 세그먼트 */
#fxTypeSeg { width: 100%; }
#fxTypeSeg button { flex: 1; }
#fxTypeSeg button.active[data-t="income"] { background: #2f7fd0; }
#fxTypeSeg button.active[data-t="expense"] { background: #c0453e; }

/* 더보기 하단 버전 표시 (배포 확인용) */
.ver { text-align: center; color: var(--muted); font-size: 12px; padding: 18px 0 8px; }

/* 자산: 계좌 행의 › 화살표 + 계좌별 내역 화면 */
.acct-row .arr { color: var(--muted); font-size: 20px; margin-left: 6px; }
#view-acct .hint { text-align: center; font-size: 13px; color: var(--muted); margin: 2px 0 10px; }
#acctTxList { padding-bottom: 8px; }
#acctTxList .date-group { margin-bottom: 12px; }

/* 이체 내역 배지 (집계 제외 표시) */
.trf-badge {
  display: inline-block; margin-left: 6px; padding: 1px 7px;
  font-size: 11px; font-weight: 700; border-radius: 999px;
  background: rgba(79, 195, 247, .15); color: #4fc3f7; white-space: nowrap;
}
