:root {
  color-scheme: light;
  font-family:
    -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR",
    "Segoe UI", sans-serif;
  color: #152138;
  background: #f5f7fb;
  font-synthesis: none;
  --navy: #173b78;
  --blue: #2864d7;
  --blue-soft: #edf3ff;
  --ink: #152138;
  --muted: #69758a;
  --line: #dce2ed;
  --danger: #c0363f;
  --danger-soft: #fff1f2;
  --success: #137356;
  --success-soft: #eaf8f2;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  touch-action: pan-x pan-y;
  background:
    radial-gradient(circle at 90% -10%, rgb(40 100 215 / 10%), transparent 32rem), #f5f7fb;
  background-attachment: fixed;
  scrollbar-gutter: stable;
  scrollbar-color: rgb(105 117 138 / 42%) transparent;
}

/* App-like, viewport-fixed mobile entry and review screens. */
@container kkaebu (max-width: 599px){
  .page-shell.records-page {
    padding-top: max(12px, env(safe-area-inset-top));
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }

  body.fixed-mobile-page {
    --mobile-install-footer-clearance: 44px;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
  }

  body.fixed-mobile-page .page-shell {
    display: flex;
    height: 100dvh;
    min-height: 0;
    padding-top: max(12px, env(safe-area-inset-top));
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    flex-direction: column;
  }

  body.fixed-mobile-page .mobile-install-hint,
  body.records-calendar-active .mobile-install-hint {
    display: none;
  }

  body.fixed-mobile-page :is(.app-header) {
    position: relative;
    top: auto;
    flex: 0 0 auto;
    margin-bottom: 12px;
  }

  body.fixed-mobile-page .intro {
    flex: 0 0 auto;
  }

  body.fixed-mobile-page .compact-page .expense-intro {
    margin-bottom: 10px;
  }

  body.fixed-mobile-page .compact-page .expense-form-card {
    min-height: 0;
    padding: 12px 14px;
  }

  body.fixed-mobile-page .compact-page .field-group {
    margin-bottom: 9px;
  }

  body.fixed-mobile-page .compact-page .expense-form-card input,
  body.fixed-mobile-page .compact-page .expense-form-card .app-control-trigger {
    height: 46px;
  }

  body.fixed-mobile-page .compact-page .primary-button {
    min-height: 46px;
  }

  body.fixed-mobile-page .review-intro {
    margin-bottom: 12px;
  }

  body.fixed-mobile-page .review-intro .eyebrow {
    margin-bottom: 6px;
  }

  body.fixed-mobile-page .review-intro h1 {
    font-size: clamp(20px, 5.8cqw, 24px);
  }

  body.fixed-mobile-page .review-intro .intro-copy {
    margin-top: 7px;
    font-size: 12px;
    line-height: 1.4;
  }

  body.fixed-mobile-page .review-section {
    min-height: 0;
    flex: 1 1 auto;
  }

  body.fixed-mobile-page .review-section .connection-section-heading {
    margin-bottom: 8px;
  }

  body.fixed-mobile-page .review-section .connection-section-heading .eyebrow {
    display: none;
  }

  body.fixed-mobile-page .review-section .connection-section-heading h2 {
    font-size: 20px;
  }

  body.fixed-mobile-page .review-page-status {
    margin-bottom: 7px;
    padding: 8px 10px;
    font-size: 11px;
  }

  body.fixed-mobile-page .review-progress {
    margin-bottom: 7px;
    font-size: 10px;
  }

  body.fixed-mobile-page .review-card {
    padding: 12px;
  }

  body.fixed-mobile-page .review-instruction {
    margin-bottom: 7px;
    font-size: 10px;
  }

  body.fixed-mobile-page .review-swipe-zone {
    height: min(184px, 29dvh);
    min-height: 142px;
  }

  body.fixed-mobile-page .review-card-actions {
    margin-top: 6px;
  }

  body.fixed-mobile-page .review-empty-state {
    padding: 24px 14px;
  }

  body.records-calendar-active {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
  }

  body.records-calendar-active .records-page {
    display: flex;
    height: 100dvh;
    min-height: 0;
    padding-top: max(12px, env(safe-area-inset-top));
    padding-right: max(6px, env(safe-area-inset-right));
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    padding-left: max(6px, env(safe-area-inset-left));
    flex-direction: column;
  }

  .records-page > :is(.app-header) {
    position: sticky;
    top: 0;
    flex: 0 0 auto;
    margin-bottom: 10px;
  }

  .records-page > .records-intro {
    margin: 0 2px 7px;
  }

  .records-page > .records-intro .eyebrow {
    margin: 0;
  }

  body.records-calendar-active .records-intro {
    display: block;
    flex: 0 0 auto;
  }

  body.records-calendar-active .records-section {
    display: flex;
    min-height: 0;
    flex: 1 1 auto;
    flex-direction: column;
  }

  body.records-calendar-active .records-section > .connection-section-heading {
    flex: 0 0 auto;
    margin-bottom: 8px;
  }

  body.records-calendar-active .records-section > .records-filters {
    flex: 0 0 auto;
    margin-bottom: 8px;
    padding: 7px;
  }

  body.records-calendar-active .records-filter-field .app-control-trigger,
  body.records-calendar-active .records-multiselect-trigger,
  body.records-calendar-active .records-filter-reset {
    height: 36px;
  }

  body.records-calendar-active .records-calendar {
    display: flex;
    min-height: 0;
    padding: 7px 4px;
    flex: 1 1 auto;
    flex-direction: column;
    border-radius: 16px;
  }

  body.records-calendar-active .records-calendar-header {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    flex: 0 0 auto;
    margin-bottom: 6px;
  }

  body.records-calendar-active .records-calendar-summary {
    min-height: 26px;
    margin-bottom: 5px;
  }

  body.records-calendar-active .records-calendar-header button {
    width: 34px;
    height: 31px;
  }

  body.records-calendar-active .records-calendar-header strong {
    font-size: 15px;
  }

  body.records-calendar-active .records-calendar-weekdays {
    flex: 0 0 auto;
    margin-bottom: 3px;
    font-size: 9px;
  }

  body.records-calendar-active .records-calendar-grid {
    min-height: 0;
    flex: 1 1 auto;
    grid-template-rows: repeat(6, minmax(0, 1fr));
    gap: 2px;
  }

  body.records-calendar-active .records-calendar-day {
    min-height: 0;
    padding: 5px 1px;
    gap: 4px;
    border-radius: 8px;
  }

  body.records-calendar-active .records-calendar-day-number {
    font-size: 10px;
  }

  body.records-calendar-active .records-calendar-day-total {
    align-self: center;
    font-size: clamp(7px, 2.3cqw, 10px);
  }

  .records-calendar-day-dialog {
    width: calc(100% - 18px);
    max-height: calc(100dvh - 18px);
    margin: auto auto 9px;
    border-radius: 20px;
  }

  .records-calendar-day-panel {
    max-height: calc(100dvh - 18px);
    padding: 17px 14px max(14px, env(safe-area-inset-bottom));
  }
}

@container kkaebu (max-width: 599px){@media (max-height: 650px){
  body.fixed-mobile-page .review-intro .intro-copy,
  body.fixed-mobile-page .compact-page .intro-copy {
    display: none;
  }

  body.fixed-mobile-page .review-swipe-zone {
    height: min(154px, 27dvh);
    min-height: 122px;
  }

  body.fixed-mobile-page .review-expense-block {
    padding: 10px;
  }

  body.fixed-mobile-page .review-expense-block small {
    margin-bottom: 5px;
  }

  body.fixed-mobile-page .review-expense-block span {
    margin-top: 5px;
  }
}}

/* Per-asset family permissions */
.financial-access-section {
  display: grid;
  gap: 16px;
}

.bank-assets-overview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  border: 1px solid #dce4ef;
  border-radius: 14px;
  background: #dce4ef;
}

.bank-assets-overview > span {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  background: #fff;
}

.bank-assets-overview small {
  color: #71809a;
  font-size: 12px;
}

.bank-assets-overview strong {
  color: var(--navy);
  font-size: 18px;
}

.bank-assets-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 14px;
}

.bank-assets-actions button {
  min-height: 42px;
  padding-inline: 10px;
  font-size: 12px;
}

.financial-asset-balance {
  display: block;
  margin-top: 7px;
  color: var(--navy);
  font-size: 15px;
  font-weight: 800;
}

.financial-asset-sync-state {
  margin: 0;
  color: #63738f;
  font-size: 12px;
  line-height: 1.5;
}

.financial-add-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.financial-security-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid #cfe0f7;
  border-radius: 16px;
  color: #24466f;
  background: #f2f7fd;
}

.financial-security-note p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}

.financial-security-note strong {
  display: block;
  color: #17385f;
}

.financial-access-list,
.financial-permission-members {
  display: grid;
  gap: 12px;
}

.financial-access-item {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.financial-access-item-heading {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.financial-access-item-heading h3 {
  display: inline;
  margin: 0 8px 0 0;
  font-size: 18px;
}

.financial-asset-kind,
.financial-asset-masked,
.financial-permission-identity span {
  color: #71809a;
  font-size: 12px;
}

.financial-asset-kind {
  display: block;
  margin-bottom: 5px;
  color: #315e9e;
  font-weight: 800;
}

.financial-service-tier {
  display: inline-flex;
  margin-top: 9px;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.financial-service-tier.basic {
  color: #74530a;
  background: #fff4cf;
}

.financial-service-tier.premium {
  color: #315e9e;
  background: #edf4ff;
}

.financial-asset-actions,
.financial-asset-rename-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.financial-asset-actions {
  flex-shrink: 0;
}

.financial-asset-rename-form {
  padding: 12px;
  border: 1px solid #dce4f0;
  border-radius: 14px;
  background: #f8fafc;
}

.financial-asset-rename-form input {
  min-width: 0;
  flex: 1;
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid #cbd7e8;
  border-radius: 10px;
  background: #fff;
}

.financial-owner-help,
.financial-permission-empty,
.financial-access-empty {
  margin: 0;
  color: #63738f;
  font-size: 13px;
  line-height: 1.5;
}

.financial-access-empty {
  padding: 20px;
}

.financial-permission-member {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(330px, 1.6fr);
  gap: 16px;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid #e8edf5;
}

.financial-permission-identity {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.financial-permission-identity span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.financial-permission-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.financial-permission-toggle {
  display: flex;
  gap: 7px;
  align-items: center;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #dce4f0;
  border-radius: 12px;
  color: #33445f;
  background: #f8fafc;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.financial-permission-toggle:has(input:checked) {
  border-color: var(--theme-accent,#9db9e2);
  color: #173f7c;
  background: #edf4ff;
}

.financial-permission-toggle input {
  inline-size: 18px;
  block-size: 18px;
  margin: 0;
  accent-color: #1f4b8f;
}

.financial-shared-permissions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.financial-permission-badge {
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.financial-permission-badge.enabled {
  color: #17643a;
  background: #e9f7ef;
}

.financial-permission-badge.disabled {
  color: #7b879b;
  background: #eef1f5;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@container kkaebu (max-width: 720px){
  .bank-assets-actions {
    grid-template-columns: 1fr;
  }

  .financial-access-section .connection-section-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    align-items: flex-start;
  }

  .financial-add-link {
    width: 100%;
    min-height: 36px;
    padding: 8px 11px;
    font-size: 12px;
  }

  .financial-access-item {
    padding: 16px;
  }

  .financial-access-item-heading,
  .financial-asset-rename-form {
    align-items: stretch;
    flex-direction: column;
  }

  .financial-asset-actions > :is(button),
  .financial-asset-rename-form > :is(button) {
    flex: 1;
  }

  .financial-permission-member {
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
  }

  .financial-permission-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .financial-permission-toggle {
    justify-content: space-between;
  }
}

/* AI insights */
.ai-insights-page {
  padding-bottom: 72px;
}

.ai-insights-intro {
  padding-bottom: 30px;
}

.card.insight-card {
  margin-top: 22px;
  border: 1px solid #dfe6f2;
  border-radius: 26px;
}

.insight-card-heading,
.reduction-list article > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.insight-card-heading h2 {
  margin: 4px 0 0;
  color: #11213b;
  font-size: clamp(1.2rem, 3cqw, 1.72rem);
}

.insight-card-heading p {
  color: #6c7c96;
  line-height: 1.65;
}

.insight-card {
  padding: clamp(22px, 3cqw, 32px);
}

.insight-card-heading p {
  margin: 7px 0 0;
}

.insight-lead {
  display: block;
  margin-top: 20px;
  color: #234b91;
  font-size: 1.05rem;
}

.trend-driver-list {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.trend-driver-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 10px;
  padding: 10px 11px;
  border-radius: 12px;
  background: #f5f8fd;
}

.trend-driver-list article strong {
  overflow: hidden;
  color: #1d345b;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trend-driver-list article > span {
  color: #cd4f4f;
  font-size: 0.8rem;
  font-weight: 850;
}

.trend-driver-list article > span.decreased {
  color: #237b61;
}

.trend-driver-list article small {
  grid-column: 1 / -1;
  color: #78869c;
  font-size: 0.7rem;
}

.trend-driver-list .insight-empty {
  margin-top: 0;
  padding: 12px;
  font-size: 0.76rem;
}

.ranked-insight-list {
  display: grid;
  gap: 4px;
  margin-top: 16px;
}

.ranked-insight-list article {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid #edf0f5;
}

.ranked-insight-list article:last-child {
  border-bottom: 0;
}

.ranked-insight-list article > span {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 9px;
  color: #2864d7;
  background: #edf3ff;
  font-size: 0.78rem;
  font-weight: 900;
}

.ranked-insight-list div,
.ranked-insight-list div strong,
.ranked-insight-list div small {
  display: block;
  min-width: 0;
}

.ranked-insight-list div strong {
  overflow: hidden;
  color: #172946;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranked-insight-list div small {
  margin-top: 4px;
  color: #7b889d;
}

.ranked-insight-list article > strong {
  color: #233b63;
  font-size: 0.88rem;
}

.reduction-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.reduction-list article {
  padding: 18px;
  border: 1px solid #f0dfc3;
  border-radius: 17px;
  background: #fffaf2;
}

.reduction-list article > div strong {
  color: #4a3518;
}

.reduction-list article > div span {
  flex: none;
  padding: 5px 8px;
  border-radius: 999px;
  color: #8c5b12;
  background: #ffebc6;
  font-size: 0.72rem;
  font-weight: 900;
}

.reduction-list p {
  margin: 13px 0 9px;
  color: #6b573a;
  line-height: 1.55;
}

.reduction-list small {
  color: #907b5c;
}

.insight-empty {
  margin: 18px 0 0;
  padding: 18px;
  border-radius: 15px;
  color: #78869b;
  background: #f7f9fc;
  text-align: center;
}



@container kkaebu (max-width: 760px){
  .reduction-list {
    grid-template-columns: 1fr;
  }

  .insight-card-heading{
    align-items: flex-start;
    flex-direction: column;
  }

}



html::-webkit-scrollbar {
  width: 12px;
}

html::-webkit-scrollbar-track {
  background: transparent;
}

html::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgb(105 117 138 / 42%);
  background-clip: content-box;
}

body {
  min-width: 0;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  background: transparent;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select {
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

.page-shell {
  width: 100%;
  max-width: 1040px;
  min-width: 0;
  margin: 0 auto;
  padding:
    max(20px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right))
    max(40px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
}

.page-shell > :not(.app-header) {
  width: 100%;
  max-width: var(--page-content-max-width, 100%);
  margin-inline: auto;
}

.app-header {
  position: sticky;
  z-index: 100;
  top: 0;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  margin-top: -10px;
  margin-bottom: 26px;
  padding: 10px 0;
  background: transparent;
}

.app-header::before {
  position: absolute;
  z-index: -1;
  top: -24px;
  right: calc(0px - max(18px, env(safe-area-inset-right)));
  bottom: -12px;
  left: calc(0px - max(18px, env(safe-area-inset-left)));
  background: linear-gradient(
    to bottom,
    rgb(245 247 251 / 99%) 0%,
    rgb(245 247 251 / 97%) calc(100% - 14px),
    rgb(245 247 251 / 0%) 100%
  );
  -webkit-backdrop-filter: blur(16px) saturate(115%);
  backdrop-filter: blur(16px) saturate(115%);
  content: "";
  pointer-events: none;
}

.brand {
  display: inline-flex;
  min-width: 0;
  gap: 10px;
  align-items: center;
  color: var(--ink);
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-family-brand-pending] {
  visibility: hidden;
}

.brand-mark {
  display: block;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 10px;
  object-fit: contain;
}

.phase-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.app-nav {
  display: flex;
  gap: 3px;
  align-items: center;
  padding: 3px;
  border-radius: 11px;
  background: #e9edf4;
}

.nav-menu-button {
  display: none;
}

.nav-link {
  position: relative;
  display: inline-flex;
  gap: 2px;
  padding: 5px 9px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border-radius: 8px;
  color: #68758a;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.05;
  text-decoration: none;
  white-space: nowrap;
}

.nav-link-icon {
  flex: 0 0 auto;
  font-size: 14px;
  line-height: 1;
}

.nav-review-count,
.nav-family-request-count {
  position: absolute;
  top: -8px;
  right: -6px;
  display: inline-grid;
  min-width: 19px;
  height: 19px;
  padding: 0 4px;
  place-items: center;
  border: 2px solid #f5f7fb;
  border-radius: 999px;
  color: #fff;
  background: #e65065;
  box-shadow: 0 2px 5px color-mix(in srgb, var(--theme-danger,rgb(129 33 52)) 22%, transparent);
  font-size: 10px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.nav-review-count[hidden],
.nav-family-request-count[hidden] {
  display: none;
}

.nav-link.active {
  color: var(--navy);
  background: #fff;
  box-shadow: 0 1px 4px color-mix(in srgb, var(--theme-shadow-ink,rgb(25 48 83)) 10%, transparent);
}

.intro {
  margin-bottom: 26px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 8cqw, 38px);
  line-height: 1.2;
  letter-spacing: -0.05em;
}

.intro-copy {
  max-width: 32rem;
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
  letter-spacing: -0.015em;
}

.card {
  min-width: 0;
  border: 1px solid rgb(220 226 237 / 85%);
  border-radius: 22px;
  background: rgb(255 255 255 / 94%);
  box-shadow: 0 12px 35px color-mix(in srgb, var(--theme-shadow-ink,rgb(25 48 83)) 7%, transparent);
}

.connection-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin: 0 2px 15px;
}

.connection-section-heading .eyebrow {
  margin-bottom: 7px;
}

.connection-section-heading h2 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -0.04em;
}

.connection-loading {
  padding: 26px 18px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.error-text {
  color: var(--danger);
}

.remove-connection {
  min-width: 48px;
  min-height: 42px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  color: var(--danger);
  background: var(--danger-soft);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.field-group {
  min-width: 0;
  margin-bottom: 20px;
}

.field-group > label {
  display: block;
  margin: 0 0 8px;
  color: #334056;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.input-wrap,
.select-wrap {
  position: relative;
  min-width: 0;
}

input,
select {
  width: 100%;
  min-width: 0;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  color: var(--ink);
  background: #fff;
  font-size: 16px;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease;
}

textarea {
  width: 100%;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  color: var(--ink);
  background: #fff;
  font-size: 16px;
  line-height: 1.5;
  resize: vertical;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease;
}

input {
  padding: 0 14px;
}

select {
  appearance: none;
  padding: 0 45px 0 14px;
}

input::placeholder {
  color: #a0a9b8;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent,rgb(40 100 215)) 13%, transparent);
}

input[aria-invalid="true"],
select[aria-invalid="true"] {
  border-color: var(--danger);
}

select:disabled {
  color: #929baa;
  background: #f7f8fa;
}

.select-arrow {
  position: absolute;
  top: 50%;
  right: 17px;
  width: 8px;
  height: 8px;
  border-right: 2px solid #667288;
  border-bottom: 2px solid #667288;
  pointer-events: none;
  transform: translateY(-70%) rotate(45deg);
}

.field-error {
  min-height: 0;
  margin: 6px 2px 0;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.45;
}

.field-error:empty {
  display: none;
}

.primary-button {
  display: flex;
  width: 100%;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
  padding: 12px 16px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: var(--navy);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--theme-accent,rgb(23 59 120)) 18%, transparent);
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.025em;
  cursor: pointer;
  transition:
    transform 120ms ease,
    background 120ms ease;
}

.primary-button:active:not(:disabled) {
  transform: translateY(1px);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.button-spinner {
  display: none;
  width: 17px;
  height: 17px;
  border: 2px solid rgb(255 255 255 / 38%);
  border-top-color: #fff;
  border-radius: 999px;
  animation: spin 700ms linear infinite;
}

.primary-button.loading .button-spinner {
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.form-status {
  margin-top: 14px;
  padding: 12px 13px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
}

.form-status.connecting {
  color: #28559f;
  background: var(--blue-soft);
}

.form-status.success {
  color: var(--success);
  background: var(--success-soft);
}

.form-status.error {
  color: var(--danger);
  background: var(--danger-soft);
}

.count-badge {
  padding: 5px 9px;
  border-radius: 999px;
  color: #526177;
  background: #e8ecf3;
  font-size: 12px;
  font-weight: 700;
}

.compact-page {
  --page-content-max-width: 644px;
}

.user-form-card {
  padding: 22px 18px 19px;
}

.expense-intro {
  margin-bottom: 22px;
}

.expense-form-card {
  padding: 22px 18px 19px;
}

.expense-fields {
  display: grid;
  min-width: 0;
  gap: 0;
}

.entry-title-row {
  display: flex;
  max-width: 100%;
  align-items: flex-end;
  gap: 8px;
}

.entry-type-toggle {
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  margin: 0 0 5px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 10px;
  color: #47617f;
  background: transparent;
  font-size: 24px;
  font-weight: 850;
  cursor: pointer;
  transition:
    color 120ms ease,
    border-color 120ms ease,
    background 120ms ease,
    transform 120ms ease;
}

.entry-type-toggle:hover,
.entry-type-toggle:focus-visible {
  color: var(--blue);
  background: #edf3ff;
  outline: 3px solid color-mix(in srgb, var(--theme-accent,rgb(40 100 215)) 13%, transparent);
}

.entry-type-toggle:active:not(:disabled) {
  transform: translateY(1px);
}

.entry-type-toggle:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.entry-type-toggle.income-active {
  color: #176f50;
  background: #eff9f4;
}

.mode-switch-out {
  pointer-events: none;
  animation: mode-switch-out 160ms ease-in forwards;
}

.mode-switch-in {
  animation: mode-switch-in 300ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes mode-switch-out {
  to {
    opacity: 0;
    transform: translateY(-4px);
  }
}

@keyframes mode-switch-in {
  from {
    opacity: 0;
    transform: translateY(7px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.expense-form-card[data-entry-mode="income"] {
  border-color: #b9ddcd;
}

.expense-form-card[data-entry-mode="income"] .primary-button {
  background: #176f50;
}

.income-source-empty-state {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 9px 8px 14px;
  border: 1px solid #b9ddcd;
  border-radius: 13px;
  background: #f4fbf7;
}

.income-source-empty-state[hidden] {
  display: none;
}

.income-source-empty-state p {
  margin: 0;
  color: #4f685d;
  font-size: 13px;
  font-weight: 700;
}

.income-source-register-button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 10px;
  color: #fff;
  background: #176f50;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.income-source-register-button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--theme-accent,rgb(23 111 80)) 18%, transparent);
  outline-offset: 2px;
}

.income-source-guide {
  margin: 7px 2px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.income-source-guide[hidden] {
  display: none;
}

.income-source-guide a {
  color: #176f50;
  font-weight: 800;
  text-decoration: none;
}

.expense-suggestions-panel {
  margin-top: 13px;
  padding: 13px 15px 15px;
  border: 1px solid #e1e6ee;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 7px 20px color-mix(in srgb, var(--theme-shadow-ink,rgb(25 48 83)) 7%, transparent);
}

.expense-suggestions-panel[hidden] {
  display: none;
}

.expense-suggestions-panel--inline {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  margin: 6px 0 0;
  padding: 10px 12px 12px;
  border-radius: 12px;
}

.expense-suggestions-title {
  margin: 0 0 9px;
  color: #7a8698;
  font-size: 11px;
  font-weight: 800;
}

.expense-description-suggestions {
  display: flex;
  max-height: min(210px, 34vh);
  flex-wrap: wrap;
  gap: 7px;
  overflow-y: auto;
  align-content: flex-start;
  overscroll-behavior: contain;
}

.expense-description-suggestion {
  display: inline-flex;
  max-width: 100%;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #59677c;
  background: #f1f3f7;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.3;
  overflow-wrap: anywhere;
  text-align: left;
  cursor: pointer;
}

.expense-description-suggestion:hover,
.expense-description-suggestion:focus-visible,
.expense-description-suggestion.active {
  color: var(--navy);
  background: var(--blue-soft);
  border-color: var(--theme-accent,#cbdaf0);
  outline: none;
}

.expense-description-hint {
  margin: 6px 2px 0;
  color: #8a95a6;
  font-size: 11px;
  line-height: 1.4;
}

.amount-input-wrap {
  position: relative;
  min-width: 0;
}

.amount-input-wrap input {
  padding-right: 43px;
  font-size: 20px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.amount-unit {
  position: absolute;
  top: 50%;
  right: 15px;
  color: #667288;
  font-size: 15px;
  font-weight: 700;
  pointer-events: none;
  transform: translateY(-50%);
}

.expense-history {
  margin-top: 38px;
}

.expense-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 11px;
  padding: 13px 15px;
  border-radius: 13px;
  color: #56647a;
  background: #e9eef7;
  font-size: 13px;
}

.expense-summary strong {
  color: var(--navy);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.expenses-list {
  display: grid;
  min-width: 0;
  gap: 11px;
}

.expense-date-group {
  min-width: 0;
  overflow: hidden;
  padding: 0 15px;
}

.expense-date-group > h3 {
  margin: 0;
  padding: 15px 0 8px;
  color: #667288;
  font-size: 13px;
  font-weight: 750;
}

.expense-list-item {
  min-width: 0;
  padding: 14px 0 15px;
}

.expense-list-item + .expense-list-item {
  border-top: 1px solid #edf0f5;
}

.expense-marker {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ec7a69;
}

.expense-item-details {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.expense-item-details span {
  color: #263247;
  font-size: 15px;
  font-weight: 700;
}

.expense-item-details small {
  color: #929baa;
  font-size: 11px;
}

.expense-main-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 10px;
  min-width: 0;
  align-items: center;
}

.expense-main-row > strong {
  color: #263247;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.category-review {
  margin: 12px 0 0 18px;
  padding: 12px;
  border: 1px solid #e3e9f3;
  border-radius: 14px;
  background: #f7f9fc;
}

.category-review.needs-review {
  border-color: #f0d59e;
  background: #fffaf0;
}

.category-review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
  color: #69768a;
  font-size: 11px;
  font-weight: 750;
}

.classification-status {
  padding: 3px 7px;
  border-radius: 999px;
  color: #28559f;
  background: var(--blue-soft);
  font-size: 10px;
}

.needs-review .classification-status {
  color: #926013;
  background: #fff0c9;
}

.category-swipe-control {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  min-height: 50px;
  align-items: center;
  overflow: hidden;
  border: 1px solid #d7dfeb;
  border-radius: 13px;
  background: #fff;
  touch-action: pan-y;
  user-select: none;
}

.category-arrow {
  width: 42px;
  height: 48px;
  border: 0;
  color: #54709d;
  background: transparent;
  font-size: 27px;
  cursor: pointer;
}

.category-arrow:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -3px;
}

.category-name {
  color: var(--navy);
  font-size: 17px;
  text-align: center;
}

.category-swipe-hint {
  margin: 7px 0 0;
  color: #8b96a8;
  font-size: 10px;
  text-align: center;
}

.manual-category-button {
  width: 100%;
  min-height: 42px;
  margin-top: 9px;
  border: 0;
  border-radius: 10px;
  color: #596a83;
  background: #e9eef6;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.category-sheet[hidden] {
  display: none;
}

.category-sheet {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.category-sheet-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgb(19 29 46 / 48%);
}

.category-sheet-panel {
  position: relative;
  width: min(100%, 680px);
  max-height: 85vh;
  overflow-y: auto;
  padding: 10px 20px max(20px, env(safe-area-inset-bottom));
  border-radius: 24px 24px 0 0;
  background: #fff;
  box-shadow: 0 -14px 40px color-mix(in srgb, var(--theme-shadow-ink,rgb(19 29 46)) 18%, transparent);
}

.category-sheet-handle {
  width: 42px;
  height: 5px;
  margin: 0 auto 19px;
  border-radius: 99px;
  background: #d7dde7;
}

.category-sheet-panel h2 {
  margin: 4px 0 5px;
  font-size: 22px;
  letter-spacing: -0.04em;
}

.category-sheet-description {
  margin: 0 0 17px;
  color: var(--muted);
  font-size: 13px;
}

.category-options {
  display: grid;
  gap: 14px;
}

.manual-category-group h3 {
  margin: 0 0 7px;
  color: #526077;
  font-size: 12px;
  font-weight: 800;
}

.detailed-category-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.category-option {
  min-height: 48px;
  border: 1px solid #dfe5ee;
  border-radius: 12px;
  color: #445269;
  background: #f8fafc;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}

.category-option[aria-pressed="true"] {
  border-color: var(--theme-accent,#9cb6e4);
  color: var(--blue);
  background: var(--blue-soft);
}

.category-sheet-close {
  width: 100%;
  min-height: 48px;
  margin-top: 12px;
  border: 0;
  border-radius: 12px;
  color: #617087;
  background: #eef1f5;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}

body.category-sheet-open,
body.category-dialog-open,
body.app-confirm-open {
  overflow: hidden;
}

.app-confirm-dialog {
  width: min(420px, calc(100cqw - 32px));
  max-width: 420px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 24px 70px color-mix(in srgb, var(--theme-shadow-ink,rgb(16 31 55)) 30%, transparent);
}

.app-confirm-dialog::backdrop {
  background: rgb(17 29 49 / 48%);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.app-confirm-shell {
  padding: 22px;
}

.app-confirm-body {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 13px;
  align-items: start;
}

.app-confirm-icon {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  color: var(--danger);
  background: var(--danger-soft);
  font-size: 20px;
  font-weight: 900;
}

.app-confirm-body h2 {
  margin: 1px 0 7px;
  color: var(--navy);
  font-size: 18px;
  letter-spacing: -0.03em;
}

.app-confirm-body p {
  margin: 0;
  color: #68758a;
  font-size: 12px;
  line-height: 1.6;
}

.app-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 20px;
}

.app-confirm-button {
  min-height: 43px;
  border: 0;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.app-confirm-button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--theme-accent,rgb(40 100 215)) 18%, transparent);
  outline-offset: 2px;
}

.app-confirm-cancel {
  color: #58677d;
  background: #edf1f6;
}

.app-confirm-cancel:hover {
  color: var(--navy);
  background: #e2e8f1;
}

.app-confirm-submit.danger {
  color: #fff;
  background: var(--danger);
}

.app-confirm-submit.danger:hover {
  background: #aa2f38;
}

.app-confirm-submit.primary {
  color: #fff;
  background: var(--navy);
}

.app-confirm-submit.primary:hover {
  background: var(--blue);
}

.records-page {
  --page-content-max-width: 884px;
}

.records-intro {
  margin-bottom: 12px;
}

.records-intro .eyebrow {
  margin: 0;
}

.records-heading-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
}

.records-heading-title .entry-type-toggle {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
  margin: 0;
  font-size: 22px;
}

.records-section {
  min-width: 0;
}

.records-table[data-records-mode="income"] .records-cost {
  color: #176f50;
}

.records-view-toggle {
  display: inline-flex;
  padding: 3px;
  border: 1px solid #dce3ee;
  border-radius: 12px;
  background: #edf1f6;
}

.records-view-toggle button {
  display: inline-flex;
  min-height: 36px;
  padding: 7px 11px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 9px;
  color: #68758a;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.records-view-toggle button[aria-pressed="true"] {
  color: var(--navy);
  background: #fff;
  box-shadow: 0 2px 7px color-mix(in srgb, var(--theme-accent,rgb(25 48 83)) 11%, transparent);
}

.records-view-toggle button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--theme-accent,rgb(40 100 215)) 18%, transparent);
  outline-offset: 1px;
}

.records-list-view-icon {
  display: grid;
  width: 14px;
  height: 12px;
  gap: 2px;
}

.records-list-view-icon::before {
  width: 14px;
  height: 2px;
  border-radius: 999px;
  background: currentcolor;
  box-shadow: 0 5px currentcolor, 0 10px currentcolor;
  content: "";
}

.records-calendar-view-icon {
  position: relative;
  display: block;
  width: 14px;
  height: 14px;
  border: 1.7px solid currentcolor;
  border-radius: 3px;
}

.records-calendar-view-icon::before,
.records-calendar-view-icon::after {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 5px;
  border-radius: 2px;
  background: currentcolor;
  content: "";
}

.records-calendar-view-icon::before {
  left: 2px;
}

.records-calendar-view-icon::after {
  right: 2px;
}

.records-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 9px;
  padding: 10px;
  border-radius: 14px;
}

.records-filters[data-records-mode="income"] {
  grid-template-columns: minmax(0, 1fr) auto;
}

.records-filter-field {
  min-width: 0;
}

.records-filter-field label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.records-filter-field select {
  height: 44px;
  border-radius: 11px;
  font-size: 13px;
}

.records-multiselect-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.records-multiselect-trigger {
  display: grid;
  position: relative;
  width: 100%;
  height: 44px;
  min-width: 0;
  padding: 0 34px 0 12px;
  align-items: center;
  border: 1px solid #d9e1ec;
  border-radius: 11px;
  color: #536278;
  background: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  text-align: left;
  cursor: pointer;
}

.records-multiselect-trigger:hover,
.records-multiselect-trigger:focus-visible,
.records-multiselect-trigger.has-selection {
  border-color: var(--theme-accent,#bdcce2);
  color: var(--navy);
  outline: none;
}

.records-multiselect-trigger > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.records-multiselect-arrow {
  position: absolute;
  top: 50%;
  right: 13px;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentcolor;
  border-bottom: 2px solid currentcolor;
  transform: translateY(-70%) rotate(45deg);
}

.records-filter-reset {
  min-width: 68px;
  height: 44px;
  border: 0;
  border-radius: 11px;
  color: #586981;
  background: #edf1f6;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.records-filter-reset:hover,
.records-filter-reset:focus-visible {
  color: var(--navy);
  background: #e3eaf5;
}

.records-table-card {
  overflow: hidden;
  border-radius: 18px;
}

.records-calendar {
  padding: 16px;
  overflow: hidden;
  border-radius: 18px;
}

.records-calendar-header {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  gap: 8px;
  align-items: center;
  margin-bottom: 11px;
}

.records-calendar-header strong {
  color: #263650;
  font-size: 17px;
  text-align: center;
  letter-spacing: -0.03em;
}

.records-calendar-header button {
  display: grid;
  width: 40px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 1px solid #dde4ee;
  border-radius: 10px;
  color: #52627a;
  background: #f6f8fb;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.records-calendar-header button:hover,
.records-calendar-header button:focus-visible {
  color: var(--navy);
  background: #edf3ff;
  outline: none;
}

.records-calendar-header button:disabled {
  color: #aeb7c5;
  background: #f5f6f8;
  cursor: default;
  opacity: 0.55;
}

.records-calendar-summary {
  display: flex;
  min-height: 34px;
  margin-bottom: 9px;
  align-items: stretch;
  justify-content: center;
  border: 1px solid #e4e9f1;
  border-radius: 10px;
  background: #f8fafc;
}

.records-calendar-summary-item {
  display: flex;
  min-width: 0;
  padding: 5px 10px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: 1 1 0;
  color: #59687f;
  white-space: nowrap;
}

.records-calendar-summary-item + .records-calendar-summary-item {
  border-left: 1px solid #e1e7f0;
}

.records-calendar-summary-item small {
  font-size: 9px;
  font-weight: 750;
}

.records-calendar-summary-item strong {
  overflow: hidden;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
}

.records-calendar-summary-item.income strong {
  color: #177352;
}

.records-calendar-summary-item.expense strong {
  color: #285ba8;
}

.records-calendar-weekdays,
.records-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.records-calendar-weekdays {
  margin-bottom: 5px;
  color: #778398;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.records-calendar-weekdays span:first-child {
  color: #bd5360;
}

.records-calendar-weekdays span:last-child {
  color: #3866ad;
}

.records-calendar-grid {
  gap: 5px;
  touch-action: pan-y;
  user-select: none;
}

.records-calendar-day {
  display: flex;
  position: relative;
  min-width: 0;
  min-height: 72px;
  padding: 8px 6px;
  align-items: center;
  flex-direction: column;
  gap: 7px;
  border: 1px solid #e4e9f1;
  border-radius: 11px;
  color: #617087;
  background: #f8fafc;
  font: inherit;
}

button.records-calendar-day {
  cursor: pointer;
}

button.records-calendar-day:hover,
button.records-calendar-day:focus-visible {
  border-color: var(--theme-accent,#b8cceb);
  background: #edf3fd;
  outline: none;
}

.records-calendar-day:nth-child(7n + 1) .records-calendar-day-number {
  color: #bd5360;
}

.records-calendar-day:nth-child(7n) .records-calendar-day-number {
  color: #3866ad;
}

.records-calendar-day.is-outside {
  border-color: transparent;
  color: #9aa5b5;
  background: transparent;
  opacity: 0.48;
}

.records-calendar-day.has-records {
  border-color: #cddbf0;
  color: var(--navy);
  background: #f2f6fd;
}

.records-calendar[data-records-mode="income"] .records-calendar-day.has-records {
  border-color: #c8e3d7;
  color: #176f50;
  background: #f1f9f5;
}

.records-calendar[data-records-mode="combined"] .records-calendar-day.has-incomes:not(.has-expenses) {
  border-color: #c8e3d7;
  background: #f1f9f5;
}

.records-calendar[data-records-mode="combined"] .records-calendar-day.has-incomes.has-expenses {
  border-color: #cfdaec;
  background: linear-gradient(145deg, #f1f9f5 0 49%, #f2f6fd 51% 100%);
}

.records-calendar-day.is-today {
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--theme-accent,rgb(40 100 215)) 25%, transparent);
}

.records-calendar-day:disabled {
  cursor: default;
  opacity: 1;
}

.records-calendar-day.is-unavailable {
  border-color: transparent;
  color: #bdc4cf;
  background: transparent;
  opacity: 0.35;
}

.records-calendar-day.has-memo::after {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #7c5bd6;
  box-shadow: 0 0 0 2px var(--theme-panel,#fff);
  content: "";
}

.records-calendar-day-number {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.records-calendar-day-total {
  max-width: 100%;
  overflow: hidden;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.records-calendar-day-total.income {
  color: #177352;
}

.records-calendar-day-total.expense {
  color: #285ba8;
}

.records-calendar-day-dialog {
  width: min(440px, calc(100% - 28px));
  max-height: min(620px, calc(100dvh - 28px));
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 22px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 24px 80px color-mix(in srgb, var(--theme-shadow-ink,rgb(15 29 52)) 28%, transparent);
}

.records-calendar-day-dialog::backdrop {
  background: rgb(18 29 47 / 55%);
  backdrop-filter: blur(2px);
}

.records-calendar-day-panel {
  display: flex;
  max-height: min(620px, calc(100dvh - 28px));
  padding: 20px;
  flex-direction: column;
  touch-action: pan-y;
  user-select: none;
}

.records-calendar-day-panel > header {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.records-calendar-day-panel h2 {
  margin: 0;
  font-size: 22px;
}

.records-calendar-day-header-actions {
  display: flex;
  margin-left: auto;
  align-items: center;
  gap: 7px;
}

#records-calendar-day-close {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 11px;
  color: #647188;
  background: #eef2f7;
  font-size: 23px;
  cursor: pointer;
}

.records-calendar-day-list {
  display: grid;
  flex: 1 1 auto;
  min-height: 0;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 7px;
  margin-top: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.records-calendar-day-navigation {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  align-items: center;
  margin-top: 6px;
}

.records-calendar-day-navigation-button {
  display: grid;
  width: 32px;
  height: 28px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: #8994a6;
  background: transparent;
  cursor: pointer;
}

.records-calendar-day-navigation-button::before {
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  content: "";
}

.records-calendar-day-navigation-button.previous::before {
  border-right: 7px solid currentcolor;
}

.records-calendar-day-navigation-button.next::before {
  border-left: 7px solid currentcolor;
}

.records-calendar-day-navigation-button:hover:not(:disabled),
.records-calendar-day-navigation-button:focus-visible {
  color: #277663;
  background: #eff7f4;
  outline: none;
}

.records-calendar-day-navigation-button:disabled {
  cursor: default;
  opacity: 0.3;
}

.records-calendar-day-swipe-hint {
  margin: 0;
  color: #8994a6;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}

.records-calendar-day-memo-display,
.records-calendar-day-memo-form {
  display: grid;
  flex: 0 0 auto;
  gap: 6px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid #e0e6ef;
  border-radius: 13px;
  background: #f8fafc;
}

.records-calendar-day-memo-display p {
  max-height: 116px;
  margin: 0;
  overflow-y: auto;
  color: #40506a;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.records-calendar-day-memo-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.records-calendar-day-memo-heading label,
.records-calendar-day-memo-heading strong {
  color: #263650;
  font-size: 12px;
  font-weight: 850;
}

.records-calendar-day-memo-heading span {
  padding: 3px 7px;
  border-radius: 999px;
  color: #6e52bd;
  background: #eee9fd;
  font-size: 9px;
  font-weight: 800;
}

.records-calendar-day-memo-form textarea {
  width: 100%;
  min-height: 54px;
  max-height: 96px;
  padding: 8px 10px;
  resize: vertical;
  border: 1px solid #d6dfeb;
  border-radius: 10px;
  outline: none;
  color: #263650;
  background: #fff;
  font: inherit;
  font-size: 12px;
  line-height: 1.45;
}

.records-calendar-day-memo-form textarea:focus {
  border-color: var(--theme-accent,#8eace0);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent,rgb(40 100 215)) 10%, transparent);
}

.records-calendar-day-memo-footer small {
  min-height: 15px;
  color: #718097;
  font-size: 9px;
  font-weight: 750;
}

.records-calendar-day-memo-footer small.success {
  color: #177352;
}

.records-calendar-day-memo-footer small.error {
  color: #bd3f4d;
}

.records-calendar-day-actions {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5e9f0;
}

.records-calendar-day-actions.memo-only {
  grid-template-columns: minmax(0, 1fr);
}

.records-calendar-day-actions button {
  min-width: 0;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
  cursor: pointer;
}

#records-calendar-day-add {
  border-color: #c9d7ed;
  color: #2459ac;
  background: #f1f6ff;
}

#records-calendar-day-memo-action {
  color: #fff;
  background: var(--navy);
}

.records-calendar-day-actions.memo-editing #records-calendar-day-add {
  border-color: transparent;
  color: #627087;
  background: #eef2f7;
}

.records-calendar-day-actions button:hover,
.records-calendar-day-actions button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--theme-accent,rgb(40 100 215)) 14%, transparent);
  filter: brightness(0.98);
}

.records-calendar-day-actions button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.records-calendar-day-empty {
  display: grid;
  min-height: 76px;
  margin: 0;
  place-items: center;
  border: 1px dashed #d9e1ec;
  border-radius: 13px;
  color: #8490a3;
  background: #f8fafc;
  font-size: 12px;
}

.records-calendar-day-item {
  display: flex;
  width: 100%;
  height: max-content;
  min-height: 62px;
  padding: 10px 12px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #e2e7ef;
  border-radius: 13px;
  color: #26354d;
  background: #f8fafc;
  text-align: left;
}

button.records-calendar-day-item {
  cursor: pointer;
}

.records-calendar-day-item > span,
.records-calendar-day-item strong,
.records-calendar-day-item small {
  display: block;
  min-width: 0;
}

.records-calendar-day-item > span {
  overflow: hidden;
}

.records-calendar-day-item strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.records-calendar-day-item small {
  margin-top: 4px;
  color: #758197;
  font-size: 10px;
}

.records-calendar-day-classification {
  display: flex;
  min-width: 0;
  margin-top: 4px;
  align-items: center;
  gap: 5px;
  color: #758197;
  font-size: 10px;
}

.records-calendar-day-classification .records-category {
  min-height: 20px;
  padding: 2px 6px;
  gap: 3px;
  font-size: 9.5px;
}

.records-calendar-day-classification .records-category-icon {
  font-size: 10px;
}

.records-calendar-day-classification small {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.records-calendar-day-item b {
  flex: 0 0 auto;
  margin-top: 2px;
  color: var(--navy);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.records-calendar-day-item.income b,
.combined-income-row .records-cost {
  color: #177352;
}

/* Daily records must keep long memo text inside the day dialog. */
.records-calendar-day-item > span {
  flex: 1 1 auto;
  max-width: 100%;
}

.records-calendar-day-item .records-memo,
.records-calendar-day-memo-display p {
  min-width: 0;
  max-width: 100%;
  overflow: visible;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-overflow: clip;
  white-space: pre-wrap;
}

.records-calendar-day-memo-display p {
  overflow-y: auto;
}

.records-entry-kind {
  display: inline-flex;
  min-height: 21px;
  padding: 3px 7px;
  align-items: center;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 850;
}

.records-entry-kind.income {
  color: #177352;
  background: #e8f6ef;
}

.records-category-filter-dialog {
  width: min(420px, calc(100% - 28px));
  max-height: min(640px, calc(100dvh - 28px));
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 22px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 24px 80px color-mix(in srgb, var(--theme-shadow-ink,rgb(15 29 52)) 28%, transparent);
}

.records-category-filter-dialog::backdrop {
  background: rgb(18 29 47 / 55%);
  backdrop-filter: blur(2px);
}

.records-category-filter-panel {
  display: flex;
  max-height: min(640px, calc(100dvh - 28px));
  padding: 20px;
  flex-direction: column;
}

.records-category-filter-panel > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.records-category-filter-panel h2 {
  margin: 0;
  font-size: 21px;
}

.records-category-filter-close {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 11px;
  color: #647188;
  background: #eef2f7;
  font-size: 23px;
  cursor: pointer;
}

.records-category-filter-help {
  margin: 7px 0 12px;
  color: #718097;
  font-size: 12px;
}

.records-category-options {
  display: grid;
  min-height: 0;
  padding: 3px;
  gap: 7px;
  overflow-y: auto;
}

.records-category-options-heading {
  margin: 8px 2px 0;
  color: #6f7c91;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.records-category-option {
  display: flex;
  min-height: 44px;
  padding: 9px 12px;
  align-items: center;
  gap: 10px;
  border: 1px solid #e0e6ef;
  border-radius: 12px;
  color: #263650;
  background: #f8fafc;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.records-category-option:has(input:checked) {
  border-color: var(--theme-accent,#a9c2e8);
  background: #eef4ff;
}

.records-category-option input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--blue);
}

.records-category-filter-panel > footer {
  display: grid;
  margin-top: 14px;
  grid-template-columns: 1fr 1.25fr;
  gap: 8px;
}

.records-category-filter-panel > footer button {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

#records-category-filter-clear {
  color: #5d6c83;
  background: #edf1f6;
}

#records-category-filter-apply {
  color: #fff;
  background: var(--navy);
}

.records-search-panel {
  display: grid;
  grid-template-columns: 15px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  width: 100%;
  height: 34px;
  padding: 0 9px;
  border: 1px solid #cfdcf0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent,rgb(40 100 215)) 7%, transparent);
}

.records-search-panel[hidden] {
  display: none;
}

.records-search-panel input {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 0;
  border: 0;
  outline: 0;
  color: #1c2b45;
  background: transparent;
  font: inherit;
  font-size: 12px;
}

.records-search-panel input::placeholder {
  color: #8b96a8;
}

.records-scroll-top {
  position: fixed;
  z-index: 30;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  display: grid;
  width: 50px;
  height: 50px;
  padding: 0;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 65%);
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #2e72e3, #173f86);
  box-shadow: 0 12px 30px color-mix(in srgb, var(--theme-shadow-ink,rgb(23 59 120)) 32%, transparent);
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.records-scroll-top:hover,
.records-scroll-top:focus-visible {
  background: linear-gradient(145deg, #3679e5, #1d4d9c);
  box-shadow: 0 12px 32px color-mix(in srgb, var(--theme-accent,rgb(40 100 215)) 32%, transparent);
  transform: translateY(-2px);
}

.records-scroll-top span,
.records-scroll-top svg {
  display: block;
  width: 25px;
  height: 25px;
}

.records-scroll-top svg {
  fill: none;
  stroke: currentcolor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.records-scroll-top:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--theme-accent,rgb(40 100 215)) 28%, transparent);
  outline-offset: 3px;
}

.records-table-wrap {
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.records-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  table-layout: fixed;
}

.records-table th,
.records-table td {
  padding: 15px 17px;
  border-bottom: 1px solid #edf0f5;
  text-align: left;
  vertical-align: middle;
}

.records-table th {
  color: #607089;
  background: #f3f6fa;
  font-size: 12px;
  font-weight: 800;
}

.records-table th:nth-child(1) {
  width: 9%;
}

.records-table th:nth-child(2) {
  width: 31%;
}

.records-table th:nth-child(3) {
  width: 16%;
}

.records-table th:nth-child(4) {
  width: 23%;
}

.records-table th:nth-child(5) {
  width: 21%;
}

.records-table thead tr {
  height: 50px;
}

.records-table thead .records-list-summary-row {
  height: auto;
}

.records-table .records-list-summary-cell {
  width: auto;
  padding: 9px 17px 13px;
  background: #f3f6fa;
}

.records-list-summary {
  margin-bottom: 0;
}

.records-description-heading {
  position: relative;
}

#records-table .records-date-heading {
  width: 154px;
}

#records-description-heading {
  width: auto;
}

.records-date-heading .app-control {
  width: 120px;
  max-width: 100%;
}

:root body .records-date-heading .app-control-trigger {
  width: 100%;
  min-width: 0;
  height: 36px;
  min-height: 36px;
  padding: 0 28px 0 10px;
  border: 1px solid #d4dedb;
  border-radius: 8px;
  color: #15584f;
  background: #e8faf5;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
}

.records-search-toggle {
  position: relative;
  display: inline-grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 11px;
  color: #5d6c83;
  background: transparent;
  cursor: pointer;
}

.records-search-toggle:hover,
.records-search-toggle:focus-visible,
.records-search-toggle.is-open {
  color: var(--navy);
  background: #e5eaf2;
}

.records-search-toggle.has-query::after {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 6px;
  height: 6px;
  border: 2px solid #f3f6fa;
  border-radius: 50%;
  background: var(--blue);
  content: "";
}

.records-search-icon {
  position: relative;
  display: block;
  width: 15px;
  height: 15px;
  border: 2px solid currentcolor;
  border-radius: 50%;
  color: inherit;
}

.records-search-icon::after {
  position: absolute;
  right: -5px;
  bottom: -3px;
  width: 6px;
  height: 2px;
  border-radius: 999px;
  background: currentcolor;
  transform: rotate(45deg);
  content: "";
}

.records-table[data-records-mode="income"] {
  min-width: 0;
}

.records-table[data-records-mode="income"] th:nth-child(1) {
  width: 18%;
}

.records-table[data-records-mode="income"] th:nth-child(2) {
  width: 52%;
}

.records-table[data-records-mode="income"] th:nth-child(3) {
  width: 30%;
}

.records-table tbody tr:last-child td {
  border-bottom: 0;
}

.records-row {
  cursor: pointer;
}

.income-records-row {
  cursor: default;
}

.records-row:hover td,
.records-row:focus td {
  background: #fbfcfe;
}

.records-row:focus {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}

.records-date {
  color: #59687f;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.records-cost,
.records-cost-heading {
  text-align: right !important;
}

.records-cost {
  color: #253249;
  font-size: 14px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.records-details {
  color: #253249;
  font-size: 14px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.records-details strong {
  display: block;
  font: inherit;
}

.records-mobile-classification {
  display: none;
}

.records-memo {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 5px;
  color: #7a8699;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}

.records-advanced-indicators {
  display: flex;
  min-width: 0;
  margin-top: 6px;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.records-tag,
.records-statistics-excluded {
  display: inline-flex;
  min-height: 20px;
  padding: 2px 7px;
  align-items: center;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
}

.records-tag {
  color: #3b5f95;
  background: #edf3fc;
}

.records-tag-more {
  color: #69788e;
  background: #f0f3f7;
}

.records-statistics-excluded {
  color: #7b6470;
  background: #f6edf1;
}

.records-row.statistics-excluded > td {
  background-image: linear-gradient(rgb(248 245 247 / 42%), rgb(248 245 247 / 42%));
}

.records-calendar-day-item.statistics-excluded {
  border-style: dashed;
}

.records-calendar-day-item .records-advanced-indicators {
  margin-top: 5px;
}

.records-calendar-day-item .records-tag,
.records-calendar-day-item .records-statistics-excluded {
  min-height: 18px;
  padding: 2px 6px;
  font-size: 9px;
}

.records-category {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  gap: 5px;
  color: #28559f;
  background: var(--blue-soft);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.records-category-icon {
  font-size: 13px;
  line-height: 1;
}

.records-category.category-transport {
  color: #2457a6;
  background: #eaf2ff;
}

.records-category.category-other {
  color: #586579;
  background: #eef1f5;
}

.records-category.category-medical {
  color: #a23f45;
  background: #fff0f1;
}

.records-category.category-living {
  color: #18705e;
  background: #e9f8f3;
}

.records-category.category-groceries {
  color: #467016;
  background: #f0f8df;
}

.records-category.category-leisure {
  color: #7048a5;
  background: #f4edff;
}

.records-category.category-dining {
  color: #a35417;
  background: #fff1e5;
}

.records-category.category-social {
  color: #a13f72;
  background: #fdeef6;
}

.records-category.category-loan {
  color: #31527f;
  background: #eaf0f7;
}

.records-category.category-annual {
  color: #8b6511;
  background: #fff6d9;
}

.records-category.category-fixed {
  color: #4f4e9f;
  background: #eeefff;
}

.records-category.category-custom {
  color: #31667b;
  background: #e9f6f8;
}

.records-category.needs-review {
  color: #926013;
  background: #fff0c9;
}

.records-detail-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 9px;
  color: #59677c;
  background: #f1f3f7;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.records-detail-badge.needs-review {
  color: #926013;
  background: #fff7e5;
}

.records-message {
  height: 120px;
  color: var(--muted);
  text-align: center !important;
}

.embedded-record-editor-host {
  width: 100cqw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
}

.embedded-record-editor-host::backdrop {
  background: rgb(18 29 47 / 55%);
  backdrop-filter: blur(2px);
}

.embedded-record-editor-host iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
}

.embedded-record-editor-host iframe[hidden],
.embedded-record-editor-loading[hidden] {
  display: none;
}

.embedded-record-editor-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  min-width: min(280px, calc(100cqw - 40px));
  padding: 1.2rem;
  border-radius: 16px;
  place-items: center;
  gap: 0.9rem;
  color: #34475f;
  background: #fff;
  box-shadow: 0 18px 55px color-mix(in srgb, var(--theme-shadow-ink,rgb(15 29 52)) 24%, transparent);
  font-size: 0.82rem;
  transform: translate(-50%, -50%);
}

.embedded-record-editor-loading button {
  min-height: 34px;
  padding: 0.4rem 1rem;
  border: 0;
  border-radius: 9px;
  color: #5f6d82;
  background: #edf1f5;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

html.embedded-record-editor-page,
body.embedded-record-editor-page {
  background: transparent;
}

body.embedded-record-editor-page {
  min-height: 100dvh;
  overflow: hidden;
}

body.embedded-record-editor-page > .page-shell,
body.embedded-record-editor-page > #records-scroll-top {
  display: none;
}

body.embedded-record-editor-page #record-editor::backdrop {
  background: transparent;
  backdrop-filter: none;
}

.record-editor {
  width: min(620px, calc(100% - 28px));
  max-height: calc(100svh - 28px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 22px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 24px 80px color-mix(in srgb, var(--theme-shadow-ink,rgb(15 29 52)) 28%, transparent);
}

.record-editor::backdrop {
  background: rgb(18 29 47 / 55%);
  backdrop-filter: blur(2px);
}

.record-editor-form {
  max-height: calc(100svh - 28px);
  padding: 22px;
  overflow-y: auto;
}

.record-editor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.record-editor-header .eyebrow {
  margin-bottom: 6px;
}

.record-editor-header h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.record-editor-close {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 12px;
  color: #68758a;
  background: #f0f3f7;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.record-editor-source-note {
  margin: 13px 0 19px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #65738a;
  background: #f4f6f9;
  font-size: 12px;
  line-height: 1.5;
}

.record-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.record-editor-detail-cost-grid {
  grid-template-columns: 52px minmax(0, 1.2fr) minmax(168px, 1fr);
}

.record-editor-detail-cost-grid .amount-input-wrap input {
  padding-left: 10px;
  font-size: 18px;
  letter-spacing: -0.025em;
}

.record-edit-date-field {
  align-self: end;
  width: 52px;
  min-width: 0;
}

.record-edit-date-field .app-calendar-control,
.record-edit-date-field .app-control-trigger {
  width: 52px;
}

.record-edit-date-field .app-control-trigger {
  height: 50px;
  min-height: 50px;
  padding: 0;
  justify-content: center;
  border-color: var(--kkaebu-line, #c7e9e1);
  background: #f4f8f7;
}

.record-edit-date-field .app-control-value {
  display: none;
}

.record-edit-date-field .app-calendar-icon {
  right: 50%;
  transform: translate(50%, -50%);
}

.record-edit-date-field .app-calendar-icon svg {
  stroke: var(--kkaebu-deep-mint, #15584f);
}

.record-editor #record-edit-memo {
  min-height: 132px;
  resize: vertical;
}

.record-editor .field-group {
  margin-bottom: 15px;
}

.record-editor .field-group > label {
  margin-bottom: 6px;
  font-size: 13px;
}

.optional-label {
  margin-left: 3px;
  color: #919baa;
  font-size: 11px;
  font-weight: 650;
}

.record-editor-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 19px;
  padding-top: 17px;
  border-top: 1px solid #ebeff5;
}

.record-editor-main-actions {
  display: flex;
  gap: 8px;
}

.record-delete-button,
.record-cancel-button,
.record-save-button {
  min-height: 46px;
  padding: 10px 16px;
  border: 0;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}

.record-delete-button {
  color: var(--danger);
  background: var(--danger-soft);
}

.record-cancel-button {
  color: #5f6d82;
  background: #edf1f5;
}

.record-save-button {
  min-width: 92px;
  color: #fff;
  background: var(--navy);
}

.record-delete-button:disabled,
.record-cancel-button:disabled,
.record-save-button:disabled,
.record-editor-close:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.review-page {
  --page-content-max-width: 644px;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.review-intro {
  margin-bottom: 12px;
}

.review-page > .app-header,
.review-intro { flex-shrink: 0; }
.review-title-row { display: flex; align-items: center; gap: 12px; }
.review-title-row h1 { margin: 0; font-size: 24px; }
.review-section { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }
.review-section > :not(.review-list) { flex-shrink: 0; }

.review-page-status {
  margin: 0 0 12px;
}

.review-progress {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.review-list {
  display: grid;
  gap: 14px;
  min-height: 0;
  overflow-y: auto;
}

.review-list:has(.review-purchase-details) {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.review-list:has(.review-purchase-details) > .review-card { flex-shrink: 0; }

.review-card {
  padding: 17px;
}

.review-purchase-details {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  text-align: left;
  overflow-wrap: anywhere;
}

.review-purchase-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 17px;
  flex-shrink: 0;
}

.review-purchase-heading h3 { margin: 0; font-size: 17px; }
.review-purchase-title { display: flex; align-items: baseline; gap: 8px; }
.review-split-button {
  flex-shrink: 0; padding: 7px 10px; border: 1px solid #dce5f3; border-radius: 9px;
  background: #f3f6fb; color: #244f91; font-size: 12px; font-weight: 700; cursor: pointer;
}
.review-product-name {
  padding: 0; border: 0; background: transparent; color: inherit;
  font: inherit; font-weight: 600; line-height: 1.5; text-align: left; cursor: pointer;
}
.review-split-button:disabled { opacity: 0.45; cursor: default; }
.review-product-category {
  display: inline-block; max-width: 100%; margin-top: 6px; padding: 4px 6px;
  border: 0; border-radius: 7px; background: #edf2fa; color: #45618a;
  font-size: 10px; font-weight: 600; white-space: normal; text-align: right; cursor: pointer;
}
.review-purchase-heading span,
.review-purchase-empty,
.review-purchase-reference { color: var(--muted); font-size: 12px; }
.review-purchase-scroll { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 70px; }
.review-purchase-details .review-purchase-table { min-width: 0; font-size: 13px; }
.review-purchase-details .review-purchase-table th:nth-child(1) { width: 59%; }
.review-purchase-details .review-purchase-table th:nth-child(2) { width: 13%; }
.review-purchase-details .review-purchase-table th:nth-child(3) { width: 28%; }
.review-purchase-table th { position: sticky; top: 0; z-index: 1; }
.review-purchase-details .review-purchase-table :is(th, td):nth-child(2) { text-align: center; }
.review-purchase-details .review-purchase-table :is(th, td):nth-child(3) { text-align: right; white-space: nowrap; }
.review-purchase-table strong { display: block; font-weight: 600; line-height: 1.5; }
.review-purchase-table small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.review-purchase-totals { display: grid; gap: 8px; margin: 16px 17px 0; font-size: 13px; }
.review-purchase-totals div { display: flex; justify-content: space-between; gap: 16px; }
.review-purchase-totals dd { margin: 0; white-space: nowrap; }
.review-purchase-total { padding-top: 8px; font-weight: 700; font-size: 15px; }
.review-purchase-reference, .review-purchase-empty { margin: 12px 17px 0; line-height: 1.5; }

@container kkaebu (max-width: 599px){
  body.fixed-mobile-page .review-list { gap: 10px; }
}

.review-instruction {
  margin: 0 0 11px;
  color: #758196;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

body.review-page-body .review-swipe-zone {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr) minmax(0, 1fr);
  height: auto;
  min-height: 184px;
  overflow: hidden;
  border-radius: 16px;
  background: #edf1f6;
}

.review-choice-target {
  position: relative;
  display: flex;
  gap: 5px;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #fff;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
  cursor: pointer;
}

.review-choice-left {
  grid-column: 1;
  padding: 10px 5px;
  background: #3f76cf;
}

.review-choice-right {
  grid-column: 3;
  padding: 10px 5px;
  background: #2f8a70;
}

.review-choice-target::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 150%;
  background: inherit;
  pointer-events: none;
}

.review-choice-left::before { left: 100%; }
.review-choice-right::before { right: 100%; }

.financial-choice-exclude {
  background: #b75b65;
}

.financial-choice-include {
  background: #2f8a70;
}

.review-choice-arrow {
  font-size: 19px;
  line-height: 1;
}

.review-choice-category {
  display: flex;
  gap: 3px;
  max-width: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.review-choice-icon {
  flex: 0 0 auto;
  font-size: 20px;
  line-height: 1;
}

.review-choice-category strong {
  max-width: 100%;
  font-size: 13px;
  line-height: 1.45;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.review-choice-detail {
  max-width: 100%;
  padding: 3px 6px;
  border-radius: 7px;
  background: rgb(255 255 255 / 16%);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.review-expense-block {
  position: absolute;
  z-index: 2;
  top: 10px;
  bottom: 10px;
  left: 20%;
  display: flex;
  width: 60%;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border: 1px solid #dce3ed;
  border-radius: 14px;
  outline: none;
  background: #fff;
  box-shadow: 0 7px 19px color-mix(in srgb, var(--theme-shadow-ink,rgb(25 48 83)) 17%, transparent);
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  transition:
    transform 180ms ease,
    opacity 180ms ease,
    box-shadow 180ms ease;
}

.review-expense-block:focus-visible {
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--theme-accent,rgb(40 100 215)) 24%, transparent),
    0 7px 19px color-mix(in srgb, var(--theme-accent,rgb(25 48 83)) 17%, transparent);
}

.review-expense-block.dragging {
  cursor: grabbing;
  transition: none;
}

.review-expense-block.drag-left {
  box-shadow: 0 9px 22px color-mix(in srgb, var(--theme-blue,rgb(63 118 207)) 30%, transparent);
}

.review-expense-block.drag-right {
  box-shadow: 0 9px 22px color-mix(in srgb, var(--theme-accent,rgb(47 138 112)) 30%, transparent);
}

.review-expense-block.finalizing-left {
  opacity: 0;
  transform: translateX(-165%) rotate(-8deg) !important;
}

.review-expense-block.finalizing-right {
  opacity: 0;
  transform: translateX(165%) rotate(8deg) !important;
}

.review-expense-block small {
  margin-bottom: 8px;
  color: #8994a5;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.review-expense-block strong {
  max-width: 100%;
  overflow: hidden;
  color: #223047;
  font-size: 17px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-expense-block span {
  margin-top: 8px;
  color: #4f6078;
  font-size: 14px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.review-expense-block .review-financial-source {
  max-width: 100%;
  margin-top: 7px;
  overflow: hidden;
  color: #7d899b;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-manual-button {
  min-height: 34px;
  padding: 5px 10px;
  border: 0;
  border-radius: 9px;
  color: #7b8798;
  background: transparent;
  font-size: 11px;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.review-card-actions {
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  margin-top: 9px;
}

.review-skip-button {
  min-height: 34px;
  padding: 5px 11px;
  border: 1px solid #d8e0eb;
  border-radius: 9px;
  color: #637189;
  background: #f7f9fc;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.review-skip-button:hover,
.review-skip-button:focus-visible {
  border-color: var(--theme-accent,#bac6d6);
  color: var(--navy);
  background: #edf2f9;
}

.recurring-match-review-card {
  min-width: 0;
}

.recurring-review-transaction {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 11px 12px;
  border: 1px solid #dce5f2;
  border-radius: 12px;
  background: #f7faff;
  text-align: center;
}

.recurring-review-transaction small,
.recurring-review-transaction em {
  overflow: hidden;
  color: #7a889e;
  font-size: 10px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recurring-review-transaction strong {
  overflow: hidden;
  color: #20324f;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recurring-review-transaction > span {
  color: var(--blue);
  font-size: 14px;
  font-weight: 850;
}

.recurring-review-choices {
  display: grid;
  max-height: min(224px, 35dvh);
  gap: 7px;
  margin-top: 9px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.recurring-review-choice {
  display: flex;
  min-width: 0;
  min-height: 50px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #cfdaea;
  border-radius: 11px;
  color: #243956;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.recurring-review-choice > span:first-child {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  border-radius: 9px;
  background: #edf3ff;
  font-size: 16px;
}

.recurring-review-choice > span:last-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.recurring-review-choice strong,
.recurring-review-choice small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recurring-review-choice strong {
  font-size: 12px;
}

.recurring-review-choice small {
  color: #74839a;
  font-size: 9px;
}

.recurring-review-choice:hover,
.recurring-review-choice:focus-visible {
  border-color: var(--theme-accent,#8eafe7);
  outline: none;
  background: #f4f8ff;
}

.recurring-review-not-matched {
  min-height: 34px;
  padding: 5px 11px;
  border: 1px solid #d8e0eb;
  border-radius: 9px;
  color: #53647d;
  background: #fff;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.review-manual-button:hover,
.review-manual-button:focus-visible {
  color: var(--navy);
  background: #edf2f9;
}

.review-empty-state {
  padding: 38px 20px;
  text-align: center;
}

.review-empty-state > span {
  display: inline-grid;
  width: 44px;
  height: 44px;
  margin-bottom: 13px;
  place-items: center;
  border-radius: 15px;
  color: var(--success);
  background: var(--success-soft);
  font-size: 19px;
  font-weight: 850;
}

.review-empty-state strong {
  display: block;
  font-size: 16px;
}

.review-empty-state p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.expense-delete-button {
  min-width: 44px;
  min-height: 44px;
  padding: 0 7px;
  border: 0;
  border-radius: 9px;
  color: #8792a4;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.expense-delete-button:focus-visible,
.expense-delete-button:hover {
  color: var(--danger);
  background: var(--danger-soft);
}

.expense-empty-state {
  padding: 34px 20px;
  text-align: center;
}

.expense-empty-state > span {
  display: inline-grid;
  width: 42px;
  height: 42px;
  margin-bottom: 13px;
  place-items: center;
  border-radius: 14px;
  color: var(--navy);
  background: var(--blue-soft);
  font-size: 18px;
  font-weight: 800;
}

.expense-empty-state strong {
  display: block;
  font-size: 16px;
}

.expense-empty-state p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.user-form-card h2 {
  margin: 0 0 20px;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.users-list-section {
  margin-top: 36px;
}

.users-list {
  display: grid;
  gap: 10px;
}

.user-list-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 15px;
}

.user-avatar {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  color: var(--navy);
  background: var(--blue-soft);
  font-size: 16px;
  font-weight: 800;
}

.user-list-item strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.users-empty-state {
  padding: 30px 20px;
  text-align: center;
}

.users-empty-state strong {
  display: block;
  font-size: 16px;
}

.users-empty-state p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.analytics-page {
  --page-content-max-width: 1004px;
}

.analytics-intro {
  margin-bottom: 34px;
}

.analytics-filter-section {
  margin-bottom: 18px;
}

.analytics-filter-panel {
  padding: 0;
  overflow: visible;
}

.analytics-filter-panel > summary {
  display: flex;
  min-height: 64px;
  padding: 12px 15px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-radius: inherit;
  list-style: none;
  cursor: pointer;
}

.analytics-filter-panel > summary::-webkit-details-marker {
  display: none;
}

.analytics-filter-panel > summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--theme-accent,rgb(40 100 215)) 15%, transparent);
  outline-offset: 2px;
}

.analytics-filter-panel[open] > summary {
  border-bottom: 1px solid #e7ecf3;
  border-radius: 22px 22px 0 0;
}

.analytics-filter-summary-copy {
  min-width: 0;
}

.analytics-filter-summary-copy > span,
.analytics-filter-summary-copy > strong {
  display: block;
}

.analytics-filter-summary-copy > span {
  color: var(--blue);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.06em;
}

.analytics-filter-summary-copy > strong {
  margin-top: 4px;
  overflow: hidden;
  color: #29384f;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-filter-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 11px;
  align-items: center;
  gap: 8px;
  border-radius: 10px;
  color: #315b96;
  background: #edf3fc;
  font-size: 11px;
  font-weight: 850;
}

.analytics-filter-chevron {
  width: 7px;
  height: 7px;
  border-right: 2px solid currentcolor;
  border-bottom: 2px solid currentcolor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 180ms ease;
}

.analytics-filter-panel[open] .analytics-filter-chevron {
  transform: translateY(2px) rotate(225deg);
}

.analytics-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
  padding: 15px;
}

.analytics-filter-panel > .analytics-filters {
  border-radius: 0 0 22px 22px;
  background: #fbfcfe;
}

.analytics-filter-field {
  min-width: 0;
}

.analytics-filter-field label {
  display: block;
  margin: 0 0 6px 2px;
  color: #65738a;
  font-size: 11px;
  font-weight: 800;
}

.analytics-filter-field input,
.analytics-filter-field select {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 8px 11px;
  border: 1px solid #d9e0ea;
  border-radius: 11px;
  outline: none;
  color: #263247;
  background: #fff;
  font-size: 12px;
}

.analytics-filter-field input:focus,
.analytics-filter-field select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent,rgb(40 100 215)) 12%, transparent);
}

.analytics-filter-field select:disabled {
  color: #8b95a4;
  background: #f3f5f8;
}

.analytics-multiselect {
  position: relative;
}

.analytics-multiselect > summary {
  position: relative;
  display: flex;
  height: 44px;
  padding: 0 38px 0 11px;
  overflow: hidden;
  align-items: center;
  border: 1px solid #d9e0ea;
  border-radius: 11px;
  color: #263247;
  background: #fff;
  font-size: 12px;
  font-weight: 650;
  list-style: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.analytics-multiselect > summary::-webkit-details-marker {
  display: none;
}

.analytics-multiselect > summary > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.analytics-multiselect[open] > summary,
.analytics-multiselect > summary:focus-visible {
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent,rgb(40 100 215)) 12%, transparent);
}

.analytics-multiselect[open] > summary .select-arrow {
  transform: translateY(-20%) rotate(225deg);
}

.analytics-multiselect-panel {
  position: absolute;
  z-index: 40;
  top: calc(100% + 7px);
  right: 0;
  width: min(280px, calc(100cqw - 44px));
  padding: 10px;
  border: 1px solid #dfe5ee;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 14px 35px color-mix(in srgb, var(--theme-shadow-ink,rgb(24 39 67)) 16%, transparent);
}

.analytics-multiselect-panel.wide {
  width: min(350px, calc(100cqw - 44px));
}

.analytics-multiselect-actions {
  display: flex;
  gap: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid #edf0f5;
}

.analytics-multiselect-actions button {
  min-height: 29px;
  padding: 5px 9px;
  border: 0;
  border-radius: 8px;
  color: #53647c;
  background: #eef2f7;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.analytics-multiselect-actions button:hover,
.analytics-multiselect-actions button:focus-visible {
  color: var(--blue);
  outline: 2px solid color-mix(in srgb, var(--theme-accent,rgb(40 100 215)) 16%, transparent);
}

.analytics-multiselect-options {
  display: grid;
  gap: 2px;
  max-height: 260px;
  padding-top: 7px;
  overflow-y: auto;
}

.analytics-filter-field .analytics-multiselect-option {
  display: flex;
  gap: 9px;
  min-height: 34px;
  margin: 0;
  padding: 7px 8px;
  align-items: center;
  border-radius: 8px;
  color: #35435a;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  cursor: pointer;
}

.analytics-spending-basis {
  padding: 15px 17px;
}

.analytics-spending-basis-row {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
}

.analytics-spending-basis-row > div:first-child {
  min-width: 0;
}

.analytics-spending-basis-row strong {
  color: var(--navy);
  font-size: 13px;
}

.analytics-spending-basis-row p,
.analytics-spending-basis-details p {
  margin: 5px 0 0;
  color: #718097;
  font-size: 11px;
  line-height: 1.55;
}

.analytics-spending-basis-toggle {
  display: inline-grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(2, minmax(88px, 1fr));
  gap: 3px;
  padding: 3px;
  border-radius: 12px;
  background: #edf1f6;
}

.analytics-spending-basis-toggle button {
  min-height: 36px;
  padding: 7px 11px;
  border: 0;
  border-radius: 9px;
  color: #69778b;
  background: transparent;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.analytics-spending-basis-toggle button:hover:not(:disabled),
.analytics-spending-basis-toggle button:focus-visible {
  color: var(--blue);
  outline: 2px solid color-mix(in srgb, var(--theme-accent,rgb(40 100 215)) 14%, transparent);
  outline-offset: 1px;
}

.analytics-spending-basis-toggle button[aria-pressed="true"] {
  color: #24589f;
  background: #fff;
  box-shadow: 0 2px 7px color-mix(in srgb, var(--theme-accent,rgb(39 63 99)) 10%, transparent);
}

.analytics-spending-basis-toggle button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.analytics-spending-basis-status {
  min-height: 0;
  margin: 6px 0 0;
  color: #315b96;
  font-size: 10px;
}

.analytics-spending-basis-status:empty {
  display: none;
}

.analytics-spending-basis-status.error {
  color: var(--danger);
}

.analytics-spending-basis-details {
  margin-top: 8px;
  border-top: 1px solid #edf0f5;
}

.analytics-spending-basis-details > summary {
  width: fit-content;
  padding-top: 8px;
  color: #50647e;
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
}

.analytics-spending-basis-details p {
  max-width: 720px;
}

.analytics-multiselect-option:hover {
  background: #f3f6fb;
}

.analytics-multiselect-option input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--blue);
}

.analytics-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
  margin: 18px 0;
}

.analytics-kpi {
  min-width: 0;
  padding: 17px;
}

.analytics-kpi > span {
  display: block;
  margin-bottom: 10px;
  color: #718097;
  font-size: 11px;
  font-weight: 750;
}

.analytics-kpi > strong {
  display: block;
  overflow: hidden;
  color: var(--navy);
  font-size: clamp(18px, 2.5cqw, 24px);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-kpi > small {
  display: block;
  margin-top: 7px;
  overflow: hidden;
  color: #8a95a5;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-kpi.target-kpi {
  background: linear-gradient(145deg, #f0f5ff, #fff);
}

.analytics-kpi.income-kpi {
  background: linear-gradient(145deg, #effaf5, #fff);
}

.analytics-kpi.spending-kpi {
  background: linear-gradient(145deg, #fff6f4, #fff);
}

.analytics-kpi.balance-kpi {
  background: linear-gradient(145deg, #f2f6ff, #fff);
}

.analytics-kpi #analytics-income,
.analytics-income-value,
.analytics-balance-value.positive {
  color: var(--success);
}

.analytics-kpi #analytics-balance.negative,
.analytics-balance-value.negative {
  color: var(--danger);
}

.analytics-chart-card,
.analytics-breakdown-card,
.analytics-monthly-card {
  margin-top: 13px;
  padding: 20px;
}

.analytics-card-heading {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.analytics-card-heading.compact {
  margin-bottom: 18px;
}

.analytics-card-heading .eyebrow {
  margin-bottom: 5px;
}

.analytics-card-heading h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.035em;
}

.analytics-card-heading p:not(.eyebrow) {
  margin: 6px 0 0;
  color: #7b8799;
  font-size: 11px;
  line-height: 1.5;
}

.analytics-heading-value {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 10px;
  color: var(--navy);
  background: var(--blue-soft);
  font-size: 11px;
  font-weight: 800;
}

.analytics-trend-insight {
  margin: 4px 0 18px;
  padding: 14px;
  border: 1px solid #e4eaf3;
  border-radius: 14px;
  background: #f8faff;
}

.analytics-trend-insight h3 {
  margin: 0;
  color: #66768e;
  font-size: 12px;
}

.analytics-trend-insight .insight-lead {
  margin-top: 7px;
}

.trend-chart-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  align-items: flex-end;
  flex-direction: column;
}

.analytics-view-toggle {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(52px, 1fr));
  gap: 3px;
  padding: 3px;
  border: 1px solid #e7ecf3;
  border-radius: 12px;
  background: #f4f7fb;
}

.analytics-view-toggle button {
  min-height: 32px;
  padding: 6px 11px;
  border: 0;
  border-radius: 9px;
  color: #6d798b;
  background: transparent;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition:
    color 280ms ease,
    background-color 280ms ease,
    box-shadow 280ms ease,
    transform 280ms ease;
}

.analytics-view-toggle button:hover,
.analytics-view-toggle button:focus-visible {
  color: var(--navy);
  background: rgb(255 255 255 / 75%);
}

.analytics-view-toggle button[aria-pressed="true"] {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 5px 12px color-mix(in srgb, var(--theme-accent,rgb(40 100 215)) 20%, transparent);
}

.analytics-view-toggle button[aria-pressed="true"]:active {
  transform: scale(0.98);
}

.analytics-chart-legend {
  display: flex;
  gap: 7px 14px;
  margin: -2px 0 12px;
  flex-wrap: wrap;
}

.analytics-chart-legend-item {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: #5f6e83;
  font-size: 10.5px;
  font-weight: 700;
}

.analytics-chart-legend-item i,
.analytics-chart-tooltip-rows i {
  display: inline-block;
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 3px;
}

.analytics-chart {
  position: relative;
  min-height: 310px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid #edf0f5;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfcfe, #fff);
  overscroll-behavior-inline: contain;
}

.analytics-chart svg {
  display: block;
  width: 100%;
  height: 310px;
  animation: analytics-chart-reveal 380ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes analytics-chart-reveal {
  from {
    opacity: 0.45;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.analytics-chart-grid {
  stroke: #e8edf4;
  stroke-width: 1;
}

.analytics-chart-y-label,
.analytics-chart-x-label {
  fill: #8793a5;
  font-size: 10px;
  font-weight: 650;
}

.analytics-chart-bar {
  fill: #bcd0f2;
}

.analytics-chart-segment {
  transition: opacity 280ms ease;
}

.analytics-chart-segment.grouped {
  opacity: 0.9;
}

.analytics-chart-hover-zone {
  fill: transparent;
  outline: none;
  cursor: crosshair;
}

.analytics-chart-hover-zone:hover,
.analytics-chart-hover-zone:focus {
  fill: rgb(40 100 215 / 5%);
}

.analytics-chart-tooltip {
  position: absolute;
  z-index: 4;
  top: 12px;
  box-sizing: border-box;
  width: min(250px, calc(100% - 24px));
  max-width: calc(100cqw - 24px);
  padding: 12px;
  border: 1px solid rgb(255 255 255 / 70%);
  border-radius: 12px;
  color: #fff;
  background: rgb(25 39 62 / 94%);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--theme-shadow-ink,rgb(21 34 56)) 24%, transparent);
  pointer-events: none;
  transform: translateX(-50%);
}

.analytics-chart-tooltip > strong {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
}

.analytics-chart-tooltip-rows {
  display: grid;
  gap: 6px;
  max-height: 195px;
  overflow: hidden;
}

.analytics-chart-tooltip-rows > div,
.analytics-chart-tooltip-total {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  font-size: 10.5px;
}

.analytics-chart-tooltip-rows > div > span {
  display: flex;
  gap: 6px;
  min-width: 0;
  align-items: center;
}

.analytics-chart-tooltip-rows > div > span > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-chart-tooltip-rows b,
.analytics-chart-tooltip-total b {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}

.analytics-chart-tooltip-rows small {
  color: #c9d3e1;
  font-size: 10.5px;
}

.analytics-chart-tooltip-total {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid rgb(255 255 255 / 18%);
  font-size: 11.5px;
}

.analytics-chart-line {
  fill: none;
  stroke: var(--blue);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
  pointer-events: none;
}

.analytics-chart-bar.target {
  fill: #b7ddcf;
}

.analytics-chart-line.target {
  stroke: var(--success);
}

.analytics-target-line {
  stroke: #d25a67;
  stroke-dasharray: 7 5;
  stroke-width: 2;
  pointer-events: none;
}

.analytics-target-line-label {
  fill: #b04752;
  font-size: 10px;
  font-weight: 800;
  pointer-events: none;
}

.analytics-settings-link {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 9px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.target-progress-summary {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  justify-content: space-between;
  margin: 18px 2px 9px;
}

.target-progress-summary > div span {
  display: block;
  margin-bottom: 4px;
  color: #7c899c;
  font-size: 11px;
}

.target-progress-summary > div strong {
  color: #26364f;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.target-progress-status {
  font-size: 11px;
  font-weight: 800;
}

.target-progress-status.within {
  color: var(--success);
}

.target-progress-status.over {
  color: var(--danger);
}

.target-progress-status.neutral {
  color: #718097;
}

.target-progress-track {
  height: 10px;
  margin-bottom: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9edf3;
}

.target-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  transition: width 220ms ease;
}

.target-progress-track span.within {
  background: var(--success);
}

.target-progress-track span.over {
  background: var(--danger);
}

.target-progress-track span.neutral {
  background: #a8b2c1;
}

.analytics-breakdown-heading {
  align-items: center;
}

.analytics-breakdown-description {
  max-width: 580px;
  margin: 7px 0 0;
  color: #748298;
  font-size: 12px;
  line-height: 1.55;
}

.analytics-breakdown-toggle {
  flex: 0 0 auto;
  grid-template-columns: repeat(2, 68px);
}

.analytics-breakdown-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
  align-items: center;
}

.analytics-breakdown-list {
  display: grid;
  gap: 0;
  margin-top: 20px;
  animation: analytics-breakdown-reveal 280ms ease both;
}

@keyframes analytics-breakdown-reveal {
  from {
    opacity: 0.35;
    transform: translateY(3px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.analytics-breakdown-row {
  padding: 15px 0;
  border-bottom: 1px solid #edf1f6;
}

.analytics-breakdown-row:first-child {
  padding-top: 0;
}

.analytics-breakdown-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.analytics-breakdown-row > div:first-child {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.analytics-breakdown-row > div:first-child strong {
  min-width: 0;
  overflow: hidden;
  color: #34435a;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-breakdown-row > div:first-child span {
  flex: 0 0 auto;
  color: #7d899a;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.analytics-breakdown-row-meta {
  display: flex;
  min-width: 0;
  gap: 7px;
  align-items: center;
  justify-content: flex-end;
}

.analytics-breakdown-row > div:first-child .analytics-breakdown-row-meta > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-breakdown-detail-toggle {
  display: inline-flex;
  min-height: 26px;
  padding: 4px 8px;
  border: 0;
  border-radius: 999px;
  align-items: center;
  gap: 5px;
  justify-content: center;
  background: #edf3fc;
  color: #48617f;
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
  transition:
    color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.analytics-breakdown-detail-toggle:hover {
  background: #e2ebfa;
  color: #2259bd;
}

.analytics-breakdown-detail-toggle:active {
  transform: scale(0.97);
}

.analytics-breakdown-detail-toggle:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--theme-accent,rgb(40 100 215)) 22%, transparent);
  outline-offset: 2px;
}

.analytics-breakdown-detail-label {
  color: inherit;
  font-size: inherit;
}

.analytics-breakdown-detail-icon {
  display: block;
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentcolor;
  border-bottom: 1.5px solid currentcolor;
  color: inherit;
  transform: translateY(-1px) rotate(45deg);
  transition: transform 220ms ease;
}

.analytics-breakdown-detail-toggle[aria-expanded="true"] .analytics-breakdown-detail-icon {
  transform: translateY(2px) rotate(225deg);
}

.analytics-breakdown-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f6;
}

.analytics-breakdown-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #77a0e5, #9db9e9);
}

.analytics-breakdown-forecast {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 10px;
  padding: 11px 12px;
  border: 1px solid #e0e8f4;
  border-radius: 12px;
  background: #f7f9fd;
  animation: analytics-forecast-detail-reveal 240ms ease both;
}

.analytics-breakdown-forecast[hidden] {
  display: none;
}

@keyframes analytics-forecast-detail-reveal {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.analytics-breakdown-forecast > span {
  min-width: 0;
  padding: 0 10px;
  border-right: 1px solid #e2e8f1;
}

.analytics-breakdown-forecast > span:first-child {
  padding-left: 0;
}

.analytics-breakdown-forecast > span:last-child {
  padding-right: 0;
  border-right: 0;
}

.analytics-breakdown-forecast small,
.analytics-breakdown-forecast strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-breakdown-forecast small {
  color: #7c899c;
  font-size: 10px;
  font-weight: 700;
}

.analytics-breakdown-forecast strong {
  margin-top: 4px;
  color: #34435a;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.analytics-breakdown-forecast .emphasized small,
.analytics-breakdown-forecast .emphasized strong {
  color: #2864d7;
}

.analytics-breakdown-total-row {
  padding-top: 0;
}

.analytics-breakdown-total-row + .analytics-breakdown-list,
.analytics-breakdown-total-row ~ .analytics-breakdown-list {
  margin-top: 0;
}

.analytics-breakdown-total-row > div:first-child b {
  color: inherit;
  font-weight: 800;
}

.analytics-breakdown-total-row .analytics-breakdown-track span {
  width: 100%;
}

.analytics-total-confidence {
  color: inherit;
  font-style: normal;
}

.analytics-total-confidence[data-level="medium"] {
  color: #2864d7;
}

.analytics-total-confidence[data-level="high"] {
  color: #137356;
}

.analytics-empty {
  display: grid;
  min-height: 100px;
  margin: 0;
  padding: 20px;
  place-items: center;
  color: #8994a5;
  font-size: 12px;
  text-align: center;
}

.analytics-monthly-heading {
  gap: 16px;
  align-items: center;
  flex-wrap: nowrap;
}

.analytics-monthly-heading > div:first-child {
  min-width: 0;
}

.analytics-monthly-navigation {
  display: grid;
  grid-template-columns: 34px minmax(108px, auto) 34px;
  gap: 5px;
  align-items: center;
  padding: 4px;
  border: 1px solid #e1e7f0;
  border-radius: 999px;
  background: #f5f7fb;
}

.analytics-monthly-navigation button {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  place-items: center;
  color: #385782;
  background: #fff;
  box-shadow: 0 1px 4px color-mix(in srgb, var(--theme-accent,rgb(32 54 88)) 9%, transparent);
  cursor: pointer;
}

.analytics-monthly-navigation button:focus-visible,
.analytics-monthly-carousel:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--theme-accent,rgb(40 100 215)) 18%, transparent);
  outline-offset: 2px;
}

.analytics-monthly-navigation button:disabled {
  color: #b6c0cf;
  background: transparent;
  box-shadow: none;
  cursor: default;
}

.analytics-monthly-navigation button span {
  width: 7px;
  height: 7px;
  border: solid currentcolor;
  border-width: 0 2px 2px 0;
}

.analytics-monthly-navigation button:first-child span {
  transform: rotate(135deg);
}

.analytics-monthly-navigation button:last-child span {
  transform: rotate(-45deg);
}

.analytics-monthly-navigation strong {
  color: #294261;
  font-size: 12px;
  font-weight: 850;
  text-align: center;
  white-space: nowrap;
}

.analytics-monthly-carousel {
  overflow: hidden;
  border-radius: 14px;
  outline: none;
  touch-action: pan-y;
  cursor: grab;
}

.analytics-monthly-carousel.is-swiping {
  cursor: grabbing;
}

.analytics-monthly-card-view {
  min-height: 180px;
  padding: 18px;
  border: 1px solid #e4e9f1;
  border-radius: 14px;
  background: #fbfcfe;
  transition: transform 220ms ease, opacity 220ms ease;
  will-change: transform, opacity;
}

.analytics-monthly-card-view.enter-from-left {
  animation: monthly-summary-from-left 360ms cubic-bezier(0.22, 0.7, 0.24, 1);
}

.analytics-monthly-card-view.enter-from-right {
  animation: monthly-summary-from-right 360ms cubic-bezier(0.22, 0.7, 0.24, 1);
}

@keyframes monthly-summary-from-left {
  from {
    opacity: 0.35;
    transform: translateX(-40px);
  }
}

@keyframes monthly-summary-from-right {
  from {
    opacity: 0.35;
    transform: translateX(40px);
  }
}

.analytics-monthly-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.analytics-monthly-metric {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 12px;
  border-radius: 11px;
  background: #f4f7fb;
  font-variant-numeric: tabular-nums;
}

.analytics-monthly-metric > span {
  color: #8592a7;
  font-size: 10px;
  font-weight: 800;
}

.analytics-monthly-metric > strong:not(.analytics-target-badge) {
  min-width: 0;
  overflow: hidden;
  color: #34465f;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-monthly-metric .analytics-target-badge {
  width: fit-content;
  max-width: 100%;
}

.analytics-monthly-swipe-hint {
  display: none;
  margin: 9px 0 0;
  color: #929db0;
  font-size: 10px;
  text-align: center;
}

.analytics-target-badge {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.analytics-target-badge.within {
  color: var(--success);
  background: var(--success-soft);
}

.analytics-target-badge.over {
  color: var(--danger);
  background: var(--danger-soft);
}

.analytics-target-badge.neutral {
  color: #68768a;
  background: #e9edf3;
}

.analytics-income-value,
.analytics-balance-value {
  font-weight: 800;
}

.analytics-monthly-memo-panel {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e5eaf2;
}

.analytics-monthly-memo-label {
  display: block;
  margin-bottom: 8px;
  color: #8592a7;
  font-size: 10px;
  font-weight: 800;
}

.analytics-monthly-memo-unavailable {
  margin: 0;
  color: #8b96a6;
  font-size: 14px;
  line-height: 1.45;
}

.analytics-monthly-memo-display {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  justify-content: space-between;
}

.analytics-monthly-memo-display p {
  display: -webkit-box;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #536178;
  line-height: 1.5;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.analytics-monthly-memo-display p.empty {
  color: #9aa4b3;
}

.analytics-monthly-memo-display button,
.analytics-monthly-memo-actions button {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid #d7e0ec;
  border-radius: 8px;
  color: #5f6f87;
  background: #f7f9fc;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.analytics-monthly-memo-display button:hover,
.analytics-monthly-memo-display button:focus-visible,
.analytics-monthly-memo-actions button[type="submit"] {
  border-color: var(--theme-accent,#b9cceb);
  color: var(--blue);
  background: var(--blue-soft);
}

.analytics-monthly-memo-form {
  display: grid;
  gap: 7px;
}

.analytics-monthly-memo-form textarea {
  width: 100%;
  min-height: 74px;
  padding: 9px 10px;
  resize: vertical;
  border: 1px solid #d9e0ea;
  border-radius: 9px;
  outline: none;
  color: #344258;
  background: #fff;
  font: inherit;
  line-height: 1.5;
}

.analytics-monthly-memo-form textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent,rgb(40 100 215)) 12%, transparent);
}

.analytics-monthly-memo-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.analytics-monthly-memo-actions button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.analytics-monthly-memo-status {
  min-height: 14px;
  color: #7d899a;
  font-size: 10px;
}

.analytics-monthly-memo-status.error {
  color: var(--danger);
}

.categories-page {
  --page-content-max-width: 724px;
}

.categories-intro {
  margin-bottom: 22px;
}

.personal-learning-section {
  margin-top: 36px;
  margin-bottom: 18px;
}

.personal-learning-card {
  display: grid;
  gap: 22px;
  padding: 20px;
}

.family-learning-ai-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid #dce5f2;
  border-radius: 14px;
  background: #f6f8fc;
}

.family-learning-ai-card[data-ai-enabled="true"] {
  border-color: #c9e7da;
  background: linear-gradient(135deg, #f2fbf7, #f7fafc);
}

.family-learning-ai-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: #718198;
  box-shadow: 0 7px 16px color-mix(in srgb, var(--theme-shadow-ink,rgb(50 67 91)) 14%, transparent);
  font-size: 19px;
}

.family-learning-ai-card[data-ai-enabled="true"] .family-learning-ai-icon {
  background: linear-gradient(145deg, #15946e, #2777c9);
}

.family-learning-ai-heading {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.family-learning-ai-heading h3 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--navy);
  font-size: 13px;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.family-learning-ai-heading span {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  color: #607087;
  background: #e9eef5;
  font-size: 9.5px;
  font-weight: 850;
}

.family-learning-ai-card[data-ai-enabled="true"] .family-learning-ai-heading span {
  color: #18785d;
  background: #dcf3e9;
}

.family-learning-ai-card p {
  margin: 5px 0 0;
  color: #6f7d90;
  font-size: 10.5px;
  line-height: 1.5;
}

.family-learning-ai-usage {
  margin-top: 11px;
}

.family-learning-ai-usage-line {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  color: #34445b;
  font-size: 10.5px;
}

.family-learning-ai-usage-line strong {
  color: #173d70;
  font-size: 11px;
}

.family-learning-ai-usage-track {
  height: 6px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce8e4;
}

.family-learning-ai-usage-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #15946e, #2878c9);
  transition: width 420ms ease;
}

.family-learning-ai-usage small {
  display: block;
  margin-top: 5px;
  color: #718096;
  font-size: 9.5px;
}

.family-learning-ai-privacy {
  margin: -14px 0 0;
  padding: 0 3px;
  color: #7a8799;
  font-size: 10px;
  line-height: 1.55;
}

.family-ai-learning-action {
  display: grid;
  gap: 13px;
  padding: 16px;
  border: 1px solid #d7e5f2;
  border-radius: 15px;
  background: linear-gradient(145deg, #f8fbff, #f1f8f5);
}

.family-ai-learning-action h3,
.family-ai-learning-report h3,
.family-ai-learning-report h4 {
  margin: 0;
  color: var(--navy);
}

.family-ai-learning-action h3 {
  font-size: 13px;
}

.family-ai-learning-action p {
  margin: 5px 0 0;
  color: #6f7d90;
  font-size: 10.5px;
  line-height: 1.55;
}

.family-ai-learning-action button,
.family-ai-learning-report > button {
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #168d6b, #286fd0);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--theme-accent,rgb(30 93 138)) 18%, transparent);
  font-size: 11px;
  font-weight: 850;
}

.family-ai-learning-action button:disabled {
  color: #8995a5;
  background: #e7ebf1;
  box-shadow: none;
}

.family-ai-learning-report {
  padding: 17px;
  border: 1px solid #cce4da;
  border-radius: 16px;
  background: #f7fcfa;
}

.family-ai-learning-report-heading {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.family-ai-learning-report-heading span {
  display: block;
  margin-bottom: 4px;
  color: #1a8667;
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.family-ai-learning-report-heading h3 {
  font-size: 14px;
}

.family-ai-learning-report-heading small {
  flex: 0 0 auto;
  color: #728096;
  font-size: 9px;
  text-align: right;
}

#family-ai-learning-report-summary {
  margin: 10px 0 13px;
  color: #415269;
  font-size: 11px;
  line-height: 1.65;
}

.family-ai-learning-findings {
  display: grid;
  gap: 8px;
}

.family-ai-learning-findings article {
  padding: 11px;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 3px 12px color-mix(in srgb, var(--theme-shadow-ink,rgb(31 74 67)) 7%, transparent);
}

.family-ai-learning-findings strong {
  color: #203955;
  font-size: 10.5px;
}

.family-ai-learning-findings p {
  margin: 4px 0 0;
  color: #66768b;
  font-size: 10px;
  line-height: 1.55;
}

.family-ai-learning-recommendations {
  margin: 14px 0;
}

.family-ai-learning-recommendations h4 {
  font-size: 11px;
}

.family-ai-learning-recommendations ul {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding-left: 18px;
  color: #53657a;
  font-size: 10px;
  line-height: 1.5;
}

.family-ai-learning-report > button {
  width: 100%;
  color: #166f57;
  background: #def3ea;
  box-shadow: none;
}

.family-learning-overview,
.family-learning-patterns,
.family-learning-conflicts {
  padding-bottom: 20px;
  border-bottom: 1px solid #e9edf3;
}

.family-learning-section-heading {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 13px;
}

.family-learning-section-heading.compact {
  margin-bottom: 11px;
}

.family-learning-section-heading h3,
.learning-category-title {
  margin: 0;
  color: var(--navy);
  font-size: 14px;
  letter-spacing: -0.025em;
}

.family-learning-section-heading p {
  margin: 5px 0 0;
  color: #7a8799;
  font-size: 10.5px;
  line-height: 1.5;
}

.family-learning-section-heading > strong {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 9px;
  color: var(--success);
  background: var(--success-soft);
  font-size: 10.5px;
}

.family-learning-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.family-learning-metrics article {
  min-width: 0;
  padding: 12px;
  border: 1px solid #edf1f5;
  border-radius: 12px;
  background: #f8fafc;
}

.family-learning-metrics span,
.family-learning-metrics strong {
  display: block;
}

.family-learning-metrics span {
  overflow: hidden;
  color: #7d899a;
  font-size: 9.5px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.family-learning-metrics strong {
  margin-top: 6px;
  color: var(--navy);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.family-learning-metrics strong.needs-attention {
  color: var(--danger);
}

.family-learning-coverage-track {
  height: 7px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f5;
}

.family-learning-coverage-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f9e78, #62bea0);
  transition: width 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.family-learning-coverage-help {
  margin: 9px 0 0;
  color: #6f7c8f;
  font-size: 10.5px;
  line-height: 1.55;
}

.learning-patterns-list,
.learning-conflicts-list {
  display: grid;
  gap: 7px;
}

.learning-pattern-row,
.learning-conflict-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 11px;
  border-radius: 11px;
  background: #f7f9fc;
}

.learning-pattern-row > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.learning-pattern-row strong,
.learning-conflict-row strong {
  overflow: hidden;
  color: var(--navy);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.learning-pattern-row > div > span,
.learning-conflict-row > span {
  color: #6f7d90;
  font-size: 10px;
  line-height: 1.45;
}

.learning-pattern-evidence {
  flex: 0 0 auto;
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
}

.family-learning-conflicts {
  padding: 14px;
  border: 1px solid #f2d8dc;
  border-radius: 13px;
  background: #fff8f8;
}

.learning-conflict-row {
  align-items: flex-start;
  flex-direction: column;
  background: #fff;
}

.learning-conflict-row small {
  color: var(--danger);
  font-size: 9.5px;
  font-weight: 750;
}

.learning-conflict-action {
  display: flex;
  width: 100%;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.learning-conflict-review {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid #cbdcf4;
  border-radius: 9px;
  color: #2159b6;
  background: #eef4ff;
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
}

.learning-conflict-review:hover,
.learning-conflict-review:focus-visible {
  border-color: var(--theme-accent,#9ebbea);
  color: #17448e;
  background: #e1ecff;
}

.family-learning-empty {
  margin: 0;
  padding: 12px;
  border-radius: 11px;
  color: #8792a2;
  background: #f7f9fc;
  font-size: 10.5px;
  text-align: center;
}

.learning-category-title {
  margin-top: 16px;
}

#learning-profile-form > label {
  display: block;
  margin-bottom: 7px;
  color: #526178;
  font-size: 12px;
  font-weight: 800;
}

.personal-learning-help {
  margin: 8px 0 0;
  color: #7a8799;
  font-size: 11px;
  line-height: 1.55;
}

#personal-classification-instructions {
  width: 100%;
  min-height: 110px;
  padding: 13px 14px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  color: var(--ink);
  background: #fff;
  font: inherit;
  line-height: 1.55;
}

#personal-classification-instructions:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent,rgb(40 100 215)) 12%, transparent);
}

.learning-category-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.learning-category-summary span {
  padding: 7px 10px;
  border-radius: 999px;
  color: #526178;
  background: #f1f4f8;
  font-size: 11px;
  font-weight: 750;
}

#learning-profile-form > .primary-button {
  max-width: 280px;
  margin-top: 15px;
}

.runtime-prompt-preview {
  border-top: 1px solid #e9edf3;
  padding-top: 16px;
}

.runtime-prompt-preview summary {
  color: var(--navy);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.runtime-prompt-preview pre {
  max-height: 320px;
  margin: 13px 0 0;
  padding: 14px;
  overflow: auto;
  border-radius: 12px;
  color: #45536a;
  background: #f7f9fc;
  font-family: inherit;
  font-size: 11px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.spending-target-section {
  margin-bottom: 18px;
}

.income-source-settings-section {
  margin-bottom: 18px;
}

.income-sources-card {
  padding: 20px;
}

.income-sources-help {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.income-sources-list {
  display: grid;
  gap: 9px;
}

.income-source-settings-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
}

.income-source-settings-icon {
  width: 100%;
  min-width: 0;
}

.income-source-remove-button {
  min-height: 44px;
  padding: 8px 13px;
  border: 1px solid #ecc9d0;
  border-radius: 11px;
  color: var(--danger);
  background: #fff7f8;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.income-source-remove-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.income-source-add-button {
  width: 100%;
  min-height: 42px;
  margin-top: 12px;
  border: 1px dashed #b9c8dd;
  border-radius: 11px;
  color: #42699f;
  background: #f5f8fc;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.spending-target-card {
  padding: 20px;
}

.spending-target-amount-field {
  max-width: 360px;
}

.spending-target-amount-field > label,
.spending-target-categories legend {
  display: block;
  margin-bottom: 7px;
  color: #526178;
  font-size: 12px;
  font-weight: 800;
}

.spending-target-categories {
  min-width: 0;
  margin: 20px 0 0;
  padding: 18px 0 0;
  border: 0;
  border-top: 1px solid #e9edf3;
}

.spending-target-categories > p {
  margin: -1px 0 12px;
  color: #7a8799;
  font-size: 11px;
  line-height: 1.55;
}

.spending-target-category-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.spending-target-category-option {
  position: relative;
  cursor: pointer;
}

.spending-target-category-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.spending-target-category-option span {
  display: inline-flex;
  min-height: 37px;
  padding: 8px 11px;
  align-items: center;
  border: 1px solid #dbe2ec;
  border-radius: 999px;
  color: #65738a;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 750;
  transition:
    border-color 150ms ease,
    color 150ms ease,
    background-color 150ms ease;
}

.spending-target-category-option input:checked + span {
  border-color: var(--theme-accent,#9bb9e9);
  color: var(--navy);
  background: var(--blue-soft);
}

.spending-target-category-option input:focus-visible + span {
  outline: 3px solid color-mix(in srgb, var(--theme-accent,rgb(40 100 215)) 18%, transparent);
  outline-offset: 2px;
}

.spending-target-status {
  margin-top: 15px;
}

.spending-target-card > .primary-button {
  max-width: 280px;
}

/* Personal spending challenges ------------------------------------------------ */
.spending-goals-builder {
  display: grid;
  gap: 16px;
}

.spending-goals-intro {
  margin: 0;
  padding: 14px 15px;
  border: 1px solid #cde6e0;
  border-radius: 15px;
  color: #42625c;
  background: #f1fbf8;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.65;
}

.spending-goal-presets,
.spending-goal-list-section {
  padding: 16px;
  border: 1px solid #e1ebe8;
  border-radius: 17px;
  background: #fff;
}

.spending-goal-section-heading,
.spending-goal-form-heading {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.spending-goal-section-heading .eyebrow,
.spending-goal-form-heading .eyebrow {
  margin: 0 0 3px;
  color: #5b8a80;
  font-size: 10px;
}

.spending-goal-section-heading h3,
.spending-goal-form-heading h3 {
  margin: 0;
  color: #263a36;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.spending-goal-section-heading > span {
  color: #78908a;
  font-size: 11px;
  font-weight: 750;
  text-align: right;
}

.spending-goal-preset-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 13px;
}

.spending-goal-preset {
  display: flex;
  min-height: 54px;
  gap: 8px;
  padding: 10px;
  align-items: center;
  border: 1px solid #d7ebe5;
  border-radius: 13px;
  color: #31564e;
  background: #fbfffd;
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 150ms ease,
    background-color 150ms ease,
    transform 150ms ease,
    box-shadow 150ms ease;
}

.spending-goal-preset > span {
  display: inline-grid;
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  place-items: center;
  border-radius: 10px;
  background: #e8faf5;
  font-size: 16px;
}

.spending-goal-preset:hover,
.spending-goal-preset:focus-visible {
  border-color: var(--theme-accent,#8dcbbb);
  outline: none;
  background: #f0fcf8;
  box-shadow: 0 7px 15px color-mix(in srgb, var(--theme-accent,rgb(35 118 106)) 10%, transparent);
  transform: translateY(-1px);
}

.spending-goal-list {
  display: grid;
  gap: 8px;
  margin-top: 13px;
}

.spending-goal-empty {
  margin: 0;
  padding: 17px 10px;
  border: 1px dashed #cdded9;
  border-radius: 12px;
  color: #70827e;
  background: #f9fcfb;
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
}

.spending-goal-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 13px;
  align-items: start;
  border: 1px solid #dbeae5;
  border-radius: 14px;
  background: #fbfffd;
}

.spending-goal-card-main {
  min-width: 0;
}

.spending-goal-card-title-row {
  display: flex;
  gap: 7px;
  align-items: center;
}

.spending-goal-card-title-row strong {
  overflow: hidden;
  color: #28443e;
  font-size: 13px;
  letter-spacing: -0.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spending-goal-card-kind {
  display: inline-flex;
  padding: 3px 6px;
  flex: 0 0 auto;
  border-radius: 999px;
  color: #3f796d;
  background: #e6f7f1;
  font-size: 10px;
  font-weight: 850;
}

.spending-goal-card-main > p {
  margin: 6px 0 0;
  overflow: hidden;
  color: #6a7e79;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spending-goal-card-actions {
  display: flex;
  gap: 5px;
}

.spending-goal-card-actions button,
.spending-goal-form-heading > button {
  min-height: 31px;
  padding: 5px 8px;
  border: 1px solid #d8e6e1;
  border-radius: 9px;
  color: #58746d;
  background: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.spending-goal-card-actions button:hover,
.spending-goal-card-actions button:focus-visible,
.spending-goal-form-heading > button:hover,
.spending-goal-form-heading > button:focus-visible {
  border-color: var(--theme-accent,#99ccbf);
  color: #1e6759;
  outline: none;
  background: #effaf7;
}

.spending-goal-card-actions [data-goal-action="remove"] {
  border-color: #efd6d9;
  color: #ad5961;
  background: #fffafb;
}

.spending-goal-form {
  display: grid;
  gap: 17px;
  padding: 18px;
  border-color: #bddfd5;
  background: linear-gradient(145deg, #f9fffd 0%, #fff 66%);
}

.spending-goal-field {
  display: grid;
  gap: 7px;
}

.spending-goal-field > span:first-child,
.spending-goal-choice-group legend,
.spending-goal-filter-fields legend {
  color: #4f645f;
  font-size: 12px;
  font-weight: 850;
}

.spending-goal-field em {
  margin-left: 3px;
  color: #8a9c97;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}

.spending-goal-field input {
  width: 100%;
  min-height: 43px;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #cfdfda;
  border-radius: 11px;
  color: #263b36;
  background: #fff;
  font: inherit;
  font-size: 14px;
}

.spending-goal-field input:focus {
  border-color: var(--theme-accent,#74b9a8);
  outline: 3px solid color-mix(in srgb, var(--theme-accent,rgb(116 185 168)) 18%, transparent);
}

.spending-goal-choice-group,
.spending-goal-filter-fields {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.spending-goal-choice-group legend,
.spending-goal-filter-fields legend {
  margin-bottom: 8px;
}

.spending-goal-choice-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.spending-goal-choice-options label {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.spending-goal-choice-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.spending-goal-choice-options span {
  display: flex;
  min-height: 43px;
  box-sizing: border-box;
  padding: 10px;
  align-items: center;
  justify-content: center;
  border: 1px solid #d5e2de;
  border-radius: 11px;
  color: #637671;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  transition:
    border-color 150ms ease,
    color 150ms ease,
    background-color 150ms ease;
}

.spending-goal-choice-options input:checked + span {
  border-color: var(--theme-accent,#8bc7b9);
  color: #1e6659;
  background: #e9faf5;
}

.spending-goal-choice-options input:focus-visible + span {
  outline: 3px solid color-mix(in srgb, var(--theme-accent,rgb(116 185 168)) 20%, transparent);
  outline-offset: 2px;
}

.spending-goal-filter-fields > p {
  margin: 7px 0 0;
  color: #788985;
  font-size: 11px;
  line-height: 1.5;
}

.spending-goal-category-options {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.spending-goal-category-bubbles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.spending-goal-category-bubble {
  min-height: 37px;
  padding: 8px 11px;
  border: 1px solid #d8e5e1;
  border-radius: 999px;
  color: #5f746e;
  background: #f8fbfa;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition:
    border-color 150ms ease,
    color 150ms ease,
    background-color 150ms ease;
}

.spending-goal-category-bubble.active {
  border-color: #8bc7b9;
  color: #1e6659;
  background: #e9faf5;
}

.spending-goal-category-bubble.has-selection::after {
  margin-left: 5px;
  color: #25826f;
  content: "✓";
  font-weight: 900;
}

.spending-goal-category-bubble:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--theme-accent,rgb(116 185 168)) 20%, transparent);
  outline-offset: 2px;
}

.spending-goal-subcategory-panel {
  padding: 11px 12px 12px;
  border: 1px solid #d8e5e1;
  border-radius: 12px;
  background: #fbfdfc;
}

.spending-goal-subcategory-panel[hidden] {
  display: none;
}

.spending-goal-subcategory-panel > strong {
  display: block;
  margin-bottom: 8px;
  color: #4f645f;
  font-size: 11px;
  font-weight: 850;
}

.spending-goal-category-whole-option,
.spending-goal-subcategory-option {
  position: relative;
  display: block;
  cursor: pointer;
}

.spending-goal-category-whole-option input,
.spending-goal-subcategory-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.spending-goal-subcategory-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.spending-goal-category-whole-option span,
.spending-goal-subcategory-option span {
  display: block;
  padding: 7px 10px;
  border: 1px solid #d8e5e1;
  border-radius: 999px;
  color: #687b76;
  background: #fff;
  font-size: 11px;
  font-weight: 800;
  transition:
    border-color 150ms ease,
    color 150ms ease,
    background-color 150ms ease,
    opacity 150ms ease;
}

.spending-goal-category-whole-option span {
  border-color: #bddbd3;
  color: #446d63;
  background: #f2faf7;
}

.spending-goal-category-whole-option input:checked + span,
.spending-goal-subcategory-option input:checked + span {
  border-color: var(--theme-accent,#8bc7b9);
  color: #1e6659;
  background: #e9faf5;
}

.spending-goal-category-whole-option input:focus-visible + span,
.spending-goal-subcategory-option input:focus-visible + span {
  outline: 3px solid color-mix(in srgb, var(--theme-accent,rgb(116 185 168)) 20%, transparent);
  outline-offset: -2px;
}

.spending-goal-category-whole-option input:disabled + span,
.spending-goal-subcategory-option input:disabled + span {
  cursor: not-allowed;
  opacity: 0.45;
}

.spending-goal-limit-field .amount-input-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid #cfdfda;
  border-radius: 11px;
  background: #fff;
}

.spending-goal-limit-field .amount-input-wrap:focus-within {
  border-color: var(--theme-accent,#74b9a8);
  outline: 3px solid color-mix(in srgb, var(--theme-accent,rgb(116 185 168)) 18%, transparent);
}

.spending-goal-limit-field .amount-input-wrap input {
  border: 0;
  border-radius: 0;
  outline: 0 !important;
}

.spending-goal-limit-field .amount-input-wrap strong {
  display: grid;
  min-width: 42px;
  padding: 0 12px;
  place-items: center;
  color: #5a716b;
  background: #f1f8f6;
  font-size: 13px;
}

.spending-goal-preview {
  margin: -5px 0 0;
  padding: 11px 12px;
  border-radius: 11px;
  color: #3f6c62;
  background: #eaf7f3;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.5;
}

.spending-goal-status {
  margin: -5px 0 0;
}

.spending-goal-form > .primary-button {
  width: 100%;
  max-width: none;
}

.spending-target-budget-details {
  margin-top: 19px;
  border-top: 1px solid #dbe7e3;
}

.spending-target-budget-details > summary {
  padding: 17px 1px 7px;
  color: #60746f;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.spending-target-budget-details > p {
  margin: 3px 0 12px;
  color: #7a8b87;
  font-size: 11px;
  line-height: 1.5;
}

.spending-target-budget-details .spending-target-card {
  margin: 0;
  border-color: #e0eae7;
  box-shadow: none;
}

@container kkaebu (max-width: 440px){
  .spending-goal-preset-list {
    grid-template-columns: 1fr;
  }

  .spending-goal-preset {
    min-height: 49px;
  }
}

.category-settings-launch-card {
  display: flex;
  gap: 18px;
  padding: 18px;
  align-items: center;
  justify-content: space-between;
}

.category-settings-section {
  margin-bottom: 18px;
}

.category-settings-launch-card > div {
  display: flex;
  gap: 12px;
  min-width: 0;
  align-items: center;
}

.category-settings-launch-icon {
  display: inline-grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: var(--blue-soft);
  font-size: 20px;
}

.category-settings-launch-card strong {
  display: block;
  color: var(--navy);
  font-size: 15px;
}

.category-settings-launch-card p {
  margin: 5px 0 0;
  color: #738096;
  font-size: 11px;
  line-height: 1.45;
}

.category-settings-launch-button {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 8px 15px;
  border: 0;
  border-radius: 11px;
  color: #fff;
  background: var(--navy);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.category-settings-launch-button:hover,
.category-settings-launch-button:focus-visible {
  background: var(--blue);
  outline: 3px solid color-mix(in srgb, var(--theme-accent,rgb(40 100 215)) 16%, transparent);
}

.category-settings-dialog {
  width: min(760px, calc(100cqw - 32px));
  max-width: 760px;
  max-height: calc(100svh - 32px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 20px;
  color: var(--ink);
  background: #f5f7fb;
  box-shadow: 0 24px 70px color-mix(in srgb, var(--theme-shadow-ink,rgb(16 31 55)) 30%, transparent);
}

.category-settings-dialog::backdrop {
  background: rgb(17 29 49 / 48%);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.category-settings-dialog-shell {
  display: flex;
  max-height: calc(100svh - 32px);
  flex-direction: column;
}

.category-settings-dialog-header {
  display: flex;
  flex: 0 0 auto;
  padding: 18px 20px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e2e7ef;
  background: #fff;
}

.category-settings-dialog-header .eyebrow {
  margin-bottom: 4px;
}

.category-settings-dialog-header h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.035em;
}

.category-settings-dialog-close {
  display: inline-grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 10px;
  color: #66758a;
  background: #eef1f5;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.category-settings-dialog-close:hover,
.category-settings-dialog-close:focus-visible {
  color: var(--navy);
  background: #e2e8f2;
  outline: 3px solid color-mix(in srgb, var(--theme-accent,rgb(40 100 215)) 14%, transparent);
}

.category-settings-dialog-close:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.category-settings-dialog-scroll {
  min-height: 0;
  padding: 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.category-settings-dialog .category-settings-note {
  margin-bottom: 18px;
}

.category-settings-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 28px;
  padding: 13px 15px;
  border: 1px solid #d8e3f2;
  border-radius: 13px;
  color: #53647c;
  background: #f2f7fd;
  font-size: 12px;
  line-height: 1.55;
}

.category-settings-note p {
  margin: 0;
}

.category-settings-status {
  margin-bottom: 12px;
}

.category-settings-list {
  display: grid;
  gap: 13px;
}

.category-settings-card {
  padding: 18px;
}

.category-settings-card-header {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: end;
}

.category-emoji-field,
.category-name-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #59677c;
  font-size: 11px;
  font-weight: 750;
}

.category-emoji-select,
.category-name-field input,
.subcategory-settings-row input {
  width: 100%;
  min-width: 0;
  height: 43px;
  border: 1px solid #d9e0ea;
  border-radius: 11px;
  outline: none;
  color: #263247;
  background: #fff;
}

.category-emoji-select {
  padding: 5px 9px;
  font-size: 22px;
  text-align: center;
}

.category-name-field input,
.subcategory-settings-row input {
  padding: 9px 12px;
  font-size: 14px;
  font-weight: 700;
}

.category-emoji-select:focus,
.category-name-field input:focus,
.subcategory-settings-row input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent,rgb(40 100 215)) 12%, transparent);
}

.category-remove-button,
.subcategory-remove-button,
.subcategory-move-button {
  min-height: 36px;
  padding: 6px 9px;
  border: 0;
  border-radius: 9px;
  color: #9a5962;
  background: #fff2f3;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
}

.subcategory-move-button {
  color: #315f9e;
  background: #edf4ff;
}

.subcategory-keywords-button {
  min-height: 36px;
  padding: 6px 9px;
  border: 0;
  border-radius: 9px;
  background: #eaf5ee;
  color: #2d7053;
  font: inherit;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
}

.subcategory-keywords-button:disabled { cursor: not-allowed; opacity: 0.45; }
.subcategory-keywords-dialog[hidden] { display: none; }
.subcategory-keywords-dialog {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  padding: 24px;
  place-items: center;
}
.subcategory-keywords-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(680px, 100%);
  max-height: calc(100dvh - 48px);
  overflow: hidden;
  border: 1px solid #dce7e0;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 80px color-mix(in srgb, var(--theme-shadow-ink,rgb(15 40 28)) 20%, transparent);
}
.subcategory-keywords-header {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid #edf1ee;
}
.subcategory-keywords-header h3 { margin: 3px 0 8px; font-size: 22px; overflow-wrap: anywhere; }
.subcategory-keywords-header p:last-child { margin: 0; color: #6d7b73; font-size: 12px; }
.subcategory-keywords-scroll { min-height: 0; overflow-y: auto; padding: 18px 24px 24px; overscroll-behavior: contain; }
.subcategory-keywords-guide { margin: 0 0 18px; color: #54665c; font-size: 13px; line-height: 1.7; }
.subcategory-keywords-form { padding: 16px; border: 1px solid #dce9df; border-radius: 14px; background: #f6faf7; }
.subcategory-keywords-form > label { display: block; margin-bottom: 9px; font-size: 13px; font-weight: 750; }
.subcategory-keywords-form textarea,
.subcategory-keywords-search input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid #d3dfd7;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  color: #26372d;
  font: inherit;
  font-size: 16px;
}
.subcategory-keywords-form textarea { min-height: 80px; resize: vertical; }
.subcategory-keywords-form > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 9px; }
.subcategory-keywords-form > div > span { color: #738077; font-size: 11px; }
.subcategory-keywords-add { min-height: 38px; padding: 7px 18px; border: 0; border-radius: 9px; color: #fff; background: #337557; font: inherit; font-size: 13px; font-weight: 750; cursor: pointer; }
.subcategory-keywords-search { display: block; margin: 22px 0 20px; }
.subcategory-keywords-search > span { display: block; margin-bottom: 8px; color: #5b6b60; font-size: 12px; font-weight: 700; }
.subcategory-keywords-group + .subcategory-keywords-group { margin-top: 24px; padding-top: 22px; border-top: 1px solid #edf1ee; }
.subcategory-keywords-group h4 { display: flex; align-items: center; gap: 9px; margin: 0 0 11px; font-size: 14px; }
.subcategory-keywords-group h4 > span { color: #708078; font-size: 12px; font-weight: 500; }
.subcategory-keywords-disclosure > summary { display: flex; align-items: center; gap: 9px; min-height: 44px; color: #364b3d; font-size: 14px; font-weight: 700; cursor: pointer; list-style: none; }
.subcategory-keywords-disclosure > summary::-webkit-details-marker { display: none; }
.subcategory-keywords-disclosure > summary > span { color: #708078; font-size: 12px; font-weight: 500; }
.subcategory-keywords-disclosure-hint { margin-left: auto; }
.subcategory-keywords-disclosure-hint::after { content: "펼치기 ＋"; }
.subcategory-keywords-disclosure[open] > summary { margin-bottom: 11px; }
.subcategory-keywords-disclosure[open] > summary .subcategory-keywords-disclosure-hint::after { content: "접기 −"; }
.subcategory-keywords-disclosure > summary:focus-visible { outline: 2px solid var(--theme-accent,#337557); outline-offset: 3px; border-radius: 5px; }
.subcategory-keywords-group > p { margin: 0 0 13px; color: #788179; font-size: 12px; line-height: 1.6; }
.subcategory-keywords-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.subcategory-keyword-chip { display: inline-flex; align-items: center; max-width: 100%; border: 1px solid #e4e9e5; border-radius: 9px; padding: 6px 10px; color: #55655a; background: #f7f9f7; font-size: 12px; line-height: 1.4; }
.subcategory-keyword-chip > span { min-width: 0; overflow-wrap: anywhere; }
.subcategory-keyword-chip.is-custom { padding: 0 0 0 10px; border-color: #c5dfcc; color: #306342; background: #edf6ef; }
.subcategory-keyword-chip button { flex: 0 0 auto; min-width: 34px; min-height: 34px; border: 0; background: transparent; color: #477656; font-size: 18px; cursor: pointer; }
.subcategory-keywords-empty { margin: 0; color: #849087; font-size: 12px; line-height: 1.6; }
.subcategory-keywords-footer { flex: 0 0 auto; padding: 15px 24px 18px; border-top: 1px solid #e7eee9; background: #fff; }
.subcategory-keywords-footer > p { margin: 0 0 12px; color: #7b877f; font-size: 11px; line-height: 1.6; }
.subcategory-keywords-footer > div { display: flex; justify-content: flex-end; gap: 8px; }
.subcategory-keywords-footer button { min-height: 42px; width: auto; margin: 0; padding: 9px 20px; border: 1px solid #dce4df; border-radius: 11px; background: #fff; color: #566b5d; font: inherit; font-size: 13px; font-weight: 750; cursor: pointer; }
.subcategory-keywords-footer button.primary-button { border-color: #337557; color: #fff; background: #337557; }
@container kkaebu (max-width: 599px){
  .subcategory-keywords-dialog { padding: 12px; }
  .subcategory-keywords-panel { max-height: calc(100dvh - 24px); border-radius: 18px; }
  .subcategory-keywords-header { padding: 17px 16px 14px; }
  .subcategory-keywords-header h3 { font-size: 19px; }
  .subcategory-keywords-scroll { padding: 16px; }
  .subcategory-keywords-form { padding: 13px; }
  .subcategory-keywords-footer { padding: 13px 16px; }
  .subcategory-keywords-footer > div > button { flex: 1; }
}

.category-remove-button:disabled,
.subcategory-remove-button:disabled,
.subcategory-move-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.subcategory-settings-panel {
  margin-top: 15px;
  border-top: 1px solid #edf0f5;
}

.subcategory-settings-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 12px;
  gap: 8px;
  min-height: 40px;
  padding: 12px 4px 0;
  align-items: center;
  border-radius: 9px;
  list-style: none;
  cursor: pointer;
}

.subcategory-settings-summary::-webkit-details-marker {
  display: none;
}

.subcategory-settings-summary:hover,
.subcategory-settings-summary:focus-visible {
  color: var(--blue);
  outline: none;
}

.subcategory-settings-summary strong {
  color: #405069;
  font-size: 13px;
}

.subcategory-settings-summary:hover strong,
.subcategory-settings-summary:focus-visible strong {
  color: var(--blue);
}

.subcategory-settings-count {
  padding: 3px 7px;
  border-radius: 999px;
  color: #8792a3;
  background: #f1f4f8;
  font-size: 11px;
  font-weight: 700;
}

.subcategory-settings-arrow {
  width: 8px;
  height: 8px;
  border-right: 2px solid #77849a;
  border-bottom: 2px solid #77849a;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 150ms ease;
}

.subcategory-settings-panel[open] .subcategory-settings-arrow {
  transform: translateY(2px) rotate(225deg);
}

.subcategory-settings-body {
  padding-top: 10px;
}

.subcategory-settings-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.subcategory-settings-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
}

.subcategory-settings-row input {
  height: 38px;
  padding: 7px 10px;
  background: #f7f9fc;
  font-size: 12px;
}

.subcategory-settings-row-actions {
  display: flex;
  gap: 5px;
}

.subcategory-move-dialog[hidden] {
  display: none;
}

.subcategory-move-dialog {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  padding: 20px;
  place-items: center;
}

.subcategory-move-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgb(15 23 42 / 48%);
  cursor: default;
}

.subcategory-move-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  padding: 22px;
  border: 1px solid rgb(255 255 255 / 70%);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px color-mix(in srgb, var(--theme-shadow-ink,rgb(24 39 75)) 28%, transparent);
}

.subcategory-move-panel h3 {
  margin: 3px 0 8px;
  color: #263247;
  font-size: 20px;
}

.subcategory-move-panel > p:not(.eyebrow) {
  margin: 0 0 17px;
  color: #69758a;
  font-size: 13px;
  line-height: 1.55;
}

.subcategory-move-field {
  display: grid;
  gap: 7px;
  color: #526177;
  font-size: 12px;
  font-weight: 800;
}

.subcategory-move-field select {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #d6deea;
  border-radius: 11px;
  color: #263247;
  background: #fff;
  font: inherit;
}

.subcategory-move-mobile-options {
  display: none;
}

.subcategory-move-actions {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 8px;
  margin-top: 18px;
}

.subcategory-move-actions button {
  min-height: 42px;
  margin: 0;
  border: 0;
  border-radius: 11px;
  font-weight: 800;
  cursor: pointer;
}

.subcategory-move-actions button:first-child {
  color: #59677c;
  background: #eef1f5;
}

.subcategory-add-button,
.category-add-button {
  min-height: 38px;
  border: 1px dashed #b9c8dd;
  border-radius: 10px;
  color: #42699f;
  background: #f5f8fc;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.subcategory-add-button {
  width: 100%;
  margin-top: 8px;
}

.category-settings-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 9px;
  margin-top: 14px;
}

.category-settings-actions .primary-button {
  margin-top: 0;
}

.category-settings-dialog-actions {
  flex: 0 0 auto;
  margin-top: 0;
  padding: 15px 18px;
  border-top: 1px solid #e2e7ef;
  background: #fff;
}

.settings-dialog-single-action {
  grid-template-columns: 1fr;
}

.settings-dialog-single-action .primary-button {
  width: 100%;
  max-width: none;
}

.deleted-expenses-section {
  margin-bottom: 18px;
}

.deleted-expenses-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 13px;
  padding: 13px 15px;
  border: 1px solid #ead9dc;
  border-radius: 13px;
  color: #705d62;
  background: #fff6f7;
  font-size: 12px;
  line-height: 1.55;
}

.deleted-expenses-note p {
  margin: 0;
}

.deleted-expenses-status {
  margin-bottom: 12px;
}

.deleted-expenses-list {
  display: grid;
  gap: 9px;
}

.deleted-expense-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
}

.deleted-expense-content {
  min-width: 0;
}

.deleted-expense-labels,
.deleted-expense-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.deleted-expense-labels {
  margin-bottom: 7px;
}

.deleted-expense-source,
.deleted-expense-expiry {
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}

.deleted-expense-source {
  color: #52647c;
  background: #edf1f6;
}

.deleted-expense-expiry {
  color: #a34853;
  background: #fff0f2;
}

.deleted-expense-content > strong {
  display: block;
  overflow: hidden;
  margin-bottom: 7px;
  color: #253249;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deleted-expense-meta {
  color: #6e7b8f;
  font-size: 11px;
  font-weight: 650;
}

.deleted-expense-meta span:not(:last-child)::after {
  margin-left: 7px;
  color: #c2cad5;
  content: "·";
}

.deleted-expense-memo {
  display: block;
  margin-top: 7px;
  overflow: hidden;
  color: #8792a3;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deleted-expense-restore {
  min-width: 64px;
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid #c9d8ee;
  border-radius: 10px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.deleted-expense-restore:hover,
.deleted-expense-restore:focus-visible {
  color: #fff;
  background: var(--blue);
}

.deleted-expense-restore:disabled {
  cursor: wait;
  opacity: 0.6;
}

.deleted-expenses-empty {
  padding: 30px 18px;
  text-align: center;
}

.deleted-expenses-empty span {
  display: inline-grid;
  width: 38px;
  height: 38px;
  margin-bottom: 10px;
  place-items: center;
  border-radius: 12px;
  color: var(--success);
  background: var(--success-soft);
  font-weight: 850;
}

.deleted-expenses-empty strong {
  display: block;
  font-size: 14px;
}

@container kkaebu (min-width: 600px){
  .page-shell {
    padding-top: 34px;
  }

  .user-form-card {
    padding: 27px 27px 22px;
  }

  .expense-form-card {
    padding: 27px 27px 22px;
  }

  .expense-fields {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 2.2fr);
    gap: 13px;
  }

}

@container kkaebu (max-width: 599px){
  .mobile-hidden {
    display: none !important;
  }

  .compact-page {
    padding-top: max(14px, env(safe-area-inset-top));
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }

  .compact-page .app-header {
    margin-bottom: 16px;
  }

  .compact-page .expense-intro {
    margin-bottom: 14px;
  }

  .compact-page .expense-intro h1 {
    font-size: clamp(20px, 6cqw, 24px);
    white-space: nowrap;
  }

  .compact-page .eyebrow {
    margin-bottom: 6px;
  }

  .compact-page .intro-copy {
    margin-top: 8px;
    line-height: 1.45;
  }

  .compact-page .expense-form-card {
    padding: 14px;
  }

  .compact-page .field-group {
    margin-bottom: 12px;
  }

  .compact-page .expense-suggestions-panel--inline .expense-description-suggestions {
    max-height: min(112px, 18svh);
  }

  .compact-page .expense-form-card input {
    height: 50px;
  }

  .compact-page .primary-button {
    min-height: 50px;
    margin-top: 2px;
  }

  .compact-page .entry-title-row {
    gap: 5px;
  }

  .compact-page .entry-type-toggle {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    margin-bottom: 2px;
    border-radius: 8px;
    font-size: 21px;
  }

  .app-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px 14px;
    align-items: center;
  }

  .nav-menu-button {
    position: relative;
    display: inline-flex;
    width: 40px;
    height: 40px;
    padding: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    border: 1px solid #dce3ed;
    border-radius: 11px;
    color: var(--navy);
    background: #fff;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--theme-accent,rgb(27 47 79)) 8%, transparent);
    cursor: pointer;
  }

  .nav-menu-button:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--theme-accent,rgb(40 100 215)) 18%, transparent);
    outline-offset: 2px;
  }

  .nav-menu-button .nav-menu-line {
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentcolor;
    transition:
      opacity 140ms ease,
      transform 140ms ease;
  }

  .app-header.nav-menu-open .nav-menu-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .app-header.nav-menu-open .nav-menu-line:nth-child(2) {
    opacity: 0;
  }

  .app-header.nav-menu-open .nav-menu-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .nav-menu-review-count {
    position: absolute;
    top: -7px;
    right: -7px;
    display: inline-grid;
    min-width: 20px;
    height: 20px;
    padding: 0 4px;
    place-items: center;
    border: 2px solid #f5f7fb;
    border-radius: 999px;
    color: #fff;
    background: #e65065;
    box-shadow: 0 2px 5px color-mix(in srgb, var(--theme-danger,rgb(129 33 52)) 22%, transparent);
    font-size: 10px;
    font-weight: 850;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    pointer-events: none;
  }

  .nav-menu-review-count[hidden],
  .app-header.nav-menu-open .nav-menu-review-count {
    display: none;
  }

  .app-confirm-dialog {
    width: calc(100cqw - 24px);
    border-radius: 16px;
  }

  .app-confirm-shell {
    padding: 18px;
  }

  .category-settings-launch-card {
    align-items: stretch;
    flex-direction: column;
  }

  .category-settings-launch-button {
    width: 100%;
  }

  .category-settings-dialog {
    width: calc(100cqw - 20px);
    max-height: calc(100svh - 20px);
    border-radius: 16px;
  }

  .category-settings-dialog-shell {
    max-height: calc(100svh - 20px);
  }

  .category-settings-dialog-header {
    padding: 16px;
  }

  .category-settings-dialog-scroll {
    padding: 14px;
  }

  .category-settings-dialog-actions {
    padding: 13px 14px;
  }

  .app-nav {
    position: absolute;
    z-index: 1;
    top: calc(100% + 4px);
    right: 0;
    left: 0;
    width: 100%;
    padding: 8px;
    flex-wrap: wrap;
    border: 1px solid rgb(207 216 229 / 78%);
    border-radius: 14px;
    background: rgb(233 237 244 / 96%);
    box-shadow: 0 14px 34px color-mix(in srgb, var(--theme-shadow-ink,rgb(22 40 69)) 16%, transparent);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    transform-origin: top center;
    transition:
      opacity 150ms ease,
      transform 150ms ease,
      visibility 150ms ease;
  }

  .app-header.nav-menu-ready .app-nav {
    display: flex;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px) scale(0.985);
  }

  .app-header.nav-menu-ready.nav-menu-open .app-nav {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }

  .nav-link {
    flex: 1 1 calc(33.333% - 3px);
    padding-inline: 5px;
    text-align: center;
  }

  .nav-link.active {
    background: rgb(255 255 255 / 96%);
  }

  .category-settings-card-header {
    grid-template-columns: 72px minmax(0, 1fr) auto;
  }

  .category-remove-button {
    min-height: 43px;
    align-self: end;
    justify-self: stretch;
  }

  .subcategory-settings-list {
    grid-template-columns: 1fr;
  }

  .subcategory-move-dialog {
    padding: 0;
    place-items: end center;
  }

  .subcategory-move-panel {
    width: 100%;
    padding: 21px 18px calc(18px + env(safe-area-inset-bottom));
    border-radius: 20px 20px 0 0;
  }

  .subcategory-move-field select {
    display: none;
  }

  .subcategory-move-mobile-options {
    display: grid;
    max-height: 270px;
    max-height: min(34dvh, 270px);
    gap: 6px;
    margin-top: 8px;
    padding: 2px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .subcategory-move-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 52px;
    padding: 11px 14px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #344258;
    background: #f5f7fa;
    font: inherit;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
  }

  .subcategory-move-option.selected {
    border-color: var(--theme-accent,#2f6fde);
    color: #1e56b6;
    background: #edf4ff;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent,rgb(47 111 222)) 10%, transparent);
  }

  .subcategory-move-option-check {
    margin-left: 12px;
    color: #1e56b6;
    font-size: 20px;
    line-height: 1;
  }

  .analytics-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytics-filter-panel > summary {
    min-height: 58px;
    padding: 10px 12px;
  }

  .analytics-filter-summary-copy > strong {
    font-size: 12px;
  }

  .analytics-filter-toggle {
    min-height: 32px;
    padding-inline: 10px;
  }

  .analytics-filters .records-filter-reset {
    grid-column: 1 / -1;
  }

  .analytics-spending-basis-row {
    align-items: stretch;
    flex-direction: column;
  }

  .analytics-spending-basis-toggle {
    width: 100%;
  }

  .analytics-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytics-breakdown-heading {
    gap: 12px;
    align-items: center;
    flex-direction: row;
  }

  .analytics-breakdown-toggle {
    width: auto;
  }

  .analytics-chart-card,
  .analytics-breakdown-card,
  .analytics-monthly-card {
    padding: 16px;
  }

  .analytics-card-heading.trend-card-heading {
    gap: 12px;
    align-items: stretch;
    flex-direction: column;
  }

  .trend-chart-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .analytics-view-toggle {
    flex: 1 1 210px;
  }

  .analytics-view-toggle.analytics-breakdown-toggle {
    width: auto;
    flex: 0 0 auto;
  }

  .analytics-heading-value {
    align-self: center;
  }

  .family-learning-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .family-learning-section-heading {
    gap: 9px;
  }

  .learning-pattern-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .analytics-chart {
    min-width: 0;
    overflow-x: hidden;
  }

  .analytics-chart svg {
    width: 100%;
    min-width: 0 !important;
    max-width: 100%;
  }

  .analytics-monthly-heading {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
  }

  .analytics-monthly-heading h2 {
    font-size: 17px;
    white-space: nowrap;
  }

  .analytics-monthly-navigation {
    width: auto;
    flex: 0 0 auto;
    grid-template-columns: 28px minmax(76px, auto) 28px;
    gap: 2px;
    padding: 2px;
  }

  .analytics-monthly-navigation button {
    width: 28px;
    height: 28px;
  }

  .analytics-monthly-card-view {
    min-height: 250px;
    padding: 13px;
  }

  .analytics-monthly-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .analytics-monthly-metric {
    min-height: 68px;
    padding: 10px;
  }

  .analytics-monthly-metric > strong:not(.analytics-target-badge) {
    font-size: 12px;
  }

  .analytics-monthly-swipe-hint {
    display: block;
  }

  .analytics-monthly-metric .analytics-target-badge {
    width: fit-content;
    max-width: 100%;
    white-space: normal;
  }

  .records-table th,
  .records-table td {
    padding: 12px 6px;
    vertical-align: top;
  }

  .records-table-wrap {
    overflow-x: hidden;
  }

  .records-table {
    min-width: 0;
  }

  .records-table th:nth-child(1) {
    width: 16%;
    padding-left: 10px;
  }

  #records-table .records-date-heading {
    width: 136px;
  }

  #records-table {
    table-layout: auto;
  }

  #records-table #records-description-heading {
    width: auto;
  }

  #records-table .records-details {
    max-width: 0;
  }

  #records-table #records-cost-heading {
    width: 24%;
  }

  #records-table .records-search-panel {
    grid-template-columns: minmax(0, 1fr);
    padding-inline: 6px;
  }

  #records-table .records-search-panel > .records-search-icon {
    display: none;
  }

  .records-table th:nth-child(2) {
    width: 52%;
  }

  .records-table th:nth-child(3) {
    width: 32%;
    padding-right: 10px;
  }

  .records-category-heading,
  .records-detail-heading,
  .records-category-cell,
  .records-detail-cell {
    display: none;
  }

  .records-date {
    padding-left: 10px !important;
    color: #6f7c90;
    font-size: 11px;
  }

  .records-details {
    padding-right: 4px !important;
    padding-left: 4px !important;
    font-size: 13px;
    line-height: 1.35;
  }

  .records-cost {
    padding-right: 10px !important;
    padding-left: 4px !important;
    font-size: 13px;
  }

  .records-mobile-classification {
    display: flex;
    gap: 4px;
    margin-top: 6px;
    align-items: center;
    flex-wrap: wrap;
  }

  .records-mobile-classification .records-category,
  .records-mobile-classification .records-detail-badge {
    min-height: 22px;
    padding: 3px 6px;
    font-size: 9.5px;
  }

  .records-mobile-classification .records-category {
    gap: 3px;
  }

  .records-mobile-classification .records-category-icon {
    font-size: 10px;
  }

  .records-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .records-filters[data-records-mode="income"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .records-filters[data-records-mode="income"] .records-filter-reset {
    grid-column: 1 / -1;
  }

  .records-filter-reset {
    width: 100%;
  }

  .record-editor-form {
    max-height: calc(100svh - 12px);
    padding: 14px;
  }

  .record-editor-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .record-editor-detail-cost-grid {
    grid-template-columns: 46px minmax(0, 1fr) minmax(118px, 0.82fr);
    gap: 8px;
  }

  .record-edit-date-field,
  .record-edit-date-field .app-calendar-control,
  .record-edit-date-field .app-control-trigger {
    width: 46px;
  }

  .record-edit-date-field .app-control-trigger {
    height: 46px;
    min-height: 46px;
    border-radius: 11px;
  }

  .record-editor-classification-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .record-editor {
    width: min(620px, calc(100% - 18px));
    max-height: calc(100svh - 12px);
    border-radius: 18px;
  }

  .record-editor-header {
    align-items: center;
  }

  .record-editor-header .eyebrow {
    display: none;
  }

  .record-editor-header h2 {
    font-size: 20px;
  }

  .record-editor-close {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 22px;
  }

  .record-editor-source-note {
    margin: 8px 0 10px;
    padding: 7px 9px;
    font-size: 11px;
    line-height: 1.4;
  }

  .record-editor .field-group {
    margin-bottom: 10px;
  }

  .record-editor .field-group > label {
    margin-bottom: 4px;
    font-size: 12px;
  }

  .record-editor input,
  .record-editor select {
    height: 46px;
    border-radius: 11px;
    font-size: 15px;
  }

  .record-editor .amount-input-wrap input {
    padding-right: 34px;
    font-size: 15px;
  }

  .record-editor .amount-unit {
    right: 11px;
    font-size: 12px;
  }

  .record-editor textarea {
    height: clamp(112px, 20svh, 150px);
    min-height: 112px;
    padding: 9px 11px;
    border-radius: 11px;
    font-size: 14px;
    line-height: 1.4;
    resize: vertical;
  }

  .record-editor-actions {
    align-items: stretch;
    display: grid;
    grid-template-columns: minmax(82px, 0.8fr) minmax(0, 2fr);
    gap: 8px;
    margin-top: 4px;
    padding-top: 10px;
  }

  .record-editor-main-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .record-delete-button {
    width: 100%;
  }

  .record-delete-button,
  .record-cancel-button,
  .record-save-button {
    min-height: 42px;
    padding: 8px 10px;
  }
}

/* Supabase authentication and family account management */
.auth-page-shell {
  display: grid;
  width: min(100% - 36px, 480px);
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 0 max(32px, env(safe-area-inset-bottom));
  align-content: center;
  gap: 24px;
}

.auth-brand {
  justify-self: center;
}

.auth-card {
  padding: 36px;
  text-align: center;
}

.auth-card h1 {
  margin: 8px 0 12px;
  font-size: clamp(25px, 6cqw, 34px);
  letter-spacing: -0.04em;
}

.auth-copy {
  margin: 0 auto 26px;
  color: var(--muted);
  line-height: 1.7;
}

.google-login-button,
.kakao-login-button,
.secondary-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 750;
}

.google-login-button {
  width: 100%;
  gap: 10px;
  box-shadow: 0 8px 22px rgb(21 33 56 / 7%);
}

.auth-provider-buttons {
  display: grid;
  gap: 10px;
}

.kakao-login-button {
  width: 100%;
  gap: 10px;
  border-color: #fee500;
  background: #fee500;
  color: #191919;
  box-shadow: 0 8px 22px rgb(63 53 0 / 10%);
}

.kakao-login-button:hover {
  border-color: #f2d900;
  background: #f2d900;
}

.google-login-button:hover,
.secondary-button:hover {
  border-color: #b8c7df;
  background: #f9fbff;
}

.google-login-button:disabled,
.kakao-login-button:disabled,
.secondary-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.google-mark {
  display: grid;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #2864d7;
  place-items: center;
  font-weight: 850;
}

.auth-back-link {
  display: inline-block;
  margin-top: 22px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-underline-offset: 3px;
}

.auth-callback-card {
  display: grid;
  justify-items: center;
}

.auth-loader {
  width: 34px;
  height: 34px;
  border: 3px solid #dbe5f6;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: auth-spin 0.8s linear infinite;
}

@keyframes auth-spin {
  to {
    transform: rotate(360deg);
  }
}

.compact-action {
  min-height: 40px;
  padding: 0 16px;
  white-space: nowrap;
}

.account-summary-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 30px 0 0;
  padding: 24px;
}

.account-summary-copy h2,
.family-name-panel h2,
.family-invite-panel h2 {
  margin: 4px 0 12px;
}

.account-name {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.account-email,
.section-supporting-copy {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.family-admin-layout {
  display: grid;
  gap: 16px;
  margin-top: 30px;
  margin-bottom: 18px;
}

.family-management-card {
  padding: 26px;
}

.family-name-panel .settings-card-copy {
  margin-bottom: 0;
}

.family-invite-panel {
  margin-top: 26px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.family-name-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin-top: 18px;
}

.family-name-form .field-group {
  margin: 0;
}

.family-name-form .primary-button {
  min-width: 120px;
}

.csv-import-card {
  padding: 26px;
}

.csv-import-card h2 {
  margin: 4px 0 8px;
}

.csv-format-rules {
  display: grid;
  gap: 6px;
  margin: 14px 0 20px;
  padding-left: 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.csv-import-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.csv-import-actions button {
  min-width: 180px;
  flex: 1;
}

.csv-validation-panel {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f9fafc;
}

.csv-file-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.csv-file-heading strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.csv-error-list {
  display: grid;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.csv-error-list li {
  padding: 9px 11px;
  border-radius: 10px;
  color: var(--danger);
  background: var(--danger-soft);
  font-size: 13px;
  line-height: 1.45;
}

.csv-preview-title {
  margin: 16px 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.csv-preview-list {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.csv-preview-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 12px;
  padding: 11px 12px;
  border: 1px solid #e3e8f1;
  border-radius: 12px;
  background: #fff;
}

.csv-preview-item strong,
.csv-preview-category {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.csv-preview-amount {
  font-weight: 800;
}

.csv-preview-meta,
.csv-preview-category {
  color: var(--muted);
  font-size: 12px;
}

.csv-validation-panel > .primary-button {
  width: 100%;
}

#import-csv-button[aria-busy="true"],
#select-csv-button[aria-busy="true"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

#import-csv-button[aria-busy="true"]::before,
#select-csv-button[aria-busy="true"]::before {
  width: 15px;
  height: 15px;
  border: 2px solid currentcolor;
  border-right-color: transparent;
  border-radius: 999px;
  animation: spin 700ms linear infinite;
  content: "";
}

.family-invite-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.34fr);
  gap: 16px;
  margin: 22px 0 4px;
}

.family-role-field .app-control,
.family-role-field select {
  width: 100%;
}

.invite-result {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #cddaf1;
  border-radius: 16px;
  background: var(--blue-soft);
}

.invite-result > label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 750;
}

.invite-link-row {
  display: flex;
  gap: 8px;
}

.invite-link-row input {
  min-width: 0;
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
}

.invite-result > p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.settings-menu-meta {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.settings-pending-badge {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: #d34a52;
  box-shadow: 0 3px 9px color-mix(in srgb, var(--theme-danger,rgb(191 46 57)) 24%, transparent);
  font-size: 11px;
  font-weight: 850;
}

.family-request-help {
  margin: -4px 2px 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.family-join-request-item {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.verified-account-badge {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  color: #17643a;
  background: #e7f6ed;
  font-size: 10px;
  font-weight: 850;
}

.family-request-time {
  margin-top: 3px;
  color: #8a95a6;
  font-size: 11px;
}

.family-request-actions,
.join-code-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.family-request-actions .primary-button,
.family-request-actions .secondary-button {
  width: auto;
  min-height: 38px;
  margin: 0;
  padding: 8px 14px;
  border-radius: 11px;
  font-size: 12px;
}

.family-request-empty {
  padding: 18px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.family-join-code-panel > .primary-button {
  width: auto;
  min-height: 44px;
  margin-top: 18px;
  padding-inline: 20px;
  font-size: 14px;
}

.join-code-result {
  display: grid;
  gap: 13px;
  margin-top: 16px;
  padding: 17px;
  border: 1px solid #c9daf3;
  border-radius: 16px;
  background: #f2f7ff;
}

.join-code-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.join-code-heading > span,
.join-code-result label {
  color: #63738f;
  font-size: 12px;
  font-weight: 750;
}

.join-code-heading strong {
  color: var(--navy);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 23px;
  letter-spacing: 0.12em;
}

.join-code-result > p {
  margin: -5px 0 0;
  color: #607089;
  font-size: 12px;
}

.join-code-share-area {
  display: grid;
  gap: 8px;
}

.join-code-share-area input {
  height: 44px;
  background: #fff;
  font-size: 13px;
}

.join-code-actions .secondary-button {
  min-height: 38px;
  padding: 7px 12px;
  border-radius: 11px;
  font-size: 12px;
}

.text-danger-button {
  width: max-content;
  min-height: 34px;
  padding: 6px 2px;
  border: 0;
  color: var(--danger);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.family-code-auth-card {
  text-align: left;
}

.family-invite-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid #dce9e3;
  border-radius: 14px;
  background: #fff;
}

.family-invite-preview img { flex: 0 0 48px; border-radius: 12px; }
.family-invite-preview div { min-width: 0; word-break: keep-all; }
.family-invite-preview strong { display: block; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.family-invite-preview p { margin: 6px 0 0; color: #63736d; font-size: 13px; line-height: 1.5; }

.family-kakao-share-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid #e8cf00;
  border-radius: 12px;
  background: #fee500;
  color: #191919;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.family-kakao-share-button:hover { background: #f4dc00; }
.family-kakao-share-button:focus-visible { outline: 3px solid var(--theme-accent,#287f6d); outline-offset: 3px; }
.family-kakao-share-button:disabled { opacity: .6; cursor: wait; }
.family-invite-share-help { margin: 10px 0 16px; color: #63736d; font-size: 13px; line-height: 1.6; }
.family-join-code-panel .join-code-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.family-join-code-panel .join-code-actions .secondary-button:last-child { grid-column: auto; }
.family-invite-message-details { margin: 16px 0; }
.family-invite-message-details summary { color: #49675b; font-size: 13px; cursor: pointer; }
.family-invite-message-details label { display: block; margin: 14px 0 6px; }
.family-invite-message-details textarea {
  display: block;
  width: 100%;
  padding: 12px;
  border: 1px solid #cddad4;
  border-radius: 10px;
  background: #fff;
  color: #263a32;
  font: inherit;
  font-size: 13px;
  line-height: 1.7;
  resize: vertical;
}

.family-invite-steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin: 18px 0 22px;
  padding: 0;
  list-style: none;
  color: #49675b;
  font-size: 13px;
}

.family-invite-steps li { display: flex; align-items: center; gap: 6px; }
.family-invite-steps span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e8f1ec;
  font-weight: 700;
}

.family-code-auth-card > .eyebrow,
.family-code-auth-card > h1,
.family-code-auth-card > .auth-copy,
.family-code-auth-card > .auth-back-link {
  text-align: center;
}

.family-code-auth-card > .auth-back-link {
  width: max-content;
  margin-inline: auto;
}

.family-code-form {
  display: grid;
  gap: 8px;
}

.family-code-form > label {
  color: #334056;
  font-size: 13px;
  font-weight: 800;
}

.family-code-form input {
  height: 58px;
  border: 1px solid #cdd7e7;
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.family-code-help {
  margin: 0 2px;
  color: var(--muted);
  font-size: 11px;
}

.family-code-form .field-error {
  margin-top: 0;
}

.family-code-form .primary-button {
  margin-top: 8px;
}

.family-code-security-note {
  margin: -8px 0 18px;
  padding: 12px 13px;
  border: 1px solid #cfe0f7;
  border-radius: 12px;
  color: #24466f;
  background: #f2f7fd;
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
}

.auth-copy.success-text {
  color: #17643a;
}

.my-join-requests {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.my-join-requests h2 {
  margin: 0 0 10px;
  font-size: 15px;
}

#my-join-requests-list {
  display: grid;
  gap: 8px;
}

.my-join-request {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  background: #f5f7fa;
}

.my-join-request > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.my-join-request strong,
.my-join-request span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-join-request strong {
  font-size: 13px;
}

.my-join-request > div span {
  color: var(--muted);
  font-size: 10px;
}

.my-join-status-badge {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  color: #6b5523;
  background: #fff0c7;
  font-size: 10px;
  font-weight: 850;
}

.my-join-request.status-approved .my-join-status-badge {
  color: #17643a;
  background: #e7f6ed;
}

.my-join-request.status-declined .my-join-status-badge {
  color: var(--danger);
  background: var(--danger-soft);
}

.family-member-item,
.pending-invite-item {
  min-width: 0;
}

.family-member-copy {
  display: grid;
  min-width: 0;
  flex: 1;
}

.family-member-heading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.family-member-heading strong,
.family-member-copy > strong,
.family-member-copy .account-email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.family-role-badge {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  border-radius: 999px;
  padding: 0 8px;
  background: #eef1f6;
  color: #566277;
  font-size: 11px;
  font-weight: 800;
}

.family-role-badge.role-owner,
.family-role-badge.role-admin {
  background: var(--blue-soft);
  color: var(--navy);
}

.review-login-button {
  width: auto;
  margin-top: 6px;
  padding-inline: 24px;
  text-decoration: none;
}

@container kkaebu (max-width: 599px){
  .auth-card {
    padding: 28px 20px;
  }

  .account-summary-card {
    align-items: flex-start;
    padding: 20px;
  }

  .family-management-card {
    padding: 20px;
  }

  .family-invite-panel {
    margin-top: 22px;
    padding-top: 22px;
  }

  .family-name-form {
    grid-template-columns: 1fr;
  }

  .family-name-form .primary-button {
    width: 100%;
  }

  .csv-import-card {
    padding: 20px;
  }

  .csv-import-actions {
    flex-direction: column;
  }

  .csv-import-actions button {
    width: 100%;
    min-width: 0;
  }

  .family-invite-fields {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .family-role-field {
    margin-bottom: 12px;
  }

  .invite-link-row {
    align-items: stretch;
    flex-direction: column;
  }

  .invite-link-row input {
    min-height: 44px;
  }

  .pending-invite-item,
  .family-member-item,
  .family-join-request-item {
    gap: 10px;
  }

  .family-join-request-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .family-request-actions {
    grid-column: 1 / -1;
    width: 100%;
  }

  .family-request-actions button {
    flex: 1;
  }

  .family-join-code-panel > .primary-button {
    width: 100%;
  }

  .join-code-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .join-code-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .join-code-actions .secondary-button:last-child {
    grid-column: 1 / -1;
  }
}

@container kkaebu (min-width: 720px){
  .page-shell {
    max-width: 1040px;
  }
}

@container kkaebu (max-width: 340px){
  .page-shell {
    padding-right: max(14px, env(safe-area-inset-right));
    padding-left: max(14px, env(safe-area-inset-left));
  }

  .category-settings-card {
    padding: 14px;
  }

  .category-settings-card-header {
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 7px;
  }

  .category-remove-button {
    padding-inline: 6px;
    font-size: 10px;
  }

  .app-header {
    align-items: stretch;
  }

  .brand {
    margin-top: 3px;
  }

  .nav-link {
    padding-right: 3px;
    padding-left: 3px;
    font-size: 10.5px;
  }

  .records-filters {
    grid-template-columns: 1fr;
  }

  .records-filters[data-records-mode="income"] {
    grid-template-columns: 1fr;
  }

  .records-filters[data-records-mode="income"] .records-filter-reset {
    grid-column: auto;
  }

  .analytics-filters,
  .analytics-kpis {
    grid-template-columns: 1fr;
  }

  .transaction-item {
    gap: 8px;
    margin-inline: 13px;
  }

  .amount {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce){
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Shared dropdown and calendar controls */
:root {
  --control-line: #d9e0ea;
  --control-text: #263247;
  --control-muted: #8b95a4;
  --control-hover: #f3f6fb;
  --control-selected: #edf3ff;
  --control-shadow: 0 16px 38px rgb(24 39 67 / 18%);
}

select.app-native-control,
input.app-native-control {
  position: absolute !important;
  width: 1px !important;
  min-width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  opacity: 0 !important;
  clip-path: inset(50%) !important;
  pointer-events: none !important;
}

.app-control-host > .select-arrow {
  display: none;
}

.app-control {
  position: relative;
  width: 100%;
  min-width: 0;
}

.app-control-trigger,
.analytics-multiselect > summary {
  position: relative;
  display: flex;
  width: 100%;
  min-width: 0;
  height: 54px;
  padding: 0 42px 0 14px;
  align-items: center;
  border: 1px solid var(--control-line);
  border-radius: 13px;
  outline: none;
  color: var(--control-text);
  background: #fff;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease;
}

.app-control-trigger:hover,
.analytics-multiselect > summary:hover {
  border-color: var(--theme-accent,#c7d1df);
  background: #fcfdff;
}

.app-control-trigger:focus-visible,
.app-control.is-open .app-control-trigger,
.app-control-trigger[aria-invalid="true"],
.analytics-multiselect[open] > summary,
.analytics-multiselect > summary:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent,rgb(40 100 215)) 12%, transparent);
}

.app-control-trigger:disabled {
  color: var(--control-muted);
  background: #f3f5f8;
  cursor: not-allowed;
}

.app-control-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-control-trigger.is-placeholder .app-control-value {
  color: var(--control-muted);
}

.app-control-arrow,
.app-calendar-icon {
  position: absolute;
  right: 16px;
  flex: 0 0 auto;
  pointer-events: none;
}

.app-control-arrow {
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid #667288;
  border-bottom: 2px solid #667288;
  transform: translateY(-70%) rotate(45deg);
  transition: transform 140ms ease;
}

.app-control.is-open .app-control-arrow {
  transform: translateY(-25%) rotate(225deg);
}

.app-calendar-icon {
  top: 50%;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
}

.app-calendar-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: #667288;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.records-filter-field .app-control-trigger,
.records-filter-field .records-multiselect-trigger,
.analytics-filter-field .app-control-trigger,
.analytics-multiselect > summary {
  height: 44px;
  padding-right: 38px;
  padding-left: 11px;
  border-radius: 11px;
  font-size: 13px;
}

.analytics-filter-field .app-control-trigger,
.analytics-multiselect > summary {
  font-size: 12px;
}

.app-control--emoji .app-control-trigger {
  height: 43px;
  padding: 5px 34px 5px 9px;
  border-radius: 11px;
  font-size: 22px;
  justify-content: center;
}

.app-control--emoji .app-control-arrow {
  right: 11px;
}

.app-floating-panel,
.analytics-multiselect-panel {
  border: 1px solid #dfe5ee;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--control-shadow);
}

.app-floating-panel {
  position: fixed;
  z-index: 1200;
  max-height: min(370px, calc(100vh - 24px));
  padding: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

dialog .app-floating-panel {
  z-index: 10;
}

.app-dropdown-group {
  padding: 9px 10px 5px;
  color: #8994a5;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.app-dropdown-option {
  display: flex;
  width: 100%;
  min-height: 38px;
  padding: 8px 9px 8px 11px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  border-radius: 9px;
  color: #35435a;
  background: transparent;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.app-dropdown-option:hover,
.app-dropdown-option:focus-visible {
  outline: none;
  color: var(--navy);
  background: var(--control-hover);
}

.app-dropdown-option[aria-selected="true"] {
  color: var(--blue);
  background: var(--control-selected);
}

.app-dropdown-option:disabled {
  color: #a0a9b8;
  cursor: not-allowed;
}

.app-dropdown-check {
  flex: 0 0 auto;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  opacity: 0;
}

.app-dropdown-option[aria-selected="true"] .app-dropdown-check {
  opacity: 1;
}

.app-calendar-panel {
  padding: 12px;
  overflow-y: auto;
}

.app-calendar-header {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  gap: 6px;
  align-items: center;
  margin-bottom: 9px;
}

.app-calendar-header strong {
  color: var(--navy);
  font-size: 14px;
  font-weight: 850;
  text-align: center;
}

.app-calendar-heading-actions {
  display: flex;
  justify-content: center;
  gap: 2px;
}

.app-calendar-heading-button {
  min-height: 36px;
  padding: 0 5px;
  border: 0;
  border-radius: 8px;
  color: inherit;
  background: transparent;
  font: inherit;
  font-weight: inherit;
  cursor: pointer;
}

.app-calendar-heading-button:hover,
.app-calendar-heading-button:focus-visible {
  outline: none;
  color: var(--blue);
  background: var(--control-hover);
}

.app-calendar-nav {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 9px;
  color: #617089;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.app-calendar-nav:hover,
.app-calendar-nav:focus-visible {
  outline: none;
  color: var(--blue);
  background: var(--control-hover);
}

.app-calendar-weekdays,
.app-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
}

.app-calendar-weekdays {
  margin-bottom: 3px;
}

.app-calendar-weekdays span {
  display: grid;
  height: 24px;
  place-items: center;
  color: #8a95a7;
  font-size: 10px;
  font-weight: 800;
}

.app-calendar-day,
.app-month-option,
.app-year-option {
  border: 0;
  border-radius: 9px;
  color: #44536a;
  background: transparent;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.app-calendar-day {
  height: 34px;
  padding: 0;
}

.app-calendar-day:hover,
.app-calendar-day:focus-visible,
.app-month-option:hover,
.app-month-option:focus-visible,
.app-year-option:hover,
.app-year-option:focus-visible {
  outline: none;
  color: var(--blue);
  background: var(--control-hover);
}

.app-calendar-day.is-outside {
  color: #b7beca;
}

.app-calendar-day.is-today,
.app-month-option.is-current {
  box-shadow: inset 0 0 0 1px var(--theme-accent,#b9c9e8);
}

.app-calendar-day.is-selected,
.app-month-option.is-selected,
.app-year-option[aria-selected="true"] {
  color: #fff;
  background: var(--blue);
  box-shadow: none;
  font-weight: 850;
}

.app-calendar-day:disabled,
.app-month-option:disabled,
.app-year-option:disabled {
  color: #c8ced7;
  background: transparent;
  cursor: not-allowed;
}

.app-month-grid,
.app-year-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.app-month-option,
.app-year-option {
  min-height: 44px;
  padding: 8px;
}

.app-calendar-footer {
  display: flex;
  margin-top: 10px;
  padding-top: 10px;
  justify-content: flex-end;
  border-top: 1px solid #edf0f5;
}

.app-calendar-footer button {
  min-height: 32px;
  padding: 6px 11px;
  border: 0;
  border-radius: 9px;
  color: var(--blue);
  background: #eef3fc;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.app-calendar-footer button:hover,
.app-calendar-footer button:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--theme-accent,rgb(40 100 215)) 16%, transparent);
  background: #e4ecfa;
}

.app-calendar-footer button:disabled {
  color: #a0a9b8;
  background: #f3f5f8;
  cursor: not-allowed;
}

.analytics-multiselect-panel {
  z-index: 120;
  padding: 8px;
}

.analytics-filter-field .analytics-multiselect-option {
  min-height: 38px;
  padding: 8px 9px;
  border-radius: 9px;
  font-size: 12px;
}

.analytics-multiselect-option:hover {
  background: var(--control-hover);
}

@container kkaebu (max-width: 599px){
  .app-floating-panel {
    max-height: min(420px, calc(100vh - 24px));
  }

  .app-dropdown-option {
    min-height: 42px;
  }

  .brand {
    font-size: 17px;
  }

  h1 {
    font-size: clamp(20px, 6cqw, 24px);
  }

  .intro-copy {
    font-size: 14px;
  }

  .connection-section-heading h2 {
    font-size: 22px;
  }

  .field-group > label {
    font-size: 13px;
  }

  .primary-button {
    font-size: 15px;
  }

  .amount-input-wrap input {
    font-size: 18px;
  }

  .amount-unit {
    font-size: 14px;
  }

  .form-status {
    font-size: 13px;
  }

  .category-sheet-panel h2 {
    font-size: 20px;
  }

  .category-option,
  .category-sheet-close {
    font-size: 13px;
  }

  .app-confirm-body h2 {
    font-size: 17px;
  }

  .record-editor-header h2 {
    font-size: 21px;
  }

  .record-delete-button,
  .record-cancel-button,
  .record-save-button {
    font-size: 13px;
  }

  .review-empty-state strong,
  .expense-empty-state strong,
  .user-list-item strong,
  .users-empty-state strong {
    font-size: 15px;
  }

  .user-form-card h2,
  .analytics-card-heading h2,
  .category-settings-dialog-header h2 {
    font-size: 18px;
  }

  .analytics-kpi > strong {
    font-size: 17px;
  }

  .target-progress-summary > div strong {
    font-size: 16px;
  }

  .category-settings-launch-card strong,
  .deleted-expense-content > strong {
    font-size: 14px;
  }

  .field-group .app-control-trigger {
    font-size: 15px;
  }
}

/* Keep the all-records filters on one compact row at every viewport width. */
@container kkaebu (max-width: 599px){
  .records-filters,
  .records-filters[data-records-mode="income"] {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 54px;
    gap: 6px;
    align-items: center;
    padding: 10px;
  }

  .records-filters[data-records-mode="income"] {
    grid-template-columns: minmax(0, 1fr) 54px;
  }

  .records-filters[data-records-mode="income"] .records-filter-reset {
    grid-column: auto;
  }

  .records-filter-field .app-control-trigger,
  .records-filter-field .records-multiselect-trigger {
    height: 40px;
    padding-right: 25px;
    padding-left: 8px;
    font-size: 11px;
  }

  .records-filter-field .app-control-arrow {
    right: 10px;
    width: 7px;
    height: 7px;
  }

  .records-filter-reset {
    width: 100%;
    min-width: 0;
    height: 40px;
    padding-inline: 4px;
    font-size: 11px;
  }

  .records-multiselect-arrow {
    right: 10px;
    width: 7px;
    height: 7px;
  }

  .records-calendar-summary-item {
    padding: 3px 4px;
    flex-direction: column;
    gap: 0;
  }

  .records-calendar-summary-item strong {
    max-width: 100%;
    font-size: 10px;
  }

  .records-category-filter-dialog {
    width: calc(100% - 18px);
    max-height: calc(100dvh - 18px);
    margin: auto auto 9px;
    border-radius: 20px;
  }

  .records-category-filter-panel {
    max-height: calc(100dvh - 18px);
    padding: 17px 14px max(14px, env(safe-area-inset-bottom));
  }
}

@container kkaebu (max-width: 340px){
  .records-filters,
  .records-filters[data-records-mode="income"] {
    gap: 4px;
    padding: 8px;
  }

  .records-filters {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 46px;
  }

  .records-filters[data-records-mode="income"] {
    grid-template-columns: minmax(0, 1fr) 46px;
  }

  .records-filter-field .app-control-trigger,
  .records-filter-field .records-multiselect-trigger {
    padding-right: 20px;
    padding-left: 6px;
    font-size: 10px;
  }

  .records-filter-field .app-control-arrow {
    right: 8px;
  }

  .records-multiselect-arrow {
    right: 8px;
  }

  .records-filter-reset {
    font-size: 10px;
  }
}

/* Keep the mobile analysis content aligned with the page gutters. */
@container kkaebu (max-width: 599px){
  .page-shell.ai-insights-page {
    padding-right: max(10px, env(safe-area-inset-right));
    padding-left: max(10px, env(safe-area-inset-left));
  }
}

/* Expandable quick actions */
.quick-actions {
  position: fixed;
  z-index: 90;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.quick-actions-menu {
  width: min(280px, calc(100cqw - 36px));
  padding: 7px;
  border: 1px solid rgb(221 229 241 / 92%);
  border-radius: 18px;
  background: rgb(255 255 255 / 96%);
  box-shadow: 0 18px 48px color-mix(in srgb, var(--theme-shadow-ink,rgb(24 39 67)) 22%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  backdrop-filter: blur(16px) saturate(120%);
  transform-origin: bottom right;
  animation: quick-actions-enter 150ms ease-out;
}

.quick-actions-menu[hidden] {
  display: none;
}

.quick-action-option {
  display: flex;
  width: 100%;
  min-height: 66px;
  padding: 10px;
  align-items: center;
  gap: 11px;
  border: 0;
  border-radius: 13px;
  color: #1c2d49;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.quick-action-option:hover,
.quick-action-option:focus-visible {
  outline: none;
  background: #f0f5fd;
}

.quick-action-option:focus-visible {
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--theme-accent,rgb(40 100 215)) 22%, transparent);
}

.quick-action-option-icon,
.quick-install-dialog-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #2e72e3, #1b51b2);
}

.quick-action-option-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  box-shadow: 0 7px 16px color-mix(in srgb, var(--theme-accent,rgb(40 100 215)) 22%, transparent);
}

.quick-action-option-icon svg,
.quick-install-dialog-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quick-action-option-copy,
.quick-action-option-copy strong,
.quick-action-option-copy small {
  display: block;
}

.quick-action-option-copy {
  min-width: 0;
}

.quick-action-option-copy strong {
  font-size: 14px;
  font-weight: 850;
}

.quick-action-option-copy small {
  margin-top: 3px;
  color: #758198;
  font-size: 11px;
  font-weight: 650;
}

.quick-actions-trigger {
  display: grid;
  width: 56px;
  height: 56px;
  padding: 0;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 46%);
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #2a8175 0%, #15584f 60%, #0d443d 100%);
  box-shadow:
    0 14px 30px color-mix(in srgb, var(--theme-accent,rgb(21 88 79)) 36%, transparent),
    inset 0 1px 0 color-mix(in srgb, var(--theme-panel,rgb(255 255 255)) 25%, transparent);
  cursor: pointer;
  transition:
    background 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.quick-actions-trigger:hover {
  background: linear-gradient(145deg, #329184 0%, #1b685d 60%, #104b43 100%);
  box-shadow:
    0 17px 36px color-mix(in srgb, var(--theme-accent,rgb(21 88 79)) 42%, transparent),
    inset 0 1px 0 color-mix(in srgb, var(--theme-panel,rgb(255 255 255)) 28%, transparent);
  transform: translateY(-2px);
}

.quick-actions-trigger:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--theme-accent,rgb(143 220 201)) 52%, transparent);
  outline-offset: 3px;
}

.quick-actions-trigger:active {
  box-shadow:
    0 8px 20px color-mix(in srgb, var(--theme-accent,rgb(21 88 79)) 30%, transparent),
    inset 0 2px 4px color-mix(in srgb, var(--theme-accent,rgb(5 39 34)) 22%, transparent);
  transform: translateY(0) scale(0.98);
}

.quick-actions-trigger svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 2;
  stroke-linecap: round;
  transition: transform 180ms ease;
}

.quick-actions.is-open .quick-actions-trigger svg {
  transform: rotate(45deg);
}

.has-quick-actions .records-scroll-top {
  right: max(18px, env(safe-area-inset-right));
  bottom: calc(max(18px, env(safe-area-inset-bottom)) + 68px);
  width: 56px;
  height: 56px;
}

.quick-actions-open .records-scroll-top {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.85);
}

.quick-install-dialog,
.quick-expense-dialog,
.quick-asset-type-dialog,
.quick-card-dialog {
  width: min(410px, calc(100% - 32px));
  max-width: none;
  margin: auto;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 24px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 28px 80px color-mix(in srgb, var(--theme-shadow-ink,rgb(17 31 55)) 30%, transparent);
}

.quick-install-dialog::backdrop,
.quick-expense-dialog::backdrop,
.quick-asset-type-dialog::backdrop,
.quick-card-dialog::backdrop {
  background: rgb(15 27 47 / 52%);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.quick-install-dialog-panel {
  position: relative;
  padding: 28px;
}

.quick-expense-dialog-panel {
  position: relative;
  padding: 28px;
}

.quick-expense-dialog-panel > .eyebrow {
  margin: 0 44px 5px 0;
}

.quick-expense-dialog h2 {
  margin: 0 44px 7px 0;
  color: #172946;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.quick-expense-form {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.quick-expense-amount-control {
  position: relative;
  display: block;
}

.quick-card-field .quick-expense-amount-control input {
  padding-right: 52px;
  text-align: right;
}

.quick-expense-amount-control > span {
  position: absolute;
  top: 50%;
  right: 13px;
  color: #6f7d91;
  font-size: 13px;
  transform: translateY(-50%);
  pointer-events: none;
}

.quick-expense-submit {
  margin-top: 0;
}

.quick-expense-submit:disabled {
  cursor: wait;
  opacity: 0.68;
}

.quick-asset-type-panel {
  position: relative;
  padding: 28px;
}

.quick-asset-type-panel > .eyebrow {
  margin: 0 44px 5px 0;
}

.quick-asset-type-dialog h2 {
  margin: 0 44px 7px 0;
  color: #172946;
  font-size: 23px;
  letter-spacing: -0.04em;
}

.quick-asset-type-options {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.quick-asset-type-option {
  display: grid;
  width: 100%;
  min-height: 76px;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px 14px;
  align-items: center;
  border: 1px solid #dce3ec;
  border-radius: 15px;
  color: #31435d;
  background: #f3f5f8;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    transform 150ms ease;
}

.quick-asset-type-option:hover {
  border-color: var(--theme-accent,#c7d3e2);
  background: #eaf0f7;
  transform: translateY(-1px);
}

.quick-asset-type-option:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--theme-accent,rgb(40 100 215)) 18%, transparent);
  outline-offset: 2px;
}

.quick-asset-type-option strong,
.quick-asset-type-option small {
  display: block;
}

.quick-asset-type-option strong {
  font-size: 15px;
  font-weight: 850;
}

.quick-asset-type-option small {
  margin-top: 4px;
  color: #748197;
  font-size: 11px;
  line-height: 1.45;
}

.quick-asset-type-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 13px;
  color: #fff;
}

.quick-asset-type-icon.card {
  background: linear-gradient(145deg, #2e72e3, #1b51b2);
}

.quick-asset-type-icon.bank {
  background: linear-gradient(145deg, #147c6c, #0d5148);
}

.quick-asset-type-icon.manual {
  background: linear-gradient(145deg, #7957bd, #52378c);
  font-size: 22px;
  font-weight: 850;
}

.quick-asset-type-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quick-asset-type-arrow {
  color: #8491a4;
  font-size: 25px;
  line-height: 1;
}

.quick-card-dialog {
  max-height: min(760px, calc(100dvh - 24px));
  overflow: hidden;
}

.quick-card-dialog-panel {
  position: relative;
  max-height: min(760px, calc(100dvh - 24px));
  padding: 28px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.quick-card-dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quick-card-environment {
  margin-right: 34px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #8a5a00;
  background: #fff3cf;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.quick-card-environment[data-environment="production"] {
  color: #14633d;
  background: #dff6e9;
}

.quick-action-card-icon {
  background: linear-gradient(145deg, #147c6c, #0d5148);
  box-shadow: 0 7px 16px color-mix(in srgb, var(--theme-accent,rgb(13 81 72)) 24%, transparent);
}

.quick-action-image-icon {
  background: linear-gradient(145deg, #3b9585, #176358);
  box-shadow: 0 7px 16px color-mix(in srgb, var(--theme-accent,rgb(23 99 88)) 24%, transparent);
}

.quick-image-upload-picker {
  position: relative;
  display: grid;
  min-height: 100px;
  grid-template-columns: minmax(0, 1fr);
  gap: 13px;
  padding: 18px;
  align-items: center;
  border: 1.5px dashed #91c4b8;
  border-radius: 16px;
  color: #27483f;
  background: #f2f9f6;
  cursor: pointer;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease;
}

.quick-image-upload-picker:hover {
  border-color: var(--theme-accent,#4c9a89);
  background: #eaf6f1;
}

.quick-image-upload-picker:focus-within {
  border-color: var(--theme-accent,#287b6d);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent,rgb(40 123 109)) 14%, transparent);
}

.quick-image-upload-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.quick-image-upload-picker-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, #3b9585, #176358);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--theme-shadow-ink,rgb(23 99 88)) 20%, transparent);
}

.quick-image-upload-picker-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quick-image-upload-picker-copy,
.quick-image-upload-picker-copy strong,
.quick-image-upload-picker-copy small {
  display: block;
  min-width: 0;
}

.quick-image-upload-picker-copy strong {
  overflow: hidden;
  font-size: 15px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-image-upload-picker-copy small {
  margin-top: 5px;
  color: #6c7f78;
  font-size: 11px;
  font-weight: 700;
}

.quick-image-security-note {
  margin: 0;
}

.quick-image-expense-result {
  padding: 13px 14px;
  border: 1px solid #cce4dc;
  border-radius: 14px;
  color: #24463d;
  background: #f4faf7;
}

.quick-image-expense-result > strong {
  display: block;
  color: #155e52;
  font-size: 14px;
  font-weight: 900;
}

.quick-image-expense-result ul {
  display: grid;
  gap: 9px;
  margin: 11px 0 0;
  padding: 0;
  list-style: none;
}

.quick-image-expense-result li,
.quick-image-expense-result li span,
.quick-image-expense-result li small {
  display: block;
  min-width: 0;
}

.quick-image-expense-result li span {
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 800;
}

.quick-image-expense-result li small {
  margin-top: 2px;
  color: #6c7f78;
  font-size: 11px;
  line-height: 1.4;
}

.quick-card-dialog h2 {
  margin: 18px 0 7px;
  color: #172946;
  font-size: 22px;
  letter-spacing: -0.035em;
}

.quick-card-security-note {
  margin-top: 15px;
  padding: 11px 12px;
  border: 1px solid #d7e4f4;
  border-radius: 12px;
  color: #52637a;
  background: #f4f8fd;
  font-size: 12px;
  line-height: 1.55;
}

.quick-card-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.quick-card-field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quick-card-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #394a62;
  font-size: 12px;
  font-weight: 800;
}

.quick-card-field span small {
  color: #8793a5;
  font-size: 10px;
  font-weight: 700;
}

.quick-card-field input,
.quick-card-field select {
  width: 100%;
  min-height: 44px;
  padding: 10px 11px;
  border: 1px solid #d7dfeb;
  border-radius: 11px;
  color: #1f314c;
  background: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 650;
}

.quick-card-field input:focus,
.quick-card-field select:focus {
  border-color: var(--theme-accent,#6c94dd);
  outline: 3px solid color-mix(in srgb, var(--theme-accent,rgb(40 100 215)) 12%, transparent);
}

.quick-card-consent {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  color: #56657a;
  font-size: 11px;
  line-height: 1.5;
}

.quick-card-consent input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--blue);
}

.quick-card-status {
  min-height: 18px;
  margin: 0;
  color: #65738a;
  font-size: 12px;
  line-height: 1.5;
}

.quick-card-status[data-kind="error"] {
  color: #b33b3b;
}

.quick-card-status[data-kind="success"] {
  color: #167047;
}

.bank-lookup-guide {
  padding: 16px;
  border: 1px solid #efc8bd;
  border-radius: 15px;
  color: #43536b;
  background: linear-gradient(145deg, #fffaf6, #fff5ee);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--theme-shadow-ink,rgb(108 54 32)) 8%, transparent);
}

.bank-lookup-guide-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.bank-lookup-guide-eyebrow {
  display: block;
  margin-bottom: 4px;
  color: #a35337;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.03em;
}

.bank-lookup-guide h3 {
  margin: 0;
  color: #502f25;
  font-size: 15px;
  letter-spacing: -0.025em;
}

.bank-lookup-guide-service {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  color: #9a4a2d;
  background: #ffe7da;
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.bank-lookup-guide-summary {
  margin: 11px 0 0;
  color: #614b44;
  font-size: 12px;
  line-height: 1.55;
}

.bank-lookup-guide-steps {
  display: grid;
  gap: 9px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: bank-guide-step;
}

.bank-lookup-guide-steps li {
  display: grid;
  grid-template-columns: 23px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  color: #4d4a4a;
  font-size: 11px;
  line-height: 1.55;
  counter-increment: bank-guide-step;
}

.bank-lookup-guide-steps li::before {
  display: grid;
  width: 23px;
  height: 23px;
  margin-top: -2px;
  place-items: center;
  border-radius: 8px;
  color: #a35337;
  background: #ffe4d5;
  font-size: 10px;
  font-weight: 900;
  content: counter(bank-guide-step);
}

.bank-lookup-guide-fields,
.bank-lookup-guide-note {
  margin: 13px 0 0;
  padding: 10px 11px;
  border-radius: 10px;
  color: #5f4f49;
  background: rgb(255 255 255 / 72%);
  font-size: 10px;
  line-height: 1.6;
}

.bank-lookup-guide-note {
  color: #785335;
  background: #fff0cc;
}

.bank-lookup-guide-link {
  display: inline-flex;
  min-height: 34px;
  margin-top: 13px;
  padding: 0 11px;
  align-items: center;
  border: 1px solid #d99070;
  border-radius: 10px;
  color: #8b3e25;
  background: #fff;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.bank-lookup-guide-link::after {
  margin-left: 5px;
  content: "↗";
}

.bank-lookup-guide-link:hover,
.bank-lookup-guide-link:focus-visible {
  color: #6e2e1a;
  outline: 2px solid color-mix(in srgb, var(--theme-accent,rgb(163 83 55)) 18%, transparent);
  background: #fff9f5;
}

.quick-card-submit {
  margin-top: 0;
}

.quick-card-submit:disabled {
  cursor: wait;
  opacity: 0.68;
}

.quick-install-dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #6e7b8f;
  background: #f0f3f8;
  cursor: pointer;
}

.quick-install-dialog-close:hover,
.quick-install-dialog-close:focus-visible {
  color: var(--navy);
  outline: 2px solid color-mix(in srgb, var(--theme-accent,rgb(40 100 215)) 18%, transparent);
  background: #e8eef8;
}

.quick-install-dialog-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 2;
  stroke-linecap: round;
}

.quick-install-dialog-icon {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  box-shadow: 0 9px 22px color-mix(in srgb, var(--theme-accent,rgb(40 100 215)) 22%, transparent);
}

.quick-install-dialog h2 {
  margin: 18px 0 7px;
  color: #172946;
  font-size: 22px;
  letter-spacing: -0.035em;
}

.quick-install-dialog-lead {
  margin: 0;
  color: #66748a;
  font-size: 14px;
  line-height: 1.65;
}

.quick-install-steps {
  display: grid;
  gap: 9px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: install-step;
}

.quick-install-steps li {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: #43536b;
  font-size: 13px;
  line-height: 1.55;
  counter-increment: install-step;
}

.quick-install-steps li::before {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 9px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 11px;
  font-weight: 900;
  content: counter(install-step);
}

.quick-install-dialog-done {
  width: 100%;
  min-height: 45px;
  margin-top: 24px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: var(--navy);
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
}

.quick-install-dialog-done:hover,
.quick-install-dialog-done:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--theme-accent,rgb(40 100 215)) 18%, transparent);
  background: var(--blue);
}

@keyframes quick-actions-enter {
  from {
    opacity: 0;
    transform: translateY(7px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@container kkaebu (max-width: 599px){
  .quick-actions {
    right: max(14px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
  }

  .quick-actions-trigger {
    width: 54px;
    height: 54px;
  }

  .has-quick-actions .records-scroll-top {
    right: max(14px, env(safe-area-inset-right));
    bottom: calc(max(14px, env(safe-area-inset-bottom)) + 66px);
    width: 54px;
    height: 54px;
  }

  .quick-install-dialog-panel {
    padding: 25px 22px 22px;
  }

  .quick-expense-dialog-panel {
    padding: 25px 20px 22px;
  }

  .quick-asset-type-panel {
    padding: 25px 20px 22px;
  }

  .quick-card-dialog-panel {
    padding: 25px 20px 22px;
  }

  .quick-card-field-row {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce){
  .quick-actions-menu {
    animation: none;
  }

  .quick-actions-trigger,
  .quick-actions-trigger svg {
    transition: none;
  }
}

.mobile-install-hint {
  display: none;
}

@container kkaebu (max-width: 599px){
  .mobile-install-hint {
    position: relative;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 13px;
    margin: 32px 0 80px;
    padding: 18px 42px 14px 14px;
    align-items: center;
    border: 1px solid #d8e3f1;
    border-radius: 20px;
    color: #344a66;
    background: #f3f6fa;
  }

  .mobile-install-hint-close {
    position: absolute;
    top: 6px;
    right: 6px;
    display: grid;
    width: 32px;
    height: 32px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #657893;
    background: transparent;
    font: inherit;
    font-size: 23px;
    line-height: 1;
    cursor: pointer;
  }

  .mobile-install-hint-close:hover,
  .mobile-install-hint-close:focus-visible {
    color: #2f4561;
    background: #e4eaf3;
  }

  .mobile-install-hint-icon {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 14px;
    color: #4f6887;
    background: #e4eaf3;
  }

  .mobile-install-hint-icon svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentcolor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-install-hint strong,
  .mobile-install-hint small {
    display: block;
  }

  .mobile-install-hint strong {
    color: #2f4561;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.025em;
  }

  .mobile-install-hint small {
    margin-top: 4px;
    color: #657893;
    font-size: 11px;
    line-height: 1.4;
  }
}

/* Connected cards and bank accounts */
.financial-page {
  padding-bottom: 90px;
}

.financial-intro {
  display: flex;
  min-height: 118px;
  padding: 24px 4px 18px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.financial-page .financial-intro {
  margin-bottom: 4px;
}

.financial-intro h1 {
  margin: 3px 0 0;
  font-size: clamp(28px, 4cqw, 40px);
  letter-spacing: -0.045em;
}

.financial-ledger-name {
  margin: 7px 0 0;
  color: #6f7f8e;
  font-size: 13px;
  font-weight: 700;
}

.money-view-tabs {
  display: grid;
  position: sticky;
  z-index: 3;
  top: max(62px, calc(env(safe-area-inset-top) + 48px));
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 22px;
  padding: 0;
  border-bottom: 1px solid #d5dfdf;
  background: rgb(239 243 242 / 96%);
  backdrop-filter: blur(12px);
}

.money-view-tabs button {
  position: relative;
  display: grid;
  min-height: 48px;
  padding: 10px 12px;
  place-items: center;
  border: 0;
  color: #4f6178;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.money-view-tabs button::after {
  position: absolute;
  right: 18%;
  bottom: -1px;
  left: 18%;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: transparent;
  content: "";
}

.money-view-tabs button[aria-selected="true"] {
  color: #174f47;
}

.money-view-tabs button[aria-selected="true"]::after {
  background: var(--kkaebu-mint-action, #287f6d);
}

.money-view-tabs button:hover,
.money-view-tabs button:focus-visible {
  outline: none;
  color: #174f47;
  background: rgb(255 255 255 / 62%);
}

.money-view-tabs button:focus-visible {
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--theme-accent,rgb(40 127 109)) 35%, transparent);
}

.money-tab-panel {
  display: flex;
  min-height: 260px;
  flex-direction: column;
  animation: money-tab-panel-enter 180ms ease-out both;
}

.money-tab-panel[hidden] {
  display: none !important;
}

@keyframes money-tab-panel-enter {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce){
  .money-tab-panel {
    animation: none;
  }
}

#money-panel-assets .money-management-mode { order: 0; }
#money-panel-assets .money-assets-overview { order: 1; }
#money-panel-assets .owned-assets-actions { order: 2; }
#money-panel-assets .financial-assets-section { order: 3; }
#money-panel-assets .money-calculation-details { order: 4; }

.owned-assets-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: -4px 0 18px;
}

[data-asset-management-only][hidden],
.money-overview[hidden] {
  display: none !important;
}

.money-management-mode {
  display: flex;
  gap: 18px;
  margin-bottom: 12px;
  padding: 15px 17px;
  align-items: center;
  justify-content: space-between;
  border-color: #cfe2dc;
  background: linear-gradient(135deg, #f7fbf9, #eef7f4);
}

.money-management-mode small,
.money-management-mode strong,
.money-management-mode p {
  display: block;
}

.money-management-mode small {
  color: #718399;
  font-size: 10px;
  font-weight: 800;
}

.money-management-mode strong {
  margin-top: 3px;
  color: #264a48;
  font-size: 14px;
}

.money-management-mode p {
  margin: 4px 0 0;
  color: #718096;
  font-size: 10px;
}

.money-management-mode button {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid #bddbd5;
  border-radius: 11px;
  color: #24685f;
  background: #fff;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.money-management-mode[hidden] {
  display: none;
}

.money-monthly-view {
  padding: 18px;
}

.money-calculation-details {
  margin-top: 18px;
  overflow: hidden;
}

.money-calculation-details > summary {
  display: flex;
  padding: 16px 18px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #36516b;
  cursor: pointer;
  list-style: none;
}

.money-calculation-details > summary::-webkit-details-marker {
  display: none;
}

.money-calculation-details > summary strong,
.money-calculation-details > summary small {
  display: block;
}

.money-calculation-details > summary strong {
  font-size: 12px;
}

.money-calculation-details > summary small {
  margin-top: 4px;
  color: #78869a;
  font-size: 10px;
}

.money-calculation-details > summary > span:last-child {
  color: #789083;
  font-size: 24px;
  transition: transform 150ms ease;
}

.money-calculation-details[open] > summary > span:last-child {
  transform: rotate(90deg);
}

.money-calculation-details[open] > summary {
  border-bottom: 1px solid #e3ebe8;
}

.money-monthly-view-heading {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
}

.money-monthly-view-heading small,
.money-monthly-view-heading p {
  color: #718096;
  font-size: 10px;
}

.money-monthly-view-heading h2 {
  margin: 3px 0 0;
  color: #263f60;
  font-size: 16px;
}

.money-monthly-view-heading p {
  margin: 5px 0 0;
}

.money-monthly-view-heading > strong {
  color: #25568e;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.money-spending-view-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 15px;
}

.money-spending-view-options button {
  min-height: 64px;
  padding: 10px 12px;
  border: 1px solid #d9e2ec;
  border-radius: 12px;
  color: #40536d;
  background: #fafbfd;
  text-align: left;
  cursor: pointer;
}

.money-spending-view-options button[aria-checked="true"] {
  border-color: #82acd8;
  color: #204e87;
  background: #edf5ff;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--theme-accent,rgb(74 132 194)) 18%, transparent);
}

.money-spending-view-options strong,
.money-spending-view-options small {
  display: block;
}

.money-spending-view-options strong {
  font-size: 12px;
}

.money-spending-view-options small {
  margin-top: 4px;
  color: #78869a;
  font-size: 9px;
  line-height: 1.4;
}

.quick-image-expense-result .quick-image-installment-link {
  display: inline-flex;
  width: fit-content;
  margin-top: 8px;
  padding: 7px 10px;
  border: 1px solid #94cfc0;
  border-radius: 999px;
  color: #155e52;
  background: #fff;
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}

.quick-image-expense-result .quick-image-installment-link:hover,
.quick-image-expense-result .quick-image-installment-link:focus-visible {
  border-color: var(--theme-accent,#287f6d);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent,rgb(45 139 119)) 14%, transparent);
}

.money-monthly-comparison {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid #e1e8ef;
  border-radius: 11px;
  background: #e1e8ef;
}

.money-monthly-comparison > span {
  padding: 10px 12px;
  background: #fff;
}

.money-monthly-comparison small,
.money-monthly-comparison strong,
.money-monthly-comparison em {
  display: block;
}

.money-monthly-comparison small {
  color: #78869a;
  font-size: 9px;
}

.money-monthly-comparison strong {
  margin-top: 3px;
  color: #334b69;
  font-size: 12px;
}

.money-monthly-comparison em {
  margin-top: 4px;
  color: #7b899b;
  font-size: 8px;
  font-style: normal;
  line-height: 1.45;
}

.money-budget-basis {
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px solid #e5ebf1;
}

.money-budget-basis summary {
  color: #53657c;
  font-size: 10px;
  cursor: pointer;
}

.money-budget-basis summary strong {
  margin-left: 5px;
  color: #315d91;
}

.money-budget-basis > p,
.money-budget-basis > small {
  display: block;
  margin: 8px 0 0;
  color: #77869a;
  font-size: 9px;
  line-height: 1.5;
}

.money-budget-basis > div {
  display: flex;
  gap: 7px;
  margin-top: 9px;
}

.money-budget-basis button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid #d7e1eb;
  border-radius: 10px;
  color: #52657e;
  background: #fff;
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
}

.money-budget-basis button[aria-checked="true"] {
  border-color: #89afd6;
  color: #24558e;
  background: #eef5fd;
}

.money-overview {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.6fr);
  margin: 0 0 18px;
  overflow: hidden;
  border: 1px solid #cfe0ed;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 14px 36px color-mix(in srgb, var(--theme-shadow-ink,rgb(33 58 90)) 8%, transparent);
}

.money-overview-primary {
  padding: 23px 24px;
  color: #fff;
  background: linear-gradient(145deg, #285b91, #2f78a1);
}

.money-overview-primary small,
.money-overview-primary strong,
.money-overview-primary p,
.money-overview-breakdown small,
.money-overview-breakdown strong,
.money-overview-breakdown em {
  display: block;
}

.money-overview-primary small {
  font-size: 11px;
  font-weight: 800;
}

.money-overview-primary strong {
  margin-top: 7px;
  font-size: clamp(24px, 3cqw, 32px);
  letter-spacing: -0.04em;
}

.money-overview-primary p {
  margin: 9px 0 0;
  color: rgb(255 255 255 / 76%);
  font-size: 11px;
  line-height: 1.55;
}

.money-overview-breakdown {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 18px 8px;
  align-items: center;
}

.money-assets-overview .money-overview-primary {
  background: linear-gradient(145deg, #256b61, #338477);
}

.money-assets-overview .money-overview-breakdown {
  grid-template-columns: 1fr;
}

.money-assets-overview .money-overview-breakdown > span {
  border-left: 0;
}

.money-debt-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(210px, 0.65fr);
  margin-bottom: 24px;
  overflow: hidden;
  border: 1px solid #e1dcd9;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 14px 34px color-mix(in srgb, var(--theme-shadow-ink,rgb(62 45 39)) 7%, transparent);
}

.money-debt-overview > div {
  padding: 23px 24px;
}

.money-debt-overview > div:first-child {
  color: #fff;
  background: linear-gradient(145deg, #705249, #94685b);
}

.money-debt-overview small,
.money-debt-overview strong,
.money-debt-overview p,
.money-debt-overview em {
  display: block;
}

.money-debt-overview small {
  font-size: 11px;
  font-weight: 800;
}

.money-debt-overview strong {
  margin-top: 7px;
  font-size: clamp(23px, 3cqw, 31px);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

.money-debt-overview p {
  margin: 9px 0 0;
  color: rgb(255 255 255 / 75%);
  font-size: 11px;
  line-height: 1.5;
}

.money-next-payment-summary {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.money-next-payment-summary small {
  color: #7f6d68;
}

.money-next-payment-summary strong {
  color: #674b43;
  font-size: 20px;
}

.money-next-payment-summary em {
  margin-top: 5px;
  color: #8a7872;
  font-size: 10px;
  font-style: normal;
}

.money-overview-breakdown > span {
  min-width: 0;
  padding: 8px 18px;
  border-left: 1px solid #e2e9f0;
}

.money-overview-breakdown > span:first-child {
  border-left: 0;
}

.money-overview-breakdown small {
  color: #728096;
  font-size: 10px;
  font-weight: 800;
}

.money-overview-breakdown strong {
  margin-top: 6px;
  overflow: hidden;
  color: #1d3d68;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.money-overview-breakdown em {
  margin-top: 4px;
  color: #748197;
  font-size: 10px;
  font-style: normal;
}

.money-debts-section {
  scroll-margin-top: 16px;
}

.money-debt-actions {
  justify-content: flex-end;
}

.money-debt-actions .primary {
  border-color: #315f96;
  color: #fff;
  background: #315f96;
}

.money-installment-settings-link {
  display: inline-grid;
  min-height: 38px;
  padding: 0 13px;
  place-items: center;
  text-decoration: none;
}

.money-debt-list {
  display: grid;
  gap: 10px;
}

.money-debt-card {
  overflow: hidden;
}

.money-debt-card > summary,
.money-installment-plan > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 17px 19px;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.money-debt-card > summary::-webkit-details-marker,
.money-installment-plan > summary::-webkit-details-marker {
  display: none;
}

.money-debt-card > summary span,
.money-installment-plan > summary span,
.money-debt-card > summary small,
.money-installment-plan > summary small,
.money-debt-card > summary strong,
.money-installment-plan > summary strong {
  display: block;
  min-width: 0;
}

.money-debt-card > summary strong {
  color: #203d64;
  font-size: 15px;
}

.money-debt-card > summary small,
.money-installment-plan > summary small {
  margin-top: 4px;
  color: #758399;
  font-size: 10px;
  font-weight: 650;
}

.money-debt-card > summary > span:last-child {
  text-align: right;
}

.money-debt-card[open] > summary {
  border-bottom: 1px solid #e3eaf2;
  background: #f7faff;
}

.money-debt-card-details {
  padding: 10px 14px 14px;
}

.money-installment-plan {
  margin-top: 8px;
  overflow: hidden;
  border: 1px solid #e0e7ef;
  border-radius: 13px;
  background: #fff;
}

.money-installment-plan:first-child {
  margin-top: 0;
}

.money-installment-plan > summary {
  padding: 13px 14px;
}

.money-installment-plan > summary > strong {
  color: #315e99;
  font-size: 12px;
  white-space: nowrap;
}

.money-installment-schedule {
  border-top: 1px solid #edf1f5;
  background: #fafbfd;
}

.money-installment-schedule-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 11px 14px;
  align-items: center;
  border-bottom: 1px solid #edf1f5;
}

.money-installment-schedule-row:last-child {
  border-bottom: 0;
}

.money-installment-schedule-row > span,
.money-installment-schedule-row strong,
.money-installment-schedule-row small {
  display: block;
}

.money-installment-schedule-row strong {
  color: #334963;
  font-size: 11px;
}

.money-installment-schedule-row small {
  margin-top: 3px;
  color: #78869a;
  font-size: 9px;
}

.money-installment-schedule-row > span:last-child {
  text-align: right;
}

.money-installment-schedule-row.paid {
  opacity: 0.67;
}

.money-installment-adjustments {
  display: grid;
  gap: 5px;
  padding: 11px 14px;
  border-top: 1px solid #e5ebf1;
  background: #fffaf4;
}

.money-installment-adjustments > strong {
  color: #70562e;
  font-size: 10px;
}

.money-installment-adjustments > span {
  color: #796a55;
  font-size: 9px;
  line-height: 1.45;
}

.money-debt-empty {
  padding: 22px;
  color: #617187;
  text-align: center;
}

.money-debt-empty strong {
  display: block;
  color: #314b6d;
  font-size: 14px;
}

.money-debt-empty p,
.money-debt-footnote {
  margin: 7px 0 0;
  color: #79879a;
  font-size: 10px;
  line-height: 1.55;
}

.money-debt-empty.error {
  color: #a54242;
  background: #fff7f7;
}

.money-payment-history {
  margin-top: 12px;
  overflow: hidden;
}

.money-payment-history > summary {
  display: flex;
  gap: 14px;
  padding: 14px 17px;
  align-items: center;
  justify-content: space-between;
  color: #334b68;
  cursor: pointer;
  list-style: none;
}

.money-payment-history > summary::-webkit-details-marker {
  display: none;
}

.money-payment-history > summary strong,
.money-payment-history > summary small {
  display: block;
}

.money-payment-history > summary strong {
  font-size: 12px;
}

.money-payment-history > summary small,
.money-payment-history > summary > span:last-child {
  margin-top: 3px;
  color: #78869a;
  font-size: 9px;
}

.money-payment-event-list {
  border-top: 1px solid #e4eaf1;
}

.money-payment-event-list > p {
  margin: 0;
  padding: 17px;
  color: #78869a;
  font-size: 10px;
  text-align: center;
}

.money-payment-event-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px;
  padding: 12px 17px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #edf1f5;
}

.money-payment-event-row.reversed {
  background: #fafbfc;
  opacity: 0.72;
}

.money-payment-event-row.reversed > span:nth-child(2) > strong {
  text-decoration: line-through;
}

.money-payment-event-row:last-child {
  border-bottom: 0;
}

.money-payment-event-row span:last-child {
  text-align: right;
}

.money-payment-event-row strong,
.money-payment-event-row small {
  display: block;
}

.money-payment-event-actions {
  display: flex;
  gap: 5px;
}

.money-payment-event-actions button {
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid #d8e2ec;
  border-radius: 8px;
  background: #fff;
  color: #416383;
  font: inherit;
  font-size: 9px;
  cursor: pointer;
}

.money-payment-event-actions button.danger {
  border-color: #f0d5d7;
  color: #b74850;
}

.money-payment-event-actions button.history[aria-expanded="true"] {
  border-color: var(--theme-accent,#aac9e5);
  background: #eef6fd;
  color: #285f91;
}

.money-payment-revision-panel {
  grid-column: 1 / -1;
  padding: 10px 12px;
  border: 1px solid #dce7f1;
  border-radius: 10px;
  background: #f8fbfe;
}

.money-payment-revision-panel[hidden] {
  display: none;
}

.money-payment-revision-panel > p {
  margin: 0;
  color: #68798e;
  font-size: 9px;
}

.money-payment-revision-panel.error {
  border-color: #f0d5d7;
  background: #fff8f8;
}

.money-payment-revision-panel.error > p {
  color: #a8444b;
}

.money-payment-revision-panel.error > button {
  margin-top: 7px;
  padding: 4px 7px;
  border: 1px solid #e7c6c9;
  border-radius: 7px;
  background: #fff;
  color: #a8444b;
  font: inherit;
  font-size: 9px;
  cursor: pointer;
}

.money-payment-revision-list {
  display: grid;
  gap: 8px;
}

.money-payment-revision-item {
  padding-bottom: 8px;
  border-bottom: 1px solid #e2eaf2;
}

.money-payment-revision-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.money-payment-revision-item > div {
  display: flex;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
}

.money-payment-revision-item strong {
  color: #334a67;
  font-size: 10px;
}

.money-payment-revision-item time,
.money-payment-revision-item p {
  color: #738399;
  font-size: 9px;
}

.money-payment-revision-item p {
  margin: 4px 0 0;
}

.money-payment-revision-item .money-payment-revision-reason {
  color: #4c617a;
}

.card-payment-correction-reason {
  margin: 12px 0;
}

.money-payment-event-row strong {
  color: #334a67;
  font-size: 11px;
}

.money-payment-event-row small {
  margin-top: 3px;
  color: #7a8799;
  font-size: 9px;
}

.card-payment-editor .record-editor-form {
  width: min(680px, calc(100cqw - 30px));
}

.card-payment-basic-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-payment-allocation-details {
  margin: 14px 0;
}

.card-payment-allocation-details > p {
  margin-bottom: 10px;
}

.card-payment-schedule-list {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.card-payment-schedule-list > p {
  margin: 0;
  padding: 12px;
  color: #78869a;
  font-size: 10px;
  text-align: center;
}

.card-payment-detail-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
}

.card-payment-detail-heading small {
  color: var(--muted);
}

.card-payment-schedule-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(120px, 0.45fr);
  gap: 10px;
  padding: 10px;
  align-items: center;
  border: 1px solid #dfe7ef;
  border-radius: 11px;
  background: #fff;
}

.card-payment-schedule-option > input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: #32669e;
}

.card-payment-schedule-option strong,
.card-payment-schedule-option small {
  display: block;
}

.card-payment-schedule-option strong {
  color: #334a66;
  font-size: 10px;
}

.card-payment-schedule-option small {
  margin-top: 3px;
  color: #7b8798;
  font-size: 9px;
}

.card-payment-schedule-option .installment-input-wrap {
  min-height: 36px;
}

.card-payment-schedule-option .installment-input-wrap input {
  min-width: 0;
  min-height: 34px;
  font-size: 11px;
}

.card-payment-allocation-summary {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  justify-content: flex-end;
  color: #65758a;
  font-size: 9px;
}

.card-payment-allocation-summary strong {
  margin-left: 3px;
  color: #2d537d;
}

.card-payment-allocation-summary .error strong {
  color: #b43c45;
}

.card-payment-link-action {
  margin-top: 5px;
}

.card-payment-basic-grid .transaction-inline-button {
  width: fit-content;
}

.manual-asset-balance-fields {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border: 1px solid #dfe8ed;
  border-radius: 13px;
  background: #f7faf9;
}

.manual-asset-balance-fields[hidden] {
  display: none;
}

.manual-asset-balance-fields > p {
  grid-column: 1 / -1;
  margin: -3px 0 0;
  color: #78869a;
  font-size: 10px;
  line-height: 1.5;
}

.manual-asset-sharing {
  display: flex;
  gap: 11px;
  margin: 2px 0 14px;
  padding: 13px 14px;
  align-items: flex-start;
  border: 1px solid #dfe8ed;
  border-radius: 13px;
  color: #36516d;
  background: #f7faf9;
  cursor: pointer;
}

.manual-asset-sharing input {
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
  flex: 0 0 auto;
  accent-color: #32669e;
}

.manual-asset-sharing strong,
.manual-asset-sharing small {
  display: block;
}

.manual-asset-sharing strong {
  font-size: 11px;
}

.manual-asset-sharing small {
  margin-top: 4px;
  color: #748398;
  font-size: 9px;
  line-height: 1.5;
}

.financial-asset-balance > strong,
.financial-asset-balance > small {
  display: block;
}

.financial-asset-balance > small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 500;
  line-height: 1.35;
}

.financial-asset-privacy {
  display: inline-block;
  margin-left: 5px;
  padding: 3px 6px;
  border-radius: 999px;
  color: #65758a;
  background: #eef2f6;
  font-size: 8px;
  font-weight: 700;
}

.financial-asset-privacy.shared {
  color: #226559;
  background: #e5f4ef;
}

.financial-add-asset-card {
  display: grid;
  width: 100%;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 13px;
  margin: 8px 0 14px;
  padding: 15px 17px;
  align-items: center;
  border: 1px solid #dbe2eb;
  border-radius: 16px;
  color: #34465f;
  background: #eef1f5;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    transform 150ms ease;
}

.owned-assets-actions .financial-add-asset-card {
  height: 100%;
  margin: 0;
  background: #f6f8f7;
}

.owned-assets-actions .financial-refresh-assets-card {
  background: #f4f7f8;
}

.financial-add-asset-card:hover {
  border-color: var(--theme-accent,#c7d2e0);
  background: #e7ebf1;
  transform: translateY(-1px);
}

.financial-add-asset-card:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--theme-accent,rgb(40 100 215)) 18%, transparent);
  outline-offset: 2px;
}

.financial-add-asset-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 13px;
  color: #425a78;
  background: #fff;
  font-size: 25px;
  font-weight: 500;
  line-height: 1;
}

.financial-add-asset-copy strong,
.financial-add-asset-copy small {
  display: block;
}

.financial-add-asset-copy strong {
  font-size: 14px;
  font-weight: 850;
}

.financial-add-asset-copy small {
  margin-top: 4px;
  color: #748195;
  font-size: 11px;
  line-height: 1.45;
}

.financial-add-asset-arrow {
  color: #8290a4;
  font-size: 27px;
  line-height: 1;
}

.financial-status {
  margin: 8px 0 24px;
}

.financial-assets-section {
  margin-top: 0;
}

.financial-assets-heading {
  align-items: flex-end;
}

.financial-balance-toggle {
  display: inline-flex;
  min-height: 38px;
  padding: 0 12px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #ccd7e7;
  border-radius: 10px;
  color: #315d9e;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.financial-balance-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.financial-balance-toggle:hover,
.financial-balance-toggle:focus-visible {
  border-color: var(--theme-accent,#7e9dcc);
  outline: 3px solid color-mix(in srgb, var(--theme-accent,rgb(40 100 215)) 12%, transparent);
  background: #f7faff;
}

.financial-asset-table-group {
  overflow: hidden;
}

.financial-summary-line {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  padding: 12px 16px;
  align-items: center;
  border-bottom: 1px solid #e4eaf2;
  background: #f7f9fc;
}

.financial-summary-item {
  display: flex;
  min-width: 0;
  padding: 0 15px;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  border-left: 1px solid #dce3ed;
  white-space: nowrap;
}

.financial-summary-item:first-child {
  padding-left: 0;
  justify-content: flex-start;
  border-left: 0;
}

.financial-summary-item:last-child {
  padding-right: 0;
}

.financial-summary-item small {
  overflow: hidden;
  color: #68778d;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
}

.financial-summary-item strong {
  overflow: hidden;
  color: #18345f;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
}

[data-balance-value][data-balance-hidden="true"] {
  letter-spacing: 0.08em;
}

.financial-asset-table-shell {
  overflow: hidden;
}

.financial-asset-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  font-size: 12px;
  table-layout: fixed;
}

.financial-asset-table th,
.financial-asset-table td {
  padding: 13px 15px;
  border-bottom: 1px solid #e7ebf2;
  color: #42516a;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.financial-asset-table th:nth-child(1) {
  width: 9%;
  text-align: center;
}

.financial-asset-table th:nth-child(2) {
  width: 35%;
}

.financial-asset-table th:nth-child(3) {
  width: 26%;
  text-align: right;
}

.financial-asset-table th:nth-child(4) {
  width: 30%;
}

.financial-asset-table th {
  color: #53627a;
  background: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.financial-asset-table tbody tr:last-child td {
  border-bottom: 0;
}

.financial-asset-type {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  background: #eef4ff;
  font-size: 16px;
}

.financial-asset-type.card {
  color: #6a50a6;
  background: #f4efff;
}

.financial-asset-name strong,
.financial-asset-name small {
  display: block;
}

.financial-asset-name strong {
  max-width: 180px;
  overflow: hidden;
  color: #172a49;
  font-size: 13px;
  text-overflow: ellipsis;
}

.financial-asset-name small {
  display: flex;
  min-width: 0;
  gap: 5px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.financial-asset-name small span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.financial-asset-name small span + span {
  flex: 0 0 auto;
}

.financial-asset-name small span + span::before {
  margin-right: 5px;
  content: "·";
}

.financial-asset-balance {
  color: #18345f !important;
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right !important;
}

.financial-asset-status {
  white-space: normal !important;
}

.financial-asset-status > small {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.financial-asset-status.error > small,
.financial-asset-empty.error {
  color: var(--danger) !important;
}

.financial-asset-empty {
  padding: 26px 18px !important;
  color: var(--muted) !important;
  line-height: 1.55;
  text-align: center !important;
  white-space: normal !important;
}

.financial-section {
  margin-top: 42px;
}

.money-tab-panel > .financial-section:first-child,
.money-debts-section {
  margin-top: 0;
}

.financial-heading-actions {
  display: flex;
  gap: 9px;
  align-items: center;
}

.financial-refresh-button {
  display: inline-flex;
  min-height: 36px;
  padding: 0 12px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #d8e0eb;
  border-radius: 10px;
  color: #28559f;
  background: #fff;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.financial-refresh-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.financial-instrument-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.financial-instrument-card {
  display: flex;
  min-height: 164px;
  padding: 20px;
  flex-direction: column;
}

.financial-instrument-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.financial-instrument-heading > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.financial-instrument-heading strong {
  overflow: hidden;
  color: #172a49;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.financial-instrument-heading div > span {
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.financial-instrument-icon {
  display: inline-grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border-radius: 13px;
  background: #edf3ff;
  font-size: 20px;
}

.financial-instrument-icon.card-icon {
  background: #f4efff;
}

.financial-sync-badge {
  padding: 5px 7px;
  border-radius: 999px;
  color: #59667a;
  background: #edf0f5;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.financial-sync-badge.success {
  color: var(--success);
  background: var(--success-soft);
}

.financial-sync-badge.error {
  color: var(--danger);
  background: var(--danger-soft);
}

.financial-sync-badge.retired {
  color: #67748a;
  background: #edf0f4;
}

.financial-asset-retired {
  background: #fafbfc;
}

.financial-asset-retired .financial-asset-name,
.financial-asset-retired .financial-asset-balance {
  color: #68778b;
}

.financial-instrument-balance {
  margin-top: 23px;
  color: #132d58;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.financial-sync-copy {
  margin-top: auto;
  padding-top: 16px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.financial-sync-copy.error {
  color: var(--danger);
}

.financial-empty-state {
  grid-column: 1 / -1;
  padding: 28px 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

.financial-empty-state.error {
  color: var(--danger);
  background: var(--danger-soft);
}

.financial-transaction-list {
  overflow: hidden;
}

.financial-transaction-table-shell {
  overflow: hidden;
  scroll-margin-top: 84px;
}

.financial-transaction-pagination {
  display: grid;
  grid-template-columns: minmax(82px, auto) minmax(0, 1fr) minmax(82px, auto);
  gap: 12px;
  padding: 13px 15px;
  align-items: center;
  border-top: 1px solid #e2e8f1;
  background: #f8faff;
}

.financial-transaction-pagination[hidden] {
  display: none;
}

.financial-transaction-pagination > span {
  color: #63718a;
  font-size: 11px;
  font-weight: 750;
  text-align: center;
  white-space: nowrap;
}

.financial-transaction-pagination button {
  display: inline-flex;
  min-height: 34px;
  padding: 0 12px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #cfdaea;
  border-radius: 10px;
  color: #2859a8;
  background: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.financial-transaction-pagination button:hover,
.financial-transaction-pagination button:focus-visible {
  border-color: var(--theme-accent,#7e9dcc);
  outline: 3px solid color-mix(in srgb, var(--theme-accent,rgb(40 100 215)) 12%, transparent);
}

.financial-transaction-pagination button:disabled {
  border-color: #e1e6ee;
  color: #9aa5b5;
  background: #f3f5f8;
  cursor: default;
  outline: none;
}

.financial-transaction-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed;
}

.asset-plus-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 7px;
  border-radius: 6px;
  color: #fff;
  background: #285fc2;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  vertical-align: middle;
}

.quick-asset-type-icon.gmail {
  background: #fff0ee;
}

.financial-source-filter .app-control { width: 100%; min-width: 0; }
.financial-source-filter .app-control-trigger {
  width: 100%; min-width: 0; height: 30px; padding: 0 24px 0 0;
  border: 0; background: transparent; box-shadow: none;
  color: inherit; font-size: inherit; font-weight: inherit;
}
.financial-source-filter .app-control-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.financial-transaction-table th,
.financial-transaction-table td {
  padding: 14px 15px;
  border-bottom: 1px solid #e7ebf2;
  text-align: left;
  vertical-align: middle;
}

.financial-transaction-table th {
  color: #53627a;
  background: #f6f8fb;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.financial-transaction-table tbody tr:last-child td {
  border-bottom: 0;
}

.financial-transaction-table td {
  color: #42516a;
  font-variant-numeric: tabular-nums;
}

.financial-transaction-table th:nth-child(1) {
  width: 18%;
}

.financial-transaction-table th:nth-child(2) {
  width: 57%;
}

.financial-transaction-table th:nth-child(3) {
  width: 25%;
  text-align: right;
}

.financial-transaction-date > span,
.financial-transaction-date > small {
  display: block;
  white-space: nowrap;
}

.financial-transaction-date > span {
  color: #42516a;
  font-weight: 750;
}

.financial-transaction-date > small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.financial-transaction-table .financial-table-description {
  min-width: 0;
  color: #1b2c48;
}

.financial-table-description > strong {
  display: block;
  overflow: hidden;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.financial-transaction-meta {
  display: flex;
  gap: 5px;
  margin-top: 7px;
  align-items: center;
  flex-wrap: wrap;
}

.financial-transaction-meta-badge {
  display: inline-flex;
  min-height: 24px;
  padding: 4px 7px;
  align-items: center;
  border-radius: 999px;
  color: #59667a;
  background: #f0f2f6;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
}

.financial-transaction-meta-badge.account {
  color: #315fae;
  background: #eef4ff;
}

.financial-transaction-meta-badge.type {
  color: #6657a8;
  background: #f2efff;
}

.financial-transaction-meta .financial-spending-toggle,
.financial-transaction-meta .financial-spending-state {
  min-width: 0;
  min-height: 24px;
  padding: 4px 7px;
  font-size: 10px;
  line-height: 1.2;
}

.financial-direction-badge {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  color: #66758c;
  background: #eef1f6;
  font-size: 11px;
  font-weight: 800;
}

.financial-direction-badge.deposit {
  color: var(--success);
  background: var(--success-soft);
}

.financial-direction-badge.withdrawal {
  color: #315fae;
  background: var(--blue-soft);
}

.financial-table-amount {
  position: relative;
  text-align: right !important;
}

.financial-table-amount > strong,
.financial-transaction-balance {
  display: block;
  white-space: nowrap;
}

.financial-transaction-balance {
  position: absolute;
  right: 15px;
  bottom: 12px;
  margin-top: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.financial-transaction-balance[data-balance-hidden="true"] {
  visibility: hidden;
}

.financial-table-amount.deposit {
  color: var(--success);
  font-weight: 800;
}

.financial-table-amount.withdrawal {
  color: #315fae;
  font-weight: 800;
}

.financial-spending-count {
  background: #e9f7ef;
  color: #237a4b;
}

.financial-table-spending {
  text-align: center !important;
}

.financial-spending-toggle,
.financial-spending-state {
  display: inline-flex;
  min-width: 92px;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.financial-spending-toggle {
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    color 150ms ease;
}

.financial-spending-toggle.included {
  border-color: #efc4ca;
  background: #fff5f6;
  color: #ae3e4c;
}

.financial-spending-toggle.excluded {
  border-color: #d8dee8;
  background: #f4f6f9;
  color: #59667a;
}

.financial-spending-toggle.pending {
  border-color: #cad9f2;
  color: #315fae;
  background: #eef4ff;
  text-decoration: none;
}

.financial-spending-toggle:hover,
.financial-spending-toggle:focus-visible {
  border-color: var(--theme-accent,#5d6bf8);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent,rgb(93 107 248)) 14%, transparent);
}

.financial-spending-toggle:disabled {
  cursor: wait;
  opacity: 0.65;
}

.financial-spending-state.unavailable {
  color: #8993a3;
}

.financial-spending-state.included {
  color: var(--success);
  background: var(--success-soft);
}

.financial-spending-state.excluded {
  color: #768296;
  background: #f0f2f6;
}

.financial-excluded-reconsider {
  min-width: 0;
  min-height: 28px;
  max-width: 100%;
  margin-top: 8px;
  padding: 5px 9px;
  font-size: 10px;
}

.financial-transaction-table-shell > .financial-empty-state {
  border: 0;
  box-shadow: none;
}

.financial-transaction-list > .financial-empty-state {
  border: 0;
  box-shadow: none;
}

.financial-transaction-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 13px;
  padding: 17px 19px;
  align-items: center;
  border-bottom: 1px solid #e7ebf2;
}

.financial-transaction-row:last-child {
  border-bottom: 0;
}

.financial-transaction-icon {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: #66758c;
  background: #eef1f6;
  font-size: 18px;
  font-weight: 850;
}

.financial-transaction-icon.deposit {
  color: var(--success);
  background: var(--success-soft);
}

.financial-transaction-icon.withdrawal {
  color: #315fae;
  background: var(--blue-soft);
}

.financial-transaction-copy,
.financial-transaction-values {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.financial-transaction-copy strong {
  overflow: hidden;
  color: #1b2c48;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.financial-transaction-copy span,
.financial-transaction-values span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.financial-transaction-values {
  align-items: flex-end;
  text-align: right;
}

.financial-transaction-values strong {
  color: #42516a;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.financial-transaction-values.deposit strong {
  color: var(--success);
}

.financial-transaction-values.withdrawal strong {
  color: #315fae;
}

@container kkaebu (max-width: 760px){
  .financial-instrument-grid {
    grid-template-columns: 1fr;
  }

  .money-overview {
    grid-template-columns: 1fr;
  }

  .money-debt-overview {
    grid-template-columns: 1fr;
  }

  .money-overview-breakdown > span:first-child {
    border-left: 0;
  }

  .money-spending-view-options {
    grid-template-columns: 1fr;
  }
}

@container kkaebu (max-width: 599px){
  .financial-intro {
    min-height: 98px;
    padding-bottom: 2px;
  }

  .money-view-tabs {
    margin-bottom: 18px;
  }

  .money-view-tabs button {
    min-height: 44px;
    padding: 8px 5px;
    font-size: 11px;
  }

  .owned-assets-actions {
    grid-template-columns: 1fr;
  }

  .money-debt-overview > div {
    padding: 19px;
  }

  .money-next-payment-summary {
    border-top: 1px solid #eadfdb;
  }

  .money-management-mode,
  .money-monthly-view-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .money-management-mode button {
    width: 100%;
  }

  .money-monthly-view-heading > strong {
    font-size: 19px;
  }

  .money-monthly-comparison {
    grid-template-columns: 1fr;
  }

  .money-budget-basis > div,
  .money-debt-actions,
  .card-payment-allocation-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .money-debt-actions > *,
  .money-budget-basis button {
    width: 100%;
  }

  .card-payment-basic-grid {
    grid-template-columns: 1fr;
  }

  .money-payment-event-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .money-payment-event-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .card-payment-schedule-option {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .card-payment-schedule-option .installment-input-wrap {
    grid-column: 2;
  }

  .money-overview-primary {
    padding: 19px;
  }

  .money-overview-breakdown {
    grid-template-columns: 1fr;
    padding: 6px 14px;
  }

  .money-overview-breakdown > span {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 11px 4px;
    align-items: center;
    border-top: 1px solid #e2e9f0;
    border-left: 0;
  }

  .money-overview-breakdown > span:first-child {
    border-top: 0;
  }

  .money-overview-breakdown strong {
    margin-top: 0;
    font-size: 14px;
    text-align: right;
  }

  .money-overview-breakdown em {
    grid-column: 1 / -1;
    text-align: right;
  }

  .money-debt-card > summary,
  .money-installment-plan > summary {
    gap: 9px;
    padding: 14px;
  }

  .money-installment-plan > summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .money-installment-plan > summary > strong {
    text-align: left;
  }

  .money-installment-schedule-row {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .money-installment-schedule-row > span:last-child {
    text-align: left;
  }

  .manual-asset-balance-fields {
    grid-template-columns: 1fr;
  }

  .manual-asset-balance-fields > p {
    grid-column: auto;
  }

  .financial-section {
    margin-top: 34px;
  }

  .financial-assets-section {
    margin-top: 18px;
  }

  .financial-section .connection-section-heading {
    gap: 12px;
    align-items: flex-start;
    flex-direction: column;
  }

  .financial-heading-actions {
    width: 100%;
    justify-content: space-between;
  }

  .financial-summary-line {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 10px 8px;
  }

  .financial-summary-item {
    padding: 0 8px;
    align-items: center;
    flex-direction: column;
    gap: 2px;
  }

  .financial-summary-item:first-child {
    padding-left: 0;
    align-items: flex-start;
    justify-content: center;
  }

  .financial-summary-item:nth-child(odd) {
    border-left: 0;
  }

  .financial-summary-item:nth-child(n + 3) {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #dce3ed;
  }

  .financial-summary-item small {
    max-width: 100%;
    font-size: 9px;
  }

  .financial-summary-item strong {
    max-width: 100%;
    font-size: 12px;
  }

  .financial-asset-table {
    min-width: 0;
  }

  .financial-asset-table th,
  .financial-asset-table td {
    padding: 10px 5px;
  }

  .financial-asset-table th:nth-child(1) {
    width: 11%;
  }

  .financial-asset-table th:nth-child(2) {
    width: 36%;
  }

  .financial-asset-table th:nth-child(3) {
    width: 24%;
  }

  .financial-asset-table th:nth-child(4) {
    width: 29%;
  }

  .financial-asset-type-cell {
    text-align: center !important;
  }

  .financial-asset-type {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    font-size: 14px;
  }

  .financial-asset-name strong {
    max-width: none;
    font-size: 11px;
  }

  .financial-asset-name small {
    gap: 3px;
    font-size: 8px;
  }

  .financial-asset-name small span + span::before {
    margin-right: 3px;
  }

  .financial-asset-balance {
    font-size: 10px;
  }

  .financial-asset-status .financial-sync-badge {
    padding: 4px 5px;
    font-size: 8px;
  }

  .financial-asset-status > small {
    margin-top: 4px;
    font-size: 7.5px;
    line-height: 1.35;
  }

  .financial-transaction-table th,
  .financial-transaction-table td {
    padding: 12px 6px;
    vertical-align: top;
  }

  .financial-transaction-pagination {
    grid-template-columns: minmax(70px, auto) minmax(0, 1fr) minmax(70px, auto);
    gap: 7px;
    padding: 10px;
  }

  .financial-transaction-pagination button {
    min-height: 32px;
    padding: 0 9px;
    font-size: 10px;
  }

  .financial-transaction-pagination > span {
    font-size: 10px;
  }

  .financial-transaction-table th:nth-child(1) {
    width: 24%;
    padding-left: 10px;
  }

  .financial-transaction-table th:nth-child(2) {
    width: 45%;
  }

  .financial-transaction-table th:nth-child(3) {
    width: 31%;
    padding-right: 10px;
  }

  .financial-transaction-date {
    padding-left: 10px !important;
  }

  .financial-transaction-date > span {
    font-size: 9.5px;
    line-height: 1.35;
    white-space: nowrap;
  }

  .financial-transaction-date > small {
    font-size: 9px;
  }

  .financial-table-description {
    padding-right: 3px !important;
    padding-left: 3px !important;
  }

  .financial-table-description > strong {
    font-size: 12px;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .financial-transaction-meta {
    gap: 4px;
    margin-top: 6px;
  }

  .financial-transaction-meta-badge,
  .financial-transaction-meta .financial-spending-toggle,
  .financial-transaction-meta .financial-spending-state {
    min-height: 21px;
    padding: 3px 5px;
    font-size: 8.5px;
  }

  .financial-table-amount {
    padding-right: 10px !important;
    padding-left: 3px !important;
    font-size: 11.5px;
  }

  .financial-transaction-balance {
    right: 10px;
    bottom: 12px;
    margin-top: 0;
    font-size: 8.5px;
    line-height: 1.3;
    white-space: nowrap;
  }

  .financial-excluded-reconsider {
    min-height: 24px;
    margin-top: 6px;
    padding: 4px 6px;
    font-size: 8.5px;
  }

  .financial-instrument-card {
    min-height: 154px;
    padding: 17px;
  }

  .financial-instrument-heading {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .financial-instrument-heading .financial-sync-badge {
    grid-column: 2;
    width: max-content;
  }

  .financial-transaction-row {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    padding: 15px;
  }

  .financial-transaction-values {
    grid-column: 2;
    align-items: flex-start;
    margin-top: -3px;
    text-align: left;
  }

  .financial-transaction-values span {
    display: none;
  }
}

/* Compact, app-style settings index. Editors keep using the scrollable dialogs above. */
.settings-page {
  --page-content-max-width: 620px;
}

.settings-heading {
  margin-bottom: 12px;
}

.settings-heading h1 {
  font-size: 28px;
}

.settings-menu-list {
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--theme-shadow-ink,rgb(25 48 83)) 6%, transparent);
}

.settings-page > .settings-group-label {
  flex: 0 0 auto;
  width: 100%;
  max-width: var(--page-content-max-width, 620px);
  margin: 18px auto 7px;
  padding-inline: 12px;
  color: var(--kkaebu-muted, #758197);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0;
}

.settings-menu-row {
  display: grid;
  width: 100%;
  min-height: 56px;
  grid-template-columns: 36px minmax(0, 1fr) auto 10px;
  gap: 10px;
  padding: 8px 13px;
  align-items: center;
  border: 0;
  color: inherit;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: background-color 140ms ease;
}

.settings-menu-row + .settings-menu-row {
  border-top: 1px solid #edf0f5;
}

.settings-menu-row:hover,
.settings-menu-row:active {
  background: #f6f9ff;
}

.settings-menu-row:focus-visible {
  position: relative;
  z-index: 1;
  outline: 3px solid color-mix(in srgb, var(--theme-accent,rgb(40 100 215)) 22%, transparent);
  outline-offset: -3px;
  background: #f6f9ff;
}

.settings-menu-icon {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 11px;
  background: var(--blue-soft);
  font-size: 18px;
}

.settings-menu-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.settings-menu-copy strong,
.settings-menu-copy > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-menu-copy strong {
  color: var(--navy);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.settings-menu-copy > span {
  color: #758197;
  font-size: 10.5px;
  line-height: 1.35;
}

.settings-menu-value {
  max-width: 116px;
  overflow: hidden;
  color: #68758a;
  font-size: 11px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-menu-chevron {
  color: #9aa6b7;
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  text-align: right;
}

.settings-dialog-section + .settings-dialog-section,
.settings-dialog-section + .settings-dialog-admin-section,
.settings-dialog-admin-section + .settings-dialog-section {
  margin-top: 18px;
}

.settings-dialog-section-heading,
.financial-dialog-heading {
  display: flex;
  gap: 14px;
  align-items: flex-end;
  justify-content: space-between;
  margin: 0 2px 12px;
}

.settings-dialog-section-heading .eyebrow {
  margin-bottom: 5px;
}

.settings-dialog-section-heading h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  letter-spacing: -0.035em;
}

.financial-dialog-heading {
  align-items: center;
  margin-bottom: 0;
}

.financial-dialog-heading .section-supporting-copy {
  max-width: 510px;
  margin: 0;
}

.account-dialog {
  max-width: 520px;
}

.account-dialog-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 18px;
  align-items: center;
}

.account-dialog-icon {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  background: var(--blue-soft);
  font-size: 19px;
}

.account-dialog-copy {
  min-width: 0;
}

.account-dialog-copy strong,
.account-dialog-copy p {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-dialog-copy strong {
  color: var(--navy);
  font-size: 14px;
}

.identity-link-card {
  margin-top: 12px;
}

.kakao-identity-icon {
  background: #fee500;
}

.kakao-identity-button {
  min-height: 40px;
  border: 1px solid #fee500;
  border-radius: 12px;
  background: #fee500;
  color: #191919;
  cursor: pointer;
  font-weight: 750;
}

.kakao-identity-button:hover {
  border-color: var(--theme-accent,#f2d900);
  background: #f2d900;
}

.kakao-identity-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.account-identity-guide {
  margin: 12px 4px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

@container kkaebu (max-width: 599px){
  body.settings-index-page .settings-page {
    display: flex;
    min-height: 100dvh;
    padding-top: max(12px, env(safe-area-inset-top));
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    flex-direction: column;
  }

  body.settings-index-page .settings-page > .app-header {
    position: relative;
    top: auto;
    flex: 0 0 auto;
    margin-bottom: 8px;
  }

  .settings-heading {
    flex: 0 0 auto;
    margin: 0 2px 8px;
  }

  .settings-heading h1 {
    font-size: 24px;
  }

  .settings-menu-list {
    flex: 0 0 auto;
    border-radius: 16px;
  }

  .settings-menu-row {
    min-height: 48px;
    grid-template-columns: 32px minmax(0, 1fr) auto 9px;
    gap: 8px;
    padding: 5px 10px;
  }

  .settings-menu-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    font-size: 16px;
  }

  .settings-menu-value {
    max-width: 88px;
    font-size: 10px;
  }

  .settings-menu-chevron {
    font-size: 20px;
  }

  .financial-dialog-heading,
  .account-dialog-card {
    align-items: stretch;
  }

  .financial-dialog-heading {
    flex-direction: column;
  }

  .financial-dialog-heading .financial-add-link {
    width: 100%;
  }

  .account-dialog-card {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .account-dialog-card .compact-action {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@container kkaebu (max-width: 599px){@media (max-height: 650px){
  .settings-menu-row {
    min-height: 44px;
    grid-template-columns: 30px minmax(0, 1fr) auto 8px;
    padding-top: 4px;
    padding-bottom: 4px;
  }

  .settings-menu-icon {
    width: 30px;
    height: 30px;
    font-size: 15px;
  }

  .settings-menu-copy > span {
    display: none;
  }
}}

.records-load-more td {
  padding: 18px 12px;
  color: #71809a;
  font-size: 0.8rem;
  text-align: center;
  background: #f8faff;
}

.bankapi-free-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.35rem;
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
  background: #dcfce7;
  color: #166534;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
}

.bankapi-success-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.bankapi-success-actions a {
  color: var(--primary, #2563eb);
  font-weight: 700;
}

.financial-refresh-assets-card {
  margin-top: -6px;
  background: #f6f8fb;
}

.financial-add-asset-icon.refresh {
  color: #166b5d;
  background: #edf9f5;
}

.bankapi-refresh-accounts {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid #dce4ef;
  border-radius: 12px;
  background: #fff;
}

.bankapi-refresh-accounts:empty {
  display: none;
}

.bankapi-refresh-account {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  margin: 0;
  padding: 6px 10px;
  border: 0;
}

.bankapi-refresh-account + .bankapi-refresh-account {
  border-top: 1px solid #edf0f5;
}

.bankapi-refresh-account-heading {
  display: flex;
  gap: 8px;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  cursor: pointer;
}

.bankapi-refresh-account-heading input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  accent-color: #147c6c;
}

.bankapi-refresh-account-heading span,
.bankapi-refresh-account-heading strong,
.bankapi-refresh-account-heading small {
  display: block;
  min-width: 0;
}

.bankapi-refresh-account-heading strong {
  color: #20334e;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bankapi-refresh-account-heading small {
  margin-top: 3px;
  color: #748195;
  font-size: 11px;
}

.bankapi-refresh-password {
  width: 94px;
  margin: 0;
}

.bankapi-refresh-password input {
  height: 44px;
  padding-inline: 8px;
  text-align: center;
}

.bankapi-refresh-password input::placeholder {
  font-size: 12px;
  font-weight: 500;
}

.bankapi-refresh-dialog .quick-card-dialog-panel {
  padding: 20px 16px 16px;
}

.bankapi-refresh-dialog h2 {
  margin: 0 36px 6px 0;
  font-size: 20px;
}

.bankapi-refresh-dialog .quick-install-dialog-lead {
  margin: 0;
  font-size: 12px;
}

.bankapi-refresh-dialog .quick-card-form {
  gap: 10px;
  margin-top: 12px;
}

.bankapi-refresh-period {
  grid-template-columns: minmax(0, 1fr) 126px;
  align-items: center;
}

.bankapi-refresh-period .app-control-trigger {
  height: 44px;
  min-height: 44px;
  padding-left: 10px;
  font-size: 14px;
}

.bankapi-refresh-period[hidden] {
  display: none;
}

.bankapi-refresh-help {
  margin: 0;
  color: #748195;
  font-size: 11px;
  line-height: 1.5;
}

.bankapi-refresh-dialog .quick-card-submit {
  min-height: 44px;
  margin-top: 0;
}

.bankapi-refresh-unsupported {
  grid-column: 1 / -1;
  margin: 0 0 0 28px;
  color: #8a6370;
  font-size: 11px;
  line-height: 1.5;
}

.nav-recurring-match-count {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  margin-left: 4px;
  padding: 0 5px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: #d34a52;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
}

.nav-recurring-match-count[hidden] {
  display: none;
}

.records-category.category-savings {
  color: #116954;
  background: #e7f6ef;
}

#financial-access-list,
#income-sources-list,
#deleted-expenses-list,
.category-settings-list.category-settings-table {
  display: block;
  overflow: hidden;
  border: 1px solid #dce4ef;
  border-radius: 12px;
  background: #fff;
}

/* Settings subpages share the main menu's compact, click-to-edit rows. */
.settings-compact-item + .settings-compact-item {
  border-top: 1px solid #edf0f5;
}

.settings-compact-item {
  min-width: 0;
}

.settings-compact-item > .settings-compact-row {
  min-height: 52px;
  border-radius: 0;
}

.settings-compact-row[aria-expanded="true"] {
  background: #f6f9ff;
}

.settings-compact-row[aria-expanded="true"] .settings-menu-chevron {
  transform: rotate(90deg);
}

.settings-compact-row .settings-menu-copy > span:not([hidden]) {
  display: block;
}

.settings-compact-row .settings-menu-value {
  max-width: 120px;
}

.settings-row-editor {
  padding: 12px;
  border-top: 1px solid #edf0f5;
  background: #f8faff;
}

.settings-row-editor[hidden] {
  display: none;
}

.settings-row-editor > .card,
.settings-row-editor > .category-settings-card {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.settings-row-editor > .category-settings-table-row .category-settings-card-header {
  grid-template-columns: 46px minmax(0, 1fr) auto;
  padding: 0 0 10px;
}

.settings-row-editor > .category-settings-table-row .subcategory-settings-body {
  padding: 0;
}

#income-sources-form {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#income-sources-form .income-source-settings-row {
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 8px;
}

#financial-access-dialog .financial-asset-add-link {
  display: flex;
  min-height: 44px;
  margin-top: 8px;
  padding: 8px 12px;
  align-items: center;
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

#financial-access-dialog .financial-access-section {
  gap: 0;
}

#financial-asset-dialog .financial-security-note,
#category-settings-dialog .category-settings-note,
#deleted-expenses-dialog .deleted-expenses-note {
  padding: 10px 12px;
  margin-bottom: 12px;
}

.category-settings-table-head,
.category-settings-table-row .category-settings-card-header {
  display: grid;
  grid-template-columns: 62px minmax(150px, 1fr) 132px 56px;
  gap: 10px;
  align-items: center;
}

.category-settings-table-head {
  min-height: 42px;
  padding: 8px 16px;
  border-bottom: 1px solid #dce4ef;
  color: #6d7b91;
  background: #f5f8fc;
  font-size: 11px;
  font-weight: 800;
}

.category-settings-table-head span:nth-child(3),
.category-settings-table-head span:nth-child(4) {
  text-align: center;
}

.category-settings-table-row {
  padding: 0;
  border-bottom: 1px solid #e7edf5;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.category-settings-table-row:last-child {
  border-bottom: 0;
}

.category-settings-table-row .category-settings-card-header {
  padding: 11px 16px;
}

.category-settings-table-row .category-emoji-field,
.category-settings-table-row .category-name-field {
  display: block;
}

.category-settings-table-row .category-emoji-field > span,
.category-settings-table-row .category-name-field > span {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.category-settings-table-row .category-emoji-select,
.category-settings-table-row .category-name-field input {
  height: 40px;
  border-radius: 9px;
}

.category-settings-table-row .category-emoji-select {
  padding: 4px 6px;
  font-size: 20px;
}

.category-settings-table-row .app-control--emoji .app-control-trigger {
  height: 40px;
  padding: 4px 18px 4px 4px;
  border-radius: 9px;
  font-size: 18px;
}

.category-settings-table-row .app-control--emoji .app-control-arrow {
  right: 7px;
}

.subcategory-detail-toggle {
  display: grid;
  gap: 2px;
  min-height: 40px;
  padding: 5px 8px;
  align-content: center;
  border: 1px solid #d7e2f2;
  border-radius: 9px;
  color: #285da9;
  background: #f5f8fd;
  text-align: center;
  cursor: pointer;
}

.subcategory-detail-toggle strong {
  font-size: 11px;
  white-space: nowrap;
}

.subcategory-detail-toggle span {
  color: #7a879a;
  font-size: 10px;
  font-weight: 700;
}

.subcategory-detail-toggle:hover,
.subcategory-detail-toggle:focus-visible,
.subcategory-detail-toggle[aria-expanded="true"] {
  border-color: var(--theme-accent,#b9ceed);
  color: #174c98;
  background: #eaf2ff;
  outline: none;
}

.category-settings-table-row .category-remove-button {
  min-height: 40px;
  padding-inline: 8px;
}

.category-settings-table-row .subcategory-settings-body {
  padding: 0 16px 14px;
  border-top: 1px solid #edf1f6;
  background: #f8faff;
}

.category-settings-table-row .subcategory-settings-body[hidden] {
  display: none;
}

.subcategory-settings-subhead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 10px 0 7px;
  color: #7a8799;
  font-size: 10px;
  font-weight: 800;
}

.category-settings-table-row .subcategory-settings-list {
  grid-template-columns: 1fr;
  gap: 0;
  overflow: hidden;
  border: 1px solid #e0e7f0;
  border-radius: 9px;
  background: #fff;
}

.category-settings-table-row .subcategory-settings-row {
  padding: 7px 8px;
  border-bottom: 1px solid #edf1f6;
}

.category-settings-table-row .subcategory-settings-row:last-child {
  border-bottom: 0;
}

.category-settings-table-row .subcategory-settings-row input {
  border-color: transparent;
  background: transparent;
}

.category-settings-table-row .subcategory-add-button {
  margin-top: 9px;
}

@container kkaebu (max-width: 599px){
  .category-settings-table-head,
  .category-settings-table-row .category-settings-card-header {
    grid-template-columns: 46px minmax(0, 1fr) 92px 44px;
    gap: 6px;
  }

  .category-settings-table-head {
    padding-inline: 10px;
  }

  .category-settings-table-row .category-settings-card-header {
    padding: 9px 10px;
  }

  .category-settings-table-row .subcategory-settings-body {
    padding: 0 10px 12px;
  }

  .subcategory-detail-toggle {
    padding-inline: 4px;
  }

  .subcategory-detail-toggle strong {
    white-space: normal;
    line-height: 1.15;
  }

  .subcategory-settings-subhead span:last-child {
    max-width: 110px;
    text-align: right;
  }

  .category-settings-table-row .subcategory-settings-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

.individual-family-section {
  display: grid;
  gap: 16px;
}

.individual-family-section[hidden],
.leave-family-section[hidden],
#family-members-section[hidden] {
  display: none;
}

.individual-status-card {
  display: flex;
  gap: 12px;
  padding: 15px;
  border: 1px solid #dbe5f2;
  border-radius: 14px;
  background: #f5f8fd;
}

.individual-status-card strong,
.family-choice-form h3,
.leave-family-section h3 {
  color: #172844;
}

.individual-status-card p,
.leave-family-section p {
  margin: 4px 0 0;
  color: #697991;
  font-size: 0.82rem;
  line-height: 1.55;
}

.family-choice-form {
  display: grid;
  gap: 11px;
  padding: 17px;
  border: 1px solid #dce4ef;
  border-radius: 15px;
  background: #fff;
}

.family-choice-form h3 {
  margin: 2px 0 0;
  font-size: 1rem;
}

.family-choice-form > label:not(.family-share-choice) {
  color: #46566e;
  font-size: 0.78rem;
  font-weight: 750;
}

.family-choice-form > input[type="text"] {
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid #d8e0ec;
  border-radius: 11px;
  outline: none;
  color: #1b2a43;
  background: #fff;
  font: inherit;
  font-weight: 700;
}

.family-choice-form > input[type="text"]:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent,rgb(40 100 215)) 12%, transparent);
}

.family-share-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 11px;
  border-radius: 11px;
  background: #f7f9fc;
  cursor: pointer;
}

.family-share-choice input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--blue);
}

.family-share-choice span {
  display: grid;
  gap: 3px;
}

.family-share-choice strong {
  color: #263750;
  font-size: 0.82rem;
}

.family-share-choice small {
  color: #718099;
  font-size: 0.72rem;
  line-height: 1.45;
}

.family-choice-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #8793a5;
  font-size: 0.72rem;
}

.family-choice-divider::before,
.family-choice-divider::after {
  height: 1px;
  background: #e1e7f0;
  content: "";
  flex: 1;
}

.leave-family-section {
  padding-top: 18px;
  border-top: 1px solid #e6ebf2;
}

.leave-category-dialog .category-settings-dialog-shell {
  width: min(100%, 560px);
}

.leave-category-options {
  display: grid;
  gap: 12px;
}

.leave-category-option {
  margin: 0;
  padding: 15px;
  border: 1px solid #dce4ef;
  border-radius: 14px;
  background: #fff;
}

.leave-category-option:has(input:checked) {
  border-color: var(--theme-accent,#8db2ea);
  background: #f3f7ff;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--theme-accent,rgb(42 102 194)) 8%, transparent);
}

.family-request-sharing {
  color: #3766a5;
  font-size: 0.72rem;
  font-weight: 700;
}

/* Keep every mobile screen aligned to the same six-pixel outer gutter. */
@container kkaebu (max-width: 599px){
  main.page-shell.page-shell {
    padding-right: max(6px, env(safe-area-inset-right));
    padding-left: max(6px, env(safe-area-inset-left));
  }

  main.auth-page-shell {
    width: 100%;
    max-width: 480px;
    padding-right: max(6px, env(safe-area-inset-right));
    padding-left: max(6px, env(safe-area-inset-left));
  }
}

/* Prevent any route or overlay from widening the document viewport. */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  overscroll-behavior-x: none;
}

.recurring-transfer-dialog-scroll {
  display: grid;
  max-width: 100%;
  gap: 24px;
  overflow-x: hidden;
}

.recurring-transfer-note {
  margin: 0;
}

.recurring-transfer-section {
  display: grid;
  min-width: 0;
  gap: 12px;
}

.recurring-transfer-section + .recurring-transfer-section {
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.recurring-transfer-section-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.recurring-transfer-section-heading h3 {
  margin: 0;
  color: #1c2d49;
  font-size: 17px;
}

.recurring-transfer-heading-title {
  display: flex;
  align-items: center;
  gap: 7px;
}

.recurring-transfer-row-count {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  flex: 0 0 auto;
  padding: 0 5px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: #d34a52;
  font-size: 10px;
  font-weight: 900;
}

.recurring-transfer-section-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.recurring-transfer-list {
  display: grid;
  min-width: 0;
  gap: 10px;
}

.recurring-transfer-table-shell {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dce4ef;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 5px 14px color-mix(in srgb, var(--theme-shadow-ink,rgb(27 47 79)) 5%, transparent);
}

.recurring-transfer-table,
.recurring-transfer-match-table,
.recurring-transfer-recent-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.recurring-transfer-recent-table th,
.recurring-transfer-recent-table td {
  padding: 9px;
  border-bottom: 1px solid #e2e8f1;
  color: #263750;
  font-size: 11px;
  text-align: left;
}

.recurring-transfer-recent-table th {
  color: #6c7a91;
  background: #f7f9fc;
  font-size: 10px;
  font-weight: 800;
}

.recurring-transfer-recent-table th:nth-child(1),
.recurring-transfer-recent-table td:nth-child(1) {
  width: 20%;
  white-space: nowrap;
}

.recurring-transfer-recent-table th:nth-child(2),
.recurring-transfer-recent-table td:nth-child(2) {
  width: 52%;
}

.recurring-transfer-recent-table th:nth-child(3),
.recurring-transfer-recent-table td:nth-child(3) {
  width: 28%;
  text-align: right;
  white-space: nowrap;
}

.recurring-transfer-recent-table td:nth-child(2) strong,
.recurring-transfer-recent-table td:nth-child(2) small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recurring-transfer-recent-table td:nth-child(2) small {
  margin-top: 2px;
  color: #738198;
  font-size: 9px;
}

.recurring-transfer-total-caption {
  padding: 0;
  caption-side: top;
  background: #eef4ff;
  border-bottom: 1px solid #dce4ef;
}

.recurring-transfer-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  color: #53647d;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
}

.recurring-transfer-total-row strong {
  color: var(--blue);
  font-size: 16px;
  font-weight: 900;
  white-space: nowrap;
}

.recurring-transfer-table th,
.recurring-transfer-table td,
.recurring-transfer-match-table th,
.recurring-transfer-match-table td {
  min-width: 0;
  border-bottom: 1px solid #e2e8f1;
  text-align: left;
}

.recurring-transfer-table th {
  padding: 10px 9px;
  color: #6c7a91;
  background: #f7f9fc;
  font-size: 10px;
  font-weight: 800;
}

.recurring-transfer-table th:nth-child(1) {
  width: 48%;
}

.recurring-transfer-table th:nth-child(2) {
  width: 22%;
  text-align: right;
}

.recurring-transfer-table th:nth-child(3) {
  width: 13%;
  text-align: center;
}

.recurring-transfer-table th:nth-child(4) {
  width: 17%;
  text-align: right;
}

.recurring-transfer-summary-row {
  cursor: pointer;
  transition: background 140ms ease;
}

.recurring-transfer-summary-row:hover,
.recurring-transfer-summary-row:focus-visible,
.recurring-transfer-summary-row[aria-expanded="true"] {
  outline: none;
  background: #f5f9ff;
}

.recurring-transfer-summary-row.inactive {
  opacity: 0.62;
}

.recurring-transfer-summary-row > td {
  padding: 11px 9px;
  vertical-align: middle;
}

.recurring-transfer-summary-row .recurring-transfer-item-header {
  gap: 7px;
}

.recurring-transfer-summary-row .recurring-transfer-kind-icon {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
  border-radius: 10px;
  font-size: 15px;
}

.recurring-transfer-summary-amount,
.recurring-transfer-summary-repeat,
.recurring-transfer-summary-action {
  overflow: hidden;
  color: #233a5e;
  font-size: 11px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recurring-transfer-summary-amount {
  text-align: right !important;
}

.recurring-transfer-summary-repeat {
  text-align: center !important;
}

.recurring-transfer-summary-action {
  text-align: right !important;
}

.recurring-transfer-row-arrow {
  display: inline-block;
  margin-left: 5px;
  color: #70819a;
  font-size: 16px;
  line-height: 1;
  transition: transform 140ms ease;
}

.recurring-transfer-summary-row[aria-expanded="true"] .recurring-transfer-row-arrow {
  transform: rotate(180deg);
}

.recurring-transfer-detail-row > td {
  padding: 0;
  border-bottom: 1px solid #d7e0ec;
}

.recurring-transfer-table tbody:last-child .recurring-transfer-detail-row:last-child > td,
.recurring-transfer-match-table tbody tr:last-child td {
  border-bottom: 0;
}

.recurring-transfer-expanded-content {
  min-width: 0;
  padding: 3px 13px 14px;
  background: #fbfcfe;
}

.recurring-transfer-expanded-content.suggestion {
  background: #f8fbff;
}

.recurring-transfer-matches {
  min-width: 0;
  margin-top: 14px;
}

.recurring-transfer-matches h4 {
  margin: 0 0 7px;
  color: #273b5b;
  font-size: 12px;
}

.recurring-transfer-match-table {
  overflow: hidden;
  border: 1px solid #dfe6f0;
  border-radius: 10px;
  background: #fff;
}

.recurring-transfer-match-table th,
.recurring-transfer-match-table td {
  padding: 8px;
  font-size: 10px;
}

.recurring-transfer-match-table th {
  color: #718097;
  background: #f4f7fb;
  font-weight: 800;
}

.recurring-transfer-match-table th:nth-child(1),
.recurring-transfer-match-table td:nth-child(1) {
  width: 25%;
  white-space: nowrap;
}

.recurring-transfer-match-table th:nth-child(2),
.recurring-transfer-match-table td:nth-child(2) {
  width: 48%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recurring-transfer-match-table th:nth-child(3),
.recurring-transfer-match-table td:nth-child(3) {
  width: 27%;
  text-align: right;
  white-space: nowrap;
}

.recurring-transfer-match-editable {
  cursor: pointer;
  transition: background 140ms ease;
}

.recurring-transfer-match-editable:hover,
.recurring-transfer-match-editable:focus-visible {
  outline: none;
  background: #edf5ff;
}

.recurring-transfer-match-table:not(.has-actions) .recurring-transfer-match-editable td:nth-child(2)::after {
  content: "수정";
  margin-left: 6px;
  padding: 2px 5px;
  border-radius: 999px;
  color: #2860ba;
  background: #e8f1ff;
  font-size: 8px;
  font-weight: 850;
}

.kakao-mark {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  font-size: 18px;
}

.auth-linking-guide {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.auth-linking-guide strong {
  color: var(--navy);
}

.recurring-transfer-matches-empty {
  margin: 0;
  padding: 12px;
  border-radius: 10px;
  color: #718097;
  background: #f2f5f9;
  font-size: 11px;
}

.recurring-transfer-item {
  min-width: 0;
  padding: 15px;
  border: 1px solid #dce4ef;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 5px 14px color-mix(in srgb, var(--theme-shadow-ink,rgb(27 47 79)) 5%, transparent);
}

.recurring-transfer-item.suggestion {
  border-color: #cdddf6;
  background: #f8fbff;
}

.recurring-transfer-item.inactive {
  opacity: 0.68;
  background: #f7f8fa;
}

.recurring-transfer-item-header {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.recurring-transfer-kind-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 12px;
  background: #edf3ff;
  font-size: 18px;
}

.recurring-transfer-item-title {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 3px;
}

.recurring-transfer-item-title strong,
.recurring-transfer-item-title span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recurring-transfer-item-title strong {
  color: #172844;
  font-size: 14px;
}

.recurring-transfer-item-title span {
  color: #718099;
  font-size: 11px;
}

.recurring-transfer-status {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
}

.recurring-transfer-status.success {
  color: #137356;
  background: #e8f7f1;
}

.recurring-transfer-status.warning {
  color: #97610e;
  background: #fff5da;
}

.recurring-transfer-status.danger {
  color: #b43b48;
  background: #fff0f2;
}

.recurring-transfer-status.neutral,
.recurring-transfer-status.inactive {
  color: #58687f;
  background: #eef1f5;
}

.recurring-transfer-details {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 0;
}

.recurring-transfer-details > div {
  min-width: 0;
  padding: 9px;
  border-radius: 10px;
  background: #f5f7fa;
}

.recurring-transfer-details dt {
  color: #7b889b;
  font-size: 10px;
  font-weight: 750;
}

.recurring-transfer-details dd {
  min-width: 0;
  margin: 4px 0 0;
  overflow: hidden;
  color: #263750;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recurring-transfer-item-footer,
.recurring-transfer-controls {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.recurring-transfer-item-footer {
  justify-content: space-between;
}

.recurring-transfer-observed {
  color: #607089;
  font-size: 11px;
  font-weight: 750;
}

.recurring-transfer-add-button,
.recurring-transfer-dismiss-button,
.recurring-transfer-edit-button,
.recurring-transfer-assign-button,
.recurring-transfer-active-button,
.recurring-transfer-delete-button,
.recurring-transfer-action-toggle button {
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid #d6deea;
  border-radius: 10px;
  color: #39506f;
  background: #fff;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.recurring-transfer-add-button {
  border-color: #2b65c7;
  color: #fff;
  background: #245ab5;
}

.recurring-transfer-suggestion-actions {
  display: flex;
  min-width: 0;
  gap: 7px;
}

.recurring-transfer-dismiss-button {
  color: #53637a;
  background: #fff;
}

.recurring-transfer-assign-button {
  color: #245caf;
  background: #f3f7ff;
}

.recurring-transfer-edit-button {
  color: #315374;
  background: #f8fafc;
}

.recurring-transfer-action-toggle {
  display: inline-flex;
  min-width: 0;
  padding: 2px;
  border-radius: 11px;
  background: #edf1f6;
}

.recurring-transfer-action-toggle button {
  min-height: 32px;
  border: 0;
  background: transparent;
}

.recurring-transfer-action-toggle button[aria-pressed="true"] {
  color: #1f58b8;
  background: #fff;
  box-shadow: 0 2px 6px color-mix(in srgb, var(--theme-accent,rgb(31 60 105)) 12%, transparent);
}

.recurring-transfer-controls .recurring-transfer-assign-button {
  margin-left: auto;
}

.recurring-transfer-controls button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.recurring-transfer-delete-button {
  color: var(--danger);
}

.recurring-transfer-empty {
  display: flex;
  gap: 11px;
  padding: 17px;
  align-items: center;
  border: 1px dashed #d7dfeb;
  border-radius: 14px;
  color: #708097;
  background: #f8f9fb;
}

.recurring-transfer-empty > span {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 50%;
  background: #eaf0f8;
  font-weight: 900;
}

.recurring-transfer-empty strong {
  display: block;
  color: #43536a;
  font-size: 13px;
}

.recurring-transfer-empty p {
  margin: 3px 0 0;
  font-size: 11px;
  line-height: 1.45;
}

.manual-recurring-open,
.manual-recurring-form-heading button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid #ced9e9;
  border-radius: 10px;
  color: #285cae;
  background: #fff;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.manual-recurring-panel {
  min-width: 0;
  padding: 15px;
  border: 1px solid #cfdcf0;
  border-radius: 16px;
  background: #f7faff;
}

.manual-recurring-form,
.manual-recurring-form-heading,
.manual-recurring-ledger-heading {
  min-width: 0;
}

.manual-recurring-form {
  display: grid;
  gap: 7px;
}

.manual-recurring-form-heading,
.manual-recurring-ledger-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.manual-recurring-form-heading h3 {
  margin: 0;
  color: #1b2f4e;
  font-size: 16px;
}

.manual-recurring-form-heading p {
  margin: 3px 0 0;
  color: #687991;
  font-size: 11px;
}

.manual-recurring-fields {
  display: grid;
  grid-template-columns: 62px minmax(0, 1.5fr) minmax(110px, 0.9fr) 92px;
  grid-auto-rows: 44px;
  gap: 0;
  overflow: hidden;
  border: 1px solid #d6dfeb;
  border-radius: 10px;
  background: #fff;
}

.manual-recurring-fields label {
  display: grid;
  min-width: 0;
  min-height: 0;
  gap: 1px;
  padding: 3px 8px;
  align-content: center;
  border-right: 1px solid #e1e7f0;
  color: #53647d;
  font-size: 9px;
  font-weight: 800;
}

.manual-recurring-fields label:last-child {
  border-right: 0;
}

.manual-recurring-card-field {
  grid-column: 1 / -1;
  min-height: 48px !important;
  border-top: 1px solid #e1e7f0;
  border-right: 0 !important;
}

.manual-recurring-card-field > span em {
  margin-left: 3px;
  color: #8492a6;
  font-size: 8px;
  font-style: normal;
  font-weight: 700;
}

.manual-recurring-card-control {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.manual-recurring-card-control select {
  flex: 1 1 auto;
}

.manual-recurring-card-control .app-control {
  width: auto;
  flex: 1 1 auto;
}

.manual-recurring-card-control .app-control-trigger {
  height: 24px;
  min-height: 24px;
  padding: 0 19px 0 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  font-size: 11px;
  font-weight: 750;
}

.manual-recurring-card-control .app-control-arrow {
  right: 5px;
  width: 6px;
  height: 6px;
}

.manual-recurring-card-control button {
  min-height: 25px;
  flex: 0 0 auto;
  padding: 3px 8px;
  border: 1px solid #cbd9ed;
  border-radius: 7px;
  color: #285cae;
  background: #f7faff;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.money-card-manage-link {
  display: flex;
  min-height: 42px;
  margin: 12px 18px 18px;
  padding: 0 13px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #dce5e2;
  border-radius: 11px;
  color: #28665d;
  background: #f7faf9;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.money-card-manage-link::after {
  content: "›";
  font-size: 20px;
  font-weight: 500;
}

.money-card-manage-link:hover,
.money-card-manage-link:focus-visible {
  border-color: var(--theme-accent,#9bc8bd);
  outline: 3px solid color-mix(in srgb, var(--theme-accent,rgb(40 127 109)) 12%, transparent);
}

.imported-transactions-section .connection-section-heading {
  align-items: flex-end;
}

.financial-spending-count {
  color: #8b5a30;
  background: #fff1df;
  text-decoration: none;
}

.imported-transaction-toolbar {
  display: grid;
  grid-template-columns: minmax(130px, 0.7fr) minmax(180px, 1.1fr) minmax(160px, 0.9fr) minmax(220px, 1.5fr);
  gap: 9px;
  margin: 16px 0 12px;
  padding: 12px;
  border: 1px solid #dce5e2;
  border-radius: 15px;
  background: #f7faf9;
}

.imported-transaction-toolbar label,
.imported-transaction-toolbar label > span {
  display: block;
  min-width: 0;
}

.imported-transaction-toolbar label > span {
  margin: 0 0 5px 2px;
  color: #718078;
  font-size: 9px;
  font-weight: 800;
}

.imported-transaction-toolbar select,
.imported-transaction-toolbar input {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid #d7e1de;
  border-radius: 10px;
  color: #334b48;
  background: #fff;
  font: inherit;
  font-size: 11px;
}

.imported-transaction-toolbar select:focus,
.imported-transaction-toolbar input:focus {
  border-color: var(--theme-accent,#87b8ad);
  outline: 3px solid color-mix(in srgb, var(--theme-accent,rgb(40 127 109)) 11%, transparent);
}

@container kkaebu (max-width: 760px){
  .imported-transaction-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@container kkaebu (max-width: 599px){
  .imported-transaction-toolbar {
    grid-template-columns: 1fr;
  }
}

.manual-recurring-fields input,
.manual-recurring-fields select {
  width: 100%;
  min-width: 0;
  height: 22px;
  min-height: 22px;
  box-sizing: border-box;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  color: #1c2e4a;
  background: transparent;
  font: inherit;
  font-size: 11px;
  font-weight: 750;
}

.manual-recurring-fields input:focus {
  box-shadow: inset 0 -2px var(--theme-accent,#2c65c0);
}

.manual-recurring-icon-field select {
  text-align: center;
  font-size: 15px;
}

.manual-recurring-icon-field .app-control-trigger {
  height: 22px;
  min-height: 22px;
  padding: 0 17px 0 3px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  font-size: 15px;
}

.manual-recurring-icon-field .app-control-arrow {
  right: 5px;
  width: 6px;
  height: 6px;
}

.manual-recurring-money-input,
.manual-recurring-day-input {
  position: relative;
  min-width: 0;
}

.manual-recurring-money-input input,
.manual-recurring-day-input input,
.manual-recurring-day-input select {
  padding-right: 19px;
  text-align: right;
}

.manual-recurring-day-input .app-control-trigger {
  height: 22px;
  min-height: 22px;
  padding: 0 17px 0 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  font-size: 11px;
  font-weight: 750;
  justify-content: flex-end;
}

.manual-recurring-day-input .app-control-arrow {
  right: 5px;
  width: 6px;
  height: 6px;
}

.manual-recurring-money-input span,
.manual-recurring-day-input span {
  position: absolute;
  top: 50%;
  right: 10px;
  color: #697991;
  font-size: 11px;
  font-weight: 800;
  transform: translateY(-50%);
  pointer-events: none;
}

.manual-recurring-filters {
  display: grid;
  grid-template-columns: minmax(130px, 1.6fr) repeat(3, minmax(92px, 1fr)) auto;
  gap: 6px;
  align-items: center;
}

.manual-recurring-filters input,
.manual-recurring-filters select,
.manual-recurring-filters button {
  width: 100%;
  min-width: 0;
  height: 32px;
  min-height: 32px;
  box-sizing: border-box;
  padding: 5px 8px;
  border: 1px solid #d8e0eb;
  border-radius: 8px;
  color: #40516b;
  background: #fff;
  font-size: 10px;
  font-weight: 750;
}

.manual-recurring-filters button {
  width: auto;
  color: #65748a;
  cursor: pointer;
}

.manual-recurring-filters .app-control-trigger {
  height: 32px;
  min-height: 32px;
  padding: 0 25px 0 8px;
  border-radius: 8px;
  font-size: 10px;
}

.manual-recurring-filters .app-control-arrow {
  right: 9px;
  width: 6px;
  height: 6px;
}

.manual-recurring-ledger-heading strong,
.manual-recurring-ledger-heading span {
  display: block;
}

.manual-recurring-ledger-heading strong {
  color: #243753;
  font-size: 13px;
}

.manual-recurring-ledger-heading span {
  margin-top: 2px;
  color: #2a64be;
  font-size: 10px;
  font-weight: 800;
}

.manual-recurring-help {
  margin: -7px 0 0;
  color: #718097;
  font-size: 10px;
}

.manual-recurring-transactions {
  min-width: 0;
  max-height: 310px;
  overflow-y: auto;
  border: 1px solid #dbe3ef;
  border-radius: 11px;
  background: #fff;
}

.manual-recurring-transaction-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.manual-recurring-transaction-table th,
.manual-recurring-transaction-table td {
  padding: 5px 6px;
  border-bottom: 1px solid #e5eaf2;
  overflow: hidden;
  color: #31435f;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manual-recurring-transaction-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #6d7b91;
  background: #f3f6fa;
  text-align: left;
  font-weight: 850;
}

.manual-recurring-transaction-table th:nth-child(1),
.manual-recurring-transaction-table td:nth-child(1) {
  width: 36px;
  text-align: center;
}

.manual-recurring-transaction-table th:nth-child(2),
.manual-recurring-transaction-table td:nth-child(2) {
  width: 64px;
}

.manual-recurring-transaction-table th:nth-child(4),
.manual-recurring-transaction-table td:nth-child(4) {
  width: 100px;
  text-align: right;
}

.manual-recurring-transaction-table tr.selected td {
  background: #edf5ff;
}

.manual-recurring-transaction-table tbody tr {
  cursor: pointer;
}

.manual-recurring-transaction-table input[type="checkbox"] {
  display: inline-block;
  width: 15px;
  min-width: 15px;
  height: 15px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border-radius: 3px;
  accent-color: #2864c1;
}

.manual-recurring-transaction-table td:nth-child(3) strong,
.manual-recurring-transaction-table td:nth-child(3) small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manual-recurring-transaction-table td:nth-child(3) strong {
  color: #263a5a;
  font-size: 10px;
}

.manual-recurring-transaction-table td:nth-child(3) small {
  margin-top: 1px;
  color: #7b889b;
  font-size: 8px;
}

.manual-recurring-more {
  margin: 0;
  padding: 9px;
  color: #6f7e94;
  background: #f5f7fa;
  text-align: center;
  font-size: 10px;
}

.manual-recurring-save {
  min-height: 36px;
  border: 0;
  border-radius: 11px;
  color: #fff;
  background: #245ab5;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.manual-recurring-save:disabled {
  opacity: 0.55;
  cursor: wait;
}

.recurring-assignment-dialog {
  width: min(720px, calc(100% - 24px));
}

.recurring-rule-editor-dialog {
  width: min(560px, calc(100% - 24px));
}

.recurring-rule-editor-scroll {
  display: grid;
  gap: 11px;
}

.recurring-rule-editor-help {
  margin: 0;
  color: #65758c;
  font-size: 11px;
  line-height: 1.5;
}

.recurring-rule-editor-actions {
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
}

.recurring-assignment-scroll {
  display: grid;
  gap: 9px;
}

.recurring-assignment-note {
  margin: 0;
}

.recurring-assignment-transactions {
  max-height: min(390px, 45dvh);
}

.recurring-assignment-actions {
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
}

.family-learning-recurring-feedback {
  padding: 13px 0;
  border-top: 1px solid #e3e9f2;
  border-bottom: 1px solid #e3e9f2;
}

.family-learning-recurring-feedback .family-learning-section-heading > strong {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  color: #225aa9;
  background: #eaf2ff;
  font-size: 11px;
}

@container kkaebu (max-width: 599px){
  .recurring-transfer-dialog-scroll {
    gap: 18px;
  }

  .recurring-transfer-section + .recurring-transfer-section {
    padding-top: 18px;
  }

  .recurring-transfer-item {
    padding: 12px;
  }

  .recurring-transfer-table th,
  .recurring-transfer-summary-row > td {
    padding-right: 6px;
    padding-left: 6px;
  }

  .recurring-transfer-table th:nth-child(1) {
    width: 42%;
  }

  .recurring-transfer-table th:nth-child(2) {
    width: 29%;
  }

  .recurring-transfer-table th:nth-child(3) {
    width: 12%;
  }

  .recurring-transfer-table th:nth-child(4) {
    width: 17%;
  }

  .recurring-transfer-summary-row .recurring-transfer-kind-icon {
    width: 29px;
    height: 29px;
    flex-basis: 29px;
  }

  .recurring-transfer-summary-row .recurring-transfer-item-title strong {
    font-size: 12px;
  }

  .recurring-transfer-summary-row .recurring-transfer-item-title span {
    font-size: 9px;
  }

  .recurring-transfer-table .recurring-transfer-status {
    padding: 4px 5px;
    font-size: 9px;
  }

  .recurring-transfer-expanded-content {
    padding-right: 8px;
    padding-left: 8px;
  }

  .recurring-transfer-match-table th,
  .recurring-transfer-match-table td {
    padding-right: 5px;
    padding-left: 5px;
  }

  .recurring-transfer-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-top: 11px;
  }

  .recurring-transfer-controls {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .recurring-transfer-item-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .recurring-transfer-suggestion-actions {
    width: 100%;
  }

  .recurring-transfer-suggestion-actions button {
    flex: 1;
  }

  .recurring-transfer-action-toggle {
    width: 100%;
  }

  .recurring-transfer-action-toggle button {
    flex: 1;
  }

  .recurring-transfer-controls .recurring-transfer-active-button {
    margin-left: 0;
    flex: 1;
  }

  .recurring-transfer-controls .recurring-transfer-assign-button {
    margin-left: 0;
    flex: 1;
  }

  .recurring-transfer-section-heading {
    align-items: flex-start;
  }

  .manual-recurring-panel {
    padding: 11px;
  }

  .manual-recurring-fields {
    grid-template-columns: 54px minmax(0, 1fr) 82px;
    grid-auto-rows: 42px;
    grid-template-areas:
      "icon name name"
      "amount amount day"
      "card card card";
  }

  .manual-recurring-icon-field {
    grid-area: icon;
    border-bottom: 1px solid #e1e7f0;
  }

  .manual-recurring-name-field {
    grid-area: name;
    border-right: 0 !important;
    border-bottom: 1px solid #e1e7f0;
  }

  .manual-recurring-fields label:nth-child(3) {
    grid-area: amount;
  }

  .manual-recurring-fields label:nth-child(4) {
    grid-area: day;
  }

  .manual-recurring-card-field {
    grid-area: card;
  }

  .manual-recurring-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas:
      "search search reset"
      "month category detail";
    gap: 4px;
  }

  .manual-recurring-filters input {
    grid-area: search;
  }

  .manual-recurring-filter-month {
    grid-area: month;
  }

  .manual-recurring-filter-category {
    grid-area: category;
  }

  .manual-recurring-filter-detail {
    grid-area: detail;
  }

  .manual-recurring-filters button {
    grid-area: reset;
    width: 100%;
    height: 32px;
    min-height: 32px;
    padding-inline: 6px;
  }

  .manual-recurring-filters .app-control {
    min-width: 0;
  }

  .manual-recurring-filters .app-control-trigger {
    height: 32px;
    min-height: 32px;
    padding-right: 20px;
    padding-left: 7px;
    font-size: 9px;
  }

  .manual-recurring-filters .app-control-arrow {
    right: 8px;
  }

  .manual-recurring-ledger-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .manual-recurring-transaction-table th:nth-child(2),
  .manual-recurring-transaction-table td:nth-child(2) {
    width: 61px;
  }

  .manual-recurring-transaction-table th:nth-child(4),
  .manual-recurring-transaction-table td:nth-child(4) {
    width: 72px;
  }
}
/* Gmail is an email source and intentionally has no asset balance. */
.gmail-source-manage { min-width: 44px; min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--muted); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.gmail-source-table .financial-asset-name { white-space: normal; overflow-wrap: anywhere; }
.bankapi-refresh-account-heading small { overflow-wrap: anywhere; }
[data-bankapi-refresh-status] { white-space: pre-line; overflow-wrap: anywhere; }
.gmail-dialog { border: 0; border-radius: 24px; width: min(440px, calc(100cqw - 24px)); max-height: 88dvh; padding: 0; color: #243247; }
.gmail-dialog::backdrop { background: rgb(18 31 49 / 45%); }
.gmail-panel { padding: 24px; overflow-wrap: anywhere; }
.gmail-panel > button:first-child { float: right; }
.gmail-panel p { line-height: 1.65; font-size: 14px; }
.gmail-panel h2 { margin: 16px 0; }
.gmail-period { padding: 12px; border-radius: 12px; background: #edf5ef; font-weight: 700; }
.gmail-panel button, .gmail-purchase button { min-height: 44px; margin: 5px 4px 5px 0; white-space: normal; }
.gmail-purchase { padding: 20px; margin: 12px 0; overflow-wrap: anywhere; }
.gmail-purchase h3 { margin: 10px 0; }
.gmail-purchase p { margin: 10px 0; font-size: 14px; line-height: 1.5; }
.gmail-form { display: grid; gap: 12px; }
.gmail-form label { display: grid; gap: 6px; font-size: 14px; }
.gmail-form input, .gmail-form select { width: 100%; min-height: 44px; font: inherit; padding: 10px; border: 1px solid #d4dce6; border-radius: 10px; box-sizing: border-box; }
.gmail-panel pre { white-space: pre-wrap; font-size: 12px; overflow-wrap: anywhere; }
.gmail-recent { max-height: 34dvh; overflow-y: auto; flex-shrink: 0; margin-top: 16px; }
body:has(.financial-page) { overflow-x: clip; }

/* Kkaebu brand refresh -----------------------------------------------------
   Mint and eggshell are the everyday foundation. Smart blue, lavender and
   gold are reserved for contextual signals so the financial UI stays calm. */
:root {
  --kkaebu-mint: #8fdcc9;
  --kkaebu-mint-soft: #e8faf5;
  --kkaebu-deep-mint: #15584f;
  --kkaebu-mint-action: #23766a;
  --kkaebu-blue: #67b7ea;
  --kkaebu-blue-deep: #2679a6;
  --kkaebu-blue-soft: #eaf6fd;
  --kkaebu-lavender: #b8b8e9;
  --kkaebu-lavender-soft: #f1f0ff;
  --kkaebu-gold: #ffd66b;
  --kkaebu-gold-soft: #fff8e3;
  --kkaebu-eggshell: #f4fcfa;
  --app-canvas: #eff3f2;
  --kkaebu-surface: #ffffff;
  --kkaebu-surface-muted: #fafcfb;
  --kkaebu-ink: #1f2a2e;
  --kkaebu-muted: #66757a;
  --kkaebu-line: #cde6e0;
  --surface-line: #d4dedb;
  --kkaebu-shadow: 0 18px 48px rgb(31 42 46 / 9%);
  --navy: var(--kkaebu-deep-mint);
  --blue: var(--kkaebu-mint-action);
  --blue-soft: var(--kkaebu-mint-soft);
  --ink: var(--kkaebu-ink);
  --muted: var(--kkaebu-muted);
  --line: var(--kkaebu-line);
  --danger: #b84f59;
  --danger-soft: #fff1f2;
  --success: #23766a;
  --success-soft: #e8faf5;
  color: var(--kkaebu-ink);
  background: var(--app-canvas);
}

html {
  background:
    radial-gradient(circle at 8% -8%, rgb(143 220 201 / 19%), transparent 28rem),
    radial-gradient(circle at 102% 18%, rgb(184 184 233 / 10%), transparent 26rem),
    linear-gradient(180deg, #f3f6f5 0%, #edf1f0 100%);
  background-attachment: fixed;
  scrollbar-color: rgb(35 118 106 / 35%) transparent;
}

html::-webkit-scrollbar-thumb {
  background: rgb(35 118 106 / 35%);
  background-clip: content-box;
}

body {
  color: var(--kkaebu-ink);
}

::selection {
  color: var(--kkaebu-deep-mint);
  background: rgb(143 220 201 / 55%);
}

a {
  text-decoration-color: rgb(35 118 106 / 42%);
}

.page-shell {
  max-width: 1080px;
}

.app-header {
  margin-top: 0;
  padding: 10px 12px;
  border: 1px solid rgb(212 222 219 / 94%);
  border-radius: 18px;
  background: rgb(255 255 255 / 82%);
  box-shadow: 0 10px 32px color-mix(in srgb, var(--theme-shadow-ink,rgb(31 42 46)) 8%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  backdrop-filter: blur(18px) saturate(120%);
}

.app-header::before {
  display: none;
}

.brand {
  color: var(--kkaebu-deep-mint);
  font-weight: 850;
}

.brand-mark {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
  border: 1px solid rgb(21 88 79 / 8%);
  border-radius: 13px;
  box-shadow: 0 5px 13px color-mix(in srgb, var(--theme-shadow-ink,rgb(21 88 79)) 14%, transparent);
}

.app-nav {
  gap: 4px;
  padding: 4px;
  border: 1px solid rgb(205 230 224 / 78%);
  border-radius: 13px;
  background: rgb(232 250 245 / 78%);
}

.nav-link {
  border-radius: 9px;
  color: #5e716d;
  transition:
    color 140ms ease,
    background-color 140ms ease,
    box-shadow 140ms ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--kkaebu-deep-mint);
  background: rgb(255 255 255 / 64%);
  outline: none;
}

.nav-link.active {
  color: var(--kkaebu-deep-mint);
  background: #ffffff;
  box-shadow: 0 3px 11px color-mix(in srgb, var(--theme-shadow-ink,rgb(21 88 79)) 11%, transparent);
}

.nav-review-count,
.nav-family-request-count,
.nav-menu-review-count {
  border-color: var(--kkaebu-eggshell);
  background: var(--kkaebu-gold);
  color: #5e4700;
  box-shadow: 0 3px 8px color-mix(in srgb, var(--theme-gold,rgb(167 122 0)) 22%, transparent);
}

.intro {
  margin-bottom: 28px;
}

.eyebrow {
  color: var(--kkaebu-mint-action);
  font-weight: 900;
  letter-spacing: 0.11em;
}

h1,
h2,
h3 {
  color: var(--kkaebu-ink);
}

h1 {
  letter-spacing: -0.045em;
}

.intro-copy {
  color: var(--kkaebu-muted);
}

.card {
  border-color: var(--surface-line);
  border-radius: 24px;
  background: rgb(255 255 255 / 97%);
  box-shadow: var(--kkaebu-shadow);
}

.connection-section-heading h2 {
  color: var(--kkaebu-deep-mint);
}

.field-group > label,
.settings-row-label,
.app-control-label {
  color: #405d58;
}

input,
select,
textarea,
.app-control-trigger,
.records-multiselect-trigger {
  border-color: var(--kkaebu-line);
  color: var(--kkaebu-ink);
  background-color: #ffffff;
}

input::placeholder,
textarea::placeholder {
  color: #899995;
}

input:focus,
select:focus,
textarea:focus,
.app-control-trigger:focus-visible,
.records-multiselect-trigger:focus-visible {
  border-color: var(--kkaebu-mint-action);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--theme-accent,rgb(143 220 201)) 28%, transparent);
}

select:disabled,
input:disabled,
textarea:disabled {
  color: #87938f;
  background: #f3f8f6;
}

.primary-button,
.category-settings-launch-button,
.app-confirm-submit.primary,
.record-save-button,
.settings-primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--kkaebu-mint-action), var(--kkaebu-deep-mint));
  box-shadow: 0 10px 24px color-mix(in srgb, var(--theme-accent,rgb(21 88 79)) 20%, transparent);
}

.primary-button:hover:not(:disabled),
.category-settings-launch-button:hover:not(:disabled),
.app-confirm-submit.primary:hover:not(:disabled),
.record-save-button:hover:not(:disabled),
.settings-primary-button:hover:not(:disabled) {
  background: linear-gradient(135deg, #2d897c, #15584f);
}

.secondary-button,
.manual-category-button,
.records-filter-reset,
.category-sheet-close,
.app-confirm-cancel {
  border-color: var(--kkaebu-line);
  color: #45615c;
  background: #f1f8f6;
}

.secondary-button:hover,
.manual-category-button:hover,
.records-filter-reset:hover,
.category-sheet-close:hover,
.app-confirm-cancel:hover {
  color: var(--kkaebu-deep-mint);
  background: var(--kkaebu-mint-soft);
}

.form-status.connecting,
.classification-status,
.count-badge {
  color: var(--kkaebu-deep-mint);
  background: var(--kkaebu-mint-soft);
}

.expense-form-card {
  position: relative;
  overflow: hidden;
}

.expense-form-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--kkaebu-mint), var(--kkaebu-mint-action));
  content: "";
}

.entry-type-toggle {
  color: var(--kkaebu-mint-action);
}

.entry-type-toggle:hover,
.entry-type-toggle:focus-visible {
  color: var(--kkaebu-deep-mint);
  background: var(--kkaebu-mint-soft);
  outline-color: color-mix(in srgb, var(--theme-accent,rgb(143 220 201)) 32%, transparent);
}

.expense-form-card[data-entry-mode="income"] {
  border-color: #9fd8ca;
}

.expense-form-card[data-entry-mode="income"] .primary-button,
.income-source-register-button {
  background: linear-gradient(135deg, var(--kkaebu-mint-action), var(--kkaebu-deep-mint));
}

.expense-description-suggestions-panel {
  border-color: var(--kkaebu-line);
  box-shadow: 0 10px 26px color-mix(in srgb, var(--theme-shadow-ink,rgb(21 88 79)) 8%, transparent);
}

.expense-description-suggestion {
  color: #526863;
  background: #f1f8f6;
}

.expense-description-suggestion:hover,
.expense-description-suggestion:focus-visible,
.expense-description-suggestion.active {
  border-color: var(--theme-accent,#a8dacf);
  color: var(--kkaebu-deep-mint);
  background: var(--kkaebu-mint-soft);
}

.expense-summary,
.records-filters,
.settings-index-card,
.category-settings-dialog {
  border-color: var(--surface-line);
  background: #f8faf9;
}

.expense-summary strong,
.category-name,
.settings-row strong,
.financial-access-item-heading h3 {
  color: var(--kkaebu-deep-mint);
}

.records-view-toggle,
.records-calendar-summary,
.records-search-panel,
.category-review,
.financial-asset-rename-form,
.financial-permission-toggle,
.subcategory-settings-row input {
  border-color: var(--surface-line);
  background: #f7f9f8;
}

.records-view-toggle button[aria-pressed="true"],
.records-category-option:has(input:checked),
.spending-target-category-option input:checked + span,
.financial-permission-toggle:has(input:checked) {
  border-color: var(--theme-accent,#96d2c4);
  color: var(--kkaebu-deep-mint);
  background: var(--kkaebu-mint-soft);
}

.records-calendar-day.has-records,
.records-calendar[data-records-mode="income"] .records-calendar-day.has-records {
  border-color: #b7ccc7;
  background: #ffffff;
  box-shadow: inset 0 -3px 0 var(--kkaebu-mint);
}

.records-calendar-day.is-today {
  border-color: var(--kkaebu-mint-action);
  background: #f4f8f7;
  box-shadow: inset 0 0 0 2px var(--kkaebu-mint-action);
}

/* Calendar surfaces stay neutral so the structure reads before the brand color. */
.records-calendar {
  border: 1px solid #cbd7d4;
  background: #ffffff;
  box-shadow: 0 18px 44px color-mix(in srgb, var(--theme-shadow-ink,rgb(31 42 46)) 11%, transparent);
}

.records-calendar-header {
  padding: 7px 8px;
  border: 1px solid #e0e7e5;
  border-radius: 13px;
  background: #f7f9f8;
}

.records-calendar-header strong {
  color: #2b3c38;
}

.records-calendar-header button {
  border-color: #d6dfdc;
  color: #4f625e;
  background: #ffffff;
}

.records-calendar-header button:hover,
.records-calendar-header button:focus-visible {
  border-color: var(--theme-accent,#9fbeb7);
  color: var(--kkaebu-deep-mint);
  background: #f2f7f5;
}

.records-calendar-summary {
  border-color: #dce4e2;
  background: #f5f7f6;
}

.records-calendar-summary-item + .records-calendar-summary-item {
  border-left-color: #dce4e2;
}

.records-calendar-weekdays {
  padding: 5px 0 8px;
  border-bottom: 1px solid #e6ebe9;
  color: #6e7a77;
}

.records-calendar-grid {
  gap: 6px;
}

.records-calendar-day {
  border-color: #dfe6e4;
  color: #586964;
  background: #fbfcfc;
}

button.records-calendar-day:hover,
button.records-calendar-day:focus-visible {
  border-color: var(--theme-accent,#9fbeb7);
  background: #f2f7f5;
}

.records-calendar-day.is-outside {
  border-color: transparent;
  color: #8e9996;
  background: #f5f7f6;
  opacity: 0.54;
}

.records-calendar[data-records-mode="income"] .records-calendar-day.has-records,
.records-calendar[data-records-mode="combined"] .records-calendar-day.has-incomes:not(.has-expenses),
.records-calendar[data-records-mode="combined"] .records-calendar-day.has-incomes.has-expenses {
  border-color: #b7ccc7;
  background: #ffffff;
  box-shadow: inset 0 -3px 0 var(--kkaebu-mint);
}

.records-calendar-day.is-today,
.records-calendar-day.is-today.has-records {
  border-color: var(--kkaebu-mint-action);
  background: #f4f8f7;
  box-shadow:
    inset 0 0 0 2px var(--kkaebu-mint-action),
    inset 0 -4px 0 var(--kkaebu-mint);
}

.records-calendar-day-total.income,
.records-calendar-summary-item.income strong {
  color: var(--kkaebu-mint-action);
}

.records-calendar-day-total.expense,
.records-calendar-summary-item.expense strong {
  color: #a45b63;
}

.records-category.category-transport,
.records-category.category-medical,
.records-category.category-living,
.records-category.category-groceries,
.records-category.category-leisure,
.records-category.category-dining,
.records-category.category-social,
.records-category.category-loan,
.records-category.category-annual,
.records-category.category-fixed,
.records-category.category-custom {
  border-color: rgb(205 230 224 / 82%);
}

.category-settings-note,
.financial-security-note {
  border-color: #b8ddd4;
  color: #315f57;
  background: var(--kkaebu-mint-soft);
}

.income-source-add-button,
.subcategory-add-button,
.category-add-button {
  border-color: #8fcbbc;
  color: var(--kkaebu-deep-mint);
  background: #f2fbf8;
}

.category-settings-launch-icon,
.quick-asset-type-icon,
.financial-asset-type {
  color: var(--kkaebu-deep-mint);
  background: var(--kkaebu-mint-soft);
}

/* Preserve white glyphs on the coloured asset-choice icons after the shared
   mint surface rule above. The dark glyphs were difficult to distinguish. */
.quick-asset-type-icon.bank,
.quick-asset-type-icon.card,
.quick-asset-type-icon.manual {
  color: #fff;
}

.quick-asset-type-icon.manual {
  background: linear-gradient(145deg, #7957bd, #52378c);
}

.category-settings-dialog-header,
.category-settings-dialog-actions,
.records-category-filter-panel,
.records-calendar-day-panel,
.category-sheet-panel,
.app-confirm-dialog,
.gmail-dialog {
  border-color: var(--kkaebu-line);
  background: #ffffff;
}

.category-settings-dialog::backdrop,
.records-category-filter-dialog::backdrop,
.records-calendar-day-dialog::backdrop,
.app-confirm-dialog::backdrop,
.gmail-dialog::backdrop {
  background: rgb(17 55 50 / 46%);
}

/* Smart blue is intentionally limited to analysis and explanation surfaces. */
.ai-insights-page .eyebrow,
.insight-card-heading .eyebrow {
  color: var(--kkaebu-blue-deep);
}

.card.insight-card {
  border-color: #cfe9f5;
  background:
    radial-gradient(circle at 100% 0%, rgb(103 183 234 / 12%), transparent 22rem),
    #ffffff;
}

.ranked-insight-list article > span {
  color: #174f62;
  background: var(--kkaebu-blue-soft);
}

.reduction-list article,
.target-status-card.is-close,
.needs-review,
.category-review.needs-review {
  border-color: #f0d995;
  background: var(--kkaebu-gold-soft);
}

.reduction-list article > div span,
.needs-review .classification-status {
  color: #715500;
  background: #ffecb3;
}

.auth-page-shell {
  width: min(100% - 36px, 500px);
}

.auth-brand {
  padding: 8px 13px 8px 9px;
  border: 1px solid rgb(205 230 224 / 88%);
  border-radius: 15px;
  background: rgb(255 255 255 / 76%);
  box-shadow: 0 8px 28px color-mix(in srgb, var(--theme-shadow-ink,rgb(21 88 79)) 8%, transparent);
}

.auth-card {
  position: relative;
  overflow: hidden;
  border-color: #b8ddd4;
  background:
    radial-gradient(circle at 50% -15%, rgb(143 220 201 / 28%), transparent 17rem),
    rgb(255 255 255 / 96%);
}

.auth-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--kkaebu-mint), var(--kkaebu-deep-mint));
  content: "";
}

.google-login-button {
  border-color: var(--kkaebu-line);
  box-shadow: 0 8px 22px rgb(21 88 79 / 7%);
}

.google-login-button:hover,
.secondary-button:hover {
  border-color: #a6d7cc;
  background: var(--kkaebu-mint-soft);
}

.google-mark {
  color: var(--kkaebu-blue-deep);
}

.auth-back-link {
  color: var(--kkaebu-mint-action);
}

@container kkaebu (max-width: 599px){
  .page-shell {
    padding-right: max(12px, env(safe-area-inset-right));
    padding-left: max(12px, env(safe-area-inset-left));
  }

  .app-header {
    padding: 9px 10px;
    border-radius: 16px;
  }

  .nav-menu-button {
    border-color: var(--kkaebu-line);
    color: var(--kkaebu-deep-mint);
    background: var(--kkaebu-mint-soft);
    box-shadow: none;
  }

  .nav-menu-button:focus-visible {
    outline-color: color-mix(in srgb, var(--theme-accent,rgb(143 220 201)) 36%, transparent);
  }

  .app-nav {
    top: calc(100% + 8px);
    border-color: rgb(205 230 224 / 92%);
    background: rgb(244 252 250 / 97%);
    box-shadow: 0 16px 36px color-mix(in srgb, var(--theme-shadow-ink,rgb(21 88 79)) 16%, transparent);
  }

  .nav-link.active {
    background: #ffffff;
  }

  .card {
    border-radius: 20px;
    box-shadow: 0 12px 34px color-mix(in srgb, var(--theme-shadow-ink,rgb(21 88 79)) 8%, transparent);
  }

  .records-calendar {
    border-radius: 18px;
  }

  .auth-card {
    padding: 28px 22px;
  }

  body.fixed-mobile-page .mobile-install-hint {
    position: fixed;
    z-index: 80;
    right: calc(max(14px, env(safe-area-inset-right)) + 66px);
    bottom: calc(
      max(14px, env(safe-area-inset-bottom)) + var(--mobile-install-footer-clearance)
    );
    left: max(12px, env(safe-area-inset-left));
    display: grid;
    width: auto;
    margin: 0;
    border-color: #d8e3f1;
    color: #344a66;
    background: rgb(243 246 250 / 98%);
    box-shadow: 0 12px 30px color-mix(in srgb, var(--theme-shadow-ink,rgb(47 69 97)) 12%, transparent);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }

  body.fixed-mobile-page:has(.mobile-install-hint) .quick-actions {
    bottom: calc(
      max(14px, env(safe-area-inset-bottom)) + var(--mobile-install-footer-clearance)
    );
  }
}

@container kkaebu (max-width: 599px){@media (max-height: 650px){
  .mobile-install-hint {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 11px;
    padding: 14px 38px 10px 11px;
    border-radius: 16px;
  }

  .mobile-install-hint-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .mobile-install-hint small {
    display: block;
    margin-top: 2px;
    font-size: 9px;
  }

  body.fixed-mobile-page:has(.mobile-install-hint) .quick-actions {
    bottom: calc(
      max(14px, env(safe-area-inset-bottom)) + var(--mobile-install-footer-clearance)
    );
  }
}}

/* Subscription plans and current-usage summary. */
.plans-page {
  --page-content-max-width: 920px;
}

a.settings-menu-row {
  text-decoration: none;
}

#open-plan-settings-link .settings-menu-icon {
  color: #8056bb;
  background: #f1eafe;
}

.plans-intro {
  max-width: 660px;
}

.plan-current-card {
  padding: clamp(20px, 4cqw, 30px);
  margin-bottom: 32px;
  border-color: #cfe2db;
  background:
    linear-gradient(135deg, rgb(244 253 249 / 98%), rgb(255 255 255 / 96%) 58%),
    #fff;
}

.plan-current-heading {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
}

.plan-current-heading .eyebrow,
.plans-section-heading .eyebrow {
  margin-bottom: 6px;
}

.plan-current-heading h2,
.plans-section-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(20px, 3cqw, 26px);
  letter-spacing: -0.045em;
}

.plan-current-state {
  display: inline-flex;
  margin-left: 8px;
  padding: 4px 8px;
  vertical-align: 3px;
  border-radius: 999px;
  color: #24745b;
  background: #dff5eb;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: -0.01em;
}

.plan-current-copy {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.plan-settings-back-link {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid #c9dcd5;
  border-radius: 10px;
  color: #386b5b;
  background: rgb(255 255 255 / 72%);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.plan-settings-back-link:hover,
.plan-settings-back-link:focus-visible {
  outline: none;
  border-color: var(--theme-accent,#95c5b4);
  background: #fff;
}

.plan-usage-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0 0;
}

.plan-usage-list > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid #dfebe6;
  border-radius: 13px;
  background: rgb(255 255 255 / 72%);
}

.plan-usage-list dt {
  overflow: hidden;
  color: #6a7c77;
  font-size: 11px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-usage-list dd {
  margin: 5px 0 0;
  overflow: hidden;
  color: #24483c;
  font-size: 14px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-current-card > .form-status {
  margin: 14px 0 0;
}

.plans-section-heading {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  justify-content: space-between;
  margin: 0 2px 14px;
}

.plan-supported-banks {
  margin: -4px 2px 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
}

.plan-sync-explainer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 2px 16px;
}

.plan-sync-explainer > div {
  padding: 13px 14px;
  border: 1px solid #dce9e4;
  border-radius: 14px;
  background: rgb(255 255 255 / 72%);
}

.plan-sync-explainer strong {
  color: #28594b;
  font-size: 12px;
}

.plan-sync-explainer p {
  margin: 5px 0 0;
  color: #62736e;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.55;
}

.plan-sync-provider-link {
  margin: -4px 2px 16px;
  color: #667872;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.55;
}

.plan-sync-provider-link a {
  color: #27735f;
  font-weight: 850;
}

.plan-no-ads-badge,
.plan-current-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 999px;
  color: #386b5b;
  background: #e3f6ee;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.plan-comparison-scroll {
  overflow-x: auto;
  border: 1px solid #d8e6e1;
  border-radius: 18px;
  background: rgb(255 255 255 / 84%);
  box-shadow: 0 10px 28px color-mix(in srgb, var(--theme-shadow-ink,rgb(21 88 79)) 7%, transparent);
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.plan-comparison-scroll:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--theme-accent,rgb(47 155 120)) 28%, transparent);
  outline-offset: 3px;
}

.plan-comparison-table {
  width: 100%;
  min-width: 680px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.plan-comparison-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.plan-comparison-table th,
.plan-comparison-table td {
  min-width: 0;
  padding: 13px 12px;
  border-right: 1px solid #e4ece9;
  border-bottom: 1px solid #e4ece9;
  vertical-align: middle;
}

.plan-comparison-table tr > :last-child {
  border-right: 0;
}

.plan-comparison-table tbody tr:last-child > * {
  border-bottom: 0;
}

.plan-comparison-feature-heading {
  width: 24%;
  color: #46625b;
  background: #f4f8f6;
  font-size: 12px;
  font-weight: 850;
  text-align: left;
}

.plan-comparison-plan {
  width: 25.333%;
  color: #294d43;
  background: #fbfdfc;
  text-align: center;
}

.plan-comparison-plan--plus {
  background: linear-gradient(180deg, #eef9f4 0%, #fbfdfc 100%);
}

.plan-comparison-plan--pro {
  background: linear-gradient(180deg, #edf5fb 0%, #fbfdfc 100%);
}

.plan-comparison-plan.is-current {
  box-shadow: inset 0 4px 0 var(--theme-accent,#2f9b78);
}

.plan-comparison-kicker {
  display: block;
  margin-bottom: 4px;
  color: #5a7a70;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.plan-comparison-plan strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
  letter-spacing: -0.035em;
}

.plan-comparison-plan small {
  display: block;
  min-height: 34px;
  margin-top: 5px;
  color: #63756f;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}

.plan-price {
  display: inline-flex;
  margin-top: 8px;
  padding: 5px 7px;
  border-radius: 8px;
  color: #315d50;
  background: #e9f6f0;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.plan-comparison-plan--pro .plan-price {
  color: #315a75;
  background: #eaf3f9;
}

.plan-comparison-plan .plan-current-badge {
  display: table;
  margin: 7px auto 0;
}

.plan-comparison-table tbody th {
  color: #4a615b;
  background: #f8fbfa;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
}

.plan-comparison-table td {
  color: #40554f;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
}

.plan-comparison-benefit-row > * {
  color: #245e4d !important;
  background: #f1faf6 !important;
  font-weight: 850 !important;
}

.plan-comparison-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 45px;
  padding: 3px 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.plan-comparison-status.is-included {
  color: #247056;
  background: #e2f6ec;
}

.plan-comparison-status.is-unavailable {
  color: #7b8582;
  background: #eef1f0;
}

.plan-payment-notice {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  margin-top: 20px;
  padding: 15px 16px;
  border: 1px solid #d8e5df;
  border-radius: 15px;
  color: #50635e;
  background: rgb(245 250 248 / 76%);
}

.plan-payment-notice > span {
  flex: 0 0 auto;
  margin-top: 1px;
}

.plan-payment-notice p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
}

p.plan-payment-notice {
  display: block;
  font-size: 13px;
  line-height: 1.6;
}

p.plan-payment-notice > a {
  overflow-wrap: normal;
  white-space: nowrap;
}

.plan-payment-notice strong {
  color: #2f5549;
}

@container kkaebu (max-width: 760px){
  .plan-usage-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .plan-sync-explainer {
    grid-template-columns: 1fr;
  }
}

@container kkaebu (max-width: 599px){
  .plans-page {
    --page-content-max-width: 620px;
  }

  .plan-current-card {
    padding: 18px;
  }

  .plan-current-heading,
  .plans-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .plan-current-heading h2,
  .plans-section-heading h2 {
    font-size: 20px;
  }

  .plan-current-state {
    margin-left: 5px;
    vertical-align: 2px;
  }

  .plan-usage-list {
    gap: 8px;
    margin-top: 18px;
  }

  .plan-usage-list > div {
    padding: 10px;
  }

  .plan-usage-list dd {
    font-size: 13px;
  }

  .plan-comparison-scroll {
    border-radius: 15px;
  }

  .plan-comparison-table {
    min-width: 620px;
  }

  .plan-comparison-table th,
  .plan-comparison-table td {
    padding: 10px 8px;
  }

  .plan-comparison-plan strong {
    font-size: 16px;
  }

  .plan-comparison-plan small {
    min-height: 31px;
    font-size: 10px;
  }

  .plan-comparison-table tbody th,
  .plan-comparison-table td {
    font-size: 11px;
  }
}

.recurring-transaction-actions {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 3px;
  margin: 0;
  white-space: nowrap;
}

.recurring-transaction-action-cell {
  overflow: hidden !important;
  padding-right: 5px !important;
  padding-left: 3px !important;
  text-align: right !important;
  white-space: nowrap !important;
}

.recurring-transfer-table-shell:has(> .has-actions) {
  overflow-x: hidden;
}

.recurring-transfer-recent-table.has-actions th:nth-child(1),
.recurring-transfer-recent-table.has-actions td:nth-child(1) {
  width: 15%;
}

.recurring-transfer-recent-table.has-actions th:nth-child(2),
.recurring-transfer-recent-table.has-actions td:nth-child(2) {
  width: 37%;
}

.recurring-transfer-recent-table.has-actions th:nth-child(3),
.recurring-transfer-recent-table.has-actions td:nth-child(3) {
  width: 18%;
}

.recurring-transfer-recent-table.has-actions th:nth-child(4),
.recurring-transfer-recent-table.has-actions td:nth-child(4) {
  width: 30%;
  text-align: right;
}

.recurring-transfer-match-table.has-actions th:nth-child(1),
.recurring-transfer-match-table.has-actions td:nth-child(1) {
  width: 18%;
}

.recurring-transfer-match-table.has-actions th:nth-child(2),
.recurring-transfer-match-table.has-actions td:nth-child(2) {
  width: 34%;
}

.recurring-transfer-match-table.has-actions th:nth-child(3),
.recurring-transfer-match-table.has-actions td:nth-child(3) {
  width: 18%;
}

.recurring-transfer-match-table.has-actions th:nth-child(4),
.recurring-transfer-match-table.has-actions td:nth-child(4) {
  width: 30%;
  text-align: right;
}

.recurring-transaction-actions button {
  min-height: 22px;
  padding: 2px 4px;
  border: 1px solid #d6deea;
  border-radius: 6px;
  color: #245caf;
  background: #f3f7ff;
  font-family: inherit;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.recurring-transaction-actions button:focus-visible {
  outline: 2px solid var(--theme-accent,#245caf);
  outline-offset: 2px;
}

#recurring-reassignment-dialog .record-editor-source-note {
  overflow-wrap: anywhere;
}

#recurring-reassignment-dialog .record-editor-source-note + .record-editor-source-note {
  margin-top: -11px;
}

.recurring-reassignment-picker {
  margin-bottom: 12px;
}

.recurring-reassignment-picker h3 {
  margin: 0 0 7px;
  color: #263750;
  font-size: 13px;
}

.recurring-reassignment-rule-list {
  max-height: min(52svh, 430px);
  overflow-x: hidden;
  overflow-y: auto;
  border-radius: 15px;
}

.recurring-reassignment-rule-list .recurring-transfer-table-shell {
  border-radius: 15px;
  box-shadow: none;
}

.recurring-reassignment-row.selected {
  background: #edf8f5;
  box-shadow: inset 3px 0 var(--theme-accent,#1b7768);
}

.recurring-reassignment-row[aria-disabled="true"] {
  cursor: wait;
}

.recurring-reassignment-choice-mark {
  display: inline-grid;
  min-width: 40px;
  min-height: 24px;
  padding: 4px 7px;
  place-items: center;
  border-radius: 999px;
  color: #65748a;
  background: #edf1f5;
  font-size: 9px;
  font-weight: 850;
}

.recurring-reassignment-choice-mark.selected {
  color: #0d6c5b;
  background: #e5f7f1;
}

#recurring-reassignment-dialog .record-editor-actions {
  justify-content: space-between;
}

@container kkaebu (max-width: 599px){
  .recurring-reassignment-rule-list {
    max-height: min(48svh, 390px);
  }

  .recurring-reassignment-choice-mark {
    min-width: 34px;
    padding-right: 5px;
    padding-left: 5px;
  }
}

.plan-purchase-button,
.billing-cancel-button {
  min-height: 42px;
  margin-top: 10px;
  border: 1px solid #8fcbbc;
  border-radius: 10px;
  padding: 8px 14px;
  background: #fff;
  color: #15584f;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.plan-purchase-button {
  width: 100%;
  border-color: #1f8268;
  color: #fff;
  background: linear-gradient(135deg, #229779, #16735f);
  box-shadow: 0 7px 16px color-mix(in srgb, var(--theme-accent,rgb(31 130 104)) 20%, transparent);
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    filter 150ms ease;
}

.plan-comparison-plan--pro .plan-purchase-button {
  border-color: #337ba6;
  background: linear-gradient(135deg, #408cb9, #2e6f9a);
  box-shadow: 0 7px 16px color-mix(in srgb, var(--theme-accent,rgb(48 116 157)) 20%, transparent);
}

.plan-basic-change-button {
  border-color: #aabbb5;
  color: #355149;
  background: #f7faf8;
  box-shadow: none;
}

.plan-purchase-button:not(:disabled):hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
  box-shadow: 0 10px 20px color-mix(in srgb, var(--theme-accent,rgb(31 130 104)) 25%, transparent);
}

.plan-purchase-button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--theme-accent,rgb(47 155 120)) 28%, transparent);
  outline-offset: 2px;
}

.plan-purchase-button:disabled,
.billing-cancel-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.billing-cancel-button {
  color: #5f6977;
  border-color: #d8e0e8;
}

.billing-consent-dialog {
  width: min(520px, calc(100cqw - 24px));
  max-height: 90dvh;
  overflow: hidden auto;
  border: 0;
  border-radius: 26px;
  padding: 0;
  color: #243247;
  background: #fbfdfc;
  box-shadow: 0 26px 90px color-mix(in srgb, var(--theme-shadow-ink,rgb(20 54 46)) 28%, transparent);
}

.billing-consent-dialog::backdrop {
  background: rgb(15 35 30 / 58%);
  backdrop-filter: blur(4px);
}

.billing-consent-panel {
  position: relative;
  padding: 30px;
  background:
    radial-gradient(circle at 4% 0%, rgb(216 244 234 / 75%), transparent 38%),
    #fbfdfc;
}

.billing-dialog-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 1px solid #dce8e3;
  border-radius: 50%;
  color: #60736d;
  background: rgb(255 255 255 / 80%);
  font: inherit;
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}

.billing-dialog-close:hover,
.billing-dialog-close:focus-visible {
  border-color: var(--theme-accent,#9ccbbd);
  outline: none;
  background: #fff;
}

.billing-consent-heading {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding-right: 38px;
}

.billing-consent-icon {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #2aa181, #19735f);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--theme-accent,rgb(33 139 111)) 22%, transparent);
}

.billing-consent-heading .eyebrow {
  margin: 1px 0 4px;
  color: #568078;
  font-size: 10px;
}

.billing-consent-heading h2 {
  margin: 0;
  color: #183f35;
  font-size: 24px;
  letter-spacing: -0.045em;
}

.billing-consent-heading > div > p:last-child {
  margin: 6px 0 0;
  color: #60736d;
  font-size: 13px;
  font-weight: 650;
}

.billing-consent-price-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  padding: 16px 18px;
  border: 1px solid #cfe5dc;
  border-radius: 16px;
  background: linear-gradient(135deg, #edf9f4, #f8fcfa);
}

.billing-consent-price-card span {
  color: #58736b;
  font-size: 12px;
  font-weight: 750;
}

.billing-consent-price-card strong {
  color: #176650;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.billing-consent-benefits {
  display: grid;
  gap: 10px;
  margin: 19px 0;
  padding: 0;
  list-style: none;
}

.billing-consent-benefits li {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 0;
  color: #425c55;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.billing-consent-benefits li span {
  display: grid;
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #1f8065;
  background: #ddf3ea;
  font-size: 12px;
  font-weight: 900;
}

.billing-consent-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid #dce7e3;
  border-radius: 14px;
  color: #526761;
  background: #fff;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.6;
  cursor: pointer;
}

.billing-consent-check input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin: 1px 0 0;
  accent-color: #208065;
}

.billing-consent-check a {
  color: #176e59;
  font-weight: 850;
}

.billing-consent-submit {
  width: 100%;
  min-height: 52px;
  margin: 0;
}

.billing-consent-security {
  margin: 12px 0 0;
  color: #7a8985;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.5;
  text-align: center;
}

.billing-consent-panel > .form-status:empty {
  display: none;
}

.billing-consent-panel > .form-status {
  margin: 12px 0 0;
}

@container kkaebu (max-width: 599px){
  .billing-consent-dialog {
    width: min(100% - 16px, 520px);
    max-height: calc(100dvh - 16px);
    border-radius: 22px;
  }

  .billing-consent-panel {
    padding: 24px 18px 20px;
  }

  .billing-dialog-close {
    top: 12px;
    right: 12px;
  }

  .billing-consent-heading {
    gap: 11px;
  }

  .billing-consent-icon {
    width: 39px;
    height: 39px;
    border-radius: 12px;
  }

  .billing-consent-heading h2 {
    font-size: 21px;
  }

  .billing-consent-price-card {
    margin-top: 20px;
    padding: 14px;
  }
}

/* Public purchase, refund, privacy, and seller-information page. */
.settings-menu-icon--policy {
  color: #276178;
  background: #e4f3f7;
}

.purchase-info-page-shell {
  --page-content-max-width: 820px;
}

.purchase-info-header {
  margin-bottom: 30px;
}

.purchase-info-hero {
  padding: clamp(23px, 4cqw, 36px);
  border: 1px solid #d6e7e4;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgb(239 250 247 / 98%), rgb(255 255 255 / 96%) 62%),
    #fff;
  box-shadow: 0 12px 30px color-mix(in srgb, var(--theme-shadow-ink,rgb(33 81 70)) 7%, transparent);
}

.purchase-info-hero .eyebrow,
.policy-section-heading .eyebrow {
  margin: 0 0 7px;
  color: #3c7669;
}

.purchase-info-hero h1 {
  margin: 0;
  color: #183e35;
  font-size: clamp(28px, 5cqw, 39px);
  letter-spacing: -0.06em;
}

.purchase-info-hero > p:not(.eyebrow):not(.policy-effective-date) {
  max-width: 590px;
  margin: 13px 0 0;
  color: #4d635f;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.7;
}

.policy-effective-date {
  display: inline-flex;
  margin: 18px 0 0;
  padding: 5px 9px;
  border-radius: 999px;
  color: #467269;
  background: #e7f4ef;
  font-size: 11px;
  font-weight: 800;
}

.policy-setup-notice {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 11px;
  margin-top: 16px;
  padding: 15px 16px;
  border: 1px solid #efdcae;
  border-radius: 16px;
  color: #6a5525;
  background: #fffaf0;
}

.policy-setup-notice > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: #8a681c;
  background: #ffedbd;
  font-size: 17px;
  font-weight: 900;
}

.policy-setup-notice strong {
  display: block;
  color: #614b1e;
  font-size: 13px;
}

.policy-setup-notice p {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.55;
}

.policy-anchor-nav {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 18px 0 4px;
}

.policy-anchor-nav a {
  display: inline-flex;
  min-height: 32px;
  padding: 0 11px;
  align-items: center;
  border: 1px solid #dce6e4;
  border-radius: 999px;
  color: #38675d;
  background: rgb(255 255 255 / 78%);
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.policy-anchor-nav a:hover,
.policy-anchor-nav a:focus-visible {
  outline: none;
  border-color: var(--theme-accent,#9dcfc0);
  color: #1e5e4d;
  background: #edf8f4;
}

.policy-section {
  scroll-margin-top: 88px;
  margin-top: 25px;
  padding: clamp(20px, 3.5cqw, 30px);
  border: 1px solid #e0e7ed;
  border-radius: 20px;
  background: rgb(255 255 255 / 90%);
  box-shadow: 0 9px 24px color-mix(in srgb, var(--theme-shadow-ink,rgb(34 56 86)) 4%, transparent);
}

.policy-section-heading {
  margin-bottom: 18px;
}

.policy-section-heading h2 {
  margin: 0;
  color: #27384e;
  font-size: clamp(20px, 3.5cqw, 25px);
  letter-spacing: -0.045em;
}

.policy-product-grid,
.policy-rule-grid,
.policy-privacy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.policy-product-card {
  min-width: 0;
  padding: 17px;
  border: 1px solid #dfe9e6;
  border-radius: 16px;
  background: #f9fcfb;
}

.policy-product-card--featured {
  border-color: #b6dacc;
  background: #f0faf6;
}

.policy-product-heading {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.policy-product-heading p {
  margin: 0 0 4px;
  color: #55776e;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.policy-product-heading h3,
.policy-rule-grid h3,
.policy-privacy-grid h3,
.policy-support-card h3 {
  margin: 0;
  color: #294238;
  font-size: 15px;
  letter-spacing: -0.035em;
}

.policy-product-heading strong {
  flex: 0 0 auto;
  padding: 5px 7px;
  border-radius: 8px;
  color: #245b4d;
  background: #e2f3ec;
  font-size: 12px;
}

.policy-product-card > p,
.policy-rule-grid p,
.policy-privacy-grid p,
.policy-support-card p {
  margin: 11px 0 0;
  color: #5e6d78;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.65;
}

.policy-fact-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 0;
}

.policy-fact-list > div {
  padding: 12px 13px;
  border-radius: 13px;
  background: #f5f8fa;
}

.policy-fact-list dt {
  color: #647682;
  font-size: 10px;
  font-weight: 850;
}

.policy-fact-list dd {
  margin: 5px 0 0;
  color: #354a5b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.48;
}

.policy-fact-list dd a {
  color: #20705b;
  font-weight: 850;
}

.policy-detail-note {
  margin: 14px 0 0;
  color: #62727f;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.65;
}

.policy-detail-note a {
  color: #20705b;
  font-weight: 850;
}

.policy-step-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  counter-reset: policy-step;
  list-style: none;
}

.policy-step-list li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  column-gap: 10px;
  align-items: start;
  counter-increment: policy-step;
}

.policy-step-list li::before {
  display: grid;
  width: 26px;
  height: 26px;
  grid-row: span 2;
  place-items: center;
  border-radius: 50%;
  color: #27735f;
  background: #e3f5ee;
  content: counter(policy-step);
  font-size: 11px;
  font-weight: 900;
}

.policy-step-list strong {
  color: #34485d;
  font-size: 13px;
}

.policy-step-list span {
  grid-column: 2;
  margin-top: 2px;
  color: #63727e;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.55;
}

.policy-callout {
  margin-top: 16px;
  padding: 14px 15px;
  border: 1px solid #c7e1d7;
  border-radius: 15px;
  color: #3d645a;
  background: #eff9f5;
}

.policy-callout--muted {
  border-color: #dbe3ea;
  color: #53687b;
  background: #f5f8fb;
}

.policy-callout strong {
  color: #2c5e51;
  font-size: 13px;
}

.policy-callout--muted strong {
  color: #41596e;
}

.policy-callout p {
  margin: 5px 0 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.62;
}

.policy-rule-grid article,
.policy-privacy-grid article {
  min-width: 0;
  padding: 15px;
  border: 1px solid #e4eaf0;
  border-radius: 15px;
  background: #fbfcfd;
}

.policy-security-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.policy-security-list > div {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 11px 12px;
  border: 1px solid #e4eaf0;
  border-radius: 13px;
  background: #fafcfd;
}

.policy-security-list > div > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 10px;
  background: #eaf5f1;
  font-size: 15px;
}

.policy-security-list p {
  margin: 0;
  color: #61717f;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.55;
}

.policy-security-list strong {
  color: #304c5d;
}

.policy-bullet-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  color: #556777;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
  list-style: none;
}

.policy-bullet-list li {
  position: relative;
  padding-left: 17px;
}

.policy-bullet-list li::before {
  position: absolute;
  top: 0.6em;
  left: 2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #439a80;
  content: "";
}

.policy-section--seller {
  border-color: #d4e3df;
  background: linear-gradient(140deg, rgb(246 252 249 / 98%), rgb(255 255 255 / 95%));
}

.seller-information-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid #dce6e3;
  border-radius: 15px;
  background: #dce6e3;
}

.seller-information-list > div {
  min-width: 0;
  padding: 13px;
  background: #fff;
}

.seller-information-list dt {
  color: #607773;
  font-size: 10px;
  font-weight: 850;
}

.seller-information-list dd {
  margin: 5px 0 0;
  color: #314b48;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.seller-information-required dd {
  color: #85672a;
}

.seller-lookup-link {
  margin: 12px 1px 0;
}

.seller-lookup-link a {
  color: #28725f;
  font-size: 12px;
  font-weight: 850;
}

.policy-support-card {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid #d5e6e0;
  border-radius: 15px;
  background: rgb(255 255 255 / 76%);
}

.commerce-footer {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding: 14px 2px 0;
  border-top: 1px solid #dce6e3;
  color: #61716f;
}

.commerce-footer p {
  margin: 0;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.5;
}

.commerce-footer strong {
  color: #405b56;
}

.commerce-footer a {
  flex: 0 0 auto;
  color: #28725f;
  font-size: 11px;
  font-weight: 850;
  text-decoration: none;
}

.commerce-footer a:hover,
.commerce-footer a:focus-visible {
  text-decoration: underline;
}

.commerce-footer--full {
  margin-top: 24px;
  padding-bottom: 4px;
}

/* Two short footer rows link to the complete seller and service policies. */
.commerce-footer.commerce-footer--site {
  display: block;
  width: 100%;
  min-width: 0;
  margin-top: 14px;
  padding: 8px 0 0;
  flex: 0 0 auto;
}

.commerce-footer--site p {
  margin: 0;
  font-size: 11px;
  line-height: 1.6;
  white-space: normal;
}

.commerce-footer--site p + p {
  margin-top: 2px;
}

.commerce-footer--site a {
  display: inline;
  font-size: inherit;
  line-height: inherit;
  white-space: inherit;
}

/* Keep the two short task screens focused on their primary action at every width. */
body.quick-entry-page,
body.review-page-body {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  overscroll-behavior: none;
}

body.quick-entry-page .compact-page,
body.review-page-body .review-page {
  display: flex;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  flex-direction: column;
}

/* Settings can grow as new options are added, so the page uses normal document
   scrolling while keeping the footer at the bottom on shorter pages. */
body.settings-index-page .settings-page {
  display: flex;
  width: 100%;
  height: auto;
  min-height: 100dvh;
  overflow: visible;
  flex-direction: column;
}

body.quick-entry-page .compact-page,
body.settings-index-page .settings-page {
  padding-top: max(12px, env(safe-area-inset-top));
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}

:is(.quick-entry-page, .review-page-body, .settings-index-page) .app-header {
  position: relative;
  top: auto;
  flex: 0 0 auto;
  margin-top: 0;
  margin-bottom: 10px;
}

body.quick-entry-page .expense-intro,
body.review-page-body .review-intro,
body.settings-index-page .settings-heading {
  flex: 0 0 auto;
}

body.quick-entry-page .expense-intro {
  margin-bottom: 10px;
}

body.quick-entry-page .expense-form-card {
  flex: 0 0 auto;
  min-height: 0;
  padding: 14px;
}

body.quick-entry-page .field-group {
  margin-bottom: 10px;
}

body.quick-entry-page .expense-form-card input,
body.quick-entry-page .expense-form-card .app-control-trigger,
body.quick-entry-page .primary-button {
  min-height: 46px;
  height: 46px;
}

body.quick-entry-page .expense-suggestions-panel:not([hidden]) {
  max-height: min(168px, 29dvh);
  margin: 6px 0 0;
  overflow: hidden;
}

body.quick-entry-page .expense-description-suggestions {
  max-height: min(120px, 21dvh);
}

body.quick-entry-page .commerce-footer--site,
body.review-page-body .commerce-footer--site,
body.settings-index-page .commerce-footer--site {
  width: 100%;
  max-width: var(--page-content-max-width, 100%);
  flex: 0 0 auto;
  margin-top: auto;
  padding: 10px 2px 0;
}

body.quick-entry-page .commerce-footer--site {
  margin-inline: auto;
}

body.review-page-body .review-list {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
}

body.settings-index-page .settings-heading {
  margin: 0 2px 8px;
}

body.settings-index-page .settings-menu-list {
  flex: 0 0 auto;
}

body.settings-index-page .settings-menu-row {
  min-height: 48px;
  padding-top: 5px;
  padding-bottom: 5px;
}

/* Keep every individual setting visible without turning the settings page
   into a scrolling list on short displays. */
@media (max-height: 720px){
  body.settings-index-page .settings-menu-row {
    min-height: 40px;
    grid-template-columns: 30px minmax(0, 1fr) auto 8px;
    gap: 8px;
    padding-top: 3px;
    padding-bottom: 3px;
  }

  body.settings-index-page .settings-menu-icon {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    font-size: 15px;
  }
}

@media (max-height: 650px){
  body.quick-entry-page .expense-intro .intro-copy,
  body.settings-index-page .settings-menu-copy > span {
    display: none;
  }

  body.quick-entry-page .expense-intro .eyebrow {
    margin-bottom: 3px;
  }

  body.quick-entry-page .expense-intro h1 {
    font-size: clamp(20px, 4.2cqw, 24px);
  }

  body.settings-index-page .settings-menu-row {
    min-height: 36px;
    grid-template-columns: 28px minmax(0, 1fr) auto 8px;
    gap: 7px;
    padding-top: 2px;
    padding-bottom: 2px;
  }

  body.settings-index-page .settings-menu-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 14px;
  }
}

@media (max-height: 420px){
  body.quick-entry-page .expense-intro .eyebrow,
  body.settings-index-page .settings-heading {
    display: none;
  }

  body.quick-entry-page .expense-intro {
    margin-bottom: 6px;
  }

  body.quick-entry-page .expense-form-card {
    padding: 10px 12px;
  }

  body.quick-entry-page .field-group {
    margin-bottom: 6px;
  }

  body.quick-entry-page .expense-form-card input,
  body.quick-entry-page .expense-form-card .app-control-trigger,
  body.quick-entry-page .primary-button {
    min-height: 40px;
    height: 40px;
  }

  body.settings-index-page .app-header {
    margin-bottom: 6px;
    padding-block: 6px;
  }

  body.settings-index-page .brand-mark {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-radius: 11px;
  }

  body.settings-index-page .settings-menu-row {
    min-height: 26px;
    grid-template-columns: 24px minmax(0, 1fr) auto 7px;
    gap: 6px;
    padding-top: 2px;
    padding-bottom: 2px;
  }

  body.settings-index-page .settings-menu-icon {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    font-size: 12px;
  }

  body.settings-index-page .settings-menu-copy strong,
  body.settings-index-page .settings-menu-value {
    font-size: 11px;
  }

  body.quick-entry-page .commerce-footer--site,
  body.review-page-body .commerce-footer--site,
  body.settings-index-page .commerce-footer--site {
    padding-top: 6px;
  }

}

.plans-policy-summary {
  margin: 14px 0 0;
  color: #596b73;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.55;
}

.plans-policy-summary a {
  color: #24735f;
  font-weight: 850;
}

@container kkaebu (max-width: 599px){
  .purchase-info-header {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
  }

  .purchase-info-header .brand {
    gap: 7px;
    font-size: 16px;
  }

  .purchase-info-header .brand-mark {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-radius: 11px;
  }

  .purchase-info-header .app-nav {
    position: static;
    width: auto;
    padding: 3px;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    border-radius: 11px;
    box-shadow: none;
    transform: none;
    visibility: visible;
    opacity: 1;
  }

  .purchase-info-header .nav-link {
    min-height: 34px;
    padding: 4px 7px;
    flex: 0 0 auto;
    font-size: 10px;
  }

  .purchase-info-header .nav-link-icon {
    font-size: 12px;
  }

  .purchase-info-hero,
  .policy-section {
    border-radius: 18px;
  }

  .purchase-info-hero {
    padding: 21px 18px;
  }

  .purchase-info-hero h1 {
    font-size: 27px;
  }

  .purchase-info-hero > p:not(.eyebrow):not(.policy-effective-date) {
    font-size: 13px;
  }

  .policy-setup-notice {
    padding: 13px;
  }

  .policy-anchor-nav {
    gap: 6px;
  }

  .policy-anchor-nav a {
    min-height: 30px;
    padding: 0 9px;
    font-size: 10px;
  }

  .policy-section {
    margin-top: 17px;
    padding: 18px 15px;
  }

  .policy-section-heading {
    margin-bottom: 14px;
  }

  .policy-section-heading h2 {
    font-size: 20px;
  }

  .policy-product-grid,
  .policy-rule-grid,
  .policy-privacy-grid,
  .policy-fact-list,
  .seller-information-list {
    grid-template-columns: 1fr;
  }

  .policy-product-card,
  .policy-rule-grid article,
  .policy-privacy-grid article {
    padding: 14px;
  }

  .policy-fact-list {
    gap: 6px;
  }

  .commerce-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-height: 380px){
  body.quick-entry-page .compact-page {
    padding-top: 6px;
    padding-bottom: 6px;
  }

  body.quick-entry-page .expense-intro {
    display: none;
  }

  body.quick-entry-page .expense-form-card {
    max-height: calc(100dvh - 120px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  body.settings-index-page .settings-page {
    padding-top: 6px;
    padding-bottom: 6px;
  }

  body.settings-index-page .settings-menu-row {
    min-height: 24px;
    padding-top: 1px;
    padding-bottom: 1px;
  }
}

@media (max-height: 340px){
  body.quick-entry-page .commerce-footer--site {
    padding-top: 4px;
  }

  body.settings-index-page .settings-menu-row {
    min-height: 20px;
    grid-template-columns: 18px minmax(0, 1fr) auto 6px;
    gap: 5px;
  }

  body.settings-index-page .settings-menu-icon {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    font-size: 10px;
  }

  body.settings-index-page .settings-menu-copy strong,
  body.settings-index-page .settings-menu-value {
    font-size: 10px;
  }
}

@container kkaebu (min-width: 600px) and (max-width: 840px){
  body.quick-entry-page .commerce-footer--site {
    padding-right: 72px;
  }
}

/* Settings: downloadable user records stay separate from service recovery. */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.backup-sections {
  display: grid;
  gap: 18px;
}

.backup-section {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--border, #dce4df);
  border-radius: 14px;
}

.backup-section h3,
.backup-section p,
.backup-restore-copy p {
  margin: 0;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.backup-note {
  color: var(--muted, #66736b);
  font-size: 13px;
}

.backup-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 20px;
  background: #eff5f0;
  color: #31563b;
  font-size: 11px;
  font-weight: 600;
  vertical-align: middle;
}

.backup-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
  padding: 2px 2px 6px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.backup-actions > button {
  min-width: 118px;
  flex: 1 0 118px;
}

.backup-section button {
  min-height: 38px;
  padding: 7px 10px;
  border: 1.5px solid #8fb7a6;
  border-radius: 10px;
  background: #eef8f3;
  box-shadow: 0 2px 7px color-mix(in srgb, var(--theme-accent,rgb(28 92 72)) 12%, transparent);
  color: #155b49;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.backup-section button:hover:not(:disabled),
.backup-section button:focus-visible {
  border-color: var(--theme-accent,#3d8a72);
  background: #dff2e9;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--theme-accent,rgb(28 92 72)) 18%, transparent);
  outline: none;
  transform: translateY(-1px);
}

.backup-section .primary-button {
  border-color: #176c58;
  background: #176c58;
  color: #fff;
}

.backup-section .primary-button:hover:not(:disabled),
.backup-section .primary-button:focus-visible {
  border-color: var(--theme-accent,#0f5948);
  background: #0f5948;
  color: #fff;
}

.backup-section button:disabled {
  opacity: 0.5;
  box-shadow: none;
  cursor: not-allowed;
}

.backup-sections .csv-import-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
  padding: 2px 2px 6px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.backup-sections .csv-import-actions button {
  width: auto;
  min-width: 118px;
  flex: 1 0 118px;
}

.backup-restore-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: inherit;
  font-size: inherit;
}

.backup-restore-picker select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 7px 34px 7px 10px;
  border: 1.5px solid #8fb7a6;
  border-radius: 10px;
  outline: none;
  color: #203f36;
  background-color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.backup-restore-picker button {
  min-width: 118px;
}

.backup-restore-picker select:focus-visible {
  border-color: var(--theme-accent,#176c58);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent,rgb(23 108 88)) 14%, transparent);
}

.backup-restore-picker select:disabled {
  color: #748078;
  background: #f2f5f3;
  cursor: not-allowed;
}

.backup-dialog-status {
  flex: 0 0 auto;
  margin: 0 18px 18px;
  border: 1px solid #176c58;
  color: #fff;
  background: #155b49;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--theme-shadow-ink,rgb(14 61 49)) 24%, transparent);
}

.backup-restore-shell {
  max-height: 85dvh;
  overflow-y: auto;
}

.backup-restore-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
}

.backup-restore-copy h2 { margin: 0; }
.backup-confirm-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.6;
}
.backup-confirm-label input {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 4px 0 0;
  padding: 0;
  flex: 0 0 18px;
}
.backup-confirm-label span { min-width: 0; }
#backup-restore-submit:disabled { opacity: 0.5; cursor: not-allowed; }

.backup-password-shell { max-height: 85dvh; overflow-y: auto; }
.backup-password-field { display: grid; gap: 7px; font-weight: 700; }
.backup-password-field input {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #cddbd2;
  border-radius: 10px;
  font: inherit;
}
.backup-recovery-link {
  justify-self: start;
  padding: 0;
  border: 0;
  background: transparent;
  color: #286856;
  text-decoration: underline;
  cursor: pointer;
}

@container kkaebu (max-width: 480px){
  .backup-section { padding: 12px; }
  .backup-dialog-status { margin: 0 14px 14px; }
}

/* Pasted card messages retain their line breaks and leave the save action reachable. */
body.quick-entry-page .compact-page {
  overflow-y: auto;
  overscroll-behavior-y: contain;
}

body.quick-entry-page #quick-entry-text {
  display: block;
  min-height: 46px;
  max-height: 146px;
  padding: 10px 14px;
  overflow-y: auto;
  font-size: 16px;
  line-height: 24px;
  resize: none;
}

body.quick-entry-page #quick-entry-text[aria-invalid="true"] {
  border-color: var(--danger);
}

.card-message-hint {
  margin: 6px 0 0;
  line-height: 1.5;
}

.card-message-preview {
  min-width: 0;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid #b7d9cd;
  border-radius: 12px;
  color: #245c4c;
  background: #edf7f1;
  overflow-wrap: anywhere;
}

.card-message-preview[hidden] {
  display: none;
}

.card-message-preview strong {
  display: block;
  font-size: 14px;
  line-height: 1.5;
}

.card-message-preview p {
  margin: 3px 0 0;
  color: #496d60;
  font-size: 12px;
  line-height: 1.5;
}

.card-message-installment-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}

.card-message-installment-actions[hidden],
.card-message-installment-actions > [hidden] {
  display: none;
}

.card-message-installment-actions button,
.card-message-installment-actions a {
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid #8bbdab;
  border-radius: 9px;
  color: #1f6651;
  background: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
}

.card-message-installment-actions small {
  width: 100%;
  color: #496d60;
  font-size: 11px;
  line-height: 1.45;
}

.quick-expense-dialog-panel {
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior-y: contain;
  border-radius: inherit;
}

.quick-expense-form textarea[name="text"] {
  min-height: 68px;
  max-height: 140px;
  padding: 10px 11px;
  overflow-y: auto;
  border-radius: 11px;
  font-size: 16px;
  font-weight: 650;
  line-height: 24px;
  resize: none;
}

.quick-expense-form textarea[aria-invalid="true"] {
  border-color: var(--danger);
}

.quick-expense-form .card-message-hint,
.quick-expense-form .card-message-preview {
  margin-top: 0;
}

.installment-view-choice-dialog {
  width: min(92cqw, 520px);
  max-height: min(88vh, 720px);
  padding: 0;
  border: 0;
  border-radius: 24px;
  color: #1f2d33;
  background: #fff;
  box-shadow: 0 24px 70px color-mix(in srgb, var(--theme-shadow-ink,rgb(24 45 48)) 24%, transparent);
}

.installment-view-choice-dialog::backdrop {
  background: rgb(18 34 38 / 48%);
  backdrop-filter: blur(3px);
}

.installment-view-choice-shell {
  display: grid;
  gap: 14px;
  padding: clamp(22px, 5cqw, 34px);
}

.installment-view-choice-shell h2,
.installment-view-choice-shell p {
  margin: 0;
}

.installment-view-choice-shell > p:not(.eyebrow, .field-error) {
  color: #667782;
  font-size: 13px;
  line-height: 1.65;
}

.installment-view-choice-options {
  display: grid;
  gap: 10px;
}

.installment-view-choice-options button {
  display: grid;
  gap: 4px;
  padding: 15px 16px;
  border: 1px solid #d7e2e4;
  border-radius: 16px;
  color: #1f2d33;
  background: #fff;
  text-align: left;
}

.installment-view-choice-options button:hover,
.installment-view-choice-options button:focus-visible {
  border-color: var(--theme-accent,#56a994);
  background: #f0faf6;
}

.installment-view-choice-options strong {
  font-size: 14px;
}

.installment-view-choice-options small,
.installment-view-choice-note {
  color: #667782;
  font-size: 11px;
  line-height: 1.5;
}

#installment-view-choice-later {
  justify-self: center;
  padding: 8px 12px;
  border: 0;
  color: #667782;
  background: transparent;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.entry-title-row > h1 {
  min-width: 0;
}

.transaction-advanced-fields {
  display: grid;
  grid-column: 1 / -1;
  gap: 14px;
  margin: 2px 0 18px;
  padding: 16px;
  border: 1px solid #dce6ef;
  border-radius: 14px;
  background: #f7fafc;
}

.transaction-advanced-fields[hidden],
.record-editor-advanced-fields[hidden] {
  display: none;
}

.transaction-advanced-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.transaction-advanced-heading strong {
  color: #223a5e;
  font-size: 14px;
}

.transaction-advanced-heading span,
.transaction-field-help {
  color: #7b899c;
  font-size: 11px;
  line-height: 1.45;
}

.transaction-advanced-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.transaction-advanced-fields .field-group {
  min-width: 0;
  margin: 0;
}

.transaction-advanced-fields .field-group > label,
.record-editor-advanced-fields .field-group > label {
  margin-bottom: 6px;
  font-size: 12px;
}

.transaction-advanced-fields select,
.transaction-advanced-fields textarea,
.transaction-advanced-fields input,
.transaction-advanced-fields .app-control-trigger,
.record-editor-advanced-fields select,
.record-editor-advanced-fields textarea,
.record-editor-advanced-fields input,
.record-editor-advanced-fields .app-control-trigger,
.record-editor-advanced-fields .transaction-readonly-value {
  width: 100%;
  font-size: 14px;
}

.transaction-advanced-memo textarea {
  min-height: 82px;
  resize: vertical;
}

.transaction-add-card-asset {
  width: fit-content;
  margin-top: 8px;
}

.transaction-add-card-asset[hidden] {
  display: none;
}

.installment-input-wrap {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
}

.installment-input-wrap > input {
  min-width: 0;
  flex: 1 1 auto;
}

.installment-input-wrap > span {
  flex: 0 0 auto;
  color: #66758a;
  font-size: 12px;
  font-weight: 750;
}

.quick-expense-title-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.quick-expense-title-row h2 {
  min-width: 0;
  margin-right: 0;
}

.record-editor-advanced-fields {
  margin-top: 3px;
  padding: 15px;
  border: 1px solid #dce6ef;
  border-radius: 14px;
  background: #f7fafc;
}

.record-editor-advanced-fields .field-group:last-child {
  margin-bottom: 0;
}

.record-editor-advanced-grid {
  align-items: start;
}

.manual-asset-editor {
  width: min(600px, calc(100% - 28px));
}

.manual-asset-editor-grid {
  align-items: start;
}

.quick-manual-asset-details[open] {
  display: grid;
  gap: 12px;
}

.quick-manual-asset-detail-grid {
  margin-top: 2px;
}

.quick-manual-asset-details .manual-asset-sharing {
  margin: 0;
}

.manual-asset-editor-actions {
  margin-top: 4px;
  justify-content: flex-end;
}

.manual-asset-editor-actions > span {
  display: none;
}

.financial-asset-type.cash {
  color: #177352;
  background: #ebf7f1;
}

.financial-asset-type.other {
  color: #815d20;
  background: #fff5df;
}

.financial-sync-badge.manual {
  color: #65509d;
  background: #f2edff;
}

.financial-asset-row-actions {
  display: flex;
  gap: 5px;
  margin-top: 7px;
}

.financial-asset-row-action {
  min-height: 27px;
  padding: 4px 8px;
  border: 1px solid #d8e0eb;
  border-radius: 7px;
  color: #435775;
  background: #fff;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.financial-asset-row-action.danger {
  border-color: #ecd1d5;
  color: var(--danger);
  background: #fff7f8;
}

.financial-asset-row-action:disabled {
  cursor: wait;
  opacity: 0.58;
}

@container kkaebu (max-width: 599px){
  .transaction-advanced-grid,
  .record-editor-advanced-grid,
  .manual-asset-editor-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .transaction-advanced-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .entry-title-row {
    align-items: flex-start;
  }

  .quick-expense-dialog-panel {
    padding: 24px 20px;
  }

  .record-editor-advanced-fields {
    padding: 12px;
  }

  .manual-asset-editor-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .financial-asset-row-actions {
    flex-wrap: wrap;
  }
}

/* Detailed transaction entry and card installment planning. */
.transaction-advanced-section {
  display: grid;
  gap: 13px;
  padding-top: 16px;
  border-top: 1px solid #e2e9f0;
}

.transaction-advanced-section + .transaction-advanced-section {
  margin-top: 2px;
}

.transaction-section-heading,
.transaction-split-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.transaction-section-heading > div,
.transaction-split-heading > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.transaction-section-heading strong,
.transaction-split-heading strong {
  color: #25364e;
  font-size: 13px;
}

.transaction-section-heading span,
.transaction-split-heading span {
  color: #77859a;
  font-size: 11px;
  line-height: 1.45;
}

.transaction-conditional-panel {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid #dce6f0;
  border-radius: 12px;
  background: #fbfdff;
}

.transaction-conditional-panel[hidden],
.transaction-advanced-section[hidden],
.transaction-split-field[hidden] {
  display: none;
}

.transaction-installment-grid,
.transaction-recurring-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.installment-simple-fields,
.installment-month-choice {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.installment-field-label {
  color: #35445a;
  font-size: 12px;
  font-weight: 750;
}

.installment-month-presets {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.installment-month-presets button {
  min-width: 0;
  min-height: 42px;
  padding: 7px 6px;
  border: 1px solid #cdd9e6;
  border-radius: 10px;
  color: #52657d;
  background: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.installment-month-presets button:hover:not(:disabled),
.installment-month-presets button:focus-visible,
.installment-month-presets button[aria-pressed="true"] {
  border-color: var(--theme-accent,#638dc4);
  color: #234f88;
  background: #edf4ff;
  outline: none;
}

.installment-month-presets button:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent,rgb(40 100 215)) 13%, transparent);
}

.installment-month-presets button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.installment-custom-months {
  width: min(180px, 100%);
}

.installment-custom-months[hidden] {
  display: none;
}

.installment-live-summary {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid #c9dbee;
  border-radius: 11px;
  color: #344f72;
  background: #f2f7fd;
  line-height: 1.5;
}

.installment-live-summary strong {
  color: #234d82;
  font-size: 13px;
}

.installment-live-summary p {
  margin: 0;
  font-size: 11px;
}

.installment-live-summary .installment-summary-caveat {
  color: #735d31;
}

.installment-live-summary[aria-busy="true"] {
  opacity: 0.72;
}

.installment-detail-disclosure {
  min-width: 0;
  padding-top: 2px;
  border-top: 1px solid #e3eaf1;
}

.installment-detail-disclosure > summary {
  width: fit-content;
  padding: 7px 0;
  color: #3c608d;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
  list-style-position: outside;
}

.installment-detail-disclosure > summary:focus-visible {
  border-radius: 5px;
  outline: 2px solid var(--theme-accent,#8eadd3);
  outline-offset: 3px;
}

.installment-detail-disclosure > p {
  margin: 0 0 10px;
  color: #77859a;
  font-size: 10px;
  line-height: 1.5;
}

.transaction-installment-detail-grid {
  margin-top: 5px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.transaction-field-help {
  margin: 0;
  color: #77859a;
  font-size: 11px;
  line-height: 1.5;
}

.transaction-field-help.error {
  color: var(--danger);
}

.card-billing-summary {
  padding: 9px 11px;
  border-radius: 9px;
  color: #315e53;
  background: #ebf7f2;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
}

.card-billing-summary.warning {
  color: #855d18;
  background: #fff6df;
}

.card-billing-summary a {
  margin-left: 3px;
  color: inherit;
  font-weight: 850;
  text-underline-offset: 2px;
}

.transaction-split-field {
  display: grid;
  gap: 9px;
}

.transaction-inline-button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid #cbd9e8;
  border-radius: 9px;
  color: #315d91;
  background: #f4f8fd;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.transaction-split-rows {
  display: grid;
  gap: 7px;
}

.transaction-split-row {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) minmax(100px, 1fr) minmax(120px, 0.8fr) 34px;
  gap: 7px;
  align-items: center;
}

.transaction-split-row > select,
.transaction-split-row > .installment-input-wrap {
  min-width: 0;
}

.transaction-split-amount input {
  min-width: 0;
}

.transaction-split-remove {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 9px;
  color: #8a5360;
  background: #f9eaed;
  font-size: 20px;
  cursor: pointer;
}

.transaction-check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid #dce5ee;
  border-radius: 11px;
  background: #fff;
  cursor: pointer;
}

.transaction-check-row > input {
  width: 18px !important;
  height: 18px !important;
  flex: 0 0 auto;
  margin: 1px 0 0;
  accent-color: var(--blue);
}

.transaction-check-row > span {
  display: grid;
  gap: 3px;
}

.transaction-check-row strong {
  color: #2c3b52;
  font-size: 12px;
}

.transaction-check-row small {
  color: #768398;
  font-size: 10px;
  line-height: 1.45;
}

.transaction-impact-disclosure {
  padding: 11px 12px;
  border: 1px solid #dce5ee;
  border-radius: 11px;
  color: #53677f;
  background: #f9fbfd;
  font-size: 11px;
}

.transaction-impact-disclosure > summary {
  color: #315d8e;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.transaction-impact-disclosure > summary:focus-visible {
  border-radius: 5px;
  outline: 2px solid var(--theme-accent,#8eadd3);
  outline-offset: 3px;
}

.transaction-impact-disclosure > p {
  margin: 9px 0 6px;
  color: #718096;
  font-size: 10px;
  line-height: 1.5;
}

.transaction-impact-disclosure > ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
  line-height: 1.55;
}

.transaction-readonly-value {
  display: flex;
  min-height: 44px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid #dce5ee;
  border-radius: 12px;
  background: #f7fafc;
  color: #2c3b52;
  font-weight: 800;
}

.installment-schedule-readonly {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 9px;
  background: #f0f4f7;
  color: #718095;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.form-status-action {
  min-height: 34px;
  margin-top: 8px;
  padding: 6px 10px;
  border: 1px solid currentcolor;
  border-radius: 9px;
  color: inherit;
  background: #fff;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.record-installment-schedule {
  display: grid;
  gap: 7px;
}

.record-installment-schedule-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
}

.record-installment-schedule-heading > span {
  color: #457563;
  font-weight: 800;
}

.record-installment-schedule-list {
  display: grid;
  max-height: 180px;
  gap: 5px;
  overflow-y: auto;
}

.record-installment-schedule-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 8px;
  background: #f1f5f9;
  font-size: 10px;
}

.record-installment-schedule-list small {
  color: #738198;
}

.installment-settings-dialog .category-settings-dialog-shell {
  width: min(920px, calc(100cqw - 28px));
}

.installment-settings-scroll {
  display: grid;
  gap: 28px;
}

.installment-settings-section {
  display: grid;
  gap: 13px;
}

.installment-settings-section + .installment-settings-section {
  padding-top: 24px;
  border-top: 1px solid #e5eaf0;
}

.installment-section-heading,
.installment-plan-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.installment-plan-heading {
  flex-wrap: wrap;
}

.installment-plan-heading > div:first-child {
  min-width: min(100%, 300px);
  flex: 1 1 340px;
}

.installment-section-heading h3 {
  margin: 0;
  color: #25364d;
  font-size: 17px;
}

.installment-section-heading p {
  margin: 5px 0 0;
  color: #758298;
  font-size: 12px;
  line-height: 1.45;
}

.installment-section-heading > .transaction-inline-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.installment-rule-note {
  margin: 0;
}

.installment-management-scope-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.installment-management-scope-options label {
  display: flex;
  min-width: 0;
  min-height: 44px;
  gap: 8px;
  padding: 8px 10px;
  align-items: center;
  border: 1px solid #dbe4ee;
  border-radius: 10px;
  color: #425269;
  background: #f8fafc;
  cursor: pointer;
}

.installment-management-scope-options label:has(input:checked) {
  border-color: var(--theme-accent,#9abbd9);
  color: #245a82;
  background: #f1f7fb;
}

.installment-management-scope-options input[type="radio"] {
  width: 14px;
  min-width: 14px;
  height: 14px;
  min-height: 14px;
  flex: 0 0 14px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  accent-color: #287968;
}

.installment-management-scope-options label > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.installment-management-scope-options strong {
  font-size: 12px;
  line-height: 1.3;
}

.installment-management-scope-options small {
  color: #718095;
  font-size: 10px;
  line-height: 1.35;
}

.installment-card-list,
.installment-plan-list {
  display: grid;
  gap: 9px;
}

.installment-card-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  min-height: 56px;
  padding: 8px 10px;
  border: 1px solid #dfe6ef;
  border-radius: 13px;
  background: #fff;
}

.installment-card-settings-chevron {
  display: grid;
  width: 32px;
  height: 36px;
  min-height: 36px !important;
  padding: 0 !important;
  place-items: center;
  border: 0 !important;
  border-radius: 999px !important;
  color: #6a788b !important;
  background: transparent !important;
}

.installment-card-settings-chevron::before {
  width: 7px;
  height: 7px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  content: "";
  transform: translateX(-1px) rotate(45deg);
}

.installment-card-settings-chevron:hover:not(:disabled),
.installment-card-settings-chevron:focus-visible {
  color: #315d78 !important;
  background: #eef4f7 !important;
}

.installment-card-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: #edf3fb;
}

.installment-card-row > div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.installment-card-row > div strong,
.installment-card-row > div span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.installment-card-row > div strong {
  color: #29394f;
  font-size: 13px;
}

.installment-card-row > div span {
  color: #617188;
  font-size: 10px;
}

.installment-card-row > div span.missing {
  color: #a36b15;
}

.installment-card-row > button,
.installment-card-row-actions button,
.installment-profile-heading button,
.installment-plan-filters button {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid #d4dfeb;
  border-radius: 9px;
  color: #385b88;
  background: #f5f8fc;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.installment-card-row > .installment-card-row-actions {
  display: flex;
  flex-direction: row;
  gap: 6px;
}

.installment-card-row-actions button.danger {
  border-color: #ecd0d4;
  color: #a23d4a;
  background: #fff6f7;
}

.installment-card-profile-form {
  display: grid;
  gap: 14px;
  padding: 15px;
  border: 1px solid #cbddec;
  border-radius: 14px;
  background: #f7fbff;
}

.installment-card-profile-form[hidden] {
  display: none;
}

#save-installment-card-profile {
  width: min(100%, 190px);
  min-height: 44px;
  justify-self: end;
  margin-top: 0;
  padding: 9px 16px;
  border-radius: 11px;
  box-shadow: 0 6px 14px color-mix(in srgb, var(--theme-shadow-ink,rgb(21 88 79)) 16%, transparent);
  font-size: 13px;
}

.installment-profile-retire {
  padding-top: 10px;
  border-top: 1px solid #d9e4ee;
  color: #68788e;
  font-size: 10px;
  line-height: 1.5;
}

.installment-profile-retire[hidden] {
  display: none;
}

.installment-profile-retire summary {
  width: fit-content;
  color: #65758a;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.installment-profile-retire p {
  margin: 8px 0;
}

.installment-profile-retire button {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid #efc5c5;
  border-radius: 9px;
  color: #b44848;
  background: #fff7f7;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.installment-profile-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.installment-profile-heading > div {
  display: grid;
  gap: 3px;
}

.installment-profile-heading strong {
  color: #273951;
  font-size: 14px;
}

.installment-profile-heading span {
  color: #718097;
  font-size: 11px;
}

.installment-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.installment-profile-grid > label {
  display: grid;
  gap: 6px;
  color: #5f6f86;
  font-size: 11px;
  font-weight: 800;
}

.installment-payment-account-field {
  display: grid;
  gap: 6px;
  color: #5f6f86;
  font-size: 11px;
  font-weight: 800;
}

.installment-payment-account-field > button {
  width: fit-content;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid #cfdae7;
  border-radius: 8px;
  color: #3d618c;
  background: #fff;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.installment-cycle-guide {
  display: grid;
  grid-column: 1 / -1;
  gap: 4px;
  margin: 0;
  padding: 11px 12px;
  border: 1px solid #dce8e5;
  border-radius: 10px;
  color: #617288;
  background: #f4f9f7;
  font-size: 10px;
  line-height: 1.5;
}

.installment-cycle-guide strong {
  color: #315d55;
  font-size: 11px;
}

.installment-cycle-help {
  min-height: 30px;
  color: #77869a;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.45;
}

.installment-card-icon-field .app-control-value {
  font-size: 12px;
}

.installment-profile-grid input,
.installment-profile-grid select,
.installment-plan-filters input,
.installment-plan-filters select,
.installment-schedule-controls input,
.installment-schedule-controls select,
.installment-payoff-form input,
.installment-payoff-form select {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 7px 9px;
  border: 1px solid #d4deea;
  border-radius: 9px;
  color: #28374c;
  background: #fff;
  font-size: 11px;
}

.installment-adjustment-form input,
.installment-adjustment-form select {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 7px 9px;
  border: 1px solid #d4deea;
  border-radius: 9px;
  color: #28374c;
  background: #fff;
  font-size: 10px;
}

.installment-profile-grid .app-control-trigger {
  min-height: 40px;
  height: 40px;
  padding: 7px 34px 7px 9px;
  border-radius: 9px;
  font-size: 12px;
}

.installment-profile-grid .app-control-arrow {
  right: 13px;
}

.installment-profile-number,
.installment-cycle-input {
  display: flex;
  align-items: center;
  gap: 7px;
}

.installment-profile-number > span {
  flex: 0 0 auto;
}

.installment-cycle-input > select {
  width: 92px;
  flex: 0 0 92px;
}

.installment-cycle-input > .app-select-control {
  width: 92px;
  flex: 0 0 92px;
}

.installment-plan-filters {
  display: flex;
  gap: 7px;
  align-items: stretch;
  flex: 0 0 auto;
  margin-left: auto;
}

.installment-plan-filters > * {
  width: auto;
}

.installment-plan-filters > .app-calendar-control {
  width: 164px;
  flex: 0 0 164px;
}

.installment-plan-filters > .app-select-control {
  width: 118px;
  flex: 0 0 118px;
}

.installment-plan-filters .app-control-trigger {
  height: 40px;
  padding-right: 38px;
  font-size: 11px;
}

.installment-plan-filters > button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.installment-plan-card {
  overflow: hidden;
  border: 1px solid #dde5ef;
  border-radius: 13px;
  background: #fff;
}

.installment-selected-month-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #bdd1ed;
  border-radius: 13px;
  color: #244f86;
  background: linear-gradient(135deg, #f1f7ff, #eaf3ff);
}

.installment-selected-month-summary > span {
  display: grid;
  gap: 3px;
}

.installment-selected-month-summary > span:last-child {
  text-align: right;
}

.preference-choice-dialog {
  width: min(560px, calc(100cqw - 28px));
}

.preference-choice-scroll {
  display: grid;
  gap: 14px;
}

.preference-choice-intro {
  margin: 0;
  color: #66758a;
  font-size: 12px;
  line-height: 1.55;
}

.preference-choice-options {
  display: grid;
  gap: 10px;
  margin: 0;
}

.preference-choice-options label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  padding: 14px;
  align-items: flex-start;
  border: 1px solid #dbe4f1;
  border-radius: 13px;
  color: #45546b;
  background: #fff;
  cursor: pointer;
}

.preference-choice-options label:has(input:checked) {
  border-color: var(--theme-accent,#8fb3e5);
  color: #214f8d;
  background: #eef5ff;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--theme-accent,rgb(53 103 165)) 8%, transparent);
}

.preference-choice-options input {
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  accent-color: #3567a5;
}

.preference-choice-options span {
  display: grid;
  gap: 5px;
}

.preference-choice-options strong {
  font-size: 14px;
}

.preference-choice-options small {
  color: #68758a;
  font-size: 12px;
  line-height: 1.55;
}

.settings-preference-toast {
  position: fixed;
  z-index: 3000;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  display: flex;
  max-width: min(400px, calc(100cqw - 32px));
  gap: 12px;
  padding: 11px 14px;
  align-items: center;
  border-radius: 11px;
  color: #fff;
  background: #25745f;
  box-shadow: 0 10px 30px color-mix(in srgb, var(--theme-shadow-ink,rgb(20 42 64)) 22%, transparent);
  font-size: 12px;
  font-weight: 750;
}

.settings-preference-toast.error {
  background: #a33d45;
}

.settings-preference-toast[hidden] {
  display: none;
}

.settings-preference-toast button {
  min-height: auto;
  padding: 4px 8px;
  border: 1px solid rgb(255 255 255 / 65%);
  color: #fff;
  background: transparent;
  font: inherit;
  white-space: nowrap;
}

.shared-expense-editor-dialog {
  width: min(540px, calc(100cqw - 24px));
}

.shared-expense-editor-fields {
  display: grid;
  gap: 12px;
}

.shared-expense-editor-fields label {
  display: grid;
  gap: 6px;
  color: #45546b;
  font-size: 12px;
  font-weight: 750;
}

.shared-expense-editor-fields input,
.shared-expense-editor-fields select,
.shared-expense-editor-fields textarea {
  width: 100%;
  min-width: 0;
}

.account-deletion-link-copy {
  margin: 6px 0 0;
  color: #758198;
  font-size: 12px;
  text-align: center;
}

.account-deletion-link-copy button {
  min-height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #596a82;
  background: transparent;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.account-deletion-reason-dialog {
  width: min(600px, calc(100cqw - 24px));
}

.account-deletion-reasons,
.account-deletion-reasons fieldset {
  display: grid;
  gap: 9px;
}

.account-deletion-reasons fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.account-deletion-reasons fieldset label {
  display: flex;
  gap: 9px;
  align-items: center;
  color: #45546b;
  font-size: 13px;
}

.account-deletion-reasons input[type="checkbox"] {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  accent-color: #8d3e48;
}

.account-deletion-feedback-field {
  display: grid;
  gap: 6px;
  margin-top: 6px;
  color: #45546b;
  font-size: 12px;
  font-weight: 750;
}

.account-deletion-feedback-field textarea {
  width: 100%;
  resize: vertical;
}

@container kkaebu (max-width: 560px){
  .shared-expense-editor-dialog {
    width: calc(100cqw - 16px);
    max-height: calc(100svh - 16px);
  }

  .shared-expense-editor-dialog .category-settings-dialog-shell {
    max-height: calc(100svh - 16px);
  }
}

.installment-selected-month-summary small {
  color: #657c9d;
  font-size: 10px;
  font-weight: 750;
}

.installment-selected-month-summary strong {
  font-size: 14px;
  line-height: 1.35;
}

.installment-undated-plan-notice {
  display: grid;
  gap: 4px;
  padding: 11px 14px;
  border: 1px solid #efd49d;
  border-radius: 11px;
  color: #71531b;
  background: #fff9ec;
  font-size: 11px;
}

.installment-undated-plan-notice strong {
  font-size: 12px;
}

.installment-payment-attention-summary {
  padding: 12px 14px;
  border: 1px solid #efd49d;
  border-radius: 13px;
  color: #654c1d;
  background: #fffaf0;
}

.installment-payment-attention-summary > summary {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  cursor: pointer;
}

.installment-payment-attention-list {
  display: grid;
  gap: 7px;
  margin-top: 11px;
}

.installment-payment-attention-list > div {
  display: flex;
  gap: 12px;
  padding: 9px 10px;
  align-items: center;
  justify-content: space-between;
  border-radius: 9px;
  background: rgb(255 255 255 / 72%);
}

.installment-payment-attention-list span,
.installment-payment-attention-list small {
  display: block;
}

.installment-payment-attention-list small,
.installment-payment-attention-summary > p {
  color: #786744;
  font-size: 10px;
  line-height: 1.55;
}

.installment-payment-attention-summary > p {
  margin: 10px 0 0;
}

.installment-first-payment-badge {
  width: fit-content;
  padding: 2px 7px;
  border-radius: 999px;
  color: #765314;
  background: #fff1c8;
  font-size: 9px;
  font-weight: 800;
}

.installment-plan-card.first-payment-month-unknown {
  border-color: #e9cf94;
}

.installment-plan-card.open {
  border-color: #bfcfe3;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--theme-shadow-ink,rgb(33 56 88)) 8%, transparent);
}

.installment-plan-summary {
  display: grid;
  width: 100%;
  min-height: 66px;
  grid-template-columns: minmax(0, 1fr) auto 24px;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 0;
  color: inherit;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.installment-plan-summary > span:not(.installment-plan-chevron) {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.installment-plan-summary > span:nth-child(2) {
  text-align: right;
}

.installment-plan-summary strong,
.installment-plan-summary small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.installment-plan-summary strong {
  color: #29394f;
  font-size: 13px;
}

.installment-plan-summary small {
  color: #738198;
  font-size: 10px;
}

.installment-plan-summary small.installment-plan-progress {
  overflow: visible;
  line-height: 1.35;
  text-overflow: clip;
  white-space: normal;
}

.installment-plan-chevron {
  color: #718198;
  font-size: 18px;
  transition: transform 160ms ease;
}

.installment-plan-summary[aria-expanded="true"] .installment-plan-chevron {
  transform: rotate(180deg);
}

.installment-plan-details {
  display: grid;
  gap: 15px;
  padding: 13px;
  border-top: 1px solid #e7ecf2;
  background: #fafcfe;
}

.installment-plan-details[hidden] {
  display: none;
}

.installment-schedule-list {
  display: grid;
  gap: 7px;
}

.installment-schedule-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(90px, auto) minmax(280px, 1.3fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #e0e7f0;
  border-radius: 10px;
  background: #fff;
}

.installment-schedule-row.selected-month {
  border-color: var(--theme-accent,#b9cfea);
  background: #f5f9ff;
  box-shadow: inset 3px 0 0 var(--theme-accent,#4a78b5);
}

.installment-schedule-row > div:first-child,
.installment-schedule-amount {
  display: grid;
  gap: 3px;
}

.installment-schedule-row strong {
  color: #2c3d54;
  font-size: 11px;
}

.installment-schedule-row span {
  color: #77859a;
  font-size: 9px;
}

.installment-schedule-amount {
  text-align: right;
}

.installment-schedule-controls {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) minmax(110px, 1fr) auto;
  gap: 6px;
}

.installment-schedule-readonly-column {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.installment-statement-correction {
  min-width: 0;
  padding-top: 6px;
  border-top: 1px solid #e4eaf1;
}

.installment-statement-correction > summary,
.installment-statement-correction-dates > summary {
  width: fit-content;
  color: #315e98;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.4;
  cursor: pointer;
}

.installment-statement-correction-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 8px;
}

.installment-statement-correction-fields > label,
.installment-statement-correction-dates label {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: #51647e;
  font-size: 9px;
  font-weight: 700;
}

.installment-statement-correction-fields input {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  box-sizing: border-box;
  padding: 6px 8px;
  border: 1px solid #cbd8e8;
  border-radius: 8px;
  color: #27384e;
  background: #fff;
  font-size: 10px;
}

.installment-statement-correction-preview,
.installment-statement-correction-dates,
.installment-statement-correction-fields > button {
  grid-column: 1 / -1;
}

.installment-statement-correction-preview {
  margin: 0;
  color: #667891;
  font-size: 9px;
  line-height: 1.45;
}

.installment-statement-correction-dates > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 7px;
}

.installment-statement-correction-dates small {
  grid-column: 1 / -1;
  color: #77859a;
  font-size: 9px;
  line-height: 1.45;
}

.installment-statement-correction-fields > button {
  min-height: 36px;
  padding: 6px 9px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: #315e98;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.installment-statement-correction-history {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.installment-statement-correction-history li {
  display: grid;
  gap: 2px;
  padding: 7px 8px;
  border-radius: 8px;
  background: #f2f6fb;
}

.installment-statement-correction-history strong {
  font-size: 10px;
}

.installment-statement-correction-history span {
  overflow-wrap: anywhere;
  font-size: 9px;
  line-height: 1.4;
}

.installment-partial-payment-note {
  grid-column: 1 / -1;
  color: #667891;
  font-size: 10px;
  line-height: 1.45;
}

.installment-schedule-controls > button,
.installment-payoff-form > button,
.installment-plan-cancel {
  min-height: 38px;
  padding: 6px 9px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: #315e98;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.installment-plan-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  padding-top: 12px;
  border-top: 1px solid #e4eaf1;
}

.installment-first-payment-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 10px;
  padding: 10px 11px;
  border: 1px solid #c7d9ef;
  border-radius: 10px;
  background: #f4f8fe;
}

.installment-first-payment-panel > strong,
.installment-first-payment-panel > p,
.installment-first-payment-manual {
  grid-column: 1 / -1;
}

.installment-first-payment-panel > a,
.installment-first-payment-panel > button,
.installment-first-payment-manual button {
  width: fit-content;
  min-height: 36px;
  box-sizing: border-box;
  padding: 7px 11px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: #315e98;
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.installment-first-payment-manual > summary {
  color: #405b7d;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.installment-first-payment-manual form {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.installment-card-payment-link {
  min-height: 38px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 9px;
  color: #fff;
  background: #315e98;
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
}

.installment-card-payment-link:hover,
.installment-card-payment-link:focus-visible {
  background: #274f82;
  outline: none;
}

.installment-adjustment-panel {
  grid-column: 1 / -1;
  padding: 10px 11px;
  border: 1px solid #e0e6ed;
  border-radius: 10px;
  background: #fff;
}

.installment-adjustment-panel > summary {
  color: #405b7d;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
}

.installment-adjustment-panel > p {
  margin: 8px 0 0;
  color: #78869a;
  font-size: 9px;
  line-height: 1.5;
}

.installment-adjustment-history {
  display: grid;
  gap: 4px;
  margin-top: 9px;
}

.installment-adjustment-history-row {
  display: grid;
  gap: 4px;
  padding: 7px 9px;
  border-radius: 8px;
  color: #5e6f84;
  background: #f4f7fa;
  font-size: 9px;
}

.installment-adjustment-history-row > small {
  color: #607795;
  line-height: 1.45;
}

.installment-adjustment-history-row.is-reversed {
  border: 1px solid #d9e2eb;
  background: #f8fafc;
}

.installment-adjustment-history-row.is-reversed > span {
  text-decoration: line-through;
  text-decoration-color: #94a3b8;
}

.installment-adjustment-correction-details > summary {
  color: #758397;
  font-size: 9px;
  font-weight: 750;
  cursor: pointer;
}

.installment-adjustment-correction-details form {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(180px, 1.5fr) auto;
  gap: 6px;
  margin-top: 7px;
}

.installment-adjustment-correction-details small {
  grid-column: 1 / -1;
  color: #667b93;
  line-height: 1.45;
}

.installment-adjustment-form {
  display: grid;
  grid-template-columns: minmax(110px, 0.75fr) minmax(110px, 1fr) minmax(125px, 1fr) minmax(120px, 1.2fr) auto;
  gap: 7px;
  margin-top: 10px;
}

.installment-adjustment-form > label,
.installment-refund-settlement-details > label {
  display: grid;
  gap: 5px;
  color: #526a68;
  font-size: 9px;
  font-weight: 750;
}

.installment-adjustment-form > button {
  min-height: 38px;
  padding: 6px 10px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: #315e98;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.installment-refund-settlement-details {
  grid-column: 1 / -2;
  padding: 8px 9px;
  border: 1px solid #dce6ef;
  border-radius: 9px;
  background: #f8fbfd;
}

.installment-refund-settlement-details > summary,
.installment-refund-confirm-details > summary {
  color: #496684;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.installment-refund-settlement-details[open] {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 7px;
}

.installment-refund-settlement-details[open] > summary,
.installment-refund-impact,
.installment-refund-settlement-details > input {
  grid-column: 1 / -1;
}

.installment-refund-settlement-details button,
.installment-refund-confirm-details button {
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid #cbdced;
  border-radius: 8px;
  color: #315e98;
  background: #fff;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.installment-refund-impact {
  margin: 0;
  color: #667b93;
  font-size: 9px;
  line-height: 1.5;
}

.installment-refund-import-evidence {
  grid-column: 1 / -1;
  padding: 7px 8px;
  border: 1px solid #dce6ef;
  border-radius: 8px;
  background: #fff;
}

.installment-refund-import-evidence > summary {
  color: #496684;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.installment-refund-import-evidence[open] {
  display: grid;
  gap: 5px;
}

.installment-refund-import-evidence select {
  width: 100%;
  min-width: 0;
  height: 36px;
  margin-top: 6px;
}

.installment-refund-import-evidence small {
  color: #667b93;
  font-size: 9px;
  line-height: 1.45;
}

.installment-refund-confirm-details {
  margin-top: 3px;
}

.installment-refund-confirm-details form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 7px;
}

.installment-refund-confirm-details .installment-refund-impact,
.installment-refund-confirm-details button {
  grid-column: 1 / -1;
}

.installment-plan-action-note {
  grid-column: 1 / -1;
  margin: 0;
}

.installment-payoff-panel {
  grid-column: 1 / -1;
  padding: 10px 11px;
  border: 1px solid #cfe0db;
  border-radius: 10px;
  background: #f7fbfa;
}

.installment-payoff-panel > summary {
  color: #315d55;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
}

.installment-payoff-panel > p {
  margin: 8px 0 0;
  color: #687c78;
  font-size: 9px;
  line-height: 1.5;
}

.installment-payoff-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr)) auto;
  gap: 8px;
  margin-top: 9px;
}

.installment-payoff-form > label,
.installment-payoff-extras label {
  display: grid;
  gap: 5px;
  color: #526a68;
  font-size: 9px;
  font-weight: 750;
}

.installment-payoff-add-account {
  align-self: end;
  color: #315e98 !important;
  background: #eaf1fb !important;
}

.installment-payoff-extras,
.installment-payoff-total,
.installment-payoff-status {
  grid-column: 1 / -1;
}

.installment-payoff-extras > summary {
  width: fit-content;
  color: #60758b;
  font-size: 9px;
  font-weight: 750;
  cursor: pointer;
}

.installment-payoff-extras > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 8px;
  margin-top: 7px;
}

.installment-payoff-total {
  color: #315d55;
  font-size: 10px;
  font-weight: 850;
}

.installment-payoff-status {
  min-height: 0;
  margin: 0;
}

.installment-plan-cancel {
  color: var(--danger);
  background: var(--danger-soft);
}

.installment-empty-state {
  padding: 26px 18px;
  border: 1px dashed #cfd9e5;
  border-radius: 13px;
  color: #718097;
  text-align: center;
}

.installment-empty-state strong {
  display: block;
  color: #35465c;
  font-size: 14px;
}

.installment-empty-state p {
  margin: 7px 0;
  font-size: 11px;
  line-height: 1.5;
}

.installment-empty-state a,
.installment-empty-action {
  padding: 0;
  border: 0;
  color: var(--blue);
  background: transparent;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

@container kkaebu (max-width: 720px){
  .transaction-installment-grid,
  .transaction-installment-detail-grid,
  .transaction-recurring-grid,
  .installment-profile-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .transaction-split-row {
    grid-template-columns: minmax(0, 1fr) 34px;
  }

  .transaction-split-row > select,
  .transaction-split-row > .transaction-split-amount {
    grid-column: 1;
  }

  .transaction-split-row > .transaction-split-remove {
    grid-column: 2;
    grid-row: 1 / span 3;
  }

  .installment-section-heading,
  .installment-plan-heading {
    flex-direction: column;
  }

  .installment-plan-heading > div:first-child {
    width: 100%;
    min-width: 0;
    flex: 0 0 auto;
  }

  .installment-month-presets {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .installment-month-presets button:last-child {
    grid-column: 1 / -1;
  }

  .card-message-installment-actions > button,
  .card-message-installment-actions > a {
    flex: 1 1 150px;
    text-align: center;
  }

  .installment-plan-filters {
    width: 100%;
    flex-wrap: wrap;
    margin-left: 0;
  }

  .installment-plan-filters > input,
  .installment-plan-filters > select,
  .installment-plan-filters > .app-control {
    min-width: 0;
    flex: 1 1 120px;
  }

  .installment-schedule-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .installment-schedule-controls {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .installment-schedule-readonly-column {
    grid-column: 1 / -1;
  }

  .installment-statement-correction-fields,
  .installment-statement-correction-dates > div {
    grid-template-columns: minmax(0, 1fr);
  }

  .installment-statement-correction-preview,
  .installment-statement-correction-dates,
  .installment-statement-correction-fields > button,
  .installment-statement-correction-dates small {
    grid-column: 1;
  }

  .installment-plan-actions,
  .installment-payoff-form,
  .installment-payoff-form.interest-free {
    grid-template-columns: minmax(0, 1fr);
  }

  .installment-payoff-extras > div {
    grid-template-columns: minmax(0, 1fr);
  }

  .installment-adjustment-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .installment-adjustment-form > button {
    grid-column: 1 / -1;
  }

  .installment-refund-settlement-details {
    grid-column: 1 / -1;
  }

  .installment-refund-settlement-details[open],
  .installment-refund-confirm-details form,
  .installment-adjustment-correction-details form {
    grid-template-columns: minmax(0, 1fr);
  }

  .installment-refund-settlement-details[open] > *,
  .installment-refund-confirm-details form > * {
    grid-column: 1;
  }
}

@container kkaebu (max-width: 480px){
  .transaction-section-heading,
  .transaction-split-heading {
    flex-direction: column;
  }

  .transaction-inline-button {
    align-self: stretch;
  }

  .installment-card-row {
    grid-template-columns: 34px minmax(0, 1fr) 32px;
  }

  .installment-card-row > .installment-card-row-actions {
    grid-column: 3;
    grid-row: 1;
    align-self: center;
    justify-self: end;
  }

  .installment-card-row-actions button {
    flex: 0 0 auto;
  }

  .installment-plan-summary {
    grid-template-columns: minmax(0, 1fr) 22px;
  }

  .installment-selected-month-summary {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .installment-selected-month-summary > span:last-child {
    text-align: left;
  }

  .installment-plan-summary > span:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
    text-align: left;
  }

  .installment-plan-chevron {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .installment-adjustment-form {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Simple manual liabilities with optional, progressively disclosed details. */
.manual-liability-editor {
  width: min(720px, calc(100cqw - 24px));
}

.manual-liability-basic-grid {
  grid-template-columns: minmax(120px, 0.65fr) minmax(180px, 1.35fr);
}

.manual-liability-amount-field {
  grid-column: 1 / -1;
}

.manual-liability-details {
  display: grid;
  gap: 13px;
  margin-top: 3px;
  padding-top: 12px;
}

.manual-liability-details:not([open]) {
  display: block;
}

.manual-liability-card-fields,
.manual-liability-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.manual-liability-card-fields[hidden] {
  display: none;
}

.manual-liability-installment-inclusion {
  align-self: end;
  margin: 0;
}

.manual-liability-editor-actions {
  grid-template-columns: minmax(0, 1fr) auto;
}

.manual-liability-card {
  border-color: #d7e4ef;
  background: linear-gradient(135deg, #fff, #f8fbfe);
}

.manual-liability-card[hidden] {
  display: none;
}

.manual-liability-card-details {
  display: grid;
  gap: 12px;
  padding: 16px 19px 18px;
}

.manual-liability-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
}

.manual-liability-facts > div {
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f2f6fa;
}

.manual-liability-facts dt,
.manual-liability-facts dd {
  margin: 0;
}

.manual-liability-facts dt {
  color: #78869a;
  font-size: 9px;
  font-weight: 750;
}

.manual-liability-facts dd {
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: #30455f;
  font-size: 11px;
  font-weight: 800;
}

.manual-liability-calculation-note,
.manual-liability-note {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  color: #4e627a;
  background: #eef7f3;
  font-size: 10px;
  line-height: 1.55;
}

.manual-liability-note {
  white-space: pre-wrap;
  background: #f7f8fa;
}

.manual-liability-card-actions {
  display: flex;
  justify-content: flex-end;
}

@container kkaebu (max-width: 600px){
  .manual-liability-basic-grid,
  .manual-liability-card-fields,
  .manual-liability-detail-grid,
  .manual-liability-facts {
    grid-template-columns: minmax(0, 1fr);
  }

  .manual-liability-amount-field {
    grid-column: auto;
  }

  .manual-liability-editor-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .manual-liability-editor-actions > .record-delete-button,
  .manual-liability-editor-actions .record-editor-main-actions,
  .manual-liability-editor-actions .record-editor-main-actions > button {
    width: 100%;
  }
}

/* Internal asset transfers stay separate from spending and reveal details on demand. */
.asset-transfer-history {
  border-top: 1px solid #dbe7e4;
}

.asset-transfer-history > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  list-style: none;
}

.asset-transfer-history > summary::-webkit-details-marker,
.asset-transfer-row > summary::-webkit-details-marker {
  display: none;
}

.asset-transfer-history > summary > span:first-child,
.asset-transfer-row > summary > span {
  display: grid;
  gap: 0.2rem;
}

.asset-transfer-history > summary strong,
.asset-transfer-row > summary strong {
  color: #22354d;
  font-size: 12px;
}

.asset-transfer-history > summary small,
.asset-transfer-row > summary small,
.asset-transfer-row-details {
  color: #708097;
  font-size: 10px;
  line-height: 1.5;
}

#asset-transfer-count {
  flex: 0 0 auto;
  color: #3768a4;
  font-size: 11px;
  font-weight: 800;
}

.asset-transfer-list {
  border-top: 1px solid #e5eeec;
}

.asset-transfer-list > p {
  margin: 0;
  padding: 1rem 1.25rem;
  color: #708097;
  font-size: 11px;
}

.asset-transfer-list > p.error {
  color: #b8444b;
}

.asset-transfer-row {
  border-bottom: 1px solid #e5eeec;
}

.asset-transfer-row:last-child {
  border-bottom: 0;
}

.asset-transfer-row > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem 1.25rem;
  cursor: pointer;
  list-style: none;
}

.asset-transfer-row > summary > span:last-child {
  text-align: right;
}

.asset-transfer-row-details {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1.25rem 1rem;
}

.asset-transfer-row-details p {
  flex: 1 1 auto;
  margin: 0;
  white-space: pre-wrap;
}

.asset-transfer-row-details > small {
  flex: 0 0 auto;
}

.asset-transfer-editor {
  width: min(680px, calc(100cqw - 2rem));
}

.financial-assets-heading .financial-heading-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.asset-transfer-basic-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.asset-transfer-details {
  margin-top: 0.25rem;
}

.asset-transfer-details .field-group {
  margin-bottom: 0.85rem;
}

.asset-transfer-editor-actions {
  justify-content: space-between;
}

@container kkaebu (max-width: 640px){
  .asset-transfer-basic-grid {
    grid-template-columns: 1fr;
  }

  .asset-transfer-history > summary,
  .asset-transfer-row > summary {
    padding-inline: 1rem;
  }

  .asset-transfer-history > summary small {
    display: none;
  }

  .asset-transfer-row-details {
    align-items: stretch;
    flex-direction: column;
    padding-inline: 1rem;
  }

  .asset-transfer-row-details .financial-asset-row-action {
    width: 100%;
  }

  .asset-transfer-editor-actions,
  .asset-transfer-editor-actions .record-editor-main-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .asset-transfer-editor-actions button {
    width: 100%;
  }
}
.card-management-editor {
  width: min(700px, calc(100% - 28px));
}

.shared-card-settings-dialog .record-editor-form {
  max-height: min(86vh, 880px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.shared-card-progress {
  color: #385b88;
  font-size: 12px;
  font-weight: 750;
}

.shared-card-settings-dialog details {
  color: #68778a;
  font-size: 12px;
}

.shared-card-settings-dialog details p {
  margin: 8px 0;
}

.card-management-editor-actions,
.card-management-editor-actions .record-editor-main-actions {
  min-width: 0;
}

.card-management-editor-actions .record-editor-main-actions {
  flex-wrap: nowrap;
}

.card-management-editor-actions button {
  white-space: nowrap;
}

@container kkaebu (max-width: 599px){
  .card-management-editor-actions .record-editor-main-actions {
    grid-column: 2;
  }

  .card-management-editor-actions .record-delete-button[hidden] + .record-editor-main-actions {
    grid-column: 1 / -1;
  }
}

.card-management-settings-section {
  display: grid;
  gap: 12px;
  padding-top: 15px;
  border-top: 1px solid #e3e9f0;
}

.card-management-settings-section + .card-management-settings-section {
  margin-top: 18px;
}

.card-management-settings-heading {
  display: grid;
  gap: 3px;
}

.card-management-settings-heading h3,
.card-management-settings-heading p {
  margin: 0;
}

.card-management-settings-heading h3 {
  color: #2a3d55;
  font-size: 15px;
}

.card-management-settings-heading p,
.card-management-rule-help {
  color: #738197;
  font-size: 11px;
  line-height: 1.5;
}

.card-management-rule-help {
  margin: 0;
  padding: 9px 11px;
  border-radius: 9px;
  background: #f3f7fa;
}

.card-management-cycle-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(88px, 0.65fr);
  gap: 8px;
}

.card-management-cycle-input > .select-wrap,
.card-management-cycle-input > .installment-input-wrap {
  min-width: 0;
}

.card-management-performance-grid + .manual-liability-calculation-note {
  margin-top: 0;
}

.card-management-panel {
  margin-bottom: 1rem;
  padding: clamp(0.55rem, 1.5cqw, 0.8rem);
  background: #f3f6fa;
}

.card-management-list {
  display: grid;
  gap: 0.65rem;
}

.card-management-row {
  display: grid;
  gap: 0.65rem;
  padding: clamp(0.8rem, 2cqw, 0.95rem);
  overflow: hidden;
  border: 1px solid #dfe6ef;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--theme-shadow-ink,rgb(32 63 95)) 6%, transparent);
}

.card-performance-card-header {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 28px;
  gap: 0.55rem;
  align-items: center;
}

.card-performance-card-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(145deg, #253d5d, #4e6f9b);
  box-shadow: 0 5px 12px color-mix(in srgb, var(--theme-shadow-ink,rgb(37 61 93)) 18%, transparent);
  font-size: 1.05rem;
}

.card-performance-card-icon[data-card-issuer],
.installment-card-icon[data-card-issuer] {
  overflow: hidden;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.card-performance-card-icon[data-card-issuer] > img,
.installment-card-icon[data-card-issuer] > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card-performance-card-header > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0.28rem;
}

.card-performance-card-identity {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 0.38rem;
}

.card-performance-card-identity strong {
  overflow: hidden;
  flex: 0 1 auto;
  color: #26384f;
  font-size: 0.88rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-performance-card-identity small {
  overflow: hidden;
  flex: 1 1 auto;
  color: #758298;
  font-size: 0.64rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-performance-settings-shortcut {
  display: grid;
  width: 28px;
  height: 28px;
  justify-self: end;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #5c6d82;
  background: transparent;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease;
}

.card-performance-settings-shortcut:hover,
.card-performance-settings-shortcut:focus-visible {
  color: #245c9f;
  background: #eef5fd;
  outline: none;
}

.card-performance-settings-shortcut > span {
  display: block;
  width: 7px;
  height: 7px;
  border-top: 1.5px solid currentcolor;
  border-right: 1.5px solid currentcolor;
  transform: translateX(-1px) rotate(45deg);
}

.card-performance-target-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.card-performance-target-summary span {
  color: #5f6e82;
  font-size: 0.8rem;
  font-weight: 700;
}

.card-performance-spending {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 0.42rem;
}

.card-performance-spending span {
  color: #758298;
  font-size: 0.66rem;
  font-weight: 650;
}

.card-performance-spending strong {
  color: #1f324c;
  font-size: 1rem;
  letter-spacing: -0.04em;
}

.card-performance-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe6ee;
}

.card-performance-progress > span {
  display: block;
  min-width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4e9cff, #2479e9);
  transition: width 220ms ease;
}

.card-performance-target-summary strong {
  color: #2479e9;
  font-size: 0.9rem;
}

.card-performance-target-summary strong.achieved {
  color: #16866d;
}

.card-performance-target-summary strong.needs-setting {
  color: #8b6c37;
}

.card-performance-limit-summary {
  margin: -0.25rem 0 0;
  color: #758298;
  font-size: 0.75rem;
}

.card-management-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  padding-top: 0.1rem;
}

.card-management-actions .financial-asset-row-action {
  min-height: 34px;
  padding-block: 0.38rem;
  line-height: 1.15;
}

.card-management-actions .primary {
  width: 100%;
  border-color: #b8d5f7;
  color: #176dcf;
  background: #edf6ff;
}

.card-performance-transactions {
  display: grid;
  gap: 0.65rem;
  margin: 0.15rem -0.95rem -0.95rem;
  padding: 0.85rem 0.95rem 1rem;
  border-top: 1px solid #e7edf4;
  background: #f8fafc;
}

.card-performance-transactions[hidden] {
  display: none;
}

.card-performance-transactions > p {
  margin: 0;
  color: #65758a;
  font-size: 0.8rem;
}

.card-performance-transactions.error > p {
  color: #ae3d49;
}

.card-performance-transactions-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.card-performance-transactions-heading strong {
  color: #2a3d55;
  font-size: 0.85rem;
}

.card-performance-transactions-heading span {
  color: #5e7087;
  font-size: 0.75rem;
}

.card-performance-month-navigation {
  display: grid;
  grid-template-columns: 28px minmax(0, auto) 28px;
  align-items: center;
  gap: 0.35rem;
}

.card-performance-month-navigation strong {
  min-width: 7.7rem;
  text-align: center;
  white-space: nowrap;
}

.card-performance-month-button {
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #3e638e;
  background: #edf3fa;
  font: inherit;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.card-performance-month-button:hover,
.card-performance-month-button:focus-visible {
  color: #176dcf;
  background: #e1effe;
  outline: none;
}

.card-performance-month-button:disabled {
  color: #aeb9c6;
  background: #f1f4f7;
  cursor: default;
}

.card-performance-records-wrap {
  margin: 0 -0.95rem -0.2rem;
  overflow-x: hidden;
}

.card-performance-records-table {
  min-width: 0;
}

.card-performance-records-table td {
  padding: 0.7rem 0.5rem;
  vertical-align: middle;
}

.card-performance-records-table td:nth-child(1) {
  width: 16%;
  padding-left: 0.95rem;
}

.card-performance-records-table td:nth-child(2) {
  width: 54%;
}

.card-performance-records-table td:nth-child(3) {
  width: 30%;
  padding-right: 0.95rem;
}

.card-performance-records-table .records-details {
  min-width: 0;
  font-size: 0.8rem;
  line-height: 1.35;
}

.card-performance-records-table .records-details > strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-performance-records-table .records-mobile-classification {
  display: flex;
  margin-top: 0.35rem;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.card-performance-records-table .records-category,
.card-performance-records-table .records-detail-badge {
  min-height: 20px;
  padding: 2px 6px;
  font-size: 0.58rem;
}

.card-performance-records-table .records-date {
  color: #6f7c90;
  font-size: 0.7rem;
}

.card-performance-records-table .records-cost {
  font-size: 0.8rem;
}

@container kkaebu (max-width: 720px){
  .card-performance-transactions {
    margin-inline: -0.8rem;
    margin-bottom: -0.8rem;
    padding-inline: 0.8rem;
  }

  .card-performance-records-wrap {
    margin-inline: -0.8rem;
  }

  .card-performance-transactions-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.4rem;
  }

}

/* Keep the primary heading rhythm identical across every main navigation page. */
main:is(
  .page-shell.compact-page,
  .page-shell.review-page,
  .page-shell.records-page,
  .page-shell.ai-insights-page,
  .page-shell.financial-page,
  .page-shell.settings-page
) > .app-header {
  margin-bottom: 24px;
}

.page-shell > .page-primary-heading.page-primary-heading {
  width: 100%;
  min-height: 0;
  margin: 0 auto 24px;
  padding: 0 2px;
  text-align: left;
}

.page-shell > .page-primary-heading.page-primary-heading .eyebrow {
  margin: 0 0 8px;
  color: var(--kkaebu-mint-action);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.11em;
}

.page-shell > .page-primary-heading.page-primary-heading h1 {
  margin: 0;
  color: var(--kkaebu-ink);
  font-size: 22px;
  font-weight: 850;
  line-height: 1.18;
  letter-spacing: -0.045em;
}

.page-shell > .page-primary-heading.page-primary-heading .intro-copy {
  margin-top: 12px;
  color: var(--kkaebu-muted);
}

.page-primary-heading.financial-intro {
  align-items: flex-start;
  padding-block: 0;
}

.page-primary-heading .review-title-row {
  align-items: center;
}

.records-intro.page-primary-heading .records-section-heading {
  margin: 0;
  align-items: flex-end;
  gap: 16px;
}

@container kkaebu (max-width: 599px){
  main:is(
    .page-shell.compact-page,
    .page-shell.review-page,
    .page-shell.records-page,
    .page-shell.ai-insights-page,
    .page-shell.financial-page,
    .page-shell.settings-page
  ) > .app-header {
    margin-bottom: 16px;
  }

  .page-shell > .page-primary-heading.page-primary-heading {
    margin-bottom: 16px;
    padding-inline: 2px;
  }

  .page-shell > .page-primary-heading.page-primary-heading .eyebrow {
    margin-bottom: 6px;
    font-size: 11px;
  }

  .page-shell > .page-primary-heading.page-primary-heading h1 {
    font-size: 22px;
    line-height: 1.18;
    white-space: normal;
  }

  .page-shell > .page-primary-heading.page-primary-heading .intro-copy {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.5;
  }

  .page-primary-heading.financial-intro {
    align-items: flex-start;
  }

  .records-intro.page-primary-heading .records-section-heading {
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
  }
}

/* Imported transaction controls stay compact even after native selects are enhanced. */
.imported-transaction-toolbar.imported-transaction-toolbar {
  gap: 8px;
  margin: 12px 0 10px;
  padding: 10px;
  border-radius: 14px;
}

.imported-transaction-toolbar .app-control-trigger,
.imported-transaction-toolbar input {
  height: 40px;
  min-height: 40px;
  padding: 0 30px 0 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
}

.imported-transaction-toolbar input {
  padding-right: 10px;
}

.imported-transaction-toolbar .app-control-arrow {
  right: 12px;
  width: 7px;
  height: 7px;
  border-width: 0 1.5px 1.5px 0;
}

.financial-table-amount .card-payment-link-action {
  min-width: 0;
  min-height: 30px;
  margin-top: 5px;
  padding: 4px 8px;
  font-size: 10px;
  line-height: 1.2;
}

@container kkaebu (max-width: 599px){
  .imported-transaction-toolbar.imported-transaction-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Goals */
.goals-page {
  --goals-accent: #2f6f5e;
  --goals-accent-soft: #e9f3ef;
  --goals-purple: #7567a1;
  --goals-danger: #bd5b45;
}

.goals-intro {
  padding-bottom: 18px;
}

.goals-title-row,
.goals-section-heading,
.goals-card-heading,
.goals-card-numbers,
.goal-ledger-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.goals-title-row .intro-copy {
  margin-top: 7px;
  font-size: 13px;
  line-height: 1.55;
}

.goals-month-label {
  flex: 0 0 auto;
  color: #64748b;
  font-size: 13px;
}

.goals-workspace {
  width: min(100%, 920px);
  margin: 0 auto;
  padding: 0 22px 40px;
}

.goals-tabs {
  display: grid;
  position: sticky;
  z-index: 3;
  top: max(62px, calc(env(safe-area-inset-top) + 48px));
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid #d5dfdf;
  border-radius: 0;
  background: rgb(239 243 242 / 96%);
  backdrop-filter: blur(12px);
}

.goals-tabs button {
  position: relative;
  display: grid;
  min-height: 48px;
  padding: 10px 12px;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.goals-tabs button::after {
  position: absolute;
  right: 18%;
  bottom: -1px;
  left: 18%;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: transparent;
  content: "";
}

.goals-tabs button[aria-selected="true"] {
  color: #244f44;
  background: transparent;
  box-shadow: none;
}

.goals-tabs button[aria-selected="true"]::after {
  background: var(--goals-accent);
}

.goals-tabs button:hover,
.goals-tabs button:focus-visible {
  outline: none;
  color: #244f44;
  background: rgb(255 255 255 / 62%);
}

.goals-tabs button:focus-visible {
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--theme-accent,rgb(47 111 94)) 35%, transparent);
}

.goals-page-status {
  margin: 16px 0 0;
}

.goals-panel {
  padding-top: 20px;
}

.goals-total-card {
  display: flex;
  width: 100%;
  min-height: 158px;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  padding: 23px 24px;
  border: 1px solid #d9e6e1;
  border-radius: 20px;
  background: linear-gradient(145deg, #fff 0%, #f3f8f6 100%);
  color: #1f3540;
  text-align: left;
  box-shadow: 0 14px 36px color-mix(in srgb, var(--theme-shadow-ink,rgb(41 74 64)) 8%, transparent);
}

.goals-total-card:not(:disabled):hover,
.goals-total-card:not(:disabled):focus-visible,
.goals-card:hover,
.goals-card:focus-visible {
  border-color: var(--theme-accent,#9fc4b8);
  transform: translateY(-1px);
  box-shadow: 0 15px 34px color-mix(in srgb, var(--theme-accent,rgb(41 74 64)) 12%, transparent);
}

.goals-card-kicker {
  color: var(--goals-accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
}

.goals-total-amount {
  margin-top: 7px;
  color: #193f35;
  font-size: clamp(24px, 3cqw, 32px);
  font-weight: 850;
  line-height: 1.15;
  letter-spacing: -.045em;
}

.goals-total-amount.is-over,
.goals-card.is-over .goals-card-numbers em,
.goal-detail-summary em.is-over {
  color: var(--goals-danger);
}

.goals-card-progress-copy {
  margin: 7px 0 14px;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.goals-progress {
  position: relative;
  display: block;
  width: 100%;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe9e5;
}

.goals-progress > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--goals-accent);
  transition: width .25s ease;
}

.goals-progress.is-over > span,
.goals-total-card.is-over .goals-progress > span {
  background: var(--goals-danger);
}

.goals-progress-native {
  display: block;
  width: 100%;
  height: 14px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  appearance: none;
  background: #dfe9e5;
}

.goals-progress-native::-webkit-progress-bar {
  border-radius: 999px;
  background: #dfe9e5;
}

.goals-progress-native::-webkit-progress-value {
  border-radius: 999px;
  background: var(--goals-accent);
}

.goals-progress-native::-moz-progress-bar {
  border-radius: 999px;
  background: var(--goals-accent);
}

.goals-progress-native.is-over::-webkit-progress-value,
.goals-total-card.is-over .goals-progress-native::-webkit-progress-value {
  background: var(--goals-danger);
}

.goals-progress-native.is-over::-moz-progress-bar,
.goals-total-card.is-over .goals-progress-native::-moz-progress-bar {
  background: var(--goals-danger);
}

.goals-section-heading {
  margin: 28px 2px 13px;
}

.goals-section-heading .eyebrow {
  margin: 0 0 3px;
}

.goals-section-heading h2 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -.03em;
}

.goals-add-button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #cbdad5;
  border-radius: 12px;
  background: #fff;
  color: var(--goals-accent);
  font-size: 11px;
  font-weight: 800;
}

.goals-card-list {
  display: grid;
  gap: 12px;
}

.goals-card {
  display: flex;
  width: 100%;
  min-height: 116px;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 16px 18px;
  border: 1px solid #e1e7e5;
  border-radius: 20px;
  background: #fff;
  color: #1e293b;
  text-align: left;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--theme-shadow-ink,rgb(34 62 54)) 5%, transparent);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.goals-card-title {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.goals-warning {
  color: #d37b28;
  font-size: 13px;
  line-height: 1;
}

.goals-kind-badge {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef3f1;
  color: #60746d;
  font-size: 10px;
  font-weight: 800;
}

.goals-card-numbers {
  align-items: baseline;
  justify-content: flex-start;
  gap: 4px;
}

.goals-card-numbers strong {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.025em;
}

.goals-card-numbers > span {
  color: #8a98a3;
  font-size: 11px;
  font-weight: 700;
}

.goals-card-numbers em {
  margin-left: auto;
  color: var(--goals-accent);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.goals-segments {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(4px, 1fr));
  gap: 3px;
  height: 14px;
}

.goals-segments span {
  min-width: 3px;
  border-radius: 4px;
  background: #dfe9e5;
}

.goals-segments span.filled {
  background: var(--goals-purple);
}

.goals-segments span.filled.over {
  background: var(--goals-danger);
}

.goals-empty-add {
  width: 100%;
  min-height: 58px;
  margin-top: 12px;
  border: 1px dashed #b8cbc5;
  border-radius: 18px;
  background: rgb(255 255 255 / 55%);
  color: var(--goals-accent);
  font-size: 12px;
  font-weight: 800;
}

.goals-month-select select {
  min-height: 38px;
  padding: 0 34px 0 12px;
  border: 1px solid #d6dfdc;
  border-radius: 11px;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}

.goals-history-month-select {
  display: block;
  width: max-content;
  margin: 0 2px 12px auto;
}

.goals-history-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 14px 16px;
  border-radius: 15px;
  background: #eef3f1;
  color: #52645e;
  font-size: 12px;
  font-weight: 800;
}

.goals-history-summary strong {
  color: #263d36;
  font-size: 14px;
}

.goals-history-period {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.goals-history-period img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.goal-form-dialog,
.goal-detail-dialog {
  width: min(620px, calc(100cqw - 24px));
}

.goal-form-scroll,
.goal-detail-scroll {
  display: grid;
  gap: 18px;
}

.goal-field,
.goal-choice-field,
.goal-category-field {
  display: grid;
  min-width: 0;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.goal-field > span,
.goal-choice-field legend,
.goal-category-field legend {
  color: #344b44;
  font-size: 12px;
  font-weight: 800;
}

.goal-category-field legend small {
  color: #83918c;
  font-size: 11px;
}

.goal-field input,
.goal-field select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #d7e0dd;
  border-radius: 12px;
  background: #fff;
}

.goal-segmented-control {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  padding: 4px;
  border-radius: 13px;
  background: #e9eeec;
}

.goal-segmented-control label {
  position: relative;
}

.goal-segmented-control input {
  position: absolute;
  opacity: 0;
}

.goal-segmented-control span {
  display: grid;
  min-height: 40px;
  place-items: center;
  border-radius: 10px;
  color: #6d7b76;
  font-size: 12px;
  font-weight: 800;
}

.goal-segmented-control input:checked + span {
  background: #fff;
  color: var(--goals-accent);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--theme-accent,rgb(38 76 65)) 9%, transparent);
}

.goal-keyword-field {
  display: grid;
  gap: 8px;
}

.goal-keyword-field > p,
.goal-category-field > p {
  margin: 0;
  color: #75837e;
  font-size: 11px;
  line-height: 1.55;
}

.goal-keyword-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.goal-keyword-tags:empty {
  display: none;
}

.goal-keyword-tags button {
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: #eeeaf7;
  color: #68598f;
  font-size: 11px;
  font-weight: 800;
}

.goal-category-options {
  display: grid;
  gap: 9px;
}

.goal-category-option {
  padding: 12px;
  border: 1px solid #e0e7e4;
  border-radius: 14px;
  background: #fbfcfc;
}

.goal-category-main {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}

.goal-category-main input,
.goal-subcategory-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--goals-accent);
}

.goal-category-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  background: #eef3f1;
  font-size: 16px;
}

.goal-category-main strong {
  font-size: 13px;
}

.goal-subcategory-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
  padding-left: 27px;
}

.goal-subcategory-option {
  position: relative;
}

.goal-subcategory-option input {
  position: absolute;
  opacity: 0;
}

.goal-subcategory-option span {
  display: block;
  padding: 7px 10px;
  border: 1px solid #dbe4e1;
  border-radius: 999px;
  background: #fff;
  color: #67756f;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.goal-subcategory-option input:checked + span {
  border-color: var(--theme-accent,#8fb6aa);
  background: var(--goals-accent-soft);
  color: var(--goals-accent);
}

.goal-subcategory-option input:disabled + span {
  opacity: .48;
  cursor: default;
}

.goal-limit-field > div {
  display: flex;
  align-items: center;
  border: 1px solid #d7e0dd;
  border-radius: 12px;
  background: #fff;
}

.goal-limit-field > div:focus-within {
  border-color: var(--theme-accent,#76a898);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent,rgb(62 127 108)) 10%, transparent);
}

.goal-limit-field input {
  min-width: 0;
  border: 0;
  box-shadow: none;
}

.goal-limit-field strong {
  padding-right: 14px;
  color: #64748b;
  font-size: 13px;
}

.goal-detail-summary {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 18px;
  background: #f2f6f4;
}

.goal-detail-summary > div:first-child {
  display: grid;
  gap: 5px;
}

.goal-detail-summary span {
  color: #75837e;
  font-size: 12px;
  font-weight: 800;
}

.goal-detail-summary strong {
  color: #233c35;
  font-size: 20px;
  letter-spacing: -.03em;
}

.goal-detail-summary strong small {
  color: #85938e;
  font-size: 11px;
}

.goal-detail-summary em {
  color: var(--goals-accent);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.goal-ledger-section {
  min-width: 0;
}

.goal-ledger-heading {
  margin-bottom: 9px;
}

.goal-ledger-heading h3 {
  margin: 0;
  font-size: 14px;
}

.goal-ledger-heading span {
  color: #788680;
  font-size: 11px;
  font-weight: 800;
}

.goal-ledger-list {
  overflow: hidden;
  border: 1px solid #e2e8e6;
  border-radius: 15px;
  background: #fff;
}

.goal-ledger-row {
  display: grid;
  width: 100%;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 10px 13px;
  border: 0;
  border-bottom: 1px solid #edf1ef;
  background: #fff;
  color: #263934;
  text-align: left;
}

.goal-ledger-row:last-child {
  border-bottom: 0;
}

.goal-ledger-row:hover,
.goal-ledger-row:focus-visible {
  background: #f7faf9;
}

.goal-ledger-date {
  color: #7d8a86;
  font-size: 11px;
  font-weight: 800;
}

.goal-ledger-description {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.goal-ledger-description strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.goal-ledger-description small {
  overflow: hidden;
  color: #87938f;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.goal-ledger-amount {
  font-size: 12px;
  white-space: nowrap;
}

.goal-ledger-empty {
  margin: 0;
  padding: 28px 16px;
  color: #7b8984;
  font-size: 13px;
  text-align: center;
}

.goal-delete-button {
  color: #a64e3c;
}

.goals-toast {
  position: fixed;
  z-index: 1200;
  right: 20px;
  bottom: max(20px, env(safe-area-inset-bottom));
  max-width: min(360px, calc(100cqw - 40px));
  padding: 12px 16px;
  border-radius: 13px;
  background: #203a33;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 14px 30px color-mix(in srgb, var(--theme-shadow-ink,rgb(17 42 35)) 24%, transparent);
}

@container kkaebu (min-width: 760px){
  .goals-card-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@container kkaebu (max-width: 599px){
  .goals-workspace {
    padding: 0 12px 30px;
  }

  .goals-title-row {
    align-items: flex-end;
  }

  .goals-title-row .intro-copy {
    display: none;
  }

  .goals-month-label {
    font-size: 12px;
  }

  .goals-total-card {
    min-height: 150px;
    padding: 20px;
    border-radius: 20px;
  }

  .goals-total-amount {
    font-size: 24px;
  }

  .goals-tabs button {
    min-height: 44px;
    padding: 8px 5px;
    font-size: 11px;
  }

  .goals-card {
    min-height: 110px;
    padding: 16px;
  }

  .goals-section-heading {
    margin-top: 23px;
  }

  .goal-form-dialog,
  .goal-detail-dialog {
    width: 100cqw;
    max-width: 100cqw;
    margin: auto 0 0;
    border-radius: 24px 24px 0 0;
  }

  .goal-form-dialog .category-settings-dialog-shell,
  .goal-detail-dialog .category-settings-dialog-shell {
    max-height: min(88vh, 760px);
  }

  .goals-toast {
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    max-width: calc(100cqw - 24px);
  }
}

[data-retired-finance-feature] {
  display: none !important;
}

.auth-product-preview {
  width: min(100%, 560px);
  padding: 24px;
}

.auth-product-preview h2 {
  margin: 0 0 18px;
  font-size: 23px;
}

.auth-product-preview p {
  font-size: 14px;
  line-height: 1.7;
}

.policy-product-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: contain;
  background: #eff3f2;
  border-radius: 12px;
  margin-bottom: 20px;
}

.policy-product-terms,
.plan-product-detail {
  font-size: 13px;
  line-height: 1.6;
}

.policy-product-card > .plan-purchase-button {
  display: inline-flex;
  margin-top: 14px;
  text-decoration: none;
}

.policy-product-card p a {
  color: #28725f;
}

.plan-product-detail {
  display: block;
  margin: 10px 0;
  color: #28725f;
}

.commerce-footer--site {
  flex-wrap: wrap;
  align-items: flex-start;
}

.commerce-footer .commerce-footer__contact {
  flex-basis: 100%;
  overflow-wrap: anywhere;
}

@container kkaebu (max-width: 599px){
  .page-shell:is(.review-page, .records-page, .goals-page, .ai-insights-page)
    > .commerce-footer--site {
    display: none;
  }
}

.billing-history-list {
  padding: 0;
  list-style: none;
}

.billing-history-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line, #e5e7eb);
}

.billing-history-list span {
  overflow-wrap: anywhere;
}

.quick-image-expense-result .quick-image-review-link {
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin: 8px 0;
  padding: 9px 12px;
  border: 1px solid color-mix(in srgb, var(--theme-accent, #287f6d) 35%, transparent);
  border-radius: 12px;
  color: var(--theme-accent, #287f6d);
  background: color-mix(in srgb, var(--theme-accent, #287f6d) 8%, transparent);
  font-weight: 750;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.quick-image-expense-result .quick-image-review-link:focus-visible {
  outline: 2px solid var(--theme-accent, #287f6d);
  outline-offset: 3px;
}
