/* My Finance Records · V15.2.13 audit, refined for common desktops in V15.2.14 */

/* Summary updates should acknowledge a change without moving the layout. */
.legend-item.legend-live-update {
  animation: financeSummaryConfirm 420ms ease-out;
}

@keyframes financeSummaryConfirm {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 0 2px color-mix(in srgb, var(--green) 28%, transparent); }
}

@media (prefers-reduced-motion: reduce) {
  .legend-item.legend-live-update { animation: none !important; }
}

/* Keep the desktop header on one compact 38px control rhythm. */
@media (min-width: 851px) {
  html body .topbar-actions {
    gap: 6px !important;
  }

  html body .topbar-actions > .cloud-sync-toolbar-button,
  html body .topbar-actions .topbar-history-button,
  html body .topbar-actions .topbar-add-button,
  html body .topbar-actions .topbar-tools-trigger,
  html body .topbar-actions .month-navigator,
  html body .topbar-actions .month-navigator > .month-nav-button,
  html body .topbar-actions .month-navigator > .month-control,
  html body .topbar-actions .month-navigator > .month-current-button,
  html body .topbar-actions .month-navigator > .month-status-chip {
    box-sizing: border-box !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
  }

  html body .topbar-actions .month-navigator > .month-control {
    width: 174px !important;
  }

  html body .topbar-actions .month-navigator > .month-current-button,
  html body .topbar-actions .month-navigator > .month-status-chip {
    min-width: 68px !important;
    margin-inline-start: 6px !important;
  }

  html body .topbar-actions .topbar-add-button {
    padding-inline: 10px !important;
  }

  /* Both rows of Budget summary cards use the same compact geometry. */
  html body #money :is(.legend, .summary-strip) {
    gap: 8px !important;
    margin-block: 8px !important;
  }

  html body #money :is(.legend-item, .summary-item) {
    min-height: 56px !important;
    padding: 7px 10px !important;
    gap: 8px !important;
    align-items: center !important;
  }

  html body #money :is(.legend-total, .summary-card-value) {
    align-self: center !important;
    font-variant-numeric: tabular-nums;
  }

  html body #money .summary-card::after {
    display: none !important;
  }
}

@media (min-width: 851px) and (max-width: 1400px) {
  html body .topbar-actions .month-navigator > .month-control {
    width: 158px !important;
  }

  html body #money :is(.legend-text small, .summary-card-copy small) {
    display: none !important;
  }

  html body #money :is(.legend-text strong, .summary-card-label) {
    display: block !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
  }

  html body #money :is(.legend-item, .summary-item) {
    height: 56px !important;
    max-height: 56px !important;
    overflow: hidden !important;
  }
}

/* Pointer-coarse tablets retain touch-safe controls at desktop widths. */
@media (min-width: 701px) and (max-width: 1024px) and (pointer: coarse),
       (min-width: 701px) and (max-width: 1024px) and (hover: none) {
  html body .topbar-actions > .cloud-sync-toolbar-button,
  html body .topbar-actions .topbar-history-button,
  html body .topbar-actions .topbar-add-button,
  html body .topbar-actions .topbar-tools-trigger,
  html body .topbar-actions .month-navigator,
  html body .topbar-actions .month-navigator > .month-nav-button,
  html body .topbar-actions .month-navigator > .month-control,
  html body .topbar-actions .month-navigator > .month-current-button,
  html body .topbar-actions .month-navigator > .month-status-chip {
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
  }
}

/* Phone: compact both the containers and the approved action-control rhythm. */
@media (max-width: 700px) {
  :root {
    --talaan-phone-control-size: 35px;
    --talaan-phone-gap: 8px;
    --talaan-phone-card-padding: 10px;
    --mobile-topbar-offset: calc(max(5px, env(safe-area-inset-top)) + 41px);
  }

  html body .topbar {
    gap: 6px 5px !important;
    padding: max(7px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) 7px max(8px, env(safe-area-inset-left)) !important;
  }

  html body .topbar-left { gap: 7px !important; }
  html body .topbar h1 { font-size: .94rem !important; }
  html body .topbar-actions .month-navigator { gap: 5px !important; }

  html body #money .section-stack {
    gap: 8px !important;
  }

  html body #money .period-card {
    margin-top: 0 !important;
    padding: 0 !important;
    border-radius: var(--talaan-card-radius) !important;
    overflow: visible !important;
  }

  html body #money .period-header {
    min-height: 50px !important;
    margin: 0 !important;
    padding: 10px 12px !important;
    border-start-start-radius: var(--talaan-card-radius) !important;
    border-start-end-radius: var(--talaan-card-radius) !important;
    border-end-start-radius: 0 !important;
    border-end-end-radius: 0 !important;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 78%, transparent) !important;
  }

  html body #money .period-card.is-collapsed {
    overflow: hidden !important;
  }

  html body #money .period-card.is-collapsed .period-header {
    min-height: 50px !important;
    border-bottom: 0 !important;
    border-radius: var(--talaan-card-radius) !important;
  }

  html body #money .period-header .collapse-toggle {
    width: 35px !important;
    min-width: 35px !important;
    max-width: 35px !important;
    height: 35px !important;
    min-height: 35px !important;
    max-height: 35px !important;
    margin: 0 !important;
  }

  html body #money :is(#earlyExpenses, #lateExpenses, #otherExpenses) {
    display: grid;
    gap: 0 !important;
  }

  html body #money .record-row[data-expense-row] {
    margin: 0 !important;
    padding: 9px 10px !important;
    gap: 6px 9px !important;
    border: 0 !important;
    border-top: 1px solid var(--line) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  html body #money :is(#earlyExpenses, #lateExpenses, #otherExpenses) > .record-row[data-expense-row]:first-child {
    border-top: 0 !important;
  }

  html body #money .expense-record-title .record-title-copy > small {
    display: -webkit-box !important;
    overflow: hidden !important;
    white-space: normal !important;
    text-overflow: clip !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  html body #money .expense-record-title .record-statuses {
    row-gap: 3px !important;
  }

  html body #money .record-row[data-expense-row] > .mobile-record-actions {
    margin-top: 0 !important;
    gap: 6px !important;
  }

  html body #money .record-row[data-expense-row] > .mobile-record-actions > .button,
  html body #money .record-row[data-expense-row] .overflow-menu-trigger {
    min-height: 44px !important;
    height: 44px !important;
  }

  /* Keep every compact phone popover and secondary action finger-safe. */
  html body :is(
    .cloud-sync-popover-close,
    .compact-help-close,
    .month-picker-year-button,
    .emoji-option,
    .gym-override-chip button,
    .kanban-column-menu .overflow-menu-trigger,
    .structured-drag-toast-dismiss
  ) {
    box-sizing: border-box !important;
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
  }

  html body :is(
    .month-picker-option,
    .emoji-custom-button,
    .settings-search-field button,
    .pc-event-actions .button,
    #projects .project-kanban-board .project-calendar-button,
    #projects .project-kanban-board .project-row-actions .button,
    .structured-drag-toast-undo
  ) {
    min-width: 44px !important;
    min-height: 44px !important;
  }

  html body .emoji-picker-panel,
  html body .record-icon-picker-controls.compact-icon-popover .emoji-picker-panel {
    position: fixed !important;
    inset: auto 12px max(12px, env(safe-area-inset-bottom)) !important;
    width: auto !important;
    max-height: min(58dvh, 430px) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
  }

  html body .emoji-grid {
    grid-template-columns: repeat(5, minmax(44px, 1fr)) !important;
    gap: 6px !important;
  }

  html body .emoji-option {
    justify-self: center;
  }

  /* Phone workspaces stay compact without turning their visual chrome into a
     second card. The 44px buttons retain the full accessible hit area. */
  html body :is(
    .finance-workspace-marquee-row > .money-workspace-switcher,
    .project-workspace-switcher,
    .dashboard-view-tabs
  ) {
    position: static !important;
    top: auto !important;
    box-sizing: border-box !important;
    width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
    border: 1px solid var(--line) !important;
    border-radius: var(--talaan-control-radius) !important;
    background: var(--surface) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    overflow: hidden !important;
  }

  html body :is(
    .finance-workspace-marquee-row > .money-workspace-switcher,
    .project-workspace-switcher,
    .dashboard-view-tabs
  ) > .workspace-switcher-button {
    box-sizing: border-box !important;
    min-width: 0 !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    padding: 6px 8px !important;
    border-radius: var(--talaan-control-radius) !important;
    box-shadow: none !important;
  }

  html body .project-workspace-switcher {
    margin-bottom: 9px !important;
  }

  /* A page-level sticky total was covering cards that follow the transaction
     list. Keep phone totals in normal document flow inside their workspace. */
  html body :is(
    #income #transactionTotals-income,
    #money #transactionTotals-expense,
    #paid-expenses #transactionTotals-paid
  ) {
    position: static !important;
    inset: auto !important;
    z-index: auto !important;
  }

  /* Account modes share one contained scrolling surface on iPhone. */
  html body #accountDialog,
  html body #accountDialog > form {
    box-sizing: border-box !important;
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    max-height: calc(100dvh - 16px) !important;
    overflow: hidden !important;
  }

  html body #accountDialog .modal-body {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 10px 12px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
  }

  html body #accountDialog :is(
    .account-mode-switch,
    #accountMaintenanceFields,
    .account-spend-panel,
    .account-spend-summary,
    .account-spend-grid,
    .account-spend-total-choice,
    .account-spend-preview,
    .field,
    .input,
    .select
  ) {
    box-sizing: border-box !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  html body #accountDialog .account-spend-panel,
  html body #accountDialog .account-spend-grid,
  html body #accountDialog .account-spend-summary,
  html body #accountDialog .account-spend-total-choice,
  html body #accountDialog .account-spend-preview {
    width: 100% !important;
  }

  /* Agenda actions use explicit rows so Add column cannot collapse into a
     narrow multi-line sliver beside the count. */
  html body .project-calendar-v13020 .pc-header-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px !important;
    gap: 7px !important;
    width: 100% !important;
    min-width: 0 !important;
    margin-top: 8px !important;
    justify-content: stretch !important;
    align-items: stretch !important;
  }

  html body .project-calendar-v13020 .pc-count {
    grid-column: 1 / -1;
    width: max-content;
    max-width: 100%;
  }

  html body .project-calendar-v13020 :is([data-pc-view], [data-kanban-add-column="agenda"]) {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 44px !important;
    padding-inline: 8px !important;
    white-space: nowrap !important;
  }

  html body .project-calendar-v13020 [data-pc-add] {
    grid-column: 3;
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
  }

  html body .project-calendar-v13020 .pc-agenda {
    width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  html body .project-calendar-v13020 .finance-kanban-board {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    scroll-padding-inline: 7px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  html body .project-calendar-v13020 .finance-kanban-column {
    min-width: min(82vw, 310px) !important;
    max-width: min(82vw, 310px) !important;
    flex: 0 0 min(82vw, 310px) !important;
    scroll-snap-align: start;
  }
}

@media (max-width: 380px) {
  html body .topbar {
    grid-template-columns: minmax(0, 1fr) 42px 42px 42px !important;
  }

  html body #money .period-header {
    padding-inline: 10px !important;
  }
}

/* V15.2.18 · Fine-pointer desktop toolbar: 30px controls, 7px corners, 4px rhythm. */
@media (min-width: 851px) and (hover: hover) and (pointer: fine) {
  html body .topbar-actions {
    gap: 4px !important;
  }

  html body .topbar-actions > .cloud-sync-toolbar-button,
  html body .topbar-actions .topbar-history-button,
  html body .topbar-actions .topbar-add-button,
  html body .topbar-actions .topbar-tools-trigger,
  html body .topbar-actions .month-navigator,
  html body .topbar-actions .month-navigator > .month-nav-button,
  html body .topbar-actions .month-navigator > .month-control,
  html body .topbar-actions .month-navigator > .month-current-button,
  html body .topbar-actions .month-navigator > .month-status-chip {
    box-sizing: border-box !important;
    height: var(--ui-disclosure-size, 30px) !important;
    min-height: var(--ui-disclosure-size, 30px) !important;
    max-height: var(--ui-disclosure-size, 30px) !important;
    padding-block: 3px !important;
  }

  html body .topbar-actions > .cloud-sync-toolbar-button,
  html body .topbar-actions .topbar-history-button,
  html body .topbar-actions .topbar-add-button,
  html body .topbar-actions .topbar-tools-trigger,
  html body .topbar-actions .month-navigator > .month-nav-button,
  html body .topbar-actions .month-navigator > .month-control,
  html body .topbar-actions .month-navigator > .month-current-button,
  html body .topbar-actions .month-navigator > .month-status-chip {
    border-radius: var(--talaan-control-radius) !important;
  }

  html body .topbar-actions .topbar-tools-trigger {
    width: var(--ui-disclosure-size, 30px) !important;
    min-width: var(--ui-disclosure-size, 30px) !important;
    max-width: var(--ui-disclosure-size, 30px) !important;
    padding-inline: 0 !important;
  }

  html body .topbar-actions :is(
    .cloud-sync-toolbar-button,
    .topbar-add-button
  ) .toolbar-icon {
    width: 18px !important;
    height: 18px !important;
    flex: 0 0 18px !important;
  }

  html body .topbar-actions .month-navigator {
    gap: 4px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    overflow: visible !important;
  }

  html body .topbar-actions .month-navigator > #previousMonthButton,
  html body .topbar-actions .month-navigator > #nextMonthButton {
    width: var(--ui-disclosure-size, 30px) !important;
    min-width: var(--ui-disclosure-size, 30px) !important;
    max-width: var(--ui-disclosure-size, 30px) !important;
    padding: 0 !important;
    border-inline: 1px solid var(--line) !important;
    border-radius: var(--talaan-control-radius) !important;
    box-shadow: none !important;
  }

  html body .topbar-actions .month-navigator > .month-control {
    width: 175px !important;
    min-width: 175px !important;
    max-width: 175px !important;
    padding: 0 !important;
    border-inline: 1px solid var(--line) !important;
    border-radius: var(--talaan-control-radius) !important;
    box-shadow: none !important;
  }

  html body .topbar-actions .month-navigator .month-display-button {
    box-sizing: border-box !important;
    width: 100% !important;
    height: calc(var(--ui-disclosure-size, 30px) - 2px) !important;
    min-height: calc(var(--ui-disclosure-size, 30px) - 2px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 4px 8px !important;
    border: 0 !important;
    border-radius: var(--talaan-control-radius) !important;
    background: transparent !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  html body .topbar-actions .month-navigator .month-display-button::before {
    flex: 0 0 14px !important;
  }

  html body .topbar-actions .month-display-value {
    flex: 0 0 auto !important;
    text-align: left !important;
  }

  html body .topbar-actions .month-navigator > .month-current-button,
  html body .topbar-actions .month-navigator > .month-status-chip {
    margin-inline-start: 0 !important;
    border-radius: var(--talaan-control-radius) !important;
    box-shadow: none !important;
  }

  html body #money #availableMoneySection #addAccountButton {
    box-sizing: border-box !important;
    height: var(--ui-disclosure-size, 30px) !important;
    min-height: var(--ui-disclosure-size, 30px) !important;
    max-height: var(--ui-disclosure-size, 30px) !important;
    padding-block: 3px !important;
  }
}

/* V15.2.18 · Finance expense-period cleanup: neutral outer cards with 5px row rhythm on desktop. */
@media (min-width: 851px) {
  html body #money .period-card {
    background: var(--surface) !important;
    border-color: var(--line) !important;
  }

  html body #money :is(#earlyExpenses, #lateExpenses, #otherExpenses) {
    background: var(--surface) !important;
  }

  html body #money :is(#earlyExpenses, #lateExpenses, #otherExpenses) > .record-row[data-expense-row] + .record-row[data-expense-row] {
    margin-top: 5px !important;
  }
}

/* V15.2.19 · Expense card-list columns, matching the Project Agenda card rhythm. */
@media (min-width: 851px) {
  html body #money .section-stack {
    align-items: start !important;
    gap: 10px !important;
  }

  html body #money .period-card {
    min-width: 0 !important;
    margin: 0 !important;
    padding: 8px !important;
    overflow: visible !important;
    border: 1px solid var(--line) !important;
    border-top-width: 3px !important;
    border-radius: var(--talaan-card-radius) !important;
    box-shadow: none !important;
  }

  html body #money .period-card.period-early {
    border-top-color: var(--red) !important;
    background: color-mix(in srgb, var(--red-soft) 28%, var(--surface-soft)) !important;
  }

  html body #money .period-card.period-late {
    border-top-color: var(--orange) !important;
    background: color-mix(in srgb, var(--orange-soft) 30%, var(--surface-soft)) !important;
  }

  html body #money .period-card.period-other {
    border-top-color: var(--blue) !important;
    background: color-mix(in srgb, var(--blue-soft) 30%, var(--surface-soft)) !important;
  }

  html body #money .period-header {
    min-height: 58px !important;
    margin: 0 !important;
    padding: 6px 6px 9px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
  }

  html body #money .period-header h3 {
    font-size: .9rem !important;
  }

  html body #money .period-header p {
    margin-top: 3px !important;
    font-size: .66rem !important;
  }

  html body #money .period-total {
    font-size: .92rem !important;
  }

  html body #money .record-header {
    display: none !important;
  }

  html body #money :is(#earlyExpenses, #lateExpenses, #otherExpenses) {
    display: grid !important;
    align-content: start !important;
    gap: 5px !important;
    padding: 0 !important;
    background: transparent !important;
  }

  html body #money :is(#earlyExpenses, #lateExpenses, #otherExpenses) > .record-row[data-expense-row],
  html body #money :is(#earlyExpenses, #lateExpenses, #otherExpenses) > .record-row[data-expense-row] + .record-row[data-expense-row] {
    min-height: 0 !important;
    margin: 0 !important;
    padding: 10px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 6px 10px !important;
    align-items: center !important;
    border: 1px solid var(--line) !important;
    border-left-width: 3px !important;
    border-radius: var(--talaan-card-radius) !important;
    background: var(--surface) !important;
    box-shadow: 0 2px 8px rgb(0 0 0 / .06) !important;
  }

  html body #money .period-early .record-row[data-expense-row] { border-left-color: var(--red) !important; }
  html body #money .period-late .record-row[data-expense-row] { border-left-color: var(--orange) !important; }
  html body #money .period-other .record-row[data-expense-row] { border-left-color: var(--blue) !important; }

  html body #money .record-row[data-expense-row] > .expense-record-title {
    grid-column: 1 / -1 !important;
    min-width: 0 !important;
  }

  html body #money .record-row[data-expense-row] .expense-record-title .record-title-copy > strong {
    font-size: .8rem !important;
    line-height: 1.3 !important;
  }

  html body #money .record-row[data-expense-row] .expense-record-title .record-title-copy > small {
    margin-top: 3px !important;
    font-size: .62rem !important;
    line-height: 1.35 !important;
  }

  html body #money .record-row[data-expense-row] .expense-record-title .record-statuses {
    margin-top: 5px !important;
    gap: 4px !important;
  }

  html body #money .record-row[data-expense-row] .expense-record-title .record-statuses > .status-saved {
    display: none !important;
  }

  html body #money .record-row[data-expense-row] > .due-cell {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    align-items: center !important;
    justify-content: start !important;
    gap: 4px 7px !important;
    padding-top: 1px !important;
    color: var(--muted) !important;
    font-size: .61rem !important;
  }

  html body #money .record-row[data-expense-row] > .due-cell::before {
    grid-column: 1 !important;
    grid-row: 1 !important;
    color: var(--primary) !important;
    font-size: .58rem !important;
    font-weight: 850 !important;
    letter-spacing: .06em !important;
    text-transform: uppercase !important;
  }

  html body #money .period-early .record-row[data-expense-row] > .due-cell::before,
  html body #money .period-late .record-row[data-expense-row] > .due-cell::before {
    content: "Deadline";
  }

  html body #money .period-other .record-row[data-expense-row] > .due-cell::before {
    content: "Expense";
  }

  html body #money .record-row[data-expense-row] > .due-cell > span:first-child {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
  }

  html body #money .record-row[data-expense-row] > .due-cell > .due-warning {
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-self: start !important;
  }

  html body #money .record-row[data-expense-row] > [data-label="Planned account"] {
    grid-column: 1 !important;
    min-width: 0 !important;
    color: var(--muted) !important;
    font-size: .62rem !important;
  }

  html body #money .record-row[data-expense-row] > [data-label="Planned account"]::before {
    content: "Account · ";
    color: var(--muted) !important;
    font-weight: 700 !important;
  }

  html body #money .record-row[data-expense-row] > .amount {
    grid-column: 2 !important;
    justify-self: end !important;
    font-size: .75rem !important;
  }

  html body #money .record-row[data-expense-row] > .desktop-record-actions {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    margin-top: 2px !important;
    padding-top: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    border-top: 0 !important;
  }

  html body #money .record-row[data-expense-row] > .desktop-record-actions > .button {
    min-height: 32px !important;
    height: 32px !important;
    padding: 5px 8px !important;
    border-radius: var(--talaan-control-radius) !important;
    font-size: .67rem !important;
  }

  html body #money .record-row[data-expense-row] > .mobile-record-actions {
    display: none !important;
  }
}

@media (min-width: 1100px) {
  html body #money .section-stack {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 851px) and (max-width: 1099px) {
  html body #money .section-stack {
    display: flex !important;
    overflow-x: auto !important;
    overscroll-behavior-inline: contain !important;
    scrollbar-gutter: stable !important;
    scroll-snap-type: inline proximity !important;
    padding-bottom: 4px !important;
  }

  html body #money .section-stack > .period-card {
    flex: 0 0 340px !important;
    scroll-snap-align: start !important;
  }
}


/* V15.2.19 · Compact expense cards: static ownership and non-shrinking monthly-repeat action. */
@media (min-width: 851px) {
  html body #money .section-stack {
    align-items: start !important;
    gap: 8px !important;
  }

  html body #money .period-card {
    min-width: 0 !important;
    margin: 0 !important;
    padding: 6px !important;
    overflow: visible !important;
  }

  html body #money .period-header {
    min-height: 50px !important;
    margin: 0 !important;
    padding: 4px 5px 6px !important;
  }

  html body #money .period-header h3 {
    font-size: .86rem !important;
  }

  html body #money .period-header p {
    margin-top: 2px !important;
    font-size: .63rem !important;
  }

  html body #money .period-total {
    font-size: .88rem !important;
  }

  html body #money :is(#earlyExpenses, #lateExpenses, #otherExpenses) {
    display: grid !important;
    align-content: start !important;
    gap: 5px !important;
  }

  html body #money :is(#earlyExpenses, #lateExpenses, #otherExpenses) > .record-row[data-expense-row],
  html body #money :is(#earlyExpenses, #lateExpenses, #otherExpenses) > .record-row[data-expense-row] + .record-row[data-expense-row] {
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 7px !important;
    gap: 4px 8px !important;
    align-self: start !important;
    align-items: center !important;
  }

  html body #money .record-row[data-expense-row] .expense-record-title .record-title-copy > strong {
    font-size: .78rem !important;
    line-height: 1.25 !important;
  }

  html body #money .record-row[data-expense-row] .expense-record-title .record-title-copy > small {
    margin-top: 2px !important;
    font-size: .61rem !important;
    line-height: 1.3 !important;
  }

  html body #money .record-row[data-expense-row] .expense-record-title .record-statuses {
    margin-top: 3px !important;
    gap: 3px !important;
  }

  html body #money .record-row[data-expense-row] > .due-cell {
    gap: 2px 6px !important;
    padding-top: 0 !important;
    font-size: .6rem !important;
  }

  html body #money .record-row[data-expense-row] > [data-label="Planned account"] {
    font-size: .61rem !important;
  }

  html body #money .record-row[data-expense-row] > .amount {
    font-size: .73rem !important;
  }

  html body #money .record-row[data-expense-row] > .desktop-record-actions {
    margin-top: 1px !important;
    padding-top: 5px !important;
    gap: 4px !important;
  }

  html body #money .record-row[data-expense-row] > .desktop-record-actions > .button {
    min-height: 30px !important;
    height: 30px !important;
    padding: 4px 7px !important;
    border-radius: var(--talaan-control-radius) !important;
    font-size: .65rem !important;
  }

  html body #money .record-row[data-expense-row] > .desktop-record-actions > .button-saved,
  html body #money .record-row[data-expense-row] > .desktop-record-actions > .button-saved:hover,
  html body #money .record-row[data-expense-row] > .desktop-record-actions > .button-saved:focus-visible,
  html body #money .record-row[data-expense-row] > .desktop-record-actions > .button-saved:active,
  html body #money .record-row[data-expense-row] > .desktop-record-actions > .button-saved.active,
  html body #money .record-row[data-expense-row] > .desktop-record-actions > .button-saved.active:hover {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    width: max-content !important;
    min-width: max-content !important;
    max-width: none !important;
    height: 30px !important;
    min-height: 30px !important;
    padding: 4px 7px !important;
    border: 1px solid var(--line) !important;
    border-radius: var(--talaan-control-radius) !important;
    background: var(--surface) !important;
    color: var(--text) !important;
    box-shadow: none !important;
    transform: none !important;
  }

}


/* V15.2.20 · Compact expense cards: static ownership. */
@media (min-width: 851px) {
  html body #money .section-stack { align-items:start !important; gap:8px !important; }
  html body #money .period-card { margin:0 !important; padding:6px !important; overflow:visible !important; }
  html body #money .period-header { min-height:50px !important; padding:4px 5px 6px !important; }
  html body #money .period-header h3 { font-size:.86rem !important; }
  html body #money .period-header p { margin-top:2px !important; font-size:.63rem !important; }
  html body #money .period-total { font-size:.88rem !important; }
  html body #money :is(#earlyExpenses,#lateExpenses,#otherExpenses) { display:grid !important; align-content:start !important; gap:5px !important; padding:0 !important; }
  html body #money :is(#earlyExpenses,#lateExpenses,#otherExpenses) > .record-row[data-expense-row],
  html body #money :is(#earlyExpenses,#lateExpenses,#otherExpenses) > .record-row[data-expense-row] + .record-row[data-expense-row] { min-height:0 !important; height:auto !important; margin:0 !important; padding:7px !important; gap:4px 8px !important; align-self:start !important; align-items:center !important; }
  html body #money .record-row[data-expense-row] .expense-record-title .record-title-copy > strong { font-size:.78rem !important; line-height:1.25 !important; }
  html body #money .record-row[data-expense-row] .expense-record-title .record-title-copy > small { margin-top:2px !important; font-size:.61rem !important; line-height:1.3 !important; }
  html body #money .record-row[data-expense-row] .expense-record-title .record-statuses { margin-top:3px !important; gap:3px !important; }
  html body #money .record-row[data-expense-row] > .due-cell { gap:2px 6px !important; padding-top:0 !important; font-size:.6rem !important; }
  html body #money .record-row[data-expense-row] > [data-label="Planned account"] { font-size:.61rem !important; }
  html body #money .record-row[data-expense-row] > .amount { font-size:.73rem !important; }
  html body #money .record-row[data-expense-row] > .desktop-record-actions { margin-top:1px !important; padding-top:5px !important; gap:4px !important; }
  html body #money .record-row[data-expense-row] > .desktop-record-actions > .button { height:30px !important; min-height:30px !important; padding:4px 7px !important; border-radius:var(--talaan-control-radius) !important; font-size:.65rem !important; }
  html body #money .record-row[data-expense-row] > .desktop-record-actions > [data-toggle-saved] { display:inline-flex !important; align-items:center !important; justify-content:center !important; flex:0 0 auto !important; flex-shrink:0 !important; width:max-content !important; min-width:82px !important; max-width:none !important; height:30px !important; min-height:30px !important; padding:4px 7px !important; white-space:nowrap !important; }
}


/* V15.2.20 · 1440px Budget summary compaction: prevent the eight Finance summary cards from growing beyond the compact desktop contract at the 1440px breakpoint. */
@media (min-width: 1401px) and (max-width: 1440px) {
  html body #money :is(.legend-text small, .summary-card-copy small) {
    display: none !important;
  }

  html body #money :is(.legend-text strong, .summary-card-label) {
    display: block !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
  }

  html body #money :is(.legend-item, .summary-item) {
    box-sizing: border-box !important;
    height: 56px !important;
    min-height: 56px !important;
    max-height: 56px !important;
    overflow: hidden !important;
  }
}


/* V15.2.21 · Real monthly recurrence label: do not rely on generated pseudo-content. */
@media (min-width: 851px) {
  html body #money .record-row[data-expense-row] > .desktop-record-actions > [data-toggle-saved] {
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    flex:0 0 auto !important;
    flex-shrink:0 !important;
    width:auto !important;
    min-width:82px !important;
    max-width:none !important;
    height:30px !important;
    min-height:30px !important;
    padding:4px 7px !important;
    color:var(--text) !important;
    opacity:1 !important;
    visibility:visible !important;
    white-space:nowrap !important;
  }
}


/* V15.2.22 · Monthly repeat control sizing. */
@media (min-width: 851px) {
  html body #money .record-row[data-expense-row] > .desktop-record-actions > [data-toggle-saved] {
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    flex:0 0 82px !important;
    flex-shrink:0 !important;
    width:82px !important;
    min-width:82px !important;
    max-width:82px !important;
    height:30px !important;
    min-height:30px !important;
    padding:4px 7px !important;
    box-sizing:border-box !important;
    transform:none !important;
    white-space:nowrap !important;
  }
}


/* V15.2.23 · Monthly repeat icon footer: approved checkbox-left / repeat-icon + Mark paid + Edit arrangement. */
@media (min-width: 851px) {
  html body #money .record-row[data-expense-row] {
    position:relative !important;
  }

  html body #money .record-row[data-expense-row] .expense-record-title > .expense-select-footer {
    position:absolute !important;
    left:7px !important;
    bottom:7px !important;
    z-index:2 !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:18px !important;
    height:18px !important;
    margin:0 !important;
  }

  html body #money .record-row[data-expense-row] .expense-record-title > .expense-select-footer > .expense-select-checkbox {
    margin:0 !important;
  }

  html body #money .record-row[data-expense-row] > .desktop-record-actions {
    min-height:34px !important;
    align-items:center !important;
    justify-content:flex-end !important;
    gap:4px !important;
  }

  html body #money .record-row[data-expense-row] > .desktop-record-actions > .button {
    height:34px !important;
    min-height:34px !important;
  }

  html body #money .record-row[data-expense-row] > .desktop-record-actions > [data-toggle-saved],
  html body #money .record-row[data-expense-row] > .desktop-record-actions > [data-toggle-saved]:hover,
  html body #money .record-row[data-expense-row] > .desktop-record-actions > [data-toggle-saved]:focus-visible,
  html body #money .record-row[data-expense-row] > .desktop-record-actions > [data-toggle-saved]:active,
  html body #money .record-row[data-expense-row] > .desktop-record-actions > [data-toggle-saved].active,
  html body #money .record-row[data-expense-row] > .desktop-record-actions > [data-toggle-saved].active:hover {
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    flex:0 0 34px !important;
    flex-shrink:0 !important;
    width:34px !important;
    min-width:34px !important;
    max-width:34px !important;
    height:34px !important;
    min-height:34px !important;
    max-height:34px !important;
    padding:0 !important;
    border-color:transparent !important;
    border-radius:var(--talaan-control-radius) !important;
    background:transparent !important;
    color:inherit !important;
    box-shadow:none !important;
    overflow:visible !important;
  }

  html body #money .record-row[data-expense-row] > .desktop-record-actions > [data-toggle-saved] .saved-icon-container {
    display:block !important;
    width:30px !important;
    min-width:30px !important;
    max-width:30px !important;
    height:30px !important;
    min-height:30px !important;
    max-height:30px !important;
    flex:0 0 30px !important;
    border:0 !important;
    border-radius:0 !important;
    background-image:url("./icons/finance-save-unsaved-r2.png") !important;
    background-repeat:no-repeat !important;
    background-position:center !important;
    background-size:30px 30px !important;
  }

  html body #money .record-row[data-expense-row] > .desktop-record-actions > [data-toggle-saved].active .saved-icon-container {
    background-image:url("./icons/finance-save-saved-r2.png") !important;
  }

  html body #money .record-row[data-expense-row] > .desktop-record-actions > [data-toggle-saved] .saved-icon {
    opacity:0 !important;
  }

}

/* Talaan · desktop More tools viewport containment */
@media (min-width: 851px) {
  html body .topbar {
    padding-inline-end: max(26px, env(safe-area-inset-right)) !important;
  }

  html body .topbar-actions {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  html body .topbar-actions .topbar-tools-menu {
    position: relative !important;
    flex: 0 0 var(--ui-disclosure-size, 30px) !important;
    width: var(--ui-disclosure-size, 30px) !important;
    min-width: var(--ui-disclosure-size, 30px) !important;
    max-width: var(--ui-disclosure-size, 30px) !important;
    margin: 0 !important;
  }

  html body .topbar-actions #topbarToolsTrigger {
    box-sizing: border-box !important;
    width: var(--ui-disclosure-size, 30px) !important;
    min-width: var(--ui-disclosure-size, 30px) !important;
    max-width: var(--ui-disclosure-size, 30px) !important;
    height: var(--ui-disclosure-size, 30px) !important;
    min-height: var(--ui-disclosure-size, 30px) !important;
    max-height: var(--ui-disclosure-size, 30px) !important;
    display: grid !important;
    place-items: center !important;
    flex: 0 0 var(--ui-disclosure-size, 30px) !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid var(--line) !important;
    border-radius: var(--talaan-control-radius) !important;
    background: var(--surface) !important;
    color: var(--text) !important;
    line-height: 1 !important;
  }

  html body .topbar-actions #topbarToolsTrigger:hover,
  html body .topbar-actions #topbarToolsTrigger:focus-visible,
  html body .topbar-actions #topbarToolsTrigger[aria-expanded="true"] {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    background: color-mix(in srgb, var(--primary) 8%, var(--surface)) !important;
  }

  html body .topbar-actions #topbarToolsTrigger .toolbar-icon,
  html body .topbar-actions #topbarToolsTrigger .toolbar-icon > svg {
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
  }

  html body .topbar-actions .topbar-tools-panel {
    right: 0 !important;
    width: min(248px, calc(100vw - 24px)) !important;
    max-width: calc(100vw - 24px) !important;
  }
}

/* Talaan · More tools touch-tablet target restoration */
@media (min-width: 851px) and (max-width: 1024px) and (pointer: coarse),
       (min-width: 851px) and (max-width: 1024px) and (hover: none) {
  html body .topbar-actions .topbar-tools-menu {
    flex: 0 0 44px !important;
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
  }

  html body .topbar-actions #topbarToolsTrigger {
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    flex-basis: 44px !important;
  }
}

/* Talaan · authoritative Dashboard view and bento system */
#dashboard {
  --dashboard-card-radius: 12px;
  --dashboard-card-gap: 12px;
  --dashboard-card-padding: 14px;
}

#dashboard .dashboard-view-tabs {
  position: static;
  top: auto;
  box-sizing: border-box;
  width: auto;
  height: 43px;
  min-height: 43px;
  max-height: 43px;
  margin: 0;
}

@media (min-width: 701px) {
  #dashboard .dashboard-view-tabs {
    display: flex;
    width: fit-content;
  }
}

#dashboard .dashboard-view-panel {
  min-width: 0;
  width: 100%;
  margin-top: var(--dashboard-card-gap);
}

#dashboard .dashboard-view-tabs > .workspace-switcher-button:is(.active, [aria-selected="true"]),
#dashboard .dashboard-view-tabs > .workspace-switcher-button:is(.active, [aria-selected="true"]):hover,
#dashboard .dashboard-view-tabs > .workspace-switcher-button:is(.active, [aria-selected="true"]):focus-visible {
  background: #356FD1 !important;
  border-color: #356FD1 !important;
  color: #FFFFFF !important;
}

#dashboard [data-dashboard-view][hidden] { display: none !important; }

#dashboard .card,
#dashboard .month-insights-card,
#dashboard .dashboard-detail-card,
#dashboard .dashboard-customize-toolbar {
  border-radius: var(--dashboard-card-radius) !important;
}

#dashboard .card,
#dashboard .dashboard-detail-card {
  padding: var(--dashboard-card-padding) !important;
  border-color: var(--line) !important;
  box-shadow: 0 1px 2px color-mix(in srgb, var(--text) 6%, transparent) !important;
}

#dashboard .card:hover,
#dashboard .dashboard-detail-card:hover {
  box-shadow: 0 1px 2px color-mix(in srgb, var(--text) 6%, transparent) !important;
}

#dashboard .card-header {
  gap: 10px;
  margin-bottom: 12px;
}

#dashboard .dashboard-card-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  grid-auto-flow: row dense !important;
  gap: var(--dashboard-card-gap) !important;
  margin-top: 0 !important;
}

#dashboard[data-dashboard-active-view="overview"] .dashboard-card-grid {
  margin-top: var(--dashboard-card-gap) !important;
}

#dashboard > .dashboard-view-panel > .kpi-grid {
  gap: var(--dashboard-card-gap) !important;
}

#dashboard .month-insights-card {
  margin-top: var(--dashboard-card-gap) !important;
}

#dashboard .dashboard-calendar-layout {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px) !important;
  align-items: stretch !important;
  gap: var(--dashboard-card-gap) !important;
}

#dashboard .dashboard-calendar-grid {
  gap: 4px !important;
}

#dashboard .calendar-day {
  min-height: clamp(72px, 7vw, 116px) !important;
  padding: 6px !important;
}

#dashboard .dashboard-calendar-events {
  display: flex;
  min-height: 100%;
  max-height: none;
  flex-direction: column;
}

#dashboard .dashboard-calendar-events .calendar-event-list {
  min-height: 0;
  max-height: none;
  flex: 1 1 auto;
}

/* Normal tab views use one stable layout even when older saved card sizes exist.
   Customize mode still shows and edits the persisted order, visibility, and sizes. */
#dashboard:not(.dashboard-customizing)[data-dashboard-active-view="calendar"] [data-dashboard-card="calendar"],
#dashboard:not(.dashboard-customizing)[data-dashboard-active-view="cash-flow"] [data-dashboard-card="cash-flow"] {
  width: 100% !important;
  grid-column: 1 / -1 !important;
  order: 1 !important;
}

#dashboard:not(.dashboard-customizing)[data-dashboard-active-view="cash-flow"] [data-dashboard-card="savings-goals"] {
  grid-column: span 5 !important;
  order: 2 !important;
}

#dashboard:not(.dashboard-customizing)[data-dashboard-active-view="cash-flow"] [data-dashboard-card="savings-trend"] {
  grid-column: span 7 !important;
  order: 3 !important;
}

#dashboard:not(.dashboard-customizing)[data-dashboard-active-view="overview"] :is(
  [data-dashboard-card="payment-progress"],
  [data-dashboard-card="expense-schedule"],
  [data-dashboard-card="due-soon"]
) {
  grid-column: span 4 !important;
}

#dashboard:not(.dashboard-customizing)[data-dashboard-active-view="overview"] [data-dashboard-card="due-soon"] { order: 1 !important; }
#dashboard:not(.dashboard-customizing)[data-dashboard-active-view="overview"] [data-dashboard-card="expense-schedule"] { order: 2 !important; }
#dashboard:not(.dashboard-customizing)[data-dashboard-active-view="overview"] [data-dashboard-card="payment-progress"] { order: 3 !important; }

#dashboard:not(.dashboard-customizing)[data-dashboard-active-view="overview"] :is(
  [data-dashboard-card="accounts"],
  [data-dashboard-card="projects"]
) {
  grid-column: span 6 !important;
}

#dashboard:not(.dashboard-customizing)[data-dashboard-active-view="overview"] [data-dashboard-card="accounts"] { order: 4 !important; }
#dashboard:not(.dashboard-customizing)[data-dashboard-active-view="overview"] [data-dashboard-card="projects"] { order: 5 !important; }

#dashboard:not(.dashboard-customizing)[data-dashboard-active-view="overview"] [data-dashboard-card="activity"] {
  grid-column: 1 / -1 !important;
  order: 6 !important;
}

#dashboard.dashboard-default-layout [data-dashboard-card="calendar"],
#dashboard.dashboard-default-layout [data-dashboard-card="cash-flow"],
#dashboard.dashboard-default-layout [data-dashboard-card="activity"] {
  grid-column: 1 / -1 !important;
}

#dashboard.dashboard-default-layout [data-dashboard-card="savings-trend"] {
  grid-column: span 7 !important;
}

#dashboard.dashboard-default-layout [data-dashboard-card="savings-goals"] {
  grid-column: span 5 !important;
}

#dashboard.dashboard-default-layout [data-dashboard-card="due-soon"],
#dashboard.dashboard-default-layout [data-dashboard-card="expense-schedule"],
#dashboard.dashboard-default-layout [data-dashboard-card="payment-progress"] {
  grid-column: span 4 !important;
}

#dashboard.dashboard-default-layout [data-dashboard-card="accounts"],
#dashboard.dashboard-default-layout [data-dashboard-card="projects"] {
  grid-column: span 6 !important;
}

#dashboard.dashboard-default-layout:not(.dashboard-customizing) [data-dashboard-card="calendar"],
#dashboard.dashboard-default-layout:not(.dashboard-customizing) [data-dashboard-card="cash-flow"],
#dashboard.dashboard-default-layout:not(.dashboard-customizing) [data-dashboard-card="due-soon"] { order: 1; }
#dashboard.dashboard-default-layout:not(.dashboard-customizing) [data-dashboard-card="savings-trend"],
#dashboard.dashboard-default-layout:not(.dashboard-customizing) [data-dashboard-card="expense-schedule"] { order: 2; }
#dashboard.dashboard-default-layout:not(.dashboard-customizing) [data-dashboard-card="savings-goals"],
#dashboard.dashboard-default-layout:not(.dashboard-customizing) [data-dashboard-card="payment-progress"] { order: 3; }
#dashboard.dashboard-default-layout:not(.dashboard-customizing) [data-dashboard-card="accounts"] { order: 4; }
#dashboard.dashboard-default-layout:not(.dashboard-customizing) [data-dashboard-card="projects"] { order: 5; }
#dashboard.dashboard-default-layout:not(.dashboard-customizing) [data-dashboard-card="activity"] { order: 6; }

#dashboard.dashboard-customizing [data-dashboard-card] { order: initial !important; }

#dashboard :is(
  .cash-flow-chart-panel,
  .savings-detail-grid > div,
  .dashboard-calendar-events,
  .calendar-day,
  .calendar-event,
  .account-card,
  .month-comparison-item,
  .chart-zero-state,
  .chart-data-table-wrap,
  .dashboard-customize-row,
  .input,
  .select,
  .button
) {
  border-radius: var(--dashboard-card-radius) !important;
}

#dashboard .status-pill,
#dashboard .chart-period-chip,
#dashboard .calendar-dot,
#dashboard .progress-track,
#dashboard .progress-fill {
  border-radius: 999px !important;
}

@media (max-width: 1100px) {
  #dashboard .dashboard-card-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }

  #dashboard.dashboard-default-layout [data-dashboard-card="savings-trend"],
  #dashboard.dashboard-default-layout [data-dashboard-card="savings-goals"],
  #dashboard.dashboard-default-layout [data-dashboard-card="due-soon"],
  #dashboard.dashboard-default-layout [data-dashboard-card="expense-schedule"],
  #dashboard.dashboard-default-layout [data-dashboard-card="payment-progress"],
  #dashboard.dashboard-default-layout [data-dashboard-card="accounts"],
  #dashboard.dashboard-default-layout [data-dashboard-card="projects"],
  #dashboard.dashboard-default-layout [data-dashboard-card="activity"] {
    grid-column: span 3 !important;
  }

  #dashboard:not(.dashboard-customizing)[data-dashboard-active-view="cash-flow"] :is(
    [data-dashboard-card="savings-goals"],
    [data-dashboard-card="savings-trend"]
  ),
  #dashboard:not(.dashboard-customizing)[data-dashboard-active-view="overview"] :is(
    [data-dashboard-card="accounts"],
    [data-dashboard-card="projects"]
  ) {
    grid-column: span 3 !important;
  }

  #dashboard:not(.dashboard-customizing)[data-dashboard-active-view="overview"] :is(
    [data-dashboard-card="payment-progress"],
    [data-dashboard-card="expense-schedule"],
    [data-dashboard-card="due-soon"]
  ) {
    grid-column: span 2 !important;
  }
}

@media (max-width: 850px) {
  #dashboard .dashboard-calendar-layout {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  #dashboard .dashboard-calendar-events {
    display: block;
    min-height: 224px;
    max-height: 320px;
  }

  #dashboard .dashboard-calendar-events .calendar-event-list {
    max-height: 254px;
  }

  #dashboard .calendar-day {
    min-height: 64px !important;
  }
}

@media (max-width: 700px) {
  #dashboard {
    --dashboard-card-gap: 12px;
    --dashboard-card-padding: 12px;
  }

  #dashboard .dashboard-view-tabs {
    margin: 0 0 8px !important;
  }

  html body #dashboard .dashboard-view-tabs > .workspace-switcher-button {
    padding: 6px 7px !important;
    font-size: .7rem !important;
    white-space: nowrap;
  }

  #dashboard .dashboard-card-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  #dashboard .dashboard-detail-card,
  #dashboard.dashboard-default-layout [data-dashboard-card] {
    grid-column: 1 !important;
  }

  #dashboard:not(.dashboard-customizing)[data-dashboard-active-view="cash-flow"] :is(
    [data-dashboard-card="cash-flow"],
    [data-dashboard-card="savings-goals"],
    [data-dashboard-card="savings-trend"]
  ),
  #dashboard:not(.dashboard-customizing)[data-dashboard-active-view="overview"] [data-dashboard-card] {
    grid-column: 1 !important;
  }

  #dashboard .dashboard-heading-actions {
    gap: 7px !important;
  }

  #dashboard .dashboard-calendar-card .card-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  #dashboard .calendar-card-controls {
    min-width: 0;
  }

  #dashboard .calendar-day {
    min-height: 56px !important;
    padding: 5px !important;
  }
}


/* V15.2.25 · Phone month option runtime fallback. */
@media (max-width: 700px) {
  html body .topbar-actions .month-control .month-picker-popover .month-picker-grid > button.month-picker-option {
    box-sizing: border-box !important;
    height: 35px !important;
    min-height: 35px !important;
    max-height: 35px !important;
    align-self: start !important;
  }
}


/* V15.2.25 · Phone month option ID specificity repair. */
@media (max-width: 700px) {
  html body #monthPickerPopover.month-picker-popover .month-picker-grid > button.month-picker-option,
  html body #monthPicker.month-picker-popover .month-picker-grid > button.month-picker-option {
    box-sizing: border-box !important;
    height: 35px !important;
    min-height: 35px !important;
    max-height: 35px !important;
    align-self: start !important;
  }
}


/* V15.2.26 · iPhone 14 Pro phone audit contract. */
@media (max-width: 700px),
       (min-width: 701px) and (max-width: 850px) and (max-height: 520px) {
  :root {
    --talaan-phone-control-size: 35px;
    --talaan-phone-gap: 8px;
    --talaan-phone-card-padding: 10px;
    --mobile-topbar-offset: calc(max(5px, env(safe-area-inset-top)) + 80px);
  }

  /* Compact action controls use the approved 35px visual contract. */
  html body button,
  html body summary,
  html body [role="button"],
  html body [role="menuitem"] {
    box-sizing: border-box !important;
    height: var(--talaan-phone-control-size) !important;
    min-height: var(--talaan-phone-control-size) !important;
    max-height: var(--talaan-phone-control-size) !important;
    line-height: 1.1 !important;
  }

  html body :is(
    .phone-icon-only-action,
    .menu-button,
    .sidebar-close-button,
    .month-nav-button,
    .topbar-tools-menu > summary,
    #topbarToolsTrigger,
    #quickAddExpense,
    .cloud-sync-popover-close,
    .compact-help-close,
    .month-picker-year-button,
    .emoji-option,
    .emoji-custom-button,
    .settings-search-field button,
    .gym-override-chip button,
    .overflow-menu-trigger,
    .structured-drag-toast-dismiss,
    .toast-dismiss
  ) {
    width: var(--talaan-phone-control-size) !important;
    min-width: var(--talaan-phone-control-size) !important;
    max-width: var(--talaan-phone-control-size) !important;
    padding-inline: 0 !important;
  }

  html body :is(
    .cloud-sync-toolbar-button,
    .topbar-add-button,
    .month-display-button,
    .month-current-button,
    .month-status-chip,
    .workspace-switcher-button,
    .collapse-toggle,
    .budget-panel-collapse,
    .button,
    .settings-tablist [role="tab"],
    #settings button,
    #settings summary,
    summary
  ) {
    max-width: 100% !important;
    padding-block: 4px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  html body :is(
    .finance-workspace-marquee-row > .money-workspace-switcher,
    .project-workspace-switcher,
    .dashboard-view-tabs
  ) {
    height: var(--talaan-phone-control-size) !important;
    min-height: var(--talaan-phone-control-size) !important;
    max-height: var(--talaan-phone-control-size) !important;
    gap: 0 !important;
    border-radius: var(--talaan-control-radius) !important;
    box-shadow: none !important;
  }

  html body :is(
    .finance-workspace-marquee-row > .money-workspace-switcher,
    .project-workspace-switcher,
    .dashboard-view-tabs
  ) > .workspace-switcher-button {
    height: var(--talaan-phone-control-size) !important;
    min-height: var(--talaan-phone-control-size) !important;
    max-height: var(--talaan-phone-control-size) !important;
    padding-block: 4px !important;
    border-radius: var(--talaan-control-radius) !important;
  }

  html body #availableMoneySection .collapse-actions {
    grid-template-columns: minmax(0, 1fr) 35px 35px !important;
    gap: var(--talaan-phone-gap) !important;
  }

  html body #availableMoneySection #addAccountButton,
  html body .project-calendar-v13020 [data-pc-add],
  html body .project-calendar-v13020 [data-pc-full-add] {
    width: var(--talaan-phone-control-size) !important;
    min-width: var(--talaan-phone-control-size) !important;
    max-width: var(--talaan-phone-control-size) !important;
    height: var(--talaan-phone-control-size) !important;
    min-height: var(--talaan-phone-control-size) !important;
    max-height: var(--talaan-phone-control-size) !important;
    padding: 0 !important;
  }

  html body .project-calendar-v13020 .pc-header-actions {
    grid-template-columns: auto minmax(0, 1fr) 35px !important;
    gap: var(--talaan-phone-gap) !important;
  }

  html body .project-calendar-v13020 :is([data-pc-view], [data-kanban-add-column="agenda"]) {
    min-height: var(--talaan-phone-control-size) !important;
    height: var(--talaan-phone-control-size) !important;
    max-height: var(--talaan-phone-control-size) !important;
    min-width: 100px !important;
  }

  html body #money .period-card {
    padding: 0 !important;
    box-shadow: none !important;
  }

  html body #money .period-header,
  html body #money .period-card.is-collapsed .period-header {
    min-height: 50px !important;
    height: auto !important;
    max-height: none !important;
    padding: 7px 10px !important;
    align-items: center !important;
  }

  html body #money .period-header h3 {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  html body #money .period-header p {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: clip !important;
    white-space: normal !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
  }

  html body #money .period-header .collapse-toggle {
    width: var(--talaan-phone-control-size) !important;
    min-width: var(--talaan-phone-control-size) !important;
    height: var(--talaan-phone-control-size) !important;
    min-height: var(--talaan-phone-control-size) !important;
    max-height: var(--talaan-phone-control-size) !important;
  }

  html body #money .record-row[data-expense-row] > .mobile-record-actions,
  html body #paid-expenses [data-paid-expense-row] > .mobile-record-actions {
    grid-template-columns: minmax(0, 1fr) 35px !important;
    min-height: var(--talaan-phone-control-size) !important;
    height: var(--talaan-phone-control-size) !important;
    max-height: var(--talaan-phone-control-size) !important;
    gap: var(--talaan-phone-gap) !important;
  }

  html body #money .record-row[data-expense-row] > .mobile-record-actions > .button,
  html body #money .record-row[data-expense-row] .overflow-menu-trigger,
  html body #paid-expenses [data-paid-expense-row] .mobile-record-actions > .button,
  html body #paid-expenses [data-paid-expense-row] .overflow-menu-trigger {
    width: 100% !important;
    min-width: 0 !important;
    height: var(--talaan-phone-control-size) !important;
    min-height: var(--talaan-phone-control-size) !important;
    max-height: var(--talaan-phone-control-size) !important;
    padding-block: 4px !important;
  }

  html body #money .record-row[data-expense-row] .record-more-menu,
  html body #paid-expenses [data-paid-expense-row] .record-more-menu {
    width: var(--talaan-phone-control-size) !important;
    min-width: var(--talaan-phone-control-size) !important;
    max-width: var(--talaan-phone-control-size) !important;
  }

  /* The approved 35px exception applies to action controls; data-entry fields
     remain larger so typing and selection stay usable. */
  html body #settings :is(button, [role="tab"]),
  html body #settings summary {
    min-width: var(--talaan-phone-control-size) !important;
    min-height: var(--talaan-phone-control-size) !important;
    height: var(--talaan-phone-control-size) !important;
    max-height: var(--talaan-phone-control-size) !important;
  }

  /* Keep help topics available to assistive technology without a visible
     question mark or an empty inline slot on phones. */
  html body :is(.context-help-button, .section-help-button) {
    position: absolute !important;
    width: 1px !important;
    min-width: 1px !important;
    max-width: 1px !important;
    height: 1px !important;
    min-height: 1px !important;
    max-height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    flex: 0 0 0 !important;
    display: none !important;
  }

  html body :is(.help-inline-title, .section-title-row, .field-label-help-row, .help-generated-section-heading) {
    gap: 0 !important;
  }

  /* Phone Bento rhythm and flat normal surfaces. */
  html body #dashboard {
    --dashboard-card-gap: 12px !important;
    --dashboard-card-padding: var(--talaan-phone-card-padding) !important;
  }

  html body #money .section-stack,
  html body #settings .settings-panels,
  html body #projects .project-workspace-content,
  html body #income .section-stack,
  html body #paid-expenses .section-stack {
    gap: var(--talaan-phone-gap) !important;
  }

  html body :is(
    .card,
    .summary-card,
    .summary-item,
    .legend-item,
    .record-row,
    .period-card,
    .account-card,
    .workspace-switcher,
    .dashboard-view-tabs
  ) {
    box-shadow: none !important;
  }

  /* Preserve one continuous row divider without a duplicate outer seam. */
  html body #money :is(#earlyExpenses, #lateExpenses, #otherExpenses) > .record-row[data-expense-row],
  html body #paid-expenses [data-paid-expense-row] {
    border-left: 0 !important;
    border-right: 0 !important;
    box-shadow: none !important;
  }

  html body #money :is(#earlyExpenses, #lateExpenses, #otherExpenses) > .record-row[data-expense-row] + .record-row[data-expense-row],
  html body #paid-expenses [data-paid-expense-row] + [data-paid-expense-row] {
    border-top: 1px solid var(--line) !important;
  }

  /* Keep stacked title and metadata on separate constrained lines so a long
     title cannot push the following metadata beyond the phone viewport. */
  html body :is(
    #money .record-title-copy,
    #paid-expenses .record-title-copy,
    #income .record-title-copy
  ) {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  html body :is(
    #money .record-title-copy > strong,
    #money .record-title-copy > small,
    #paid-expenses .record-title-copy > strong,
    #paid-expenses .record-title-copy > small,
    #income .record-title-copy > strong,
    #income .record-title-copy > small
  ) {
    display: block !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  /* Non-monetary phone text slots may truncate; monetary values remain intact. */
  html body :is(
    #topTitle,
    #todayLabel,
    .month-display-value,
    .workspace-switcher-button,
    .dashboard-week-copy strong,
    .settings-status-copy,
    .settings-state-chip,
    .system-status-value,
    .summary-card-label,
    .legend-copy,
    .record-title-copy > strong,
    .record-title-copy > small,
    [data-label="Planned account"],
    .account-card-label,
    .account-card-main strong,
    .finance-kanban-card-meta,
    .finance-kanban-card-value,
    .pc-event-title,
    .pc-event-meta,
    .project-title-text,
    .project-title-note,
    .productivity-search-copy strong,
    .productivity-search-copy small,
    .productivity-search-value,
    .transaction-calendar-entry span
  ) {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  html body :is(.period-total, .amount, .summary-card-value, .legend-total, .kpi-value, [data-money-value]) {
    min-width: 0 !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }
}

@media (max-width: 390px) {
  html body #availableMoneySection .collapse-actions {
    grid-template-columns: minmax(0, 1fr) 35px 35px !important;
  }
}

/* TALAAN RUNTIME OVERLAY */
/* My Finance Records · V15.2.25 · Compact Expense Status & Collapse */

/* Desktop compaction block. Phone and coarse-pointer tablet geometry is defined below. */
@media (min-width: 851px) and (hover: hover) and (pointer: fine) {
  html body #money .section-stack {
    gap: 8px !important;
    align-items: start !important;
  }

  html body #money .period-card {
    min-width: 0 !important;
    margin: 0 !important;
    padding: 6px !important;
    overflow: visible !important;
  }

  html body #money .period-card .period-header,
  html body #money .period-card.is-collapsed .period-header {
    min-height: 42px !important;
    margin: 0 !important;
    padding: 5px 10px 6px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
  }

  html body #money .period-header > div:first-child {
    min-width: 0 !important;
  }

  html body #money .period-header .section-title-row {
    min-width: 0 !important;
    align-items: center !important;
  }

  html body #money .period-header h3 {
    margin: 0 !important;
    color: #1F2937 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
  }

  html body #money .period-header p {
    margin: 2px 0 0 !important;
    color: #64748B !important;
    font-size: 10px !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
  }

  html body #money .period-header .collapse-actions {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    margin: 0 !important;
  }

  html body #money .period-header .period-total {
    margin: 0 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    text-align: right !important;
    white-space: nowrap !important;
  }

  html body #money .period-card .period-header .collapse-toggle {
    box-sizing: border-box !important;
    flex: 0 0 30px !important;
    width: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #D5DCE5 !important;
    border-radius: var(--talaan-control-radius) !important;
    background: color-mix(in srgb, #F8FAFC 94%, transparent) !important;
    color: #64748B !important;
    display: inline-grid !important;
    place-items: center !important;
  }

  html body #money .period-card .period-header .collapse-toggle:hover {
    background: #F1F5F9 !important;
  }

  html body #money .period-card .period-header .collapse-icon {
    width: 20px !important;
    height: 20px !important;
    display: block !important;
    color: #64748B !important;
    transform-origin: center !important;
  }

  html body #money .period-card .period-header .collapse-icon svg {
    width: 20px !important;
    height: 20px !important;
    display: block !important;
  }

  html body #money .record-header {
    display: none !important;
  }

  html body #money :is(#earlyExpenses, #lateExpenses, #otherExpenses) {
    display: grid !important;
    align-content: start !important;
    gap: 5px !important;
    padding: 0 !important;
  }

  html body #money .period-card.is-collapsed > :is(#earlyExpenses, #lateExpenses, #otherExpenses) {
    display: none !important;
  }

  html body #money :is(#earlyExpenses, #lateExpenses, #otherExpenses) > .record-row[data-expense-row],
  html body #money :is(#earlyExpenses, #lateExpenses, #otherExpenses) > .record-row[data-expense-row] + .record-row[data-expense-row] {
    position: relative !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 8px 10px 7px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 3px 8px !important;
    align-self: start !important;
    align-items: center !important;
  }

  html body #money .record-row[data-expense-row] > .expense-record-title {
    grid-column: 1 / -1 !important;
    min-width: 0 !important;
  }

  html body #money .record-row[data-expense-row] .expense-record-title .record-title-copy > strong {
    color: #1F2937 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
  }

  html body #money .record-row[data-expense-row] .expense-record-title .record-title-copy > small {
    margin-top: 2px !important;
    color: #64748B !important;
    font-size: 10px !important;
    font-weight: 400 !important;
    line-height: 1.25 !important;
  }

  html body #money .record-row[data-expense-row] .expense-record-title .ui-tag {
    color: #64748B !important;
    font-size: 9px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
  }

  html body #money .record-row[data-expense-row] .expense-record-title .record-statuses {
    min-height: 0 !important;
    margin-top: 3px !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 3px 4px !important;
  }

  html body #money .record-row[data-expense-row] .record-statuses > .status-unpaid,
  html body #money .record-row[data-expense-row] .record-statuses > .expense-inline-due-warning {
    min-height: 18px !important;
    padding: 2px 6px !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
  }

  html body #money .record-row[data-expense-row] .record-statuses > .expense-inline-due-warning {
    margin-left: 0 !important;
  }

  /* Remove the old standalone Deadline / Expense prefix. */
  html body #money .record-row[data-expense-row] > .due-cell::before {
    content: none !important;
    display: none !important;
  }

  html body #money .record-row[data-expense-row] > .due-cell {
    grid-column: 1 / -1 !important;
    display: block !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #64748B !important;
    font-size: 10px !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
  }

  html body #money .record-row[data-expense-row] > .due-cell > span:first-child {
    display: inline !important;
  }

  html body #money .record-row[data-expense-row] > .due-cell > .due-warning {
    display: none !important;
  }

  html body #money .record-row[data-expense-row] > [data-label="Planned account"] {
    grid-column: 1 !important;
    min-width: 0 !important;
    color: #64748B !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
  }

  html body #money .record-row[data-expense-row] > [data-label="Planned account"]::before {
    content: "Account · " !important;
    color: #64748B !important;
    font-weight: 600 !important;
  }

  html body #money .record-row[data-expense-row] > .amount {
    grid-column: 2 !important;
    justify-self: end !important;
    color: #172033 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    font-variant-numeric: tabular-nums !important;
  }

  html body #money .record-row[data-expense-row] > .desktop-record-actions {
    box-sizing: border-box !important;
    grid-column: 1 / -1 !important;
    width: auto !important;
    min-height: 30px !important;
    /* Keep the action bar inside the card's content box.  The previous
       negative margins and top border made a horizontal rule appear to cut
       through the account/amount row at wide desktop widths. */
    margin: 4px 0 0 !important;
    padding: 0 0 0 37px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 5px !important;
    border-top: 0 !important;
  }

  html body #money .record-row[data-expense-row] > .desktop-record-actions > [data-toggle-saved],
  html body #money .record-row[data-expense-row] > .desktop-record-actions > [data-toggle-saved]:hover,
  html body #money .record-row[data-expense-row] > .desktop-record-actions > [data-toggle-saved]:focus-visible,
  html body #money .record-row[data-expense-row] > .desktop-record-actions > [data-toggle-saved]:active,
  html body #money .record-row[data-expense-row] > .desktop-record-actions > [data-toggle-saved].active,
  html body #money .record-row[data-expense-row] > .desktop-record-actions > [data-toggle-saved].active:hover {
    box-sizing: border-box !important;
    flex: 0 0 30px !important;
    width: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  html body #money .record-row[data-expense-row] > .desktop-record-actions > [data-toggle-saved] .saved-icon-container {
    display: block !important;
    flex: 0 0 30px !important;
    width: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background-image: url("./icons/repeat-monthly-off.png?v=2.5.0-talaan1") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 30px 30px !important;
  }

  html body #money .record-row[data-expense-row] > .desktop-record-actions > [data-toggle-saved].active .saved-icon-container {
    background-image: url("./icons/repeat-monthly-on.png?v=2.5.0-talaan1") !important;
  }

  html body #money .record-row[data-expense-row] > .desktop-record-actions > [data-toggle-saved] .saved-icon {
    opacity: 0 !important;
  }

  html body #money .record-row[data-expense-row] > .desktop-record-actions > [data-mark-paid] {
    box-sizing: border-box !important;
    flex: 0 0 74px !important;
    width: 74px !important;
    min-width: 74px !important;
    max-width: 74px !important;
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    padding: 0 10px !important;
    border: 1px solid #356FD1 !important;
    border-radius: var(--talaan-control-radius) !important;
    background: #356FD1 !important;
    color: #FFFFFF !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  html body #money .record-row[data-expense-row] > .desktop-record-actions > [data-edit-expense] {
    box-sizing: border-box !important;
    flex: 0 0 48px !important;
    width: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    padding: 0 10px !important;
    border: 1px solid #D5DCE5 !important;
    border-radius: var(--talaan-control-radius) !important;
    background: #FFFFFF !important;
    color: #1F2937 !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  html body #money .record-row[data-expense-row] .expense-record-title > .expense-select-footer {
    position: absolute !important;
    left: 7px !important;
    bottom: 7px !important;
    z-index: 2 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 18px !important;
    min-width: 18px !important;
    height: 18px !important;
    min-height: 18px !important;
    margin: 0 !important;
  }

  html body #money .record-row[data-expense-row] .expense-record-title > .expense-select-footer > .expense-select-checkbox {
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
  }
}

/* V15.2.25 · Phone 35px compact control rhythm. */
@media (max-width: 700px) {
  /* All phone action controls share the requested 35px maximum. */
  html body :is(
    button,
    .button,
    input[type="button"],
    input[type="submit"],
    input[type="reset"],
    summary,
    [role="button"]
  ) {
    box-sizing: border-box !important;
    height: 35px !important;
    min-height: 35px !important;
    max-height: 35px !important;
    line-height: 1.1 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  html body :is(
    #menuButton,
    #sidebarCloseButton,
    #availableMoneySection #addAccountButton,
    #availableMoneySection [data-collapse-toggle="available-money"],
    .budget-planner-toggle,
    .budget-panel-collapse,
    .topbar-actions .cloud-sync-toolbar-button,
    .topbar-actions #cloudSyncStatusButton,
    .topbar-actions .topbar-add-button,
    .topbar-actions .topbar-tools-menu > summary,
    .topbar-actions .topbar-tools-trigger,
    .topbar-actions .topbar-history-button,
    .topbar-actions .month-nav-button,
    #quickAddExpense:not([hidden]),
    .overflow-menu-trigger,
    .record-more-menu,
    .cloud-sync-popover-close,
    .compact-help-close,
    .month-picker-year-button,
    .emoji-option,
    .emoji-custom-button,
    .settings-search-field button,
    .toast-dismiss,
    .structured-drag-toast-dismiss
  ) {
    width: 35px !important;
    min-width: 35px !important;
    max-width: 35px !important;
    flex: 0 0 35px !important;
    padding: 0 !important;
  }

  html body .topbar {
    grid-template-columns: minmax(0, 1fr) 35px 35px 35px !important;
    gap: 4px !important;
    padding: max(5px, env(safe-area-inset-top)) max(6px, env(safe-area-inset-right)) 5px max(6px, env(safe-area-inset-left)) !important;
  }

  html body .topbar-actions .month-navigator {
    grid-template-columns: 35px minmax(0, 1fr) 35px auto !important;
    gap: 4px !important;
  }

  html body .topbar-actions .month-control,
  html body .topbar-actions .month-current-button,
  html body .topbar-actions .month-status-chip {
    min-width: 0 !important;
    height: 35px !important;
    min-height: 35px !important;
    max-height: 35px !important;
    padding: 4px 6px !important;
  }

  html body .topbar-actions .month-control {
    width: 100% !important;
    max-width: none !important;
  }

  html body .topbar-actions .month-display-button {
    width: 100% !important;
    height: 33px !important;
    min-height: 33px !important;
    max-height: 33px !important;
    padding: 3px 5px !important;
  }

  html body .topbar-actions .month-current-button,
  html body .topbar-actions .month-status-chip {
    max-width: 64px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: .58rem !important;
  }

  html body #money .section-stack {
    gap: 5px !important;
  }

  html body #money .period-card {
    padding: 0 !important;
    overflow: visible !important;
  }

  html body #money .period-header,
  html body #money .period-card.is-collapsed .period-header {
    box-sizing: border-box !important;
    height: auto !important;
    min-height: 50px !important;
    max-height: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 7px 10px !important;
    gap: 8px !important;
    align-items: center !important;
    overflow: visible !important;
  }

  html body #money .period-card,
  html body #money .period-header > div:first-child,
  html body #money .period-header .collapse-actions {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  html body #money .period-header h3 {
    min-width: 0 !important;
    max-width: 100% !important;
    font-size: .72rem !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  html body #money .period-header p {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: clip !important;
    white-space: normal !important;
  }

  html body #money .period-header .period-total {
    max-width: 82px !important;
    font-size: .72rem !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  html body #money .period-header .collapse-actions {
    gap: 4px !important;
    min-width: 0 !important;
  }

  html body #availableMoneySection .card-header {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    height: 35px !important;
    min-height: 35px !important;
    max-height: 35px !important;
    margin: 0 -10px 4px !important;
    padding: 0 6px !important;
    gap: 4px !important;
    align-items: center !important;
    overflow: hidden !important;
  }

  html body #availableMoneySection .card-header > div:first-child > p,
  html body #availableMoneySection .available-money-account-count {
    display: none !important;
  }

  html body #availableMoneySection .section-title-row h3 {
    min-width: 0 !important;
    max-width: 100% !important;
    font-size: .72rem !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  html body #availableMoneySection .collapse-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 35px 35px !important;
    grid-template-areas: "total add toggle" !important;
    gap: 4px !important;
    height: 35px !important;
    min-height: 35px !important;
    max-height: 35px !important;
    align-items: center !important;
  }

  html body #availableMoneySection .available-money-total-wrap {
    grid-area: total !important;
    min-width: 0 !important;
    max-width: 82px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  html body #availableMoneySection #addAccountButton {
    grid-area: add !important;
  }

  html body #availableMoneySection [data-collapse-toggle="available-money"] {
    grid-area: toggle !important;
  }

  html body #availableMoneySection #addAccountButton .phone-only-action-label {
    display: none !important;
  }

  html body #availableMoneySection #addAccountButton .phone-only-action-icon {
    display: grid !important;
    width: 20px !important;
    height: 20px !important;
  }

  html body .budget-planner-card .budget-planner-header,
  html body .budget-bento-panel .budget-panel-heading {
    box-sizing: border-box !important;
    display: flex !important;
    height: 35px !important;
    min-height: 35px !important;
    max-height: 35px !important;
    padding: 0 6px !important;
    gap: 4px !important;
    align-items: center !important;
    overflow: hidden !important;
  }

  html body :is(
    .budget-planner-card .budget-planner-header p,
    .budget-bento-panel .budget-panel-heading p,
    .budget-planner-card .budget-planner-header small,
    .budget-bento-panel .budget-panel-heading small
  ) {
    display: none !important;
  }

  html body :is(
    .budget-planner-card .budget-planner-header h3,
    .budget-bento-panel .budget-panel-heading h3
  ) {
    min-width: 0 !important;
    font-size: .72rem !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  html body #money :is(.legend, .summary-strip) {
    gap: 4px !important;
    margin-block: 4px !important;
  }

  html body #money :is(.legend-item, .summary-item) {
    box-sizing: border-box !important;
    height: 35px !important;
    min-height: 35px !important;
    max-height: 35px !important;
    padding: 4px 6px !important;
    gap: 4px !important;
    align-items: center !important;
    overflow: hidden !important;
  }

  html body #money :is(.legend-text small, .summary-card-copy small) {
    display: none !important;
  }

  html body #money :is(.legend-text strong, .summary-card-label) {
    min-width: 0 !important;
    max-width: 100% !important;
    font-size: .6rem !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  html body #money :is(.legend-total, .summary-card-value) {
    min-width: 0 !important;
    max-width: 44% !important;
    font-size: .72rem !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  html body #money .record-row[data-expense-row] {
    padding: 6px 8px !important;
    gap: 4px 7px !important;
  }

  html body #money .record-row[data-expense-row] > .mobile-record-actions,
  html body #income .income-record-row > .record-actions,
  html body #paid-expenses [data-paid-expense-row] > .mobile-record-actions {
    min-height: 35px !important;
    height: 35px !important;
    max-height: 35px !important;
    gap: 4px !important;
  }

  html body #money .record-row[data-expense-row] > .mobile-record-actions,
  html body #paid-expenses [data-paid-expense-row] > .mobile-record-actions {
    grid-template-columns: minmax(0, 1fr) 35px !important;
  }

  html body :is(
    #money .record-row[data-expense-row] > .mobile-record-actions > .button,
    #money .record-row[data-expense-row] .overflow-menu-trigger,
    #income .income-record-row > .record-actions .button,
    #paid-expenses [data-paid-expense-row] > .mobile-record-actions > .button,
    #paid-expenses [data-paid-expense-row] .overflow-menu-trigger
  ) {
    height: 35px !important;
    min-height: 35px !important;
    max-height: 35px !important;
    padding: 4px 7px !important;
  }

  html body :is(
    .finance-workspace-marquee-row > .money-workspace-switcher,
    .project-workspace-switcher,
    .dashboard-view-tabs
  ) {
    height: 35px !important;
    min-height: 35px !important;
    max-height: 35px !important;
  }

  html body :is(
    .finance-workspace-marquee-row > .money-workspace-switcher,
    .project-workspace-switcher,
    .dashboard-view-tabs
  ) > .workspace-switcher-button {
    height: 35px !important;
    min-height: 35px !important;
    max-height: 35px !important;
    padding: 4px 6px !important;
  }

  html body #settings :is(button, summary, [role="tab"]) {
    height: 35px !important;
    min-height: 35px !important;
    max-height: 35px !important;
    padding-block: 4px !important;
  }

  html body :is(
    #settings .settings-tablist button small,
    #settings .settings-disclosure > summary small
  ) {
    display: none !important;
  }

  html body :is(
    .app-dialog button,
    .app-dialog summary,
    .app-dialog [role="button"],
    [role="dialog"] button,
    [role="dialog"] summary,
    [role="dialog"] [role="button"]
  ) {
    height: 35px !important;
    min-height: 35px !important;
    max-height: 35px !important;
    padding-block: 4px !important;
  }

  html body #projects .project-kanban-board :is(button, summary, [role="button"]) {
    height: 35px !important;
    min-height: 35px !important;
    max-height: 35px !important;
  }

  html body .emoji-grid {
    grid-template-columns: repeat(5, minmax(35px, 1fr)) !important;
    gap: 4px !important;
  }
}

/* V15.2.25 · Phone control specificity repair. Feature styles loaded before this
   overlay still contain legacy 44px declarations; these explicit selectors keep
   the approved 35px contract without changing tablet or desktop geometry. */
@media (max-width: 700px) {
  html body :is(
    button,
    .button,
    input[type="button"],
    input[type="submit"],
    input[type="reset"],
    summary,
    [role="button"]
  ) {
    height: 35px !important;
    min-height: 35px !important;
    max-height: 35px !important;
  }

  html body :is(
    .nav-button,
    .sidebar .nav-button,
    #sidebar .nav-button,
    #cloudSyncStatusButton,
    .topbar-actions .cloud-sync-toolbar-button,
    #previousMonthButton,
    #nextMonthButton,
    .topbar-actions .month-nav-button,
    #quickAddExpense:not([hidden]),
    .topbar-actions .topbar-add-button,
    .topbar-tools-menu > summary,
    #availableMoneySection #addAccountButton,
    .project-calendar-v13020 [data-pc-add],
    .project-calendar-v13020 [data-pc-full-add],
    .project-calendar-v13020 [data-pc-view],
    .project-calendar-v13020 [data-kanban-add-column],
    #toastDismissButton,
    .toast .toast-dismiss,
    .structured-drag-toast-dismiss,
    .cloud-sync-popover-close,
    .compact-help-close,
    .month-picker-year-button,
    .settings-search-field button,
    .emoji-option,
    .emoji-custom-button,
    .gym-override-chip button,
    .kanban-column-menu .overflow-menu-trigger,
    .pc-event-actions .button,
    .project-kanban-board .button,
    .structured-drag-toast button
  ) {
    height: 35px !important;
    min-height: 35px !important;
    max-height: 35px !important;
  }

  html body :is(
    #money .money-workspace-switcher .workspace-switcher-button,
    #income .money-workspace-switcher .workspace-switcher-button,
    #paid-expenses .money-workspace-switcher .workspace-switcher-button,
    .finance-workspace-marquee-row > .money-workspace-switcher .workspace-switcher-button,
    #dashboard .dashboard-view-tabs .dashboard-view-tab,
    #dashboard .dashboard-view-tabs .workspace-switcher-button,
    #projects .project-workspace-switcher .workspace-switcher-button
  ) {
    height: 35px !important;
    min-height: 35px !important;
    max-height: 35px !important;
  }

  html body :is(
    #money .account-card-actions .button,
    #money .account-card-actions .account-spend-button,
    #availableMoneySection .account-card-actions .button,
    #money .record-row[data-expense-row] > .mobile-record-actions,
    #money .record-row[data-expense-row] > .mobile-record-actions > .button,
    #money .record-row[data-expense-row] > .mobile-record-actions > .record-more-menu,
    #money .record-row[data-expense-row] > .mobile-record-actions > .record-more-menu > .overflow-menu-trigger,
    #paid-expenses [data-paid-expense-row] > .mobile-record-actions,
    #paid-expenses [data-paid-expense-row] > .mobile-record-actions > .button,
    #paid-expenses [data-paid-expense-row] > .mobile-record-actions > .record-more-menu,
    #paid-expenses [data-paid-expense-row] .overflow-menu-trigger,
    #income .income-record-row > .record-actions .button,
    #settings .section-help-button,
    #settings .context-help-button.section-help-button,
    #settings .settings-tablist button,
    #settings .settings-disclosure > summary,
    #settings .button,
    #settings-panel-finance-tools button,
    #settings-panel-finance-tools .button,
    #accountDialog .button,
    #expenseDialog .button,
    #projectDialog .button,
    [role="dialog"] .button,
    #projects .project-mobile-actions > .button,
    #projects .project-mobile-actions > details > summary,
    .budget-planner-card .budget-planner-toggle,
    .budget-bento-panel .budget-panel-collapse
  ) {
    height: 35px !important;
    min-height: 35px !important;
    max-height: 35px !important;
  }

  /* Keep the available-money divider flush with its card edge after the
     compact header loses its former vertical padding. */
  html body #availableMoneySection .card-header {
    margin-inline: -10px !important;
  }
}


/* V15.2.25 · Phone icon width repair. */
@media (max-width: 700px) {
  html body :is(
    .phone-icon-only-action,
    .project-calendar-v13020 [data-pc-add],
    .project-calendar-v13020 [data-pc-full-add],
    #gymRemove,
    .gym-override-chip button
  ) {
    box-sizing: border-box !important;
    width: 35px !important;
    min-width: 35px !important;
    max-width: 35px !important;
    flex: 0 0 35px !important;
    padding: 0 !important;
  }
}


/* V15.2.25 · Phone picker and summary height specificity repair. */
@media (max-width: 700px) {
  html body .month-picker-grid .month-picker-option,
  html body .month-picker-option {
    box-sizing: border-box !important;
    height: 35px !important;
    min-height: 35px !important;
    max-height: 35px !important;
  }

  html body #money :is(.legend-item, .summary-item),
  html body #availableMoneySection .card-header {
    box-sizing: border-box !important;
    height: 35px !important;
    min-height: 35px !important;
    max-height: 35px !important;
  }
}


/* Phone content-card readability repair: keep 35px controls compact while
   information cards size to their content instead of clipping text. */
@media (max-width: 700px) {
  html body #money :is(.legend-item, .summary-item) {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    height: auto !important;
    min-height: 56px !important;
    max-height: none !important;
    padding: 7px 8px !important;
    gap: 6px !important;
    overflow: visible !important;
    white-space: normal !important;
  }

  html body #money .summary-item {
    min-height: 60px !important;
  }

  html body #money :is(.legend-copy, .summary-card-copy) {
    min-width: 0 !important;
    max-width: none !important;
  }

  html body #money :is(.legend-text strong, .summary-card-label) {
    min-width: 0 !important;
    max-width: none !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  html body #money :is(.legend-text small, .summary-card-copy small) {
    display: block !important;
    max-width: none !important;
    margin-top: 2px !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    overflow-wrap: anywhere !important;
  }

  html body #money :is(.legend-total, .summary-card-value) {
    min-width: 0 !important;
    max-width: none !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
    font-size: clamp(.62rem, 2.5vw, .82rem) !important;
    line-height: 1 !important;
    font-variant-numeric: tabular-nums !important;
  }

  html body #availableMoneySection .card-header {
    height: 35px !important;
    min-height: 35px !important;
    max-height: 35px !important;
    overflow: visible !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
  }

  html body #availableMoneySection .collapse-actions {
    grid-template-columns: minmax(96px, 1fr) 35px 35px !important;
    grid-template-areas: "total add toggle" !important;
    width: auto !important;
    max-width: 100% !important;
    overflow: visible !important;
  }

  html body #availableMoneySection .available-money-total-wrap {
    max-width: none !important;
    min-width: 0 !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
  }

  html body #availableMoneySection #moneyAvailableTotal {
    display: block !important;
    max-width: none !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
    font-size: clamp(.62rem, 2.5vw, .78rem) !important;
    line-height: 1 !important;
    font-variant-numeric: tabular-nums !important;
  }

  html body :is(.section-help-button, .context-help-button) {
    box-sizing: border-box !important;
    width: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    height: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
    flex: 0 0 20px !important;
    color: var(--muted) !important;
    opacity: .62 !important;
  }

  html body #settings .settings-status-card {
    box-sizing: border-box !important;
    height: auto !important;
    min-height: 76px !important;
    max-height: none !important;
    overflow: visible !important;
    white-space: normal !important;
    text-overflow: clip !important;
    line-height: normal !important;
    grid-template-columns: 38px minmax(0, 1fr) auto !important;
    align-items: center !important;
  }

  html body #settings .settings-status-card .settings-status-copy {
    min-width: 0 !important;
  }

  html body #settings .settings-status-card .settings-status-copy > span,
  html body #settings .settings-status-card .settings-status-copy strong,
  html body #settings .settings-status-card .settings-status-copy small {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  html body #settings .settings-status-card .settings-status-copy strong {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    line-height: 1.12 !important;
    overflow: hidden !important;
  }

  html body #settings .settings-status-card .settings-status-copy small {
    display: none !important;
  }
}


/* Keep compact summary cards single-height on narrow phones.  The label and
   numeric value remain visible; explanatory copy is available in the card's
   accessible text and section help. */
@media (max-width: 700px) {
  html body #money :is(.legend-text small, .summary-card-copy small) {
    display: none !important;
  }
}


/* Keep compact card labels on one readable line. */
@media (max-width: 700px) {
  html body #money .legend-item {
    height: 56px !important;
    min-height: 56px !important;
    max-height: 56px !important;
  }

  html body #money .summary-item {
    height: 60px !important;
    min-height: 60px !important;
    max-height: 60px !important;
  }

  html body #money :is(.legend-text strong, .summary-card-label) {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
}

/* V15.2.26 · Repeat-action readability and flat controls. */
@media (min-width: 851px) {
  html body #money .record-row[data-expense-row] > .desktop-record-actions,
  html body #paidExpenseList .desktop-record-actions {
    box-shadow: none !important;
  }

  html body #money .record-row[data-expense-row] > .desktop-record-actions > .button,
  html body #paidExpenseList .desktop-record-actions > .button {
    box-shadow: none !important;
    border-radius: 12px !important;
    text-shadow: none !important;
  }

  html body #money .record-row[data-expense-row] > .desktop-record-actions > [data-toggle-saved],
  html body #money .record-row[data-expense-row] > .desktop-record-actions > [data-toggle-saved]:hover,
  html body #money .record-row[data-expense-row] > .desktop-record-actions > [data-toggle-saved]:focus-visible,
  html body #money .record-row[data-expense-row] > .desktop-record-actions > [data-toggle-saved]:active,
  html body #money .record-row[data-expense-row] > .desktop-record-actions > [data-toggle-saved].active,
  html body #money .record-row[data-expense-row] > .desktop-record-actions > [data-toggle-saved].active:hover,
  html body #paidExpenseList .desktop-record-actions > [data-toggle-saved],
  html body #paidExpenseList .desktop-record-actions > [data-toggle-saved]:hover,
  html body #paidExpenseList .desktop-record-actions > [data-toggle-saved]:focus-visible,
  html body #paidExpenseList .desktop-record-actions > [data-toggle-saved]:active,
  html body #paidExpenseList .desktop-record-actions > [data-toggle-saved].active,
  html body #paidExpenseList .desktop-record-actions > [data-toggle-saved].active:hover {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    width: max-content !important;
    min-width: 112px !important;
    max-width: 100% !important;
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    padding: 0 7px !important;
    gap: 5px !important;
    border: 1px solid var(--line) !important;
    border-radius: 12px !important;
    background: var(--surface) !important;
    color: var(--text) !important;
    box-shadow: none !important;
    text-shadow: none !important;
    overflow: visible !important;
    white-space: nowrap !important;
  }

  html body #money .record-row[data-expense-row] > .desktop-record-actions > [data-toggle-saved] .saved-icon-container,
  html body #paidExpenseList .desktop-record-actions > [data-toggle-saved] .saved-icon-container {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 30px !important;
    width: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 30px 30px !important;
  }

  html body #money .record-row[data-expense-row] > .desktop-record-actions > [data-toggle-saved] .saved-icon,
  html body #paidExpenseList .desktop-record-actions > [data-toggle-saved] .saved-icon {
    opacity: 0 !important;
  }

}

@media (max-width: 700px) {
  html body #money .record-row[data-expense-row] > .mobile-record-actions,
  html body #paid-expenses [data-paid-expense-row] > .mobile-record-actions,
  html body #paidExpenseList .mobile-record-actions {
    box-shadow: none !important;
  }

  html body #money .record-row[data-expense-row] > .mobile-record-actions > .button,
  html body #money .record-row[data-expense-row] > .mobile-record-actions .record-more-panel,
  html body #money .record-row[data-expense-row] > .mobile-record-actions .record-more-panel [role="menuitem"],
  html body #paid-expenses [data-paid-expense-row] > .mobile-record-actions > .button,
  html body #paid-expenses [data-paid-expense-row] > .mobile-record-actions .record-more-panel,
  html body #paid-expenses [data-paid-expense-row] > .mobile-record-actions .record-more-panel [role="menuitem"],
  html body #paidExpenseList .mobile-record-actions > .button,
  html body #paidExpenseList .mobile-record-actions .record-more-panel,
  html body #paidExpenseList .mobile-record-actions .record-more-panel [role="menuitem"],
  html body #paidExpenseList .mobile-record-actions [data-toggle-saved] {
    box-shadow: none !important;
    border-radius: 12px !important;
    text-shadow: none !important;
  }

  html body #money .record-row[data-expense-row] > .mobile-record-actions .record-more-panel,
  html body #paid-expenses [data-paid-expense-row] > .mobile-record-actions .record-more-panel,
  html body #paidExpenseList .mobile-record-actions .record-more-panel {
    overflow: visible !important;
  }

  html body #money .record-row[data-expense-row] > .mobile-record-actions .record-more-panel [data-toggle-saved],
  html body #paid-expenses [data-paid-expense-row] > .mobile-record-actions .record-more-panel [data-toggle-saved],
  html body #paidExpenseList .mobile-record-actions [data-toggle-saved] {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 35px !important;
    min-height: 35px !important;
    max-height: 35px !important;
    padding: 0 10px !important;
    border: 1px solid var(--line) !important;
    border-radius: 12px !important;
    background: var(--surface) !important;
    color: var(--text) !important;
    font-size: .75rem !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    opacity: 1 !important;
    visibility: visible !important;
    text-indent: 0 !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  html body #money .record-row[data-expense-row] > .mobile-record-actions .record-more-panel [data-toggle-saved]::before,
  html body #money .record-row[data-expense-row] > .mobile-record-actions .record-more-panel [data-toggle-saved]::after,
  html body #paid-expenses [data-paid-expense-row] > .mobile-record-actions .record-more-panel [data-toggle-saved]::before,
  html body #paid-expenses [data-paid-expense-row] > .mobile-record-actions .record-more-panel [data-toggle-saved]::after,
  html body #paidExpenseList .mobile-record-actions [data-toggle-saved]::before,
  html body #paidExpenseList .mobile-record-actions [data-toggle-saved]::after {
    content: none !important;
    display: none !important;
  }
}

/* V15.2.26 · Runtime-safe desktop action fallback. */
html body #money .record-row[data-expense-row] > .desktop-record-actions,
html body #paidExpenseList .desktop-record-actions {
  box-shadow: none !important;
}

html body #money .record-row[data-expense-row] > .desktop-record-actions > .button,
html body #paidExpenseList .desktop-record-actions > .button {
  box-shadow: none !important;
  border-radius: 12px !important;
  text-shadow: none !important;
}

html body #money .record-row[data-expense-row] > .desktop-record-actions > [data-toggle-saved],
html body #paidExpenseList .desktop-record-actions > [data-toggle-saved] {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  flex-shrink: 0 !important;
  width: max-content !important;
  min-width: 112px !important;
  max-width: 100% !important;
  height: 30px !important;
  min-height: 30px !important;
  max-height: 30px !important;
  padding: 0 7px !important;
  gap: 5px !important;
  border: 1px solid var(--line) !important;
  border-radius: 12px !important;
  background: var(--surface) !important;
  color: var(--text) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  overflow: visible !important;
  white-space: nowrap !important;
}

/* V15.2.27 · Repeat controls are permanently icon-only.
   The label is removed from the renderer and this final guard prevents any
   legacy selector or future pseudo-content rule from bringing it back. */
html body #money .record-row[data-expense-row] > .desktop-record-actions > [data-toggle-saved].repeat-icon-control,
html body #paidExpenseList .desktop-record-actions > [data-toggle-saved].repeat-icon-control {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 30px !important;
  width: 30px !important;
  min-width: 30px !important;
  max-width: 30px !important;
  height: 30px !important;
  min-height: 30px !important;
  max-height: 30px !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 0 !important;
  border: 1px solid var(--line) !important;
  border-radius: 12px !important;
  background: var(--surface) !important;
  color: var(--text) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  overflow: hidden !important;
  white-space: nowrap !important;
}

html body #money .record-row[data-expense-row] > .desktop-record-actions > [data-toggle-saved].repeat-icon-control .saved-icon-container,
html body #paidExpenseList .desktop-record-actions > [data-toggle-saved].repeat-icon-control .saved-icon-container {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 30px !important;
  width: 30px !important;
  min-width: 30px !important;
  max-width: 30px !important;
  height: 30px !important;
  min-height: 30px !important;
  max-height: 30px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background-image: url("./icons/repeat-monthly-off.png?v=2.5.0-talaan1") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 30px 30px !important;
}

html body #money .record-row[data-expense-row] > .desktop-record-actions > [data-toggle-saved].repeat-icon-control.active .saved-icon-container,
html body #paidExpenseList .desktop-record-actions > [data-toggle-saved].repeat-icon-control.active .saved-icon-container {
  background-image: url("./icons/repeat-monthly-on.png?v=2.5.0-talaan1") !important;
}

html body #money .record-row[data-expense-row] > .desktop-record-actions > [data-toggle-saved].repeat-icon-control .saved-icon,
html body #paidExpenseList .desktop-record-actions > [data-toggle-saved].repeat-icon-control .saved-icon {
  opacity: 0 !important;
}

html body #money .record-row[data-expense-row] > .desktop-record-actions > [data-toggle-saved] :is(.monthly-repeat-label, .saved-button-text),
html body #paidExpenseList .desktop-record-actions > [data-toggle-saved] :is(.monthly-repeat-label, .saved-button-text) {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

html body #money .record-row[data-expense-row] > .desktop-record-actions > [data-toggle-saved] .saved-button-text::before,
html body #money .record-row[data-expense-row] > .desktop-record-actions > [data-toggle-saved] .saved-button-text::after,
html body #paidExpenseList .desktop-record-actions > [data-toggle-saved] .saved-button-text::before,
html body #paidExpenseList .desktop-record-actions > [data-toggle-saved] .saved-button-text::after {
  content: none !important;
  display: none !important;
}

@media (max-width: 700px) {
  html body #money .record-row[data-expense-row] > .mobile-record-actions .record-more-panel [data-toggle-saved].repeat-icon-control,
  html body #paid-expenses [data-paid-expense-row] > .mobile-record-actions .record-more-panel [data-toggle-saved].repeat-icon-control,
  html body #paidExpenseList .mobile-record-actions [data-toggle-saved].repeat-icon-control {
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 35px !important;
    min-height: 35px !important;
    max-height: 35px !important;
    padding: 0 !important;
    gap: 0 !important;
    border: 1px solid var(--line) !important;
    border-radius: 12px !important;
    background: var(--surface) !important;
    color: var(--text) !important;
    box-shadow: none !important;
    text-shadow: none !important;
    overflow: hidden !important;
    white-space: nowrap !important;
  }

  html body #money .record-row[data-expense-row] > .mobile-record-actions .record-more-panel [data-toggle-saved].repeat-icon-control .saved-icon-container,
  html body #paid-expenses [data-paid-expense-row] > .mobile-record-actions .record-more-panel [data-toggle-saved].repeat-icon-control .saved-icon-container,
  html body #paidExpenseList .mobile-record-actions [data-toggle-saved].repeat-icon-control .saved-icon-container {
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 30px !important;
    width: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background-image: url("./icons/repeat-monthly-off.png?v=2.5.0-talaan1") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 30px 30px !important;
  }

  html body #money .record-row[data-expense-row] > .mobile-record-actions .record-more-panel [data-toggle-saved].repeat-icon-control.active .saved-icon-container,
  html body #paid-expenses [data-paid-expense-row] > .mobile-record-actions .record-more-panel [data-toggle-saved].repeat-icon-control.active .saved-icon-container,
  html body #paidExpenseList .mobile-record-actions [data-toggle-saved].repeat-icon-control.active .saved-icon-container {
    background-image: url("./icons/repeat-monthly-on.png?v=2.5.0-talaan1") !important;
  }

  html body #money .record-row[data-expense-row] > .mobile-record-actions .record-more-panel [data-toggle-saved].repeat-icon-control .saved-icon,
  html body #paid-expenses [data-paid-expense-row] > .mobile-record-actions .record-more-panel [data-toggle-saved].repeat-icon-control .saved-icon,
  html body #paidExpenseList .mobile-record-actions [data-toggle-saved].repeat-icon-control .saved-icon {
    opacity: 0 !important;
  }
}

/* V15.2.28 · iPhone 14 Pro finance-header geometry repair. */
@media (max-width:700px) {
  /* Keep the month row contained while every visible control stays compact. */
  html body .topbar-actions .month-navigator {
    box-sizing:border-box !important;
    display:grid !important;
    grid-template-columns:35px minmax(0,1fr) 35px auto !important;
    align-items:center !important;
    gap:4px !important;
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    overflow:visible !important;
  }

  html body .topbar-actions .month-navigator > .month-nav-button {
    box-sizing:border-box !important;
    width:35px !important;
    min-width:35px !important;
    max-width:35px !important;
    height:35px !important;
    min-height:35px !important;
    max-height:35px !important;
    flex:0 0 35px !important;
    padding:0 !important;
  }

  html body .topbar-actions .month-navigator > .month-control {
    box-sizing:border-box !important;
    width:auto !important;
    min-width:0 !important;
    max-width:none !important;
    height:35px !important;
    min-height:35px !important;
    max-height:35px !important;
    padding:4px 6px !important;
  }

  html body .topbar-actions .month-navigator .month-display-button {
    box-sizing:border-box !important;
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    height:33px !important;
    min-height:33px !important;
    max-height:33px !important;
    padding:3px 5px !important;
  }

  html body .topbar-actions .month-navigator > :is(.month-current-button,.month-status-chip) {
    box-sizing:border-box !important;
    width:auto !important;
    min-width:0 !important;
    max-width:64px !important;
    height:35px !important;
    min-height:35px !important;
    max-height:35px !important;
    flex:0 0 auto !important;
    padding-inline:6px !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    white-space:nowrap !important;
  }

  /* Expanded planner headers use their own content height; the 35px toggle
     reserves a fixed disclosure column instead of sharing the action row. */
  html body .budget-planner-card .budget-planner-header {
    position:relative !important;
    box-sizing:border-box !important;
    display:block !important;
    width:100% !important;
    min-width:0 !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    margin-bottom:0 !important;
    padding:10px 55px 10px 10px !important;
    overflow:visible !important;
  }

  html body .budget-planner-card .budget-planner-heading-copy,
  html body .budget-planner-card .budget-planner-heading-copy h3,
  html body .budget-planner-card .budget-planner-heading-copy p {
    min-width:0 !important;
    max-width:100% !important;
  }

  html body .budget-planner-card .budget-planner-heading-copy h3 {
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    white-space:nowrap !important;
  }

  html body .budget-planner-card .budget-planner-heading-copy p {
    display:-webkit-box !important;
    -webkit-box-orient:vertical !important;
    -webkit-line-clamp:2 !important;
    line-clamp:2 !important;
    overflow:hidden !important;
    text-overflow:clip !important;
    white-space:normal !important;
  }

  html body .budget-planner-card .budget-planner-actions {
    box-sizing:border-box !important;
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    align-items:center !important;
    gap:6px !important;
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    margin-top:8px !important;
  }

  html body .budget-planner-card .budget-planner-actions > .button,
  html body .budget-planner-card .budget-planner-actions > .overflow-menu,
  html body .budget-planner-card .budget-planner-actions > .overflow-menu > .overflow-menu-trigger {
    box-sizing:border-box !important;
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
  }

  html body .budget-planner-card .budget-planner-actions > .button,
  html body .budget-planner-card .budget-planner-actions > .overflow-menu > .overflow-menu-trigger {
    height:35px !important;
    min-height:35px !important;
    max-height:35px !important;
    padding-inline:7px !important;
    font-size:.68rem !important;
  }

  html body .budget-planner-card #addBudgetItem { order:1 !important; }
  html body .budget-planner-card .budget-planner-more-menu { order:2 !important; }
  html body .budget-planner-card #buildBudgetFromExpenses { order:3 !important; }
  html body .budget-planner-card #copyPreviousBudget { order:4 !important; }

  html body .budget-planner-card .budget-planner-actions > .budget-planner-toggle {
    position:absolute !important;
    top:10px !important;
    right:10px !important;
    box-sizing:border-box !important;
    display:grid !important;
    place-items:center !important;
    width:35px !important;
    min-width:35px !important;
    max-width:35px !important;
    height:35px !important;
    min-height:35px !important;
    max-height:35px !important;
    margin:0 !important;
    padding:0 !important;
  }

  html body .budget-planner-card.is-planner-collapsed .budget-planner-header {
    display:flex !important;
    align-items:center !important;
    height:50px !important;
    min-height:50px !important;
    max-height:50px !important;
    padding:7px 55px 7px 10px !important;
  }

  html body .budget-planner-card.is-planner-collapsed .budget-planner-heading-copy p {
    display:none !important;
  }

  html body .budget-planner-card.is-planner-collapsed .budget-planner-actions {
    position:absolute !important;
    top:7px !important;
    right:10px !important;
    display:block !important;
    width:35px !important;
    min-width:35px !important;
    max-width:35px !important;
    height:35px !important;
    min-height:35px !important;
    max-height:35px !important;
    margin:0 !important;
  }

  html body .budget-planner-card.is-planner-collapsed .budget-planner-actions > :not(.budget-planner-toggle) {
    display:none !important;
  }

  html body .budget-planner-card.is-planner-collapsed .budget-planner-actions > .budget-planner-toggle {
    position:relative !important;
    width:35px !important;
    min-width:35px !important;
    max-width:35px !important;
    height:35px !important;
    min-height:35px !important;
    max-height:35px !important;
  }

  /* Bento panel headings can wrap their title while the status and disclosure
     controls remain in a fixed, non-overlapping action column. */
  html body .budget-planner-card .budget-bento-panel .budget-panel-heading {
    box-sizing:border-box !important;
    display:grid !important;
    grid-template-columns:minmax(0,1fr) auto !important;
    align-items:center !important;
    gap:6px !important;
    width:100% !important;
    min-width:0 !important;
    height:auto !important;
    min-height:56px !important;
    max-height:none !important;
    padding:8px 9px !important;
    overflow:visible !important;
  }

  html body .budget-planner-card .budget-bento-panel .budget-panel-heading-copy,
  html body .budget-planner-card .budget-bento-panel .budget-panel-heading-copy h4,
  html body .budget-planner-card .budget-bento-panel .budget-panel-heading-copy p {
    min-width:0 !important;
    max-width:100% !important;
  }

  html body .budget-planner-card .budget-bento-panel .budget-panel-heading-copy h4 {
    overflow-wrap:anywhere !important;
    white-space:normal !important;
    line-height:1.15 !important;
  }

  html body .budget-planner-card .budget-bento-panel .budget-panel-heading-copy p {
    display:-webkit-box !important;
    -webkit-box-orient:vertical !important;
    -webkit-line-clamp:2 !important;
    line-clamp:2 !important;
    overflow:hidden !important;
    text-overflow:clip !important;
    white-space:normal !important;
  }

  html body .budget-planner-card .budget-bento-panel .budget-panel-heading-actions {
    display:flex !important;
    align-items:center !important;
    justify-content:flex-end !important;
    gap:6px !important;
    min-width:0 !important;
    max-width:100% !important;
    flex:0 0 auto !important;
  }

  html body .budget-planner-card .budget-bento-panel .budget-panel-heading-actions .status-chip {
    box-sizing:border-box !important;
    max-width:clamp(80px,30vw,120px) !important;
    min-width:0 !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    white-space:nowrap !important;
  }

  html body .budget-planner-card .budget-bento-panel .budget-panel-collapse {
    box-sizing:border-box !important;
    width:35px !important;
    min-width:35px !important;
    max-width:35px !important;
    height:35px !important;
    min-height:35px !important;
    max-height:35px !important;
    flex:0 0 35px !important;
    padding:0 !important;
  }

  html body .budget-planner-card .budget-bento-panel.is-collapsed .budget-panel-heading {
    min-height:50px !important;
    padding-block:7px !important;
  }

  html body .budget-planner-card .budget-bento-panel.is-collapsed .budget-panel-heading-copy p {
    display:none !important;
  }

  /* Available money keeps the amount in a bounded text track before the two
     icon controls. Monetary text remains visible; only its scale adapts. */
  html body #availableMoneySection .card-header {
    box-sizing:border-box !important;
    display:grid !important;
    grid-template-columns:minmax(0,1fr) minmax(0,190px) !important;
    align-items:center !important;
    gap:4px 8px !important;
    width:auto !important;
    height:35px !important;
    min-height:35px !important;
    max-height:35px !important;
    margin:0 -10px 4px !important;
    padding:0 6px !important;
    overflow:visible !important;
  }

  html body #availableMoneySection .card-header > div:first-child {
    min-width:0 !important;
    max-width:100% !important;
  }

  html body #availableMoneySection .section-title-row h3 {
    min-width:0 !important;
    max-width:100% !important;
    font-size:.72rem !important;
    line-height:1 !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    white-space:nowrap !important;
  }

  html body #availableMoneySection .collapse-actions {
    box-sizing:border-box !important;
    display:grid !important;
    grid-template-columns:minmax(0,1fr) 35px 35px !important;
    grid-template-areas:"total add toggle" !important;
    align-items:center !important;
    justify-items:stretch !important;
    gap:4px !important;
    width:190px !important;
    min-width:0 !important;
    max-width:100% !important;
    height:35px !important;
    min-height:35px !important;
    max-height:35px !important;
    overflow:visible !important;
  }

  html body #availableMoneySection .available-money-total-wrap {
    box-sizing:border-box !important;
    grid-area:total !important;
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    justify-items:end !important;
    overflow:visible !important;
    white-space:nowrap !important;
  }

  html body #availableMoneySection #moneyAvailableTotal {
    display:block !important;
    width:auto !important;
    min-width:0 !important;
    max-width:100% !important;
    overflow:visible !important;
    text-overflow:clip !important;
    white-space:nowrap !important;
    font-size:clamp(.62rem,2.8vw,.78rem) !important;
    line-height:1 !important;
    letter-spacing:-.02em !important;
    font-variant-numeric:tabular-nums !important;
  }

  html body #availableMoneySection #addAccountButton,
  html body #availableMoneySection [data-collapse-toggle="available-money"] {
    box-sizing:border-box !important;
    width:35px !important;
    min-width:35px !important;
    max-width:35px !important;
    height:35px !important;
    min-height:35px !important;
    max-height:35px !important;
    padding:0 !important;
  }

  html body #availableMoneySection #addAccountButton {
    grid-area:add !important;
    display:grid !important;
    place-items:center !important;
  }

  html body #availableMoneySection [data-collapse-toggle="available-money"] {
    grid-area:toggle !important;
  }

  /* The export action stays labeled and fits beside a shrinkable heading. */
  html body #income .income-records-card .card-header {
    box-sizing:border-box !important;
    display:grid !important;
    grid-template-columns:minmax(0,1fr) auto !important;
    align-items:center !important;
    gap:8px !important;
    min-width:0 !important;
    width:100% !important;
    overflow:visible !important;
  }

  html body #income .income-records-card .card-header > div:first-child {
    min-width:0 !important;
    max-width:100% !important;
  }

  html body #income .income-records-card .card-header h3 {
    min-width:0 !important;
    max-width:100% !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    white-space:nowrap !important;
  }

  html body #income .income-records-card .card-header p {
    display:-webkit-box !important;
    -webkit-box-orient:vertical !important;
    -webkit-line-clamp:2 !important;
    line-clamp:2 !important;
    min-width:0 !important;
    max-width:100% !important;
    overflow:hidden !important;
    text-overflow:clip !important;
    white-space:normal !important;
  }

  html body #income #exportIncomeCsv {
    box-sizing:border-box !important;
    width:auto !important;
    min-width:0 !important;
    max-width:100% !important;
    height:35px !important;
    min-height:35px !important;
    max-height:35px !important;
    padding-inline:8px !important;
    font-size:.68rem !important;
    white-space:nowrap !important;
  }
}

/* V15.2.29 · iPhone 14 Pro overflow and shadow cleanup. */
@media (max-width:700px) {
  /* Budget summary cards must use the phone viewport as their only width. */
  html body #money,
  html body #money > *,
  html body #money .finance-workspace-marquee-row,
  html body #money .page-heading,
  html body #money .legend,
  html body #money #moneySummary,
  html body #money .section-stack,
  html body #money .collapsible-section {
    box-sizing:border-box !important;
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
  }

  html body #money {
    overflow-x:clip !important;
  }

  /* Single-column summaries keep labels and monetary values readable at 390px. */
  html body #money .legend,
  html body #money #moneySummary {
    grid-template-columns:minmax(0,1fr) !important;
  }

  html body #money .legend-item,
  html body #money #moneySummary .summary-item {
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    grid-column:1 !important;
  }

  html body #money :is(.legend-copy,.legend-text,.legend-total,.summary-card-copy,.summary-card-label,.summary-card-value) {
    min-width:0 !important;
    max-width:100% !important;
  }

  html body #money :is(.legend-total,.summary-card-value) {
    overflow:visible !important;
    text-overflow:clip !important;
    white-space:nowrap !important;
  }

  /* The phone surface is flat; keep focus rings and popover/dialog shadows. */
  html body .topbar,
  html body #money,
  html body #money .card,
  html body #money .card-header,
  html body #money .legend-item,
  html body #money .summary-item,
  html body #money .period-card,
  html body #money .account-card,
  html body #money .budget-planner-card,
  html body #money .budget-bento-panel,
  html body .topbar .cloud-sync-toolbar-button,
  html body .topbar .topbar-add-button,
  html body .topbar .topbar-tools-trigger,
  html body .topbar .month-navigator,
  html body .topbar .month-control,
  html body .topbar .month-nav-button,
  html body .topbar .month-display-button,
  html body .topbar .month-current-button,
  html body .topbar .month-status-chip,
  html body #money .collapse-toggle,
  html body #money .budget-panel-collapse,
  html body #money .button,
  html body #money .workspace-switcher,
  html body #money .workspace-switcher-button,
  html body .mobile-add-expense-fab {
    box-shadow:none !important;
  }

  html body #money .legend-live-update,
  html body #money .summary-item.legend-live-update {
    animation:none !important;
    transform:none !important;
  }

  /* This is a divider, not a shadow; keep the expanded row flush with the
     card edge even when the icon-alignment layer is loaded after this file. */
  html body #money #availableMoneySection:not(.is-collapsed) > .card-header {
    width:auto !important;
    margin-inline:calc(-1 * var(--row-divider-bleed, 10px)) !important;
  }
}

/* V15.2.30 · Separate compact controls from phone divider lines. */
@media (max-width:700px) {
  :root {
    /* Keep the workspace aligned with the compact two-row topbar while leaving
       only a small clearance below the month controls. */
    --mobile-topbar-offset:calc(max(5px, env(safe-area-inset-top)) + 80px) !important;
  }

  /* Leave a small bottom clearance for the topbar divider so the month
     controls are not visually cut without creating a detached blank band. */
  html body .topbar {
    padding-bottom:5px !important;
  }

  html body .topbar-actions .month-navigator {
    margin-bottom:0 !important;
  }

  /* The Available Money action row is 35px; its divider needs its own space.
     The two-ID selector remains authoritative when ui-icon-alignment.css is
     loaded after this overlay in a fixture or embedded shell. */
  html body #money #availableMoneySection:not(.is-collapsed) > .card-header {
    box-sizing:border-box !important;
    height:44px !important;
    min-height:44px !important;
    max-height:44px !important;
    width:auto !important;
    padding:0 var(--row-divider-bleed, 10px) 8px !important;
    margin:0 calc(-1 * var(--row-divider-bleed, 10px)) 8px !important;
    align-items:center !important;
    border-bottom:1px solid var(--line) !important;
    overflow:visible !important;
  }

  html body #money #availableMoneySection:not(.is-collapsed) > .card-header .collapse-actions,
  html body #money #availableMoneySection:not(.is-collapsed) > .card-header .collapse-actions > :is(#addAccountButton,[data-collapse-toggle="available-money"]) {
    align-self:center !important;
  }

  /* A collapsed section has no visible divider or account content. */
  html body #money #availableMoneySection.is-collapsed > .card-header {
    height:35px !important;
    min-height:35px !important;
    max-height:35px !important;
    width:auto !important;
    margin:0 !important;
    padding:0 !important;
    border-bottom-color:transparent !important;
  }
}

/* V15.2.31 · Row overflow controls own one visible surface on phones. */
@media (max-width:700px) {
  /* The menu wrapper is structural. Its border and glass material used to
     render behind the trigger as a second outline and could intercept taps
     near the trigger edge. */
  html body #money .record-row[data-expense-row] > .mobile-record-actions,
  html body #paid-expenses [data-paid-expense-row] > .mobile-record-actions {
    border:0 !important;
    background:transparent !important;
    background-image:none !important;
    box-shadow:none !important;
    overflow:visible !important;
  }

  html body #money .record-row[data-expense-row] > .mobile-record-actions > .record-more-menu,
  html body #paid-expenses [data-paid-expense-row] > .mobile-record-actions > .record-more-menu {
    box-sizing:border-box !important;
    display:block !important;
    position:relative !important;
    z-index:2 !important;
    width:var(--talaan-phone-control-size, 35px) !important;
    min-width:var(--talaan-phone-control-size, 35px) !important;
    max-width:var(--talaan-phone-control-size, 35px) !important;
    height:var(--talaan-phone-control-size, 35px) !important;
    min-height:var(--talaan-phone-control-size, 35px) !important;
    max-height:var(--talaan-phone-control-size, 35px) !important;
    margin:0 !important;
    padding:0 !important;
    border:0 !important;
    border-radius:0 !important;
    background:transparent !important;
    background-image:none !important;
    box-shadow:none !important;
    -webkit-backdrop-filter:none !important;
    backdrop-filter:none !important;
    overflow:visible !important;
    pointer-events:auto !important;
  }

  html body #money .record-row[data-expense-row] > .mobile-record-actions > .record-more-menu > .overflow-menu-trigger,
  html body #paid-expenses [data-paid-expense-row] > .mobile-record-actions > .record-more-menu > .overflow-menu-trigger {
    box-sizing:border-box !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:var(--talaan-phone-control-size, 35px) !important;
    min-width:var(--talaan-phone-control-size, 35px) !important;
    max-width:var(--talaan-phone-control-size, 35px) !important;
    height:var(--talaan-phone-control-size, 35px) !important;
    min-height:var(--talaan-phone-control-size, 35px) !important;
    max-height:var(--talaan-phone-control-size, 35px) !important;
    margin:0 !important;
    padding:0 !important;
    border:1px solid var(--line) !important;
    border-radius:var(--talaan-control-radius) !important;
    background:var(--surface) !important;
    background-image:none !important;
    box-shadow:none !important;
    pointer-events:auto !important;
  }

  html body #money .record-row[data-expense-row] > .mobile-record-actions > .record-more-menu > .overflow-menu-trigger .kebab-icon,
  html body #paid-expenses [data-paid-expense-row] > .mobile-record-actions > .record-more-menu > .overflow-menu-trigger .kebab-icon {
    pointer-events:none !important;
  }

  html body #money .record-row[data-expense-row] > .mobile-record-actions .record-more-panel,
  html body #paid-expenses [data-paid-expense-row] > .mobile-record-actions .record-more-panel {
    z-index:30 !important;
    pointer-events:auto !important;
  }
}

/* V15.2.32 · Keep phone month navigation and finance tabs in one connected flow. */
@media (max-width:700px) {
  /* The optional Current/status control must never create an intrinsic-width
     column that pushes the month navigator beyond the phone viewport. */
  html body .topbar-actions .month-navigator {
    box-sizing:border-box !important;
    grid-template-columns:
      var(--talaan-phone-control-size, 35px)
      minmax(0, 1fr)
      var(--talaan-phone-control-size, 35px)
      minmax(0, 64px) !important;
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    margin:0 !important;
    padding:0 !important;
  }

  html body .topbar-actions .month-navigator > .month-control {
    width:auto !important;
    min-width:0 !important;
    max-width:100% !important;
    overflow:hidden !important;
  }

  html body .topbar-actions .month-navigator > :is(.month-current-button, .month-status-chip) {
    min-width:0 !important;
    max-width:64px !important;
    justify-self:stretch !important;
    overflow:hidden !important;
  }

  /* .content adds 12px of generic phone padding. Finance pages already begin
     with their workspace switcher, so reclaim that padding to avoid a
     detached blank band between the month toolbar and the tabs. */
  html body .content > :is(#income, #money, #paid-expenses) > .finance-workspace-marquee-row {
    margin-top:-8px !important;
    margin-bottom:8px !important;
  }
}

/* V15.2.33 · Center only the phone month field and its inner contents. */
@media (max-width:700px) {
  html body .topbar-actions .month-navigator {
    position:relative !important;
  }

  /* Keep the outer arrows in their existing columns; the month field is
     centered independently so the whole navigator does not move. */
  html body .topbar-actions .month-navigator:not(:has(> .month-current-button:not([hidden]), > .month-status-chip:not([hidden]))) {
    grid-template-columns:
      var(--talaan-phone-control-size, 35px)
      minmax(0, 1fr)
      var(--talaan-phone-control-size, 35px) !important;
  }

  /* Reserve the visible status lane without changing the outer arrow rhythm. */
  html body .topbar-actions .month-navigator:has(> .month-current-button:not([hidden]), > .month-status-chip:not([hidden])) {
    grid-template-columns:
      var(--talaan-phone-control-size, 35px)
      minmax(0, 1fr)
      var(--talaan-phone-control-size, 35px)
      64px !important;
  }

  html body .topbar-actions .month-navigator > #previousMonthButton {
    grid-column:1 !important;
  }

  html body .topbar-actions .month-navigator > #nextMonthButton {
    grid-column:3 !important;
  }

  html body .topbar-actions .month-navigator > :is(.month-current-button, .month-status-chip) {
    grid-column:4 !important;
    width:100% !important;
    max-width:64px !important;
    justify-self:stretch !important;
  }

  /* The gray month field is centered on the navigator's own midpoint, and
     remains between the 35px arrows at the supported phone widths. */
  html body .topbar-actions .month-navigator > .month-control {
    position:absolute !important;
    top:50% !important;
    left:50% !important;
    transform:translate(-50%, -50%) !important;
    width:min(100%, calc(100% - 78px)) !important;
    height:35px !important;
    min-height:35px !important;
    max-height:35px !important;
    padding:0 !important;
    z-index:1 !important;
  }

  html body .topbar-actions .month-navigator:has(> .month-current-button:not([hidden]), > .month-status-chip:not([hidden])) > .month-control {
    width:min(100%, calc(100% - 208px)) !important;
  }

  /* Center Month, the divider, and the short YYYY-MM display as one group. */
  html body .topbar-actions .month-navigator .month-display-button {
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:5px !important;
    padding-inline:3px !important;
    text-align:center !important;
  }

  html body .topbar-actions .month-navigator .month-display-label,
  html body .topbar-actions .month-navigator .month-display-separator,
  html body .topbar-actions .month-navigator .month-display-value {
    flex:0 0 auto !important;
  }

  html body .topbar-actions .month-navigator .month-display-value {
    min-width:0 !important;
    max-width:100% !important;
    text-align:center !important;
  }
}

/* V15.2.35 · Connect the phone Dashboard tabs without changing tab geometry. */
@media (max-width:700px) {
  /* The phone Dashboard starts with hidden presentation-only content. Keep
     those nodes out of layout even before the runtime enhancement stylesheet
     is inserted, so the tabs are the first rendered content below the topbar. */
  html body .content > #dashboard > :is(#dashboardWeekMarquee, .page-heading) {
    display:none !important;
  }

  /* Dashboard-specific content styling contributes an 18px phone top inset.
     Reclaim it on the page container, leaving the shared tab margin at 0 0
     8px for Dashboard and Finance style parity. */
  html body .content > #dashboard {
    margin-top:-18px !important;
  }
}

/* V15.2.36 · Keep the Dashboard phone seam to one visible divider. */
@media (max-width:700px) {
  /* The shared Dashboard tabs already provide the connected top edge. Remove
     only the Dashboard topbar's duplicate bottom rule and preserve its outer
     height with one pixel of equivalent padding. */
  html body.dashboard-view .topbar {
    border-bottom:0 !important;
    padding-bottom:6px !important;
  }
}

/* V15.2.37 · Keep Dashboard phone month controls together. */
@media (max-width:700px) {
  /* The month field belongs in the middle grid lane. The previous absolute
     centering made it visually drift away from the previous-month arrow when
     the optional Current/status lane was visible. */
  html body:is(.dashboard-view, :has(#dashboard.active)) .topbar-actions .month-navigator {
    display:grid !important;
    grid-template-columns:
      var(--talaan-phone-control-size, 35px)
      minmax(0, 1fr)
      var(--talaan-phone-control-size, 35px)
      64px !important;
    gap:5px !important;
  }

  html body:is(.dashboard-view, :has(#dashboard.active)) .topbar-actions .month-navigator:not(:has(> .month-current-button:not([hidden]), > .month-status-chip:not([hidden]))) {
    grid-template-columns:
      var(--talaan-phone-control-size, 35px)
      minmax(0, 1fr)
      var(--talaan-phone-control-size, 35px) !important;
  }

  html body:is(.dashboard-view, :has(#dashboard.active)) .topbar-actions .month-navigator > #previousMonthButton {
    grid-column:1 !important;
    grid-row:1 !important;
  }

  html body:is(.dashboard-view, :has(#dashboard.active)) .topbar-actions .month-navigator > #nextMonthButton {
    grid-column:3 !important;
    grid-row:1 !important;
  }

  html body:is(.dashboard-view, :has(#dashboard.active)) .topbar-actions .month-navigator > :is(.month-current-button, .month-status-chip) {
    grid-column:4 !important;
    grid-row:1 !important;
    width:100% !important;
    max-width:64px !important;
  }

  html body:is(.dashboard-view, :has(#dashboard.active)) .topbar-actions .month-navigator > .month-control {
    position:relative !important;
    top:auto !important;
    left:auto !important;
    transform:none !important;
    grid-column:2 !important;
    grid-row:1 !important;
    justify-self:stretch !important;
    width:auto !important;
    min-width:0 !important;
    max-width:none !important;
    align-self:center !important;
  }
}

/* V15.2.38 · Keep the collapsed phone budget disclosure inside its header. */
@media (max-width:700px) {
  /* The toggle is part of the header's disclosure affordance, so its
     containing block must be the header rather than a wider card ancestor. */
  html body .budget-planner-card.is-planner-collapsed .budget-planner-header {
    position:relative !important;
    display:flex !important;
    align-items:center !important;
    box-sizing:border-box !important;
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    height:50px !important;
    min-height:50px !important;
    max-height:50px !important;
    overflow:visible !important;
  }

  html body .budget-planner-card.is-planner-collapsed .budget-planner-actions {
    position:absolute !important;
    top:50% !important;
    right:10px !important;
    transform:translateY(-50%) !important;
    box-sizing:border-box !important;
    display:block !important;
    width:35px !important;
    min-width:35px !important;
    max-width:35px !important;
    height:35px !important;
    min-height:35px !important;
    max-height:35px !important;
    margin:0 !important;
    z-index:1 !important;
  }

  html body .budget-planner-card.is-planner-collapsed .budget-planner-actions > .budget-planner-toggle {
    position:relative !important;
    top:0 !important;
    right:auto !important;
    bottom:auto !important;
    left:auto !important;
    display:grid !important;
    place-items:center !important;
    box-sizing:border-box !important;
    width:35px !important;
    min-width:35px !important;
    max-width:35px !important;
    height:35px !important;
    min-height:35px !important;
    max-height:35px !important;
    margin:0 !important;
    padding:0 !important;
  }
}

/* V15.2.40 · Keep phone workspace rails at 35px while tightening tab buttons. */
@media (max-width:700px) {
  /* These segmented controls keep their 35px rail, while each tab button is
     30px and centered inside it. The stronger selector also overrides the
     legacy Budget-only 44px minimum without touching other phone controls,
     desktop geometry, or coarse-pointer tablet layout. */
  html body :is(
    .finance-workspace-marquee-row > .money-workspace-switcher,
    #money .money-workspace-switcher,
    #income .money-workspace-switcher,
    #paid-expenses .money-workspace-switcher,
    #dashboard .dashboard-view-tabs,
    #projects .project-workspace-switcher
  ) {
    display:grid !important;
    box-sizing:border-box !important;
    width:100% !important;
    height:35px !important;
    min-height:35px !important;
    max-height:35px !important;
    align-items:center !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:0 !important;
    padding:0 !important;
    overflow:hidden !important;
  }

  html body :is(
    .project-workspace-switcher,
    #projects .project-workspace-switcher
  ) {
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }

  html body :is(
    .finance-workspace-marquee-row > .money-workspace-switcher > .workspace-switcher-button,
    #money .money-workspace-switcher > .workspace-switcher-button,
    #income .money-workspace-switcher > .workspace-switcher-button,
    #paid-expenses .money-workspace-switcher > .workspace-switcher-button,
    #dashboard .dashboard-view-tabs > .workspace-switcher-button,
    #projects .project-workspace-switcher > .workspace-switcher-button
  ) {
    box-sizing:border-box !important;
    width:100% !important;
    min-width:0 !important;
    height:30px !important;
    min-height:30px !important;
    max-height:30px !important;
    padding:4px 5px !important;
    font-size:.7rem !important;
    line-height:1.1 !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
  }
}

/* V15.2.41 · Match the reference phone header arrangement on every page. */
@media (max-width:700px) {
  /* Keep the phone header to one action row: menu, month controls, sync, and
     tools. The 64px status lane is retained inside the month navigator so the
     existing Current chip stays readable. */
  html body .topbar {
    grid-template-columns:
      var(--talaan-phone-control-size, 35px)
      var(--talaan-phone-control-size, 35px)
      minmax(0, 1fr)
      var(--talaan-phone-control-size, 35px)
      minmax(0, 64px)
      var(--talaan-phone-control-size, 35px)
      var(--talaan-phone-control-size, 35px) !important;
    grid-template-areas:"menu month month month month sync tools" !important;
    column-gap:5px !important;
    row-gap:0 !important;
  }

  html body .topbar-left {
    grid-area:menu !important;
    width:35px !important;
    min-width:35px !important;
    max-width:35px !important;
  }

  html body .topbar-left > div {
    display:none !important;
  }

  html body .topbar-actions .month-navigator {
    grid-area:month !important;
    display:grid !important;
    grid-template-columns:
      var(--talaan-phone-control-size, 35px)
      minmax(0, 1fr)
      var(--talaan-phone-control-size, 35px)
      minmax(0, 64px) !important;
    grid-template-rows:35px !important;
    align-items:center !important;
    gap:5px !important;
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    padding:0 !important;
    overflow:visible !important;
  }

  html body .topbar-actions .month-navigator > .month-nav-button {
    box-sizing:border-box !important;
    width:35px !important;
    min-width:35px !important;
    max-width:35px !important;
    height:35px !important;
    min-height:35px !important;
    max-height:35px !important;
    padding:0 !important;
  }

  /* Keep the month field in the navigator's middle lane. Explicit placement
     prevents fixture and shell-only actions from creating implicit grid rows. */
  html body .topbar-actions .month-navigator > .month-control {
    position:relative !important;
    top:auto !important;
    left:auto !important;
    transform:none !important;
    grid-column:2 !important;
    grid-row:1 !important;
    justify-self:stretch !important;
    align-self:center !important;
    width:100% !important;
    min-width:100% !important;
    max-width:none !important;
  }

  html body .topbar-actions .month-navigator > :is(.month-current-button,.month-status-chip) {
    grid-column:4 !important;
    grid-row:1 !important;
    box-sizing:border-box !important;
    width:auto !important;
    min-width:0 !important;
    max-width:64px !important;
    height:35px !important;
    min-height:35px !important;
    max-height:35px !important;
    padding-inline:6px !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    white-space:nowrap !important;
  }

  html body .topbar-actions .month-navigator > #previousMonthButton {
    grid-column:1 !important;
    grid-row:1 !important;
  }

  html body .topbar-actions .month-navigator > #nextMonthButton {
    grid-column:3 !important;
    grid-row:1 !important;
  }

  /* The add action is intentionally omitted from the compact reference row.
     Hide it explicitly because fixture shells may omit its hidden attribute,
     which otherwise creates an implicit track outside the seven-column rail. */
  html body .topbar-actions > :is(.topbar-add-button,#quickAddExpense) {
    display:none !important;
  }

  /* The base phone rule hides non-month actions. Re-enable only the two
     reference actions, preserving their existing accessible labels and
     popover behavior. */
  html body .topbar-actions > .cloud-sync-toolbar-button,
  html body .topbar-actions > #cloudSyncStatusButton {
    display:grid !important;
    grid-area:sync !important;
    align-self:center !important;
    justify-self:stretch !important;
    width:35px !important;
    min-width:35px !important;
    max-width:35px !important;
    height:35px !important;
    min-height:35px !important;
    max-height:35px !important;
    padding:0 !important;
    place-items:center !important;
  }

  html body .topbar-actions > .topbar-tools-menu {
    display:block !important;
    grid-area:tools !important;
    align-self:center !important;
    justify-self:stretch !important;
    width:35px !important;
    min-width:35px !important;
    max-width:35px !important;
    height:35px !important;
    min-height:35px !important;
    max-height:35px !important;
  }

  html body .topbar-actions > .topbar-tools-menu > .topbar-tools-trigger {
    display:grid !important;
    place-items:center !important;
    width:35px !important;
    min-width:35px !important;
    max-width:35px !important;
    height:35px !important;
    min-height:35px !important;
    max-height:35px !important;
    padding:0 !important;
  }
}

/* V15.2.42 · Reconcile one-row header height with safe-area consumers. */
@media (max-width:700px) {
  :root {
    /* top padding + one 35px row + bottom padding + topbar divider */
    --mobile-topbar-offset:calc(max(5px, env(safe-area-inset-top)) + 41px) !important;
  }

  html body .topbar {
    grid-template-rows:35px !important;
  }
}

/* The phone summary leads with the monthly position; desktop retains its comparison rows. */
@layer talaan-readable-ui {
@scope (:root[data-talaan-phone-ui]) {
.phone-product-name, .money-priority-summary, .money-add-expense, .phone-page-add { display:none; }
:scope body #money .money-add-expense { display:none !important; }
.money-budget-breakdown { border:0; background:transparent; margin:0; }
.money-budget-breakdown > summary { display:none; }
:scope body .income-expenses-period-copy.is-positive { color:var(--green-text) !important; }
:scope body :is(.insights-workspace-tabs button[aria-selected="true"], .reports-workspace-tabs button[aria-selected="true"], .report-section-number, .project-source-line.freelance, .savings-trend-values > summary) { color:var(--action-text) !important; }
:scope body .finance-kanban-column-header > strong { color:var(--text) !important; }
:scope body .insight-change-chip.started { color:var(--danger) !important; }
:scope body #reports .report-section-nav button[aria-current="true"],
:scope body .chart-data-details > summary,
:scope body .income-yearly-table th.text-blue { color:var(--action-text) !important; }
:scope body .report-section-heading > span { color:var(--action-text) !important; }

@media (max-width:850px) {
  :scope body .money-priority-summary { display:block; padding:16px !important; margin-bottom:12px; }
  :scope body #moneyPrioritySummary h3 { margin:0; font-size:15px !important; }
  :scope body #moneyPrioritySummary .money-priority-amount { display:block; font-size:32px !important; line-height:1.3; font-weight:750; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; margin:4px 0 8px; }
  :scope body #moneyPrioritySummary .money-priority-status { display:inline-block; font-size:13px; color:var(--muted); margin-bottom:14px; }
  :scope body #moneyPrioritySummary .money-priority-status.shortfall { color:var(--danger); background:var(--red-soft); padding:4px 7px; border-radius:var(--talaan-control-radius); }
  :scope body #moneyPrioritySummary .money-priority-outstanding { display:flex; flex-wrap:wrap; gap:8px 12px; align-items:center; justify-content:space-between; padding-top:12px; border-top:1px solid var(--line); font-size:14px; }
  :scope body #moneyOutstandingValue { font-size:20px; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
  :scope body #moneyBudgetBreakdown { border:1px solid var(--line); background:var(--surface); border-radius:var(--talaan-card-radius); margin-bottom:12px; padding:0 12px; }
  :scope body #moneyBudgetBreakdown > summary { display:flex !important; align-items:center !important; justify-content:center !important; gap:8px !important; min-height:44px !important; padding:12px 0 !important; font-size:14px; font-weight:650; list-style:none; }
  :scope body #moneyBudgetBreakdown > summary::-webkit-details-marker { display:none; }
  :scope body #moneyBudgetBreakdown > summary::marker { content:""; }
  :scope body #moneyBudgetBreakdown .money-breakdown-chevron { flex:0 0 20px; }
  :scope body #moneyBudgetBreakdown[open] .money-breakdown-chevron { transform:rotate(90deg); }
  :scope body #moneyBudgetBreakdown :is(.legend,.summary-strip) { display:grid !important; grid-template-columns:minmax(0,1fr) !important; gap:0 !important; margin:0 !important; }
  :scope body #moneyBudgetBreakdown :is(.legend-item,.summary-item) { display:flex !important; flex-wrap:wrap; align-items:center; justify-content:space-between; min-height:52px !important; height:auto !important; max-height:none !important; padding:10px 0 !important; border:0 !important; border-top:1px solid var(--line) !important; border-radius:0 !important; background:transparent !important; box-shadow:none !important; }
  :scope body #moneyBudgetBreakdown :is(.legend-copy,.legend-text,.summary-card-copy,.summary-card-label) { width:auto !important; min-width:0; flex:1 1 140px; }
  :scope body #moneyBudgetBreakdown .legend-dot { display:none; }
  :scope body #moneyBudgetBreakdown :is(.legend-text strong,.summary-card-label,.summary-label-mobile) { font-size:14px !important; line-height:1.4 !important; white-space:normal !important; }
  :scope body #moneyBudgetBreakdown :is(.legend-total,.summary-card-value) { width:auto !important; max-width:100% !important; font-size:17px !important; line-height:1.4 !important; white-space:normal !important; overflow:visible !important; overflow-wrap:anywhere; }
  :scope body #moneyBudgetBreakdown #moneySummary > :is(.summary-item:first-child,.summary-item:last-child) { display:none !important; }
}

/* Two header rows reserve the selected period instead of clipping it between utility actions. */
@media (max-width:700px) {
  :scope { --mobile-topbar-offset:calc(max(8px,env(safe-area-inset-top)) + 104px) !important; --talaan-phone-control-size:44px; }
  :scope body .topbar { display:grid !important; grid-template-columns:44px minmax(0,1fr) 44px 44px !important; grid-template-rows:44px 44px !important; grid-template-areas:none !important; gap:8px !important; min-height:0 !important; height:auto !important; max-height:none !important; padding:max(8px,env(safe-area-inset-top)) 12px 8px !important; align-items:center; }
  :scope body .topbar .topbar-left, :scope body .topbar .topbar-actions { display:contents !important; }
  :scope body .topbar .topbar-left > div { display:block !important; min-width:0 !important; grid-column:2 !important; grid-row:1 !important; text-align:center; }
  :scope body .topbar .phone-product-name { display:block !important; font-size:18px; line-height:1.2; }
  :scope body .topbar #topTitle { display:block !important; font-size:12px !important; line-height:1.3; margin:2px 0 0; color:var(--muted); }
  :scope body .topbar :is(#todayLabel,#buildBadge) { display:none !important; }
  :scope body .topbar #menuButton { grid-row:1 !important; grid-column:1 !important; margin:0 !important; }
  :scope body .topbar #cloudSyncStatusButton { grid-row:1 !important; grid-column:3 !important; position:static !important; }
  :scope body .topbar .topbar-tools-menu { grid-row:1 !important; grid-column:4 !important; position:relative !important; width:44px !important; min-width:44px !important; max-width:44px !important; height:44px !important; min-height:44px !important; max-height:44px !important; }
  :scope body .topbar .month-navigator { display:grid !important; position:static !important; grid-row:2 !important; grid-column:1 / -1 !important; grid-template-columns:44px minmax(0,1fr) 44px !important; grid-template-areas:none !important; gap:8px !important; height:44px !important; min-height:44px !important; max-height:44px !important; width:100% !important; max-width:none !important; margin:0 !important; }
  :scope body .topbar .month-navigator:has(> #currentMonthButton:not([hidden])) { grid-template-columns:44px minmax(0,1fr) 44px 64px !important; }
  :scope body .topbar .month-navigator #previousMonthButton { grid-column:1 !important; grid-row:1 !important; }
  :scope body .topbar .month-navigator #nextMonthButton { grid-column:3 !important; grid-row:1 !important; }
  :scope body .topbar .month-navigator > :is(#previousMonthButton,#nextMonthButton) { display:grid !important; place-items:center !important; padding:0 !important; }
  :scope body .topbar .month-navigator > :is(#previousMonthButton,#nextMonthButton) > svg { display:block !important; margin:0 !important; position:static !important; transform:none !important; }
  :scope body .topbar .month-navigator #currentMonthButton { grid-column:4 !important; grid-row:1 !important; width:64px !important; font-size:12px !important; }
  :scope body .topbar .month-navigator .month-control { display:block !important; position:relative !important; grid-column:2 !important; grid-row:1 !important; top:auto !important; left:auto !important; transform:none !important; width:100% !important; min-width:0 !important; max-width:none !important; height:44px !important; min-height:44px !important; max-height:none !important; padding:0 !important; }
  :scope body .topbar .month-navigator #monthDisplayButton { display:flex !important; justify-content:center !important; width:100% !important; height:44px !important; padding:8px 2px !important; }
  :scope body .topbar .month-navigator :is(.month-display-label,.month-display-separator,#monthStatusChip) { display:none !important; }
  :scope body .topbar .month-navigator .month-display-value { width:auto !important; max-width:100% !important; font-size:var(--phone-action-size,14px) !important; line-height:1.4 !important; flex:0 1 auto !important; }
  :scope body .topbar .month-display-long { display:inline !important; }
  :scope body .topbar .month-display-short { display:none !important; }
  :scope body .topbar #quickAddExpense { display:none !important; }
  :scope body #money .money-add-expense { display:flex !important; width:100%; min-height:44px !important; height:auto !important; max-height:none !important; margin:12px 0; font-size:var(--phone-action-size,14px) !important; }
  :scope body :is(button,.button,summary,[role="button"],[role="tab"]) { min-height:44px !important; max-height:none !important; }
  :scope body :is(.workspace-switcher-button,.dashboard-view-tab,.button,.topbar-tools-item,.month-picker-option) { height:auto !important; font-size:var(--phone-action-size,14px) !important; line-height:1.4 !important; }
  :scope body :is(.workspace-switcher,.dashboard-view-tabs,.money-workspace-switcher,.project-workspace-switcher) { height:auto !important; min-height:52px !important; max-height:none !important; }
  :scope body :is(.collapse-toggle,.overflow-menu-trigger,.section-help-button,.month-nav-button,.menu-button,.sidebar-close-button,.topbar-tools-trigger,.cloud-sync-toolbar-button,.phone-icon-only-action) { width:44px !important; min-width:44px !important; max-width:44px !important; height:44px !important; min-height:44px !important; max-height:44px !important; flex-basis:44px !important; }
  :scope body .sidebar .nav-button { min-height:44px !important; }
  :scope body :is(.mobile-record-actions,.record-row[data-paid-expense-row] .mobile-record-actions) { height:auto !important; min-height:44px !important; grid-template-columns:minmax(0,1fr) 44px !important; }
  :scope body :is(#money .record-row[data-expense-row],#paid-expenses [data-paid-expense-row]) > .mobile-record-actions { grid-template-columns:minmax(44px,max-content) 44px !important; justify-content:end !important; align-items:center !important; gap:8px !important; }
  :scope body :is(#money .record-row[data-expense-row],#paid-expenses [data-paid-expense-row]) > .mobile-record-actions > .button { width:auto !important; min-width:44px !important; max-width:100% !important; padding:8px 12px !important; display:inline-flex !important; align-items:center !important; justify-content:center !important; gap:8px !important; text-align:center !important; white-space:normal !important; }
  :scope body .mobile-record-actions .record-more-menu { width:44px !important; min-width:44px !important; max-width:44px !important; height:44px !important; min-height:44px !important; max-height:44px !important; }
  :scope body #money .account-card-actions { grid-template-columns:auto auto !important; align-items:center !important; gap:8px !important; }
  :scope body #money .account-card-actions .button { display:inline-flex !important; min-width:44px !important; align-items:center !important; justify-content:center !important; gap:8px !important; }
  :scope body #monthlyBudgetPlannerCard .budget-planner-header { display:grid !important; grid-template-columns:minmax(0,1fr) 44px !important; align-items:center !important; gap:8px !important; padding:12px !important; height:auto !important; min-height:0 !important; max-height:none !important; }
  :scope body #monthlyBudgetPlannerCard:not(.is-planner-collapsed) .budget-planner-header { grid-template-columns:minmax(0,1fr) 64px !important; }
  :scope body #monthlyBudgetPlannerCard .budget-planner-heading-copy { grid-column:1 !important; grid-row:1 !important; min-width:0 !important; }
  :scope body #monthlyBudgetPlannerCard .budget-planner-heading-copy h3 { white-space:normal !important; overflow:visible !important; }
  :scope body #monthlyBudgetPlannerCard .budget-planner-actions { display:contents !important; position:static !important; transform:none !important; width:auto !important; min-width:0 !important; max-width:none !important; height:auto !important; min-height:0 !important; max-height:none !important; margin:0 !important; }
  :scope body #monthlyBudgetPlannerCard .budget-planner-actions > #monthlyBudgetPlannerToggle { grid-column:2 !important; grid-row:1 !important; position:static !important; display:grid !important; place-items:center !important; justify-self:end !important; width:44px !important; min-width:44px !important; max-width:44px !important; height:44px !important; min-height:44px !important; max-height:44px !important; padding:0 !important; margin:0 !important; }
  :scope body #monthlyBudgetPlannerCard.is-planner-collapsed .budget-planner-actions > :not(.budget-planner-toggle) { display:none !important; }
  :scope body #monthlyBudgetPlannerCard:not(.is-planner-collapsed) .budget-planner-actions > .button { display:flex !important; align-items:center !important; justify-content:center !important; gap:8px !important; text-align:center !important; white-space:normal !important; overflow:visible !important; width:100% !important; min-width:44px !important; height:auto !important; min-height:44px !important; max-height:none !important; padding:8px 12px !important; }
  :scope body #monthlyBudgetPlannerCard:not(.is-planner-collapsed) #addBudgetItem { grid-column:1 !important; grid-row:2 !important; }
  :scope body #monthlyBudgetPlannerCard:not(.is-planner-collapsed) .budget-planner-more-menu { grid-column:2 !important; grid-row:2 !important; width:64px !important; min-width:64px !important; max-width:64px !important; height:44px !important; margin:0 !important; padding:0 !important; border:0 !important; background:transparent !important; box-shadow:none !important; }
  :scope body #monthlyBudgetPlannerCard:not(.is-planner-collapsed) .budget-planner-more-menu > .overflow-menu-trigger { display:flex !important; justify-content:center !important; align-items:center !important; width:64px !important; min-width:64px !important; max-width:64px !important; min-height:44px !important; padding:8px !important; gap:8px !important; text-align:center !important; }
  :scope body #monthlyBudgetPlannerCard:not(.is-planner-collapsed) #buildBudgetFromExpenses { grid-column:1 / -1 !important; grid-row:3 !important; }
  :scope body #monthlyBudgetPlannerCard:not(.is-planner-collapsed) #copyPreviousBudget { grid-column:1 / -1 !important; grid-row:4 !important; }
  :scope body #income .annual-income-card > .card-header { display:block !important; min-width:0 !important; }
  :scope body #income .annual-income-card > .card-header > div:first-child { width:100% !important; min-width:0 !important; }
  :scope body #income .annual-income-actions { display:grid !important; grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important; gap:8px !important; justify-content:start !important; align-items:center !important; width:100% !important; min-width:0 !important; max-width:100% !important; margin-top:8px !important; }
  :scope body #income .annual-income-actions > :is(select,label:not(.sr-only),button) { width:100% !important; min-width:0 !important; height:44px !important; min-height:44px !important; max-height:none !important; margin:0 !important; box-sizing:border-box !important; }
  :scope body #income .annual-income-actions > label:not(.sr-only) { display:flex !important; align-items:center !important; justify-content:center !important; gap:8px !important; }
  :scope body #income #exportAnnualIncomeCsv { grid-column:1 / -1 !important; display:flex !important; align-items:center !important; justify-content:center !important; }
  :scope body #expenseDialog .expense-dialog-footer { gap:8px !important; }
  :scope body #expenseDialog .expense-dialog-footer .button:not([hidden]) { display:inline-flex !important; align-items:center !important; justify-content:center !important; gap:8px !important; padding:8px 12px !important; white-space:normal !important; text-align:center !important; }
  :scope body #money :is(#availableMoneySection .card-header,.period-header) {
    display:flex !important;
    flex-wrap:wrap !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:8px !important;
    height:auto !important;
    min-height:68px !important;
    max-height:none !important;
    padding:12px !important;
  }
  :scope body #money :is(#availableMoneySection .card-header,.period-header) > div:first-child {
    flex:1 1 140px !important;
    min-width:0 !important;
    max-width:100% !important;
    width:auto !important;
  }
  :scope body #money #availableMoneySection .card-header > div:first-child { flex-basis:100px !important; }
  :scope body #money :is(#availableMoneySection .card-header,.period-header) .collapse-actions {
    display:flex !important;
    flex-wrap:nowrap !important;
    flex:0 1 auto !important;
    align-items:center !important;
    justify-content:flex-end !important;
    gap:8px !important;
    width:auto !important;
    min-width:0 !important;
    max-width:100% !important;
    height:auto !important;
    min-height:44px !important;
    max-height:none !important;
  }
  :scope body #money :is(#availableMoneySection .card-header,.period-header) .collapse-toggle { display:inline-grid !important; place-items:center !important; margin:0 !important; padding:0 !important; flex:0 0 44px !important; }
  :scope body #money :is(#availableMoneySection .card-header,.period-header) h3 { white-space:normal !important; overflow:visible !important; overflow-wrap:anywhere; }
  :scope body #money .period-header p { -webkit-line-clamp:unset !important; line-clamp:unset !important; overflow:visible !important; }
  :scope body #money .collapse-actions > :is(.available-money-total-wrap,.period-total) { flex:0 1 auto !important; }
  :scope body #money :is(.available-money-total-wrap,.period-total) { min-width:0 !important; width:auto !important; max-width:100% !important; white-space:normal !important; overflow:visible !important; overflow-wrap:anywhere; }
  :scope body #money #moneyAvailableTotal { width:auto !important; max-width:none !important; white-space:normal !important; overflow:visible !important; }
  :scope body #money .account-card-main strong { font-size:17px !important; line-height:1.4 !important; }
  :scope body :is(.month-picker-popover,.topbar-tools-panel) { max-width:calc(100vw - 24px) !important; }
  :scope body #money :is(.account-card-label small,.record-title-copy small,.record-label,.record-meta,.record-status-chip,.summary-card-label) { font-size:13px !important; line-height:1.4 !important; }
  :scope body #money :is(.ui-tag,.status-badge,.expense-inline-note,.due-cell,[data-label]:not(.amount)) { font-size:13px !important; line-height:1.4 !important; }
  :scope body #money :is(.account-card-label > span,.account-card-main > span,.record-title-copy > strong,.period-header h3,.card-header h3) { font-size:14px !important; line-height:1.4 !important; }
  :scope body #money :is(.account-card-main > strong,.amount,.period-total,#moneyAvailableTotal) { font-size:var(--phone-amount-size,17px) !important; line-height:1.4 !important; }
  :scope body #money :is(.record-row[data-expense-row],.account-card) { height:auto !important; max-height:none !important; }
  :scope body #money .record-row[data-expense-row] .record-title-copy { white-space:normal !important; }
  :scope body #money .record-row[data-expense-row] .record-title-copy > :is(strong,small) { white-space:normal !important; overflow:visible !important; }
  :scope body .income-expenses-range button { min-width:44px !important; min-height:44px !important; height:44px !important; max-height:none !important; font-size:13px !important; }
  :scope body :is(.budget-panel-collapse,.budget-planner-toggle,.toast-dismiss,#toastDismissButton) { width:44px !important; min-width:44px !important; height:44px !important; min-height:44px !important; }
  :scope body :is(select,input:not([type="checkbox"]):not([type="radio"]):not([type="month"]):not([type="hidden"])) { min-height:44px !important; max-height:none !important; font-size:16px !important; }
  :scope body .calendar-day { min-height:56px !important; }
  :scope body .month-navigator { grid-template-rows:44px !important; padding:0 !important; border:0 !important; }
  :scope body .settings-status-card { min-height:70px !important; height:auto !important; }
  :scope body .phone-page-add { display:flex !important; height:auto !important; max-height:none !important; font-size:var(--phone-action-size,14px) !important; }
  :scope body :is(.annual-show-all,.expense-select-footer,label:has(> input[type="checkbox"])) { min-width:44px !important; min-height:44px !important; height:auto !important; }
  :scope body #money .expense-record-title { display:grid !important; grid-template-columns:44px minmax(0,1fr) !important; gap:8px !important; }
  :scope body #money .expense-select-footer { position:static !important; display:flex !important; align-items:center; justify-content:center; width:44px !important; min-width:44px !important; flex:0 0 44px !important; }
  :scope body #money .expense-record-title .record-title-copy { grid-column:2; }
}
:scope body #annualIncomeTable th { color:var(--text) !important; }
}
}

/* Swipe rows keep payment visible and expose secondary actions in the row. */
.phone-expense-swipe-hint, .phone-row-actions-label, .phone-recurrence-label, .phone-selection-action, .phone-selection-badge { display:none; }
@layer talaan-readable-ui {
@scope (:root[data-talaan-phone-ui]) {
@media (max-width:700px) {
  :scope body .phone-expense-swipe-hint { display:block; margin:0 0 12px; color:var(--muted); font-size:13px; line-height:1.4; }
  :scope body #money .phone-swipe-row { touch-action:pan-y pinch-zoom; }
  :scope body #money .phone-swipe-row:focus-visible { outline:2px solid var(--blue); outline-offset:-2px; }
  :scope body #money .phone-swipe-row.is-expense-selected { box-shadow:inset 3px 0 var(--blue); }
  :scope body #money .phone-swipe-row .expense-select-footer { display:none !important; }
  :scope body #money .phone-swipe-row .expense-record-title { grid-template-columns:minmax(0,1fr) !important; }
  :scope body #money .phone-swipe-row .record-title-copy { grid-column:1 !important; }
  :scope body #money .phone-swipe-row .phone-selection-badge:not([hidden]) { display:inline-flex !important; color:var(--action-text); border:1px solid var(--blue); }
  :scope body #money .phone-swipe-row > .mobile-record-actions { display:flex !important; flex-wrap:wrap !important; justify-content:flex-end !important; align-items:center !important; height:auto !important; min-height:44px !important; max-height:none !important; gap:8px !important; }
  :scope body #money .phone-swipe-row .record-more-menu { flex:0 0 0 !important; width:0 !important; min-width:0 !important; max-width:none !important; height:0 !important; min-height:0 !important; max-height:none !important; }
  :scope body #money .phone-swipe-row .record-more-menu > .overflow-menu-trigger { position:absolute !important; width:1px !important; min-width:0 !important; max-width:none !important; height:1px !important; min-height:0 !important; max-height:none !important; padding:0 !important; overflow:hidden !important; clip-path:inset(50%); }
  :scope body #money .phone-swipe-row.has-keyboard-actions .record-more-menu { flex:0 0 auto !important; width:auto !important; height:44px !important; }
  :scope body #money .phone-swipe-row.has-keyboard-actions .record-more-menu > .overflow-menu-trigger { position:static !important; width:auto !important; min-width:44px !important; height:44px !important; min-height:44px !important; padding:8px 12px !important; min-width:76px !important; max-width:none !important; flex-basis:auto !important; overflow:visible !important; clip-path:none; }
  :scope body #money .phone-swipe-row .overflow-menu-trigger :is(.kebab-icon,.sr-only) { display:none !important; }
  :scope body #money .phone-expense-swipe-status { position:fixed !important; left:0; top:0; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  :scope body #money .phone-swipe-row .phone-row-actions-label { display:inline !important; }
  :scope body #money .phone-swipe-row .record-more-menu.is-open { flex:1 1 100% !important; width:100% !important; height:auto !important; }
  :scope body #money .phone-swipe-row .record-more-panel:not([hidden]) { position:static !important; display:grid !important; grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important; gap:8px !important; width:100% !important; min-width:0 !important; max-width:none !important; margin:0 !important; padding:8px 0 0 !important; border:0 !important; border-top:1px solid var(--line) !important; border-radius:0 !important; background:transparent !important; box-shadow:none !important; }
  :scope body #money .phone-swipe-row .record-more-panel > .button { display:flex !important; align-items:center !important; justify-content:center !important; width:100% !important; min-width:44px !important; max-width:none !important; height:auto !important; min-height:44px !important; max-height:none !important; padding:8px !important; gap:8px !important; white-space:normal !important; text-align:center !important; border-radius:var(--talaan-control-radius) !important; }
  :scope body #money .phone-swipe-row .record-more-panel .saved-icon-container { display:none !important; }
  :scope body #money .phone-swipe-row .record-more-panel .phone-recurrence-label { display:inline !important; font-size:var(--phone-action-size,14px) !important; line-height:1.4 !important; }
  :scope body #money .phone-swipe-row .record-more-panel .phone-selection-action { grid-column:1 / -1; }
  :scope body #money .phone-swipe-row .record-more-panel > .button::after { content:none !important; }
}
}
}

.phone-expense-payment-status, .phone-expense-schedule { display:none; }
@layer talaan-readable-ui {
@scope (:root[data-talaan-phone-ui]) {
@media (max-width:700px) {
  /* Flatten only nonsemantic wrappers so the existing actions and swipe targets stay intact. */
  :scope body #money :is(#earlyExpenses,#lateExpenses,#otherExpenses) > .record-row[data-expense-row] {
    display:grid !important;
    grid-template-columns:minmax(0,1fr) fit-content(45%) !important;
    grid-template-rows:auto auto auto auto auto !important;
    gap:4px 12px !important;
    align-items:start !important;
    padding:12px !important;
    margin:0 0 8px !important;
    border:1px solid var(--line) !important;
    border-left:3px solid var(--expense-status-edge,transparent) !important;
    border-radius:12px !important;
    background:var(--surface) !important;
    box-shadow:var(--expense-selection-ring,none) !important;
  }
  :scope body #money .record-row[data-expense-row].overdue-row { --expense-status-edge:var(--danger); }
  :scope body #money .record-row[data-expense-row].due-soon-row { --expense-status-edge:var(--orange-text); }
  :scope body #money .record-row[data-expense-row].is-expense-selected { --expense-selection-ring:inset 3px 0 var(--blue); }
  :scope body #money .record-row[data-expense-row] :is(.expense-record-title,.record-title-copy) { display:contents !important; }
  :scope body #money .record-row[data-expense-row] .record-title-copy > strong { grid-column:1 !important; grid-row:1 !important; min-width:0 !important; overflow-wrap:anywhere; align-self:center; }
  :scope body #money .record-row[data-expense-row] .record-icon { grid-column:1 !important; grid-row:1 !important; width:24px !important; height:24px !important; min-width:24px !important; font-size:20px !important; align-self:start; }
  :scope body #money .record-row[data-expense-row]:has(.record-icon) .record-title-copy > strong { padding-left:32px; }
  :scope body #money .record-row[data-expense-row] .record-title-copy > small { grid-column:1 / -1 !important; grid-row:2 !important; margin:0 !important; color:var(--muted) !important; overflow-wrap:anywhere; }
  :scope body #money :is(#earlyExpenses,#lateExpenses,#otherExpenses) .expense-category { display:inline !important; background:transparent !important; border:0 !important; border-radius:0 !important; padding:0 !important; font-weight:400 !important; color:inherit !important; }
  :scope body #money .record-row[data-expense-row] .record-statuses { grid-column:1 / -1 !important; grid-row:3 !important; display:flex !important; flex-wrap:wrap !important; gap:4px 8px !important; margin:4px 0 8px !important; }
  :scope body #money .record-row[data-expense-row] .record-statuses > :is(.status-unpaid,.status-saved,.status-one-time,.expense-inline-due-warning) { display:none !important; }
  :scope body #money .record-row[data-expense-row] .phone-expense-payment-status { display:block !important; flex-basis:100%; font-weight:600; color:var(--muted); background:transparent !important; border:0 !important; border-radius:0 !important; padding:0 !important; }
  :scope body #money .record-row[data-expense-row] .phone-expense-payment-status.status-overdue { color:var(--danger) !important; }
  :scope body #money .record-row[data-expense-row] .phone-expense-payment-status.status-due-soon { color:var(--orange-text) !important; }
  :scope body #money .record-row[data-expense-row] > .amount { grid-column:2 !important; grid-row:1 !important; min-width:0 !important; max-width:100% !important; width:auto !important; white-space:normal !important; overflow-wrap:anywhere; text-align:right !important; justify-self:end !important; }
  :scope body #money .record-row[data-expense-row] > .amount::before { content:none !important; }
  :scope body #money .record-row[data-expense-row] > .due-cell { grid-column:1 !important; grid-row:4 !important; display:block !important; width:auto !important; min-width:0 !important; margin:0 !important; padding:0 !important; color:var(--muted) !important; white-space:normal !important; overflow-wrap:anywhere; align-self:end; }
  :scope body #money .record-row[data-expense-row] > .due-cell::before { content:none !important; }
  :scope body #money .record-row[data-expense-row] .expense-due-original { display:none !important; }
  :scope body #money .record-row[data-expense-row] .phone-expense-schedule { display:inline !important; }
  :scope body #money .record-row[data-expense-row] > [data-label="Planned account"] { grid-column:1 !important; grid-row:5 !important; justify-self:start !important; text-align:left !important; width:auto !important; min-width:0 !important; margin:0 !important; padding:0 !important; color:var(--muted) !important; white-space:normal !important; overflow-wrap:anywhere; align-self:start; }
  :scope body #money .record-row[data-expense-row] > [data-label="Planned account"]::before { font-weight:400 !important; }
  :scope body #money :is(#earlyExpenses,#lateExpenses,#otherExpenses) .record-row[data-expense-row] :is(.record-title-copy > small,.phone-expense-payment-status,.due-cell,[data-label="Planned account"]) { font-size:var(--phone-helper-size,12px) !important; line-height:1.4 !important; }
  :scope body #money .record-row[data-expense-row] > .mobile-record-actions { grid-column:2 !important; grid-row:4 / 6 !important; justify-self:end !important; align-self:center !important; width:104px !important; min-width:104px !important; margin:0 !important; padding:0 !important; gap:0 !important; }
  :scope body #money .record-row[data-expense-row] > .mobile-record-actions > [data-mark-paid] { width:104px !important; min-width:104px !important; min-height:44px !important; height:auto !important; max-height:none !important; padding:8px 12px !important; display:inline-flex !important; align-items:center !important; justify-content:center !important; border-radius:10px !important; }
  :scope body #money .record-row[data-expense-row]:is(.has-keyboard-actions,:has(.record-more-menu.is-open)) > .mobile-record-actions { grid-column:1 / -1 !important; grid-row:6 !important; width:100% !important; gap:8px !important; }
}
}
}
