body {
  min-height: 100vh;
}
.navbar-nav .nav-link,
.navbar-nav .navbar-text,
.navbar-nav .btn {
  white-space: nowrap;
}
.htmx-indicator {
  display: none;
}
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  display: inline-block;
}
.text-pre-wrap {
  white-space: pre-wrap;
}
.finance-month-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem 0.7rem;
  margin-top: 0.75rem;
  font-variant-numeric: tabular-nums;
}
.page-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.page-tabs > .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}
.page-tabs > .btn.trip-icon-help {
  padding-inline: 0.55rem;
}
.month-tabs {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
}
.month-tabs .btn {
  flex: 0 0 auto;
  min-width: 3.25rem;
}
:root {
  --month-odd-tint: #0d6efd;
  /* rgba 대신 color-mix → sticky 헤더에서도 뒤 내용이 비치지 않음 */
  --month-odd-bg: color-mix(
    in srgb,
    var(--month-odd-tint) 5.5%,
    var(--bs-body-bg)
  );
  --month-even-bg: var(--bs-body-bg);
  --month-odd-header-bg: color-mix(
    in srgb,
    var(--month-odd-tint) 8%,
    var(--bs-tertiary-bg, var(--bs-body-bg))
  );
  --month-even-header-bg: var(--bs-tertiary-bg, var(--bs-body-bg));
  --sticky-cell-bg: var(--bs-body-bg);
  --sticky-header-bg: var(--bs-tertiary-bg, var(--bs-body-bg));
  /* Bootstrap table-active(rgba) 대신 불투명 tint */
  --sticky-active-bg: color-mix(
    in srgb,
    var(--bs-emphasis-color) 7.5%,
    var(--bs-body-bg)
  );
  --amount-col-min: 5.5rem;
  --total-col-min: 6.5rem;
}
.month-odd {
  background-color: var(--month-odd-bg) !important;
}
.month-even {
  background-color: var(--month-even-bg) !important;
}
.table thead th.month-odd {
  background-color: var(--month-odd-header-bg) !important;
}
.table thead th.month-even {
  background-color: var(--month-even-header-bg) !important;
}
/* 금액/합계/월 숫자 열: 기본 최소 너비 + 값 커지면 열도 함께 확장 */
.annual-statistics-table th.month-odd,
.annual-statistics-table th.month-even,
.annual-statistics-table td.month-odd,
.annual-statistics-table td.month-even,
.fixed-expenses-table th.month-odd,
.fixed-expenses-table th.month-even,
.fixed-expenses-table .fixed-month-cell,
.fixed-expenses-table .fixed-total,
.credit-cards-table th.month-odd,
.credit-cards-table th.month-even,
.credit-cards-table .credit-month-cell,
.credit-cards-table .credit-total,
.bank-items-table th.month-odd,
.bank-items-table th.month-even,
.bank-items-table .bank-month-cell,
.bank-items-table .bank-prev,
.bank-items-table .bank-total,
.finance-statistics-table td:last-child,
.finance-statistics-table th:last-child {
  min-width: var(--amount-col-min);
  width: auto;
  max-width: none;
  box-sizing: border-box;
  overflow: visible;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}
.fixed-expenses-table .fixed-total,
.credit-cards-table .credit-total,
.bank-items-table .bank-prev,
.bank-items-table .bank-total {
  min-width: var(--total-col-min);
}
.annual-statistics-table th.month-odd,
.annual-statistics-table th.month-even,
.annual-statistics-table td.month-odd,
.annual-statistics-table td.month-even,
.fixed-expenses-table th.month-odd,
.fixed-expenses-table th.month-even,
.fixed-expenses-table .fixed-month-cell,
.credit-cards-table th.month-odd,
.credit-cards-table th.month-even,
.credit-cards-table .credit-month-cell,
.bank-items-table th.month-odd,
.bank-items-table th.month-even,
.bank-items-table .bank-month-cell {
  font-size: 0.8rem;
  padding-left: 0.35rem !important;
  padding-right: 0.35rem !important;
}

/* 헤더·데이터 기본 중앙. 내용(텍스트) 본문만 좌측 */
.annual-statistics-table th,
.annual-statistics-table td,
.fixed-expenses-table th,
.fixed-expenses-table td,
.credit-cards-table th,
.credit-cards-table td,
.bank-items-table th,
.bank-items-table td,
.finance-statistics-table th,
.finance-statistics-table td,
.finance-ledger-table th,
.finance-ledger-table td {
  text-align: center;
  vertical-align: middle;
}
.annual-statistics-table thead th,
.fixed-expenses-table thead th,
.credit-cards-table thead th,
.bank-items-table thead th,
.finance-statistics-table thead th,
.finance-ledger-table thead th {
  text-align: center !important;
}
.fixed-expenses-table td.fixed-month-cell,
.bank-items-table td.bank-month-cell {
  text-align: center !important;
}
.fixed-expenses-table .fixed-month-cell .form-check,
.bank-items-table .bank-month-cell .form-check {
  text-align: left;
}
.fixed-expenses-table .fixed-month-cell .fixed-amount-btn,
.bank-items-table .bank-month-cell .fixed-amount-btn {
  display: block;
  width: 100%;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  line-height: 1.2;
  font-size: 0.8rem;
}
/* 내용 본문만 좌측 (헤더는 가운데 유지) */
.fixed-expenses-table td.fixed-content,
.fixed-expenses-table td.fixed-memo,
.bank-items-table td.bank-content,
.finance-ledger-table td:nth-child(6) {
  text-align: left !important;
}
.fixed-expenses-table .fixed-month-cell .form-control,
.bank-items-table .bank-month-cell .form-control {
  min-width: 4.5rem;
  width: 100%;
  font-size: 0.75rem;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}
.ledger-search-q {
  width: 11rem;
  min-height: calc(1.5em + 0.5rem + calc(var(--bs-border-width, 1px) * 2));
  height: calc(1.5em + 0.5rem + calc(var(--bs-border-width, 1px) * 2));
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  line-height: 1.5;
  appearance: none;
  -webkit-appearance: none;
}
.ledger-search-q::-webkit-search-decoration,
.ledger-search-q::-webkit-search-cancel-button,
.ledger-search-q::-webkit-search-results-button,
.ledger-search-q::-webkit-search-results-decoration {
  display: none;
}
.finance-ledger-wrap {
  max-height: calc(100vh - 16rem);
  overflow: auto;
}
.finance-ledger-table {
  table-layout: fixed;
  width: 100%;
  font-size: 0.875rem;
  border-collapse: separate;
  border-spacing: 0;
}
.finance-ledger-table .col-date {
  width: 10%;
}
.finance-ledger-table .col-category {
  width: 16%;
}
.finance-ledger-table .col-method {
  width: 11%;
}
.finance-ledger-table .col-income {
  width: 12%;
}
.finance-ledger-table .col-expense {
  width: 12%;
}
.finance-ledger-table .col-content {
  width: 32%;
}
.finance-ledger-table .col-action {
  width: 7%;
}
.finance-ledger-table th,
.finance-ledger-table td {
  padding: 0.4rem 0.45rem;
}
.finance-ledger-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background-color: var(
    --sticky-header-bg,
    var(--bs-tertiary-bg, var(--bs-body-bg))
  ) !important;
  --bs-table-bg-state: transparent;
  box-shadow: inset 0 -1px 0 var(--bs-border-color);
}
.bg-section-toggle {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: start;
  cursor: pointer;
}
.bg-section-toggle::before {
  content: "▸";
  font-size: 0.85em;
  line-height: 1;
  color: var(--bs-secondary-color);
}
.bg-section-toggle[aria-expanded="true"]::before {
  content: "▾";
}
.ledger-check-section {
  display: block;
}
.finance-entry-toggle .when-expanded {
  display: none;
}
.finance-entry-toggle[aria-expanded="true"] .when-collapsed {
  display: none;
}
.finance-entry-toggle[aria-expanded="true"] .when-expanded {
  display: inline;
}
.ledger-entry-row + .ledger-entry-row {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--bs-border-color);
}
.ledger-entry-row.is-active {
  outline: 1px solid rgba(var(--bs-primary-rgb), 0.25);
  outline-offset: 4px;
  border-radius: 0.25rem;
}
.easy-cal-dow,
.easy-cal {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
}
.easy-cal-dow {
  margin-bottom: 0.35rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--bs-secondary-color);
}
.easy-cal-day {
  min-height: 2.6rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.4rem;
  background: var(--bs-body-bg);
}
.easy-cal-day.is-today {
  border-color: var(--bs-primary);
}
.easy-cal-day.is-selected,
.easy-choice.is-selected {
  background: var(--bs-primary);
  border-color: var(--bs-primary);
  color: var(--bs-white);
}
.finance-cal-dow,
.finance-cal {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.4rem;
}
.finance-cal-dow {
  margin-bottom: 0.4rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--bs-secondary-color);
}
.finance-cal-day {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 6.5rem;
  padding: 0.4rem 0.45rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  background: var(--bs-body-bg);
  text-align: left;
}
button.finance-cal-day {
  width: 100%;
  color: inherit;
  cursor: pointer;
}
.finance-cal-day.is-out {
  opacity: 0.38;
  pointer-events: none;
}
.finance-cal-day.is-today {
  border-color: var(--bs-primary);
}
.finance-cal-num {
  font-weight: 600;
}
.finance-cal-counts {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-size: 0.8rem;
}
@media (max-width: 767.98px) {
  .finance-cal-day {
    min-height: 4.6rem;
    padding: 0.25rem 0.3rem;
  }
  .finance-cal-counts {
    font-size: 0.7rem;
  }
}
button.finance-home-reveal {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  line-height: inherit;
}
a.finance-home-card,
button.finance-home-card,
a.trip-home-card,
button.trip-home-card {
  display: block;
  width: 100%;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}
a.finance-home-card,
button.finance-home-card,
a.trip-home-card,
button.trip-home-card,
.card-nav {
  border-color: var(--bs-primary);
}
.ui-icon {
  width: 1.05em;
  height: 1.05em;
  flex: 0 0 auto;
  display: block;
}
.ui-icon-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}
.nav-link .ui-icon-label {
  gap: 0.35em;
}
.card .ui-icon,
.finance-home-pair-item .ui-icon,
.dashboard-menu-tile .ui-icon {
  color: var(--bs-primary);
}
a.finance-home-card.dashboard-menu-tile {
  width: auto;
  min-width: 6.5rem;
  height: auto;
  flex: 0 0 auto;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-align: center;
  font-weight: 600;
  padding: 0.5rem 1.1rem;
}
a.finance-home-card.is-current,
button.finance-home-card.is-current,
a.trip-home-card.is-current,
button.trip-home-card.is-current,
a.finance-home-card:hover,
a.finance-home-card:focus-visible,
button.finance-home-card:hover,
button.finance-home-card:focus-visible,
a.trip-home-card:hover,
a.trip-home-card:focus-visible,
button.trip-home-card:hover,
button.trip-home-card:focus-visible {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.15rem rgba(var(--bs-primary-rgb), 0.2);
}
button.finance-home-reveal [data-home-reveal-hidden] {
  color: var(--bs-secondary-color);
}
.finance-home-year-split > .col-6:first-child {
  border-right: 1px solid var(--bs-border-color);
}
.finance-home-pair-item {
  flex: 1 1 0;
  min-width: 0;
  display: block;
  padding: 1rem 1.15rem;
  color: inherit;
  text-decoration: none;
  text-align: left;
}
.finance-home-pair-item + .finance-home-pair-item {
  border-left: 1px solid var(--bs-border-color);
}
.finance-home-pair-item:hover,
.finance-home-pair-item:focus-visible {
  background: rgba(var(--bs-primary-rgb), 0.06);
}
.easy-method-groups {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.easy-choice-group-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--bs-secondary-color);
  margin-bottom: 0.4rem;
}
.easy-choice-divider {
  margin: 0;
  opacity: 0.35;
}
.easy-choices {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
}
.easy-choices[data-easy-choices="type"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 22rem;
}
button.form-select[data-ledger-pick],
button.form-select[data-ledger-extra],
button.form-select[data-choice-picker-open] {
  overflow: hidden;
}
button.form-select[data-ledger-pick] [data-ledger-pick-text],
button.form-select[data-ledger-extra] [data-ledger-extra-text],
button.form-select[data-choice-picker-open] [data-choice-picker-label] {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.easy-choices.is-kind {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 22rem;
}
.easy-choices.is-wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.easy-choices.is-trip {
  grid-template-columns: 1fr;
}
.easy-choices.is-day {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 768px) {
  .easy-choices.is-trip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .easy-choices.is-day {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.easy-choice.is-stack {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 3.6rem;
  padding: 0.6rem 0.85rem;
  text-align: start;
  gap: 0.15rem;
}
.easy-choice-sub {
  font-size: 0.8rem;
  color: var(--bs-secondary-color);
}
.easy-choices.is-year {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (min-width: 768px) {
  .easy-choices.is-year {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.choice-picker-control {
  min-width: 8.5rem;
}
#ledger-extra-modal {
  z-index: 1065;
}
.easy-choice {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  background: var(--bs-body-bg);
  padding: 0.4rem 0.35rem;
  text-align: center;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.easy-choice:disabled {
  opacity: 0.45;
}
#easy-input-list-modal {
  z-index: 1065;
}
.finance-summary-link {
  color: inherit;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.finance-summary-link:hover,
.finance-summary-link:focus-visible {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.15rem rgba(var(--bs-primary-rgb), 0.12);
}
.finance-statistics-table .col-account {
  width: 28%;
}
.finance-statistics-table .col-classification {
  width: 44%;
}
.finance-statistics-table .col-amount {
  width: 28%;
}
.finance-statistics-table tr.account-group-start > * {
  border-top-width: 2px !important;
  border-top-color: var(--bs-emphasis-color) !important;
}
.finance-statistics-table tr.account-group-total > * {
  border-top-width: var(--bs-border-width) !important;
  border-top-style: solid;
  border-top-color: var(--bs-border-color) !important;
}

.annual-statistics-wrap {
  max-height: calc(100vh - 14rem);
  overflow: auto;
}
.annual-statistics-table {
  min-width: 1400px;
  width: max-content;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
}
.annual-statistics-table > :not(caption) > * > * {
  background-color: var(--bs-body-bg);
}
.annual-statistics-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background-color: var(--sticky-header-bg) !important;
  --bs-table-bg-state: transparent;
  box-shadow: inset 0 -1px 0 var(--bs-border-color);
}
.annual-statistics-table .annual-account {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 7.5rem;
  width: 7.5rem;
  background-color: var(--sticky-cell-bg) !important;
  --bs-table-bg-state: transparent;
}
.annual-statistics-table .annual-classification {
  position: sticky;
  left: 7.5rem;
  z-index: 2;
  min-width: 8.5rem;
  width: 8.5rem;
  background-color: var(--sticky-cell-bg) !important;
  --bs-table-bg-state: transparent;
  box-shadow: 6px 0 8px -6px rgba(0, 0, 0, 0.18);
}
.annual-statistics-table .annual-year-total {
  min-width: 5.5rem;
  text-align: center !important;
}
.annual-statistics-table thead .annual-account,
.annual-statistics-table thead .annual-classification {
  z-index: 5;
  background-color: var(--sticky-header-bg) !important;
}
.annual-statistics-table tr.account-group-start > * {
  border-top-width: 2px !important;
  border-top-color: var(--bs-emphasis-color) !important;
}
.annual-statistics-table tr.account-group-total > * {
  border-top-width: var(--bs-border-width) !important;
  border-top-style: solid;
  border-top-color: var(--bs-border-color) !important;
}

.fixed-expenses-wrap,
.credit-cards-wrap,
.bank-items-wrap {
  max-height: calc(100vh - 14rem);
  overflow: auto;
}
.fixed-expenses-table {
  min-width: 1400px;
  width: max-content;
  font-size: 0.875rem;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
}
.fixed-expenses-table > :not(caption) > * > * {
  background-color: var(--bs-body-bg);
}
.fixed-expenses-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background-color: var(--sticky-header-bg) !important;
  --bs-table-bg-state: transparent;
  box-shadow: inset 0 -1px 0 var(--bs-border-color);
  text-align: center !important;
}
.fixed-expenses-table .fixed-content,
.fixed-expenses-table .fixed-memo,
.fixed-expenses-table .fixed-total {
  position: sticky;
  z-index: 2;
  background-color: var(--sticky-cell-bg) !important;
  --bs-table-bg-state: transparent;
}
.fixed-expenses-table .fixed-content {
  left: 0;
  width: 140px;
  min-width: 140px;
}
.fixed-expenses-table .fixed-memo {
  left: 140px;
  width: 148px;
  min-width: 148px;
}
.fixed-expenses-table .fixed-total {
  left: 288px;
  width: auto;
  min-width: var(--total-col-min);
  box-shadow: 6px 0 8px -6px rgba(0, 0, 0, 0.18);
}
.fixed-expenses-table thead .fixed-content,
.fixed-expenses-table thead .fixed-memo,
.fixed-expenses-table thead .fixed-total {
  z-index: 5;
  background-color: var(--sticky-header-bg) !important;
  text-align: center !important;
}
.fixed-expenses-table thead .fixed-stop,
.fixed-expenses-table thead th.month-odd,
.fixed-expenses-table thead th.month-even {
  text-align: center !important;
}
.fixed-expenses-table tr.table-active .fixed-content,
.fixed-expenses-table tr.table-active .fixed-memo,
.fixed-expenses-table tr.table-active .fixed-total {
  background-color: var(--sticky-active-bg) !important;
}
.fixed-expenses-table .fixed-month-cell {
  vertical-align: middle;
}
.fixed-expenses-table td.fixed-month-stopped {
  background-color: color-mix(in srgb, var(--bs-secondary-color) 12%, var(--bs-body-bg)) !important;
}
.fixed-expenses-table td.fixed-month-stopped,
.fixed-expenses-table td.fixed-month-stopped span {
  color: var(--bs-secondary-color) !important;
}
.fixed-expenses-table .fixed-stop {
  min-width: 90px;
}
.fixed-expenses-table .fixed-action {
  min-width: 140px;
}
.fixed-month-card {
  background: var(--bs-body-bg);
}
.fixed-month-card .form-check-label {
  user-select: none;
}
.fixed-input-btn {
  --bs-btn-padding-y: 0.1rem;
  --bs-btn-padding-x: 0.35rem;
  --bs-btn-font-size: 0.7rem;
  --bs-btn-border-radius: 0.25rem;
  line-height: 1.2;
}
.fixed-amount-btn {
  font-size: 0.8rem;
  white-space: nowrap;
  line-height: 1.2;
}
input[data-fixed-month]:disabled {
  background: var(--bs-secondary-bg);
  color: var(--bs-secondary-color);
}
.credit-cards-table {
  min-width: 1200px;
  width: max-content;
  font-size: 0.875rem;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
}
.credit-cards-table > :not(caption) > * > * {
  background-color: var(--bs-body-bg);
}
.credit-cards-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background-color: var(--sticky-header-bg) !important;
  --bs-table-bg-state: transparent;
  box-shadow: inset 0 -1px 0 var(--bs-border-color);
  text-align: center !important;
}
.credit-cards-table .credit-subject,
.credit-cards-table .credit-method,
.credit-cards-table .credit-bank {
  position: sticky;
  z-index: 2;
  background-color: var(--sticky-cell-bg) !important;
  --bs-table-bg-state: transparent;
}
.credit-cards-table .credit-subject {
  left: 0;
  width: 56px;
  min-width: 56px;
}
.credit-cards-table .credit-method {
  left: 56px;
  width: 110px;
  min-width: 110px;
}
.credit-cards-table .credit-bank {
  left: 166px;
  width: 110px;
  min-width: 110px;
  box-shadow: 6px 0 8px -6px rgba(0, 0, 0, 0.18);
}
.credit-cards-table .credit-total {
  width: auto;
  min-width: var(--total-col-min);
}
.credit-cards-table thead .credit-subject,
.credit-cards-table thead .credit-method,
.credit-cards-table thead .credit-bank {
  z-index: 5;
  background-color: var(--sticky-header-bg) !important;
  text-align: center !important;
}
.credit-cards-table thead .credit-total,
.credit-cards-table thead th.month-odd,
.credit-cards-table thead th.month-even {
  text-align: center !important;
}
.credit-cards-table .credit-action {
  min-width: 140px;
}
.bank-items-table {
  min-width: 1600px;
  width: max-content;
  font-size: 0.875rem;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
}
.bank-items-table > :not(caption) > * > * {
  background-color: var(--bs-body-bg);
}
.bank-items-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background-color: var(--sticky-header-bg) !important;
  --bs-table-bg-state: transparent;
  box-shadow: inset 0 -1px 0 var(--bs-border-color);
  text-align: center !important;
}
.bank-items-table .bank-subject,
.bank-items-table .bank-method,
.bank-items-table .bank-content {
  position: sticky;
  z-index: 2;
  background-color: var(--sticky-cell-bg) !important;
  --bs-table-bg-state: transparent;
}
.bank-items-table .bank-subject {
  left: 0;
  width: 48px;
  min-width: 48px;
}
.bank-items-table .bank-method {
  left: 48px;
  width: 100px;
  min-width: 100px;
}
.bank-items-table .bank-content {
  left: 148px;
  width: 110px;
  min-width: 110px;
  box-shadow: 6px 0 8px -6px rgba(0, 0, 0, 0.18);
}
.bank-items-table thead .bank-subject,
.bank-items-table thead .bank-method,
.bank-items-table thead .bank-content {
  z-index: 5;
  background-color: var(--sticky-header-bg) !important;
}
.bank-items-table .bank-date {
  min-width: 100px;
}
.bank-items-table .bank-rate {
  min-width: 64px;
}
.bank-items-table .bank-day {
  min-width: 64px;
}
.bank-items-table .bank-prev,
.bank-items-table .bank-total {
  width: auto;
  min-width: var(--total-col-min);
}
.bank-items-table .bank-month-cell {
  vertical-align: middle;
}
.bank-items-table .bank-action {
  min-width: 140px;
}
@media (max-width: 767.98px) {
  .month-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow-x: visible;
    gap: 0.5rem;
  }
  .month-tabs .btn {
    min-width: 0;
    width: 100%;
    padding-inline: 0.25rem;
  }
  .finance-mobile-entry .entry-amount {
    font-variant-numeric: tabular-nums;
  }
  .finance-summary .card-body {
    padding: 0.5rem 0.65rem !important;
  }
  .finance-summary .fs-5 {
    font-size: 1rem !important;
    white-space: nowrap;
  }

  /* 왼쪽 sticky 열: 좁게 + 글자 축소해서 월 영역이 보이게 */
  .annual-statistics-table .annual-account,
  .annual-statistics-table .annual-classification,
  .fixed-expenses-table .fixed-content,
  .fixed-expenses-table .fixed-memo,
  .fixed-expenses-table .fixed-total,
  .credit-cards-table .credit-subject,
  .credit-cards-table .credit-method,
  .credit-cards-table .credit-bank,
  .bank-items-table .bank-subject,
  .bank-items-table .bank-method,
  .bank-items-table .bank-content {
    font-size: 0.68rem;
    padding-left: 0.2rem !important;
    padding-right: 0.2rem !important;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .annual-statistics-table .annual-account {
    left: 0;
    width: 3.75rem;
    min-width: 3.75rem;
  }
  .annual-statistics-table .annual-classification {
    left: 3.75rem;
    width: 4.25rem;
    min-width: 4.25rem;
  }
  .fixed-expenses-table .fixed-content {
    left: 0;
    width: 4.5rem;
    min-width: 4.5rem;
  }
  .fixed-expenses-table .fixed-memo {
    left: 4.5rem;
    width: 4rem;
    min-width: 4rem;
  }
  .fixed-expenses-table .fixed-total {
    left: 8.5rem;
    min-width: 4.25rem;
  }
  .credit-cards-table .credit-subject {
    left: 0;
    width: 28px;
    min-width: 28px;
  }
  .credit-cards-table .credit-method {
    left: 28px;
    width: 56px;
    min-width: 56px;
  }
  .credit-cards-table .credit-bank {
    left: 84px;
    width: 56px;
    min-width: 56px;
  }
  .bank-items-table .bank-subject {
    left: 0;
    width: 28px;
    min-width: 28px;
  }
  .bank-items-table .bank-method {
    left: 28px;
    width: 48px;
    min-width: 48px;
  }
  .bank-items-table .bank-content {
    left: 76px;
    width: 52px;
    min-width: 52px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

[x-cloak] {
  display: none !important;
}

.pi-board {
  display: grid;
  grid-template-columns: repeat(8, minmax(7.5rem, 1fr));
  grid-template-rows: repeat(5, auto);
  gap: 1px;
  max-width: 72rem;
  margin-inline: auto;
  overflow-x: auto;
  background: #2c2c2c;
  border: 2px solid #2c2c2c;
}
.pi-cell {
  min-height: 10.5rem;
  padding: 0.5rem 0.55rem 0.55rem;
  background: #f6f3ec;
}
.pi-row-1 {
  grid-row: 1;
}
.pi-row-2 {
  grid-row: 2;
}
.pi-row-3 {
  grid-row: 3;
}
.pi-row-4 {
  grid-row: 4;
}
.pi-row-5 {
  grid-row: 5;
}
.pi-col-1 {
  grid-column: 1 / span 2;
}
.pi-col-2 {
  grid-column: 2 / span 2;
}
.pi-col-3 {
  grid-column: 3 / span 2;
}
.pi-col-4 {
  grid-column: 4 / span 2;
}
.pi-col-5 {
  grid-column: 5 / span 2;
}
.pi-col-6 {
  grid-column: 6 / span 2;
}
.pi-col-7 {
  grid-column: 7 / span 2;
}
.pi-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.35rem;
  align-items: center;
  padding: 0.2rem 0.3rem;
  border-radius: 0.2rem;
}
.pi-item + .pi-item {
  margin-top: 0.28rem;
}
.pi-item-main {
  display: grid;
  grid-template-columns: 2.1rem minmax(0, 1fr);
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
  margin: 0;
}
.pi-item-main:not(:has(.pi-k)) {
  display: block;
  min-width: 0;
}
.pi-placed {
  width: 100%;
  min-width: 0;
  padding: 0.12rem 0.35rem;
  border: 1px solid #c5bba8;
  background: #fff;
  text-align: left;
  font-size: 0.8rem;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pi-item.pi-hint-maybe .pi-placed,
.pi-item.pi-hint-hot .pi-placed {
  background-color: rgba(255, 255, 255, 0.35);
  border-color: rgba(0, 0, 0, 0.28);
}
.pi-item.pi-hint-hit .pi-placed {
  background-color: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}
.pi-cell-name {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
  white-space: nowrap;
  word-break: keep-all;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pi-k {
  font-size: 0.72rem;
  color: #6c757d;
}
.pi-item-tokens {
  display: flex;
  gap: 0.2rem;
  flex: 0 0 auto;
}
.pi-chip {
  width: 1.7rem;
  height: 1.55rem;
  padding: 0;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  background: #fff;
  color: #888;
}
.pi-chip.check {
  border: 1.5px solid #2f6f46;
}
.pi-chip.arrow {
  border: 1.5px solid #3b5b8a;
  letter-spacing: -1px;
}
.pi-chip.miss {
  border: 1.5px solid #8a3b3b;
}
.pi-chip.check.on {
  background: #2f6f46;
  color: #fff;
}
.pi-chip.arrow.on {
  background: #3b5b8a;
  color: #fff;
}
.pi-chip.miss.on {
  background: #8a3b3b;
  color: #fff;
}
.pi-detectives {
  margin-top: 0.4rem;
}
.pi-detectives-box {
  display: flex;
  gap: 0.2rem;
  width: max-content;
  padding: 0.18rem;
  border: 1px solid #2c2c2c;
  background: #ece6d8;
}
.pi-det {
  border-radius: 0;
}
.pi-item.pi-hint-out {
  opacity: 0.38;
}
.pi-item.pi-hint-out .pi-cell-name,
.pi-item.pi-hint-out .pi-k,
.pi-item.pi-hint-out .pi-placed {
  text-decoration: line-through;
}
.pi-item.pi-hint-maybe {
  background: #e8b423;
}
.pi-item.pi-hint-hot {
  background: #d97706;
  color: #1a1a1a;
}
.pi-item.pi-hint-hit {
  background: #2f6f46;
  color: #fff;
}
.pi-item.pi-hint-hit .pi-k,
.pi-item.pi-hint-hit .pi-cell-name {
  color: #fff;
}
.pi-item.pi-hint-maybe .pi-k,
.pi-item.pi-hint-hot .pi-k {
  color: #3a2a08;
}
.pi-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1080;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.45);
}
.pi-modal.open {
  display: flex;
}
.pi-modal-card {
  width: min(36rem, 100%);
  max-height: 92vh;
  overflow: auto;
  padding: 1rem 1.1rem 1.1rem;
  border: 2px solid #2c2c2c;
  background: #fff;
}
.pi-opt-label {
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}
.pi-opt-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
  margin-bottom: 0.9rem;
}
.pi-opt {
  padding: 0.4rem 0.25rem;
  border: 1px solid #555;
  background: #fff;
  font-size: 0.85rem;
  line-height: 1.2;
}
.pi-opt.blank {
  font-size: 0.75rem;
  color: #666;
}
.pi-opt.on {
  background: #2f6f46;
  color: #fff;
  border-color: #245a38;
}
.pi-opt.taken {
  opacity: 0.32;
}
.pi-tips-page {
  background: #f6f3ec;
  min-height: 100vh;
}
.pi-tips-wrap {
  padding: 0.9rem 1rem 1.1rem;
}
.pi-coach-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}
.pi-coach-h {
  font-size: 0.82rem;
  font-weight: 700;
  margin: 0 0 0.3rem;
}
.pi-coach-list {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.95rem;
  line-height: 1.5;
}
.pi-coach-list li + li {
  margin-top: 0.25rem;
}
.pi-tips-page strong {
  font-weight: 700;
}
@media (max-width: 900px) {
  .pi-board {
    grid-template-columns: repeat(8, minmax(6.6rem, 1fr));
  }
  .pi-opt-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.stat-headline {
  font-size: 1.05rem;
}
.stat-stack {
  display: block;
  width: 100%;
  height: 16px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bs-secondary-bg, #e9ecef);
}
.stat-legend {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.stat-legend-swatch,
.stat-seg-0, .stat-seg-1, .stat-seg-2, .stat-seg-3,
.stat-seg-4, .stat-seg-5, .stat-seg-6, .stat-seg-7 {
  display: inline-block;
}
.stat-legend-swatch {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 2px;
}
.stat-family-expense .stat-seg-0 { fill: #c92a2a; background: #c92a2a; }
.stat-family-expense .stat-seg-1 { fill: #e03131; background: #e03131; }
.stat-family-expense .stat-seg-2 { fill: #f03e3e; background: #f03e3e; }
.stat-family-expense .stat-seg-3 { fill: #ff6b6b; background: #ff6b6b; }
.stat-family-expense .stat-seg-4 { fill: #d9480f; background: #d9480f; }
.stat-family-expense .stat-seg-5 { fill: #f76707; background: #f76707; }
.stat-family-expense .stat-seg-6 { fill: #c2255c; background: #c2255c; }
.stat-family-expense .stat-seg-7 { fill: #ae3ec9; background: #ae3ec9; }
.stat-family-income .stat-seg-0 { fill: #1864ab; background: #1864ab; }
.stat-family-income .stat-seg-1 { fill: #1c7ed6; background: #1c7ed6; }
.stat-family-income .stat-seg-2 { fill: #4dabf7; background: #4dabf7; }
.stat-family-income .stat-seg-3 { fill: #0b7285; background: #0b7285; }
.stat-family-income .stat-seg-4 { fill: #0c8599; background: #0c8599; }
.stat-family-income .stat-seg-5 { fill: #099268; background: #099268; }
.stat-family-income .stat-seg-6 { fill: #2f9e44; background: #2f9e44; }
.stat-family-income .stat-seg-7 { fill: #37b24d; background: #37b24d; }
.stat-pie-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.stat-pie {
  width: 10.5rem;
  height: 10.5rem;
  flex-shrink: 0;
}
.stat-pie path {
  stroke: var(--bs-body-bg, #fff);
  stroke-width: 0.7;
  stroke-linejoin: round;
}
.stat-pie path.stat-family-income,
.stat-legend-swatch.stat-family-income {
  fill: #1c7ed6;
  background: #1c7ed6;
}
.stat-pie path.stat-family-expense,
.stat-legend-swatch.stat-family-expense {
  fill: #c92a2a;
  background: #c92a2a;
}
.stat-hbars {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.stat-hbar {
  color: inherit;
}
.stat-hbar-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.85rem;
  margin-bottom: 0.15rem;
}
.stat-hbar-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stat-hbar-amount {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.stat-hbar-track {
  position: relative;
  height: 8px;
  border-radius: 4px;
  background: var(--bs-secondary-bg, #e9ecef);
}
.stat-family-expense .stat-hbar-fill,
.stat-family-expense .stat-vbar-fill,
.stat-vbar-fill.stat-family-expense {
  background: #c92a2a;
}
.stat-family-income .stat-hbar-fill,
.stat-family-income .stat-vbar-fill,
.stat-vbar-fill.stat-family-income {
  background: #1c7ed6;
}
.stat-compare-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.stat-compare-row + .stat-compare-row {
  margin-top: 0.4rem;
}
.stat-compare-label {
  width: 2.5rem;
  flex-shrink: 0;
  font-size: 0.8rem;
}
.stat-compare-row .stat-hbar-track {
  flex: 1 1 auto;
}
.stat-hbar-fill {
  display: block;
  height: 100%;
  border-radius: 4px;
  min-width: 0;
}
.stat-hbar-budget {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 0;
  border-left: 1px dashed #212529;
  transform: translateX(-0.5px);
}
.stat-vbars {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
}
.stat-vbar {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  color: inherit;
}
.stat-vbar-track {
  position: relative;
  width: 100%;
  height: 7.5rem;
  background: var(--bs-secondary-bg, #e9ecef);
  border-radius: 4px 4px 0 0;
}
.stat-vbar-fill {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #adb5bd;
}
.stat-vbar-fill.stat-family-income {
  background-color: #1c7ed6;
}
.stat-vbar-fill.stat-family-expense {
  background-color: #c92a2a;
}
.stat-vbar-pair {
  display: flex;
  align-items: stretch;
  gap: 2px;
  width: 100%;
  height: 7.5rem;
}
.stat-vbar-pair .stat-vbar-track {
  flex: 1 1 0;
  height: 7.5rem;
  max-width: none;
}
.stat-vbar-label {
  font-size: 0.7rem;
  margin-top: 0.25rem;
  color: var(--bs-secondary-color);
  text-align: center;
}
.stat-methods summary {
  cursor: pointer;
}
.trip-day {
  position: relative;
  z-index: 0;
  margin-bottom: 1.15rem;
}
.trip-day > .collapsing {
  overflow: hidden;
}
.trip-day.is-panel {
  padding: 0.85rem 0.95rem 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 1rem;
  background: var(--bs-tertiary-bg);
  box-shadow: 0 0.12rem 0.55rem rgba(15, 23, 42, 0.05);
}
.trip-day-bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.trip-day-bar .bg-section-toggle {
  min-width: 0;
  flex: 1 1 auto;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
}
.trip-day-bar > .dropdown,
.trip-day-bar > .d-flex {
  flex-shrink: 0;
}
.trip-timeline {
  position: relative;
  padding: 0.85rem 0 0.25rem 2.35rem;
}
.trip-timeline::before {
  content: "";
  position: absolute;
  left: 0.7rem;
  top: 0.35rem;
  bottom: 0.35rem;
  width: 2px;
  background: var(--bs-border-color);
}
.trip-timeline-item {
  position: relative;
  margin-bottom: 0.85rem;
}
.trip-timeline-item:last-child {
  margin-bottom: 0;
}
.trip-timeline-dot {
  position: absolute;
  left: -2.35rem;
  top: 0.7rem;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--bs-primary);
  color: #fff;
  z-index: 1;
}
.trip-timeline-dot-memo,
.trip-timeline-dot-transit,
.trip-timeline-dot-photo {
  width: 0.7rem;
  height: 0.7rem;
  left: -1.97rem;
  top: 1.05rem;
  background: var(--bs-secondary);
}
.trip-timeline-dot-icon {
  width: 1.45rem;
  height: 1.45rem;
  left: -2.35rem;
  top: 0.55rem;
  background: var(--bs-secondary-bg);
  color: var(--bs-body-color);
  border: 1px solid var(--bs-border-color);
}
.trip-timeline-dot-icon .ui-icon {
  width: 0.95rem;
  height: 0.95rem;
}
.trip-time-reversed {
  background: #dc3545;
  color: #fff;
  border-radius: 0.25rem;
  padding: 0 0.3rem;
}
.trip-item-card {
  border: 1px solid var(--bs-border-color);
  border-radius: 0.85rem;
  padding: 0.8rem 0.95rem;
  background: var(--bs-body-bg);
  min-width: 0;
}
.trip-item-main {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.trip-item-body {
  min-width: 0;
  flex: 1;
}
.trip-item-compact .trip-item-card {
  padding: 0.4rem 0.7rem;
}
.trip-item-more {
  margin-top: 0;
  flex-shrink: 0;
}
.trip-item-transit .trip-item-card {
  background: var(--bs-tertiary-bg);
  border-style: dashed;
}
.trip-item-memo .trip-item-card {
  background: var(--bs-tertiary-bg);
}
.trip-item-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 0.65rem;
}
.trip-item-time {
  font-variant-numeric: tabular-nums;
  color: var(--bs-secondary-color);
  font-weight: 600;
}
.trip-item-time.trip-time-reversed {
  background: #dc3545;
  color: #fff;
}
.trip-item-kicker {
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
  margin-bottom: 0.2rem;
}
.trip-item-meta {
  margin-top: 0.2rem;
  font-size: 0.875rem;
  color: var(--bs-secondary-color);
}
.trip-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.dropdown > .trip-item-actions.dropdown-menu {
  display: none;
}
.dropdown > .trip-item-actions.dropdown-menu.show {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 8rem;
  padding: 0.35rem;
}
@media (min-width: 768px) {
  .trip-item-more-toggle {
    display: none !important;
  }
  .dropdown > .trip-item-actions.dropdown-menu,
  .dropdown > .trip-item-actions.dropdown-menu.show {
    display: flex !important;
    flex-direction: row;
    position: static;
    inset: auto;
    transform: none !important;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
    min-width: 0;
    box-shadow: none;
  }
  .trip-ledger-side .trip-item-more-toggle {
    display: inline-flex !important;
  }
  .trip-ledger-side .dropdown > .trip-item-actions.dropdown-menu,
  .trip-ledger-side .dropdown > .trip-item-actions.dropdown-menu.show {
    flex-direction: column;
    position: absolute;
    inset: auto;
    transform: none !important;
    border: var(--bs-dropdown-border-width) solid var(--bs-dropdown-border-color);
    border-radius: var(--bs-dropdown-border-radius);
    background: var(--bs-dropdown-bg);
    padding: 0.35rem;
    min-width: 8rem;
    box-shadow: var(--bs-dropdown-box-shadow);
  }
  .trip-ledger-side .dropdown > .trip-item-actions.dropdown-menu {
    display: none !important;
  }
  .trip-ledger-side .dropdown > .trip-item-actions.dropdown-menu.show {
    display: flex !important;
  }
  .trip-ledger-side .dropdown > .trip-item-actions.dropdown-menu.show .btn,
  .trip-ledger-side .dropdown > .trip-item-actions.dropdown-menu.show form {
    width: 100%;
    margin: 0;
  }
  .trip-ledger-side .dropdown > .trip-item-actions.dropdown-menu.show .btn {
    padding: 0.35rem 0.6rem;
    font-size: 0.875rem;
  }
}
@media (max-width: 767.98px) {
  .trip-item-more {
    display: flex;
    justify-content: flex-end;
    align-self: flex-start;
  }
  .dropdown > .trip-item-actions.dropdown-menu.show .btn,
  .dropdown > .trip-item-actions.dropdown-menu.show form {
    width: 100%;
    margin: 0;
  }
  .dropdown > .trip-item-actions.dropdown-menu.show .btn {
    padding: 0.35rem 0.6rem;
    font-size: 0.875rem;
  }
}
img.trip-item-photo,
.trip-booking-photo {
  display: block;
  width: 100%;
  max-height: 12rem;
  object-fit: cover;
  border-radius: 0.7rem;
  margin-bottom: 0.7rem;
}
.trip-timeline-item.trip-item-photo .trip-item-card {
  overflow: hidden;
}
.trip-day-photo-frame {
  position: relative;
  display: block;
  width: 100%;
  height: 16rem;
  max-height: 16rem;
  overflow: hidden;
  border-radius: 0.5rem;
  background: var(--bs-secondary-bg);
  margin-bottom: 0.35rem;
}
.trip-day-photo-open {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: none;
  line-height: 0;
  cursor: zoom-in;
}
.trip-item-photo.trip-day-photo {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  object-position: top center;
  background: none;
  margin: 0;
}
.trip-bookings {
  padding-bottom: 0.35rem;
}
.trip-booking-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.trip-booking-card {
  border: 1px solid var(--bs-border-color);
  border-radius: 0.85rem;
  background: var(--bs-body-bg);
  overflow: hidden;
}
.trip-booking-photo {
  border-radius: 0;
  margin-bottom: 0;
  max-height: 10rem;
}
.trip-booking-body {
  padding: 0.85rem 0.95rem 0.95rem;
}
.trip-day-bookings {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.7rem 0 0.85rem;
}
.trip-day-booking {
  padding: 0.65rem 0.85rem;
  border: 1px dashed var(--bs-border-color);
  border-radius: 0.75rem;
  background: var(--bs-tertiary-bg);
}
.trip-ledger-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.trip-ledger-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.95rem;
  background: var(--bs-body-bg);
  box-shadow: 0 0.1rem 0.4rem rgba(15, 23, 42, 0.05);
}
.trip-ledger-main {
  min-width: 0;
  flex: 1 1 auto;
}
.trip-ledger-side {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  flex: 0 0 auto;
}
.trip-ledger-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}
.trip-ledger-title {
  font-size: 1.02rem;
  font-weight: 700;
}
.trip-ledger-amount {
  text-align: end;
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}
.trip-ledger-amt-primary {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.25;
}
.trip-ledger-amt-secondary {
  margin-top: 0.15rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--bs-secondary-color);
}
.trip-ledger-main .trip-ledger-thumbs {
  margin-top: 0.45rem;
}
.trip-ledger-thumbs,
.trip-ledger-photo-edit {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.trip-ledger-thumb {
  width: 3.25rem;
  height: 3.25rem;
  object-fit: cover;
  border-radius: 0.4rem;
  border: 1px solid var(--bs-border-color);
}
.trip-photo-open {
  padding: 0;
  border: 0;
  background: transparent;
  line-height: 0;
  cursor: zoom-in;
}
.trip-photo-open .trip-ledger-thumb {
  display: block;
}
.trip-photo-modal-content {
  background: #111;
}
.trip-photo-view {
  max-width: 100%;
  max-height: min(85vh, 56rem);
  width: auto;
  height: auto;
  object-fit: contain;
}
.trip-stat-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.trip-stat-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.trip-stat-bar {
  height: 0.45rem;
  background: var(--bs-tertiary-bg);
  border-radius: 999px;
  overflow: hidden;
}
.trip-stat-bar > span {
  display: block;
  height: 100%;
  background: var(--bs-primary);
}
.trip-check-group > .bg-section-toggle {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
}
.trip-check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--bs-border-color);
}
.trip-check-row:last-child {
  border-bottom: 0;
}
.trip-check-toggle {
  margin: 0;
  padding-top: 0.15rem;
}
.trip-check-actions {
  margin-top: 0;
  flex-shrink: 0;
}
.trip-check-btn {
  width: 1.35rem;
  height: 1.35rem;
  padding: 0;
  border: 1.5px solid var(--bs-border-color);
  border-radius: 50%;
  background: transparent;
  display: inline-block;
}
.trip-check-btn.is-checked {
  border-color: var(--bs-primary);
  background: var(--bs-primary);
  box-shadow: inset 0 0 0 0.22rem var(--bs-body-bg);
}
.trip-check-main {
  min-width: 0;
  flex: 1;
}
.trip-ledger-amount-input {
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
}
.trip-cat-picks {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.4rem;
}
.trip-cat-picks.trip-currency-picks {
  grid-template-columns: repeat(auto-fill, minmax(3.8rem, 1fr));
}
.trip-cat-picks.trip-mode-picks {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.trip-cat-pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.45rem 0.2rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.7rem;
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  font-size: 0.75rem;
  line-height: 1.2;
  cursor: pointer;
  margin: 0;
}
.trip-cat-pick.is-selected,
.trip-cat-pick:has(:checked) {
  border-color: var(--bs-primary);
  color: var(--bs-primary);
  background: var(--bs-primary-bg-subtle);
}
.trip-cat-mark {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bs-tertiary-bg);
  font-size: 0.75rem;
  font-weight: 600;
}
.trip-cat-mark.is-list {
  width: 1.45rem;
  height: 1.45rem;
  flex: 0 0 auto;
}
.trip-avatar {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1a1a1a;
  flex: 0 0 auto;
}
.trip-person-row .trip-avatar,
.trip-settle-people .trip-avatar {
  width: 1.2rem;
  height: 1.2rem;
  font-size: 0.65rem;
}
.trip-share-picks {
  margin: 0;
}
.trip-share-pick {
  display: grid;
  gap: 0.55rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--bs-border-color);
}
.trip-share-pick:last-child {
  border-bottom: 0;
}
.trip-share-who {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}
.trip-share-name {
  min-width: 0;
}
.trip-share-toggles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}
.trip-share-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  margin: 0;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.7rem;
  background: var(--bs-body-bg);
  font-weight: 600;
  cursor: pointer;
}
.trip-share-toggle:has(:checked),
.trip-share-toggle.is-selected {
  border-color: var(--bs-primary);
  color: var(--bs-primary);
  background: var(--bs-primary-bg-subtle);
}
button.trip-share-toggle {
  width: 100%;
  color: inherit;
}
.trip-share-sheet-summary {
  list-style: none;
  cursor: pointer;
}
.trip-share-sheet-summary::-webkit-details-marker {
  display: none;
}
@media (min-width: 768px) {
  .trip-share-pick {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
  .trip-share-toggles {
    min-width: 12.5rem;
  }
  .trip-share-sheet > summary {
    display: none;
  }
}
@media (max-width: 767.98px) {
  .trip-share-sheet {
    border: 1px solid var(--bs-border-color);
    border-radius: 0.85rem;
    background: var(--bs-body-bg);
    padding: 0.1rem 0.85rem 0.35rem;
  }
  .trip-share-sheet-summary {
    display: flex;
    align-items: center;
    min-height: 2.75rem;
    font-weight: 600;
  }
}
.trip-companion-list,
.trip-person-list,
.trip-transfer-list {
  margin: 0;
}
.trip-companion-row,
.trip-person-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--bs-border-color);
}
.trip-companion-row:last-child,
.trip-person-row:last-child {
  border-bottom: 0;
}
.trip-companion-edit {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  flex: 1;
  min-width: 0;
}
.trip-companion-edit .form-control {
  flex: 1;
  min-width: 8rem;
}
.trip-fund-amount {
  width: 8rem;
  margin-left: auto;
}
.trip-person-main {
  flex: 1;
  min-width: 0;
}
.trip-person-amt,
.trip-settle-amt {
  text-align: end;
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}
.trip-settle-amt {
  color: var(--bs-primary);
  font-weight: 600;
}
.trip-transfer-row {
  border-bottom: 1px dashed var(--bs-border-color);
}
.trip-transfer-row:last-child {
  border-bottom: 0;
}
.trip-transfer-row summary {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  padding: 0.85rem 0;
  cursor: pointer;
  list-style: none;
}
.trip-transfer-row summary::-webkit-details-marker {
  display: none;
}
.trip-transfer-who {
  min-width: 0;
}
.trip-transfer-detail {
  padding: 0 0 0.9rem;
}
@media (max-width: 575.98px) {
  .trip-cat-picks {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.trip-days-views {
  margin-top: 0.75rem;
}
.trip-schedule {
  display: flex;
  gap: 0;
  overflow-x: auto;
}
.trip-schedule-hours {
  flex: 0 0 3.4rem;
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--bs-body-bg);
}
.trip-schedule-hour,
.trip-schedule-hour-pad {
  height: 3.2rem;
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
}
.trip-schedule-hour-pad {
  height: 3.6rem;
}
.trip-schedule-days {
  display: flex;
  min-width: 0;
}
.trip-schedule-day {
  flex: 0 0 10rem;
  min-width: 10rem;
  border-left: 1px solid var(--bs-border-color);
}
.trip-schedule-day-head {
  height: 3.6rem;
  padding: 0.25rem 0.5rem;
  font-weight: 600;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--bs-border-color);
}
.trip-schedule-track {
  position: relative;
  height: calc(3.2rem * var(--hours, 18));
}
.trip-sched-block {
  position: absolute;
  left: 0.25rem;
  right: 0.25rem;
  box-sizing: border-box;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 0.4rem;
  padding: 0.2rem 0.35rem;
  font-size: 0.78rem;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
}
.trip-sched-place {
  background: #cfe2ff;
}
.trip-sched-transit {
  background: #e2e3e5;
}
.trip-sched-lodging {
  background: #d1e7dd;
}
.trip-sched-memo {
  background: #fff3cd;
}
.trip-schedule-untimed {
  padding: 0.5rem;
  font-size: 0.85rem;
  border-top: 1px dashed var(--bs-border-color);
}
.trip-day-chips {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  margin-bottom: 0.75rem;
}
.trip-day-chip {
  border: 1px solid var(--bs-border-color);
  background: var(--bs-body-bg);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  white-space: nowrap;
}
.trip-day-chip.is-on {
  border-color: var(--bs-primary);
  color: var(--bs-primary);
}
.trip-schedule-mobile-track {
  display: flex;
}
.trip-schedule-mobile .trip-schedule-hour-pad {
  display: none;
}
.trip-schedule-mobile .trip-schedule-track {
  flex: 1;
}
@media (max-width: 767.98px) {
  .trip-schedule-desktop,
  .trip-transit-desktop {
    display: none;
  }
}
@media (min-width: 768px) {
  .trip-schedule-mobile,
  .trip-transit-mobile {
    display: none;
  }
}
.trip-transit-wrap {
  overflow-x: auto;
}
.trip-transit-table th:nth-child(-n+3),
.trip-transit-table td:nth-child(-n+3) {
  position: sticky;
  background: var(--bs-body-bg);
}
.trip-transit-table th:nth-child(1),
.trip-transit-table td:nth-child(1) { left: 0; }
.trip-transit-table th:nth-child(2),
.trip-transit-table td:nth-child(2) { left: 7rem; }
.trip-transit-table th:nth-child(3),
.trip-transit-table td:nth-child(3) { left: 13rem; }
.trip-transit-day-head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bs-body-bg);
  font-size: 0.95rem;
  padding: 0.4rem 0;
}
.trip-hop-card {
  display: block;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.85rem;
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.6rem;
  text-decoration: none;
  color: inherit;
  background: var(--bs-body-bg);
}
.trip-hop-card.is-current {
  border-color: var(--bs-primary);
}
.trip-hop-card.is-past {
  opacity: 0.55;
}
.trip-hop-time {
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.trip-hop-duration {
  margin-left: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--bs-secondary-color);
}
.trip-hop-route {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.25rem 0;
}
.trip-ledger-flags {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin-top: 0;
}
.trip-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  color: var(--bs-secondary-color);
  background: none;
}
.trip-flag .ui-icon {
  width: 1.05rem;
  height: 1.05rem;
}
.trip-flag.is-cash {
  color: #198754;
}
.trip-flag.is-card {
  color: #0d6efd;
}
.trip-flag.is-hide {
  color: #c9a227;
}
.trip-flag.is-fund {
  color: #dc6b04;
}
.trip-flag.is-exchange {
  color: #6f42c1;
}
.trip-flag.is-held {
  color: #0f766e;
}
.trip-fund-switch .form-check-input {
  width: 2.5rem;
  height: 1.35rem;
  margin-top: 0.15rem;
}
.trip-fund-currency {
  padding: 0.9rem 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.85rem;
  background: var(--bs-body-bg);
}
.trip-fund-currency + .trip-fund-currency {
  margin-top: 0.85rem;
}
.trip-fund-currency-body {
  display: none;
  margin-top: 0.9rem;
}
.trip-fund-currency:has([name="fund_currencies"]:checked) .trip-fund-currency-body {
  display: block;
}
.trip-share-fund-note,
.trip-share-people-personal,
.trip-share-people-group,
.trip-share-hidden {
  display: none;
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.trip-share-block:has([name="settle_mode"][value="fund"]:checked) .trip-share-fund-note {
  display: block;
}
.trip-share-block:has([name="settle_mode"][value="personal"]:checked) .trip-share-people-personal {
  display: block;
}
.trip-share-block:has([name="settle_mode"][value="group"]:checked) .trip-share-people-group {
  display: block;
}
.trip-share-block:has([name="settle_mode"][value="group"]:checked) .trip-share-hidden,
.trip-share-block:has([name="settle_mode"][value="fund"]:checked) .trip-share-hidden {
  display: block;
  margin-top: 1rem;
}
.trip-ledger-prep-only {
  display: none;
}
.trip-ledger-fields:has(#trip-ledger-section option[value="prep"]:checked) .trip-ledger-prep-only {
  display: block;
}
.trip-ledger-amt-krw {
  display: none;
}
.trip-ledger-fields:has([name="currency_code"][value="KRW"]:checked) .trip-ledger-amt-krw {
  display: inline;
}
.trip-ledger-fields:has([name="currency_code"][value="KRW"]:checked) .trip-ledger-amt-local {
  display: none;
}
.trip-exchange-buy,
.trip-exchange-held {
  display: none;
}
.trip-exchange-fields:has([name="exchange_mode"][value="buy"]:checked) .trip-exchange-buy {
  display: block;
}
.trip-exchange-fields:has([name="exchange_mode"][value="held"]:checked) .trip-exchange-held {
  display: block;
}
.trip-fx-quote {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.trip-fx-quote input {
  width: 6.5rem;
  flex: 0 0 auto;
}
.trip-fx-quote #trip-exchange-rate,
.trip-fx-quote #trip-exchange-held-rate {
  width: 8rem;
}
.trip-fx-quote-unit,
.trip-fx-quote-krw {
  color: var(--bs-secondary-color);
}
.trip-item-fields .trip-item-place,
.trip-item-fields .trip-item-memo,
.trip-item-fields .trip-item-transit,
.trip-item-fields .trip-item-lodging,
.trip-booking-fields .trip-booking-lodging,
.trip-booking-fields .trip-booking-flight {
  display: none;
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.trip-item-fields:has(#trip-item-kind option[value="place"]:checked) .trip-item-place,
.trip-item-fields:has(#trip-item-kind option[value="memo"]:checked) .trip-item-memo,
.trip-item-fields:has(#trip-item-kind option[value="transit"]:checked) .trip-item-transit,
.trip-item-fields:has(#trip-item-kind option[value="lodging"]:checked) .trip-item-lodging {
  display: block;
}
.trip-booking-fields:has([name="kind"][value="lodging"]:checked) .trip-booking-lodging,
.trip-booking-fields:has([name="kind"][value="flight"]:checked) .trip-booking-flight {
  display: block;
}
.trip-fund-summary {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--bs-body-color);
}
.trip-fund-bucket + .trip-fund-bucket {
  margin-top: 1rem;
}
.trip-fund-bucket-label,
.trip-cash-wallet-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--bs-secondary-color);
}
.trip-cash-wallet-label {
  margin-bottom: 0.5rem;
}
.trip-fund-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.trip-fund-stat {
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.85rem;
  background: var(--bs-tertiary-bg);
}
.trip-fund-stat.is-remain-neg {
  background: rgba(220, 53, 69, 0.12);
  border-color: rgba(220, 53, 69, 0.35);
}
.trip-fund-stat.is-remain-neg .trip-fund-stat-value {
  color: #b02a37;
}
.trip-fund-stat.is-remain-low {
  background: rgba(255, 193, 7, 0.18);
  border-color: rgba(196, 146, 6, 0.35);
}
.trip-fund-stat.is-remain-ok {
  background: rgba(25, 135, 84, 0.12);
  border-color: rgba(25, 135, 84, 0.3);
}
.trip-fund-stat.is-remain-ok .trip-fund-stat-value {
  color: #146c43;
}
.trip-fund-stat-label {
  font-size: 0.8rem;
  color: var(--bs-secondary-color);
  margin-bottom: 0.25rem;
}
.trip-fund-stat-value {
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}
.trip-fund-stat-sub {
  margin-top: 0.2rem;
  font-size: 0.85rem;
  color: var(--bs-secondary-color);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 575.98px) {
  .trip-fund-stats {
    grid-template-columns: 1fr;
  }
}
.trip-icon-legend {
  display: grid;
  gap: 0.7rem;
}
.trip-icon-legend li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.trip-currency-more > summary {
  cursor: pointer;
  color: var(--bs-secondary-color);
  font-size: 0.9rem;
}
.trip-settle-people {
  margin-top: 0.45rem;
}
.trip-settle-people-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.45rem;
  font-size: 0.9rem;
}
.trip-settle-people-row + .trip-settle-people-row {
  margin-top: 0.3rem;
}
.trip-settle-people-k {
  color: var(--bs-secondary-color);
  font-size: 0.8rem;
  margin-right: 0.1rem;
}
.trip-settle-people-each {
  color: var(--bs-secondary-color);
  font-size: 0.82rem;
}

