/* Balance v132 — presentation only. Existing component order and behavior retained. */
:root:root,
:root:root[data-theme=golden] {
  color-scheme:light;
  --bg:#e9eaec!important; --phone:#f0f1f2!important;
  --card:#ffffff!important; --card2:#f9fafb!important; --field:#ffffff!important;
  --text:#292b2e!important; --muted:#686c72!important; --line:#dfe1e4!important;
  --gold:#94640f!important; --gold2:#edb43d!important;
  --green:#28794f!important; --red:#b84640!important;
  --accent-top:#ffda78; --accent-bottom:#e4a023; --accent-ink:#30230d;
  --accent-soft:#fff5dc; --surface-soft:#f5f6f7; --nav-surface:#ffffffed;
  --surface-shadow:0 3px 5px #20252d05,0 10px 24px #20252d0b;
  --modal-shadow:0 24px 70px #171b2433; --overlay-surface:#24272e70;
  --track:#e5e6e8!important; --border:var(--line)!important; --panel:var(--card)!important;
  --analytics-income:#eeb73f!important; --analytics-expense:#72767c!important;
  --analytics-income-soft:#fbeac1!important; --analytics-expense-soft:#dfe1e5!important;
  --analytics-track:var(--track)!important; --analytics-center-bg:var(--card)!important;
  --analytics-card-bg:var(--card)!important; --analytics-card-bg-soft:var(--surface-soft)!important;
  --analytics-card-border:var(--line)!important; --analytics-outline:var(--line)!important;
}
:root:root[data-theme=light] {
  color-scheme:light;
  --bg:#edeef0!important; --phone:#f5f6f7!important; --card:#fff!important; --card2:#fcfcfd!important;
  --field:#fff!important; --text:#292c31!important; --muted:#686d75!important; --line:#e0e2e6!important;
  --gold:#856222!important; --gold2:#d8b36a!important; --green:#28794f!important; --red:#b84640!important;
  --accent-top:#f7dda0; --accent-bottom:#d9b363; --accent-ink:#302714;
  --accent-soft:#fbf5e7; --surface-soft:#f5f6f8; --nav-surface:#ffffffed;
  --analytics-income:#d8b36a!important; --analytics-expense:#7b8088!important;
}
:root:root[data-theme=dark] {
  color-scheme:dark;
  --bg:#17191c!important; --phone:#202226!important; --card:#2a2d31!important; --card2:#26292d!important;
  --field:#222529!important; --text:#f2f2f3!important; --muted:#b2b6be!important; --line:#40444b!important;
  --gold:#f2c45f!important; --gold2:#dba638!important; --green:#81cea5!important; --red:#f2948d!important;
  --accent-top:#ffdc85; --accent-bottom:#daa02f; --accent-ink:#28200f;
  --accent-soft:#3e3524; --surface-soft:#24272b; --nav-surface:#2a2d31f0;
  --surface-shadow:0 3px 5px #0000000d,0 10px 24px #00000026;
  --modal-shadow:0 24px 70px #00000066; --overlay-surface:#090b10a6;
  --track:#44484f!important; --analytics-income:#efbc4f!important; --analytics-expense:#969da9!important;
  --analytics-income-soft:#594627!important; --analytics-expense-soft:#434952!important;
}
:root:root[data-theme=platinum] {
  color-scheme:dark;
  --bg:#191c21!important; --phone:#22262c!important; --card:#2c3138!important; --card2:#282d34!important;
  --field:#252a31!important; --text:#f1f3f5!important; --muted:#b7bec8!important; --line:#444c57!important;
  --gold:#e7cc93!important; --gold2:#bda779!important; --green:#89cfac!important; --red:#f29c96!important;
  --accent-top:#f2e2bd; --accent-bottom:#bca477; --accent-ink:#29251c;
  --accent-soft:#3b382e; --surface-soft:#272c33; --nav-surface:#2c3138f0;
  --surface-shadow:0 3px 5px #0000000d,0 10px 24px #00000026;
  --modal-shadow:0 24px 70px #00000066; --overlay-surface:#090b10a6;
  --track:#484f5a!important; --analytics-income:#d7bd85!important; --analytics-expense:#a0aaba!important;
  --analytics-income-soft:#514a3b!important; --analytics-expense-soft:#454e5e!important;
}
:root:root body {color:var(--text);background:var(--bg);-webkit-text-size-adjust:100%;}
:root:root .shell {background:var(--bg)!important;}
:root:root .phone {background:var(--phone)!important;border-color:var(--line)!important;box-shadow:var(--surface-shadow)!important;}
:root:root .phone::before,:root:root .refBalanceCard::before {background:none!important;}
:root:root :is(.glass,.refBalanceCard,.refAnalyticsCard,.premiumEditableTx,.calcRecordItem) {
  background:linear-gradient(165deg,var(--card),var(--card2))!important;
  border:1px solid var(--line)!important;border-radius:20px!important;box-shadow:var(--surface-shadow)!important;
  color:var(--text)!important;
}
:root:root :is(.modal,.choiceModalUnified,.choiceMenuUnified,.budgetMenu,.recurrenceMenu,.monthListPremium,.serverAuthCard) {
  background:var(--card)!important;border-color:var(--line)!important;color:var(--text)!important;
  box-shadow:var(--modal-shadow)!important;border-radius:22px!important;
}
:root:root :is(.overlay,.monthOverlay) {background:var(--overlay-surface)!important;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);}
:root:root .choiceOverlayUnified {background:transparent!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;}
:root:root :is(input,select,textarea,.searchBox,.settingsBlock,.rateEditor,.forecastResult,.categoryValue,.recurrenceRow,.analyticsSection,.flowSection,.wfBlock,.refShareCard,.refCapitalRow,.currencyPill,.refCurrencyPill,.analyticsCurrencyPill,.calcSpreadsheet) {
  background-color:var(--field)!important;color:var(--text)!important;border-color:var(--line)!important;box-shadow:none!important;
}
:root:root :is(.settingsBlock,.rateEditor,.forecastResult,.categoryValue,.recurrenceRow,.analyticsSection,.flowSection,.wfBlock,.refShareCard,.refCapitalRow) {
  background-image:none!important;border-radius:14px!important;
}
:root:root :is(.refCapitalRow b,.refCapitalRow span,.refShareCard b,.refEquivalentItem b,.refCompareItem b,.refBalanceTitle,.balanceTitle,.balanceCard .convertLine,.conversionList b,.budgetTitleBtn,.flowLimitNote) {color:var(--text)!important;}
:root:root :is(.refShareCard span,.refEquivalentItem span,.refRowMetaSoft,.serverAuthSubtitle,.serverAuthForm label span) {color:var(--muted)!important;}
:root:root :is(.refCapitalRow i,.refCapitalRow svg,.currencyPill,.refCurrencyPill,.refIconBadge,.catGrid svg,.pref span,.walletArt,.sectionHead button,.recurrenceRow svg) {color:var(--gold)!important;filter:none!important;}
:root:root :is(.periodTabs,.flowTabs,.seg,.calcSheetTabs) {background:var(--surface-soft)!important;border-color:var(--line)!important;}
:root:root :is(.primary,.goldFab,.goldSmall,.miniAdd,.calcPrimary,.serverAuthPrimary,.periodTabs button.active,.flowTabs button.active) {
  background:linear-gradient(180deg,var(--accent-top),var(--accent-bottom))!important;
  color:var(--accent-ink)!important;border:1px solid color-mix(in srgb,var(--accent-bottom) 70%,transparent)!important;
  box-shadow:inset 0 1px #ffffff45,0 3px 8px #6b4c151a!important;
}
:root:root :is(.secondary,.iconBtn,.backBtn,.moduleBtn,.calcBack,.calcSecondary,.serverAuthSecondary,.txActions button,.catGrid button,.fileImport) {
  background:var(--field)!important;border-color:var(--line)!important;color:var(--gold)!important;box-shadow:none!important;
}
:root:root :is(.catGrid .selected,.choiceListUnified button.selected,.calcSheetTabs button.active) {background:var(--accent-soft)!important;border-color:var(--gold)!important;color:var(--gold)!important;}
:root:root :is(.txIcon,.refIconBadge,.recurrenceBadge,.calcRecordGlyph) {background:var(--accent-soft)!important;color:var(--gold)!important;border-color:var(--line)!important;}
:root:root .switch:not(.off) {background:linear-gradient(180deg,var(--accent-top),var(--accent-bottom))!important;}
:root:root .nav.appNav {background:var(--nav-surface)!important;border:1px solid var(--line)!important;box-shadow:0 4px 24px #14182020!important;border-radius:22px!important;}
:root:root .nav.appNav button {color:var(--muted)!important;background:transparent!important;box-shadow:none!important;border-color:transparent!important;}
:root:root .nav.appNav button svg {color:inherit!important;}
:root:root .nav.appNav button.active {color:var(--gold)!important;background:var(--accent-soft)!important;border-radius:14px!important;}
:root:root .nav.appNav button.navAdd {
  color:var(--accent-ink)!important;background:linear-gradient(180deg,var(--accent-top),var(--accent-bottom))!important;
  box-shadow:inset 0 1px #ffffff66,0 4px 12px #8d671526!important;border-radius:50%!important;
}
:root:root :is(.summaryGrid,.balanceCard,.sumValues,.refCompareItem,.moduleTotal,.txHeadline,.forecastResult,.calcSpreadsheet) {font-variant-numeric:tabular-nums;}
:root:root :is(button,input,select,textarea,a):focus-visible {outline:2px solid var(--gold)!important;outline-offset:3px;}
:root:root input:focus,:root:root textarea:focus {border-color:var(--gold)!important;}
:root:root button {touch-action:manipulation;}
:root:root button:disabled {cursor:default;}
:root:root .serverAuthShell {background:var(--bg)!important;color:var(--text)!important;min-height:100svh;}
:root:root .serverAuthCard {border:1px solid var(--line)!important;}
:root:root .serverAuthLink {color:var(--gold)!important;}
:root:root .calculationRecordsShell {background:var(--bg)!important;}
:root:root .calculationRecordsPhone {background:var(--phone)!important;border-color:var(--line)!important;box-shadow:var(--surface-shadow)!important;}
/* Existing navigation placement, section order and desktop alignment are preserved. */
@media(max-width:899px) {
  :root:root .shell {padding:0!important;}
  :root:root .phone {
    width:100%!important;max-width:760px!important;min-height:100svh!important;border:0!important;border-radius:0!important;
    padding: max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) calc(90px + env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))!important;
    overflow-x:clip!important;
  }
  :root:root .content {gap:12px!important;padding-bottom:12px!important;min-width:0;}
  :root:root .content > * {min-width:0;max-width:100%;}
  :root:root .nav.appNav {
    width:min(728px,calc(100% - 24px - env(safe-area-inset-left) - env(safe-area-inset-right)))!important;
    bottom:calc(8px + env(safe-area-inset-bottom))!important;min-height:64px!important;
    padding:6px 8px!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 54px minmax(0,1fr) minmax(0,1fr)!important;
  }
  :root:root .nav.appNav button {min-height:44px!important;min-width:0!important;max-width:100%;font-size:12px!important;}
  :root:root .nav.appNav button.navAdd {height:50px!important;width:50px!important;}
  :root:root :is(input,select,textarea,.txModulePage .txModuleFilters input,.txModulePage .txModuleFilters select,.txModulePage .txBudgetFilter select,.txModulePage .searchBox input) {font-size:16px!important;min-width:0;}
  :root:root :is(.periodTabs button,.flowTabs button,.recurringFilterChips button,.close,.iconBtn,.calcBack,.calcMenuButton,.txActions button) {min-height:44px!important;}
  :root:root :is(.close,.iconBtn,.txActions button) {min-width:44px!important;}
  :root:root :is(.modal,.refAnalyticsModal) {
    max-width:100%!important;max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;
    padding:20px 16px!important;overflow-y:auto;overscroll-behavior:contain;scroll-padding-block:20px;
  }
  :root:root .overlay {padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))!important;}
  :root:root .choiceOverlayUnified {padding:0!important;}
  :root:root :is(.modal h2,.analyticsTitleWrap) {padding-inline:30px;}
  :root:root :is(.refCapitalRow,.refCapitalRow.refExtraRow) {min-height:44px!important;height:auto!important;padding-block:8px!important;}
  :root:root :is(.refCapitalRow b,.txHeadline b,.txBody p) {overflow-wrap:anywhere;}
  :root:root .premiumTxList .editableTx.premiumEditableTx {padding:14px 12px!important;column-gap:9px!important;}
  :root:root .premiumTxList .editableTx.premiumEditableTx > .txHeadline {flex-wrap:wrap;gap:5px 10px!important;}
  :root:root .premiumTxList .editableTx.premiumEditableTx > .txHeadline > strong {white-space:normal!important;overflow-wrap:anywhere;margin-right:0!important;}
  :root:root :is(.refShareCards,.refEquivalentGrid,.summaryGrid.compact) {grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  :root:root :is(.metric,.metricBody,.metricBody > div,.refShareCard,.refEquivalentItem,.refRowMeta) {min-width:0;}
  :root:root :is(.metric strong,.refEquivalentItem b,.refRowMeta,.refShareCard b) {overflow-wrap:anywhere;white-space:normal!important;}
  :root:root .calculationRecordsShell {padding:0!important;}
  :root:root .calculationRecordsPhone {width:100%!important;border:0!important;border-radius:0!important;min-height:100svh;padding:max(12px,env(safe-area-inset-top)) 12px max(12px,env(safe-area-inset-bottom));}
  :root:root .calcSpreadsheetWrap {max-width:100%;max-height:calc(100dvh - 245px);}
  :root:root .serverAuthShell {padding:max(16px,env(safe-area-inset-top)) 16px max(16px,env(safe-area-inset-bottom));}
}
@media(max-width:359px) {
  :root:root .phone {padding-left:max(8px,env(safe-area-inset-left))!important;padding-right:max(8px,env(safe-area-inset-right))!important;}
  :root:root :is(.refBalanceCard,.refAnalyticsCard,.forecastCard,.periodPanel) {padding:12px!important;}
  :root:root .summaryGrid.compact {gap:8px!important;}
  :root:root .metric {padding:12px!important;}
  :root:root .metric strong {font-size:18px!important;}
  :root:root .catGrid {gap:6px!important;}
  :root:root .amountRow {grid-template-columns:minmax(0,1fr) 88px!important;gap:8px;}
  :root:root .refShareCard {padding:8px!important;}
  :root:root .refCapitalRow {column-gap:5px!important;}
}
@media(prefers-reduced-motion:reduce) {
  :root:root :is(.glass,.nav button,.switch::after,.flowGoalBar span) {transition:none!important;}
}
/* Keep status colors meaningful; match the donut's legend to its palette. */
:root:root .refBalanceAmount {color:var(--text)!important;text-shadow:none!important;font-variant-numeric:tabular-nums;}
:root:root .refBalanceAmount.balancePositive,:root:root .goodText {color:var(--green)!important;}
:root:root .refBalanceAmount.balanceNegative,:root:root .badText {color:var(--red)!important;}
:root:root .refShareCard .legendDot.green {background:var(--analytics-income)!important;}
:root:root .refShareCard .legendDot.red {background:var(--analytics-expense)!important;}
:root:root :is(.sumRow,.modalCompareGrid>div) {background:var(--surface-soft)!important;border-color:var(--line)!important;}
:root:root .refCompareItem p {color:var(--muted)!important;}
:root:root :is(.fieldLabel span,.periodRow span,.modal label,.catGrid span,.refShareCardLabel,.sectionHead button,.refEquivalentItem span) {font-size:14px!important;line-height:1.35!important;}
:root:root :is(.refCompareItem p,.refCompareItem b,.periodHint,.repeatHint,.flowRowTitle,.flowStateName,.flowPieName,.flowGroupHead,.flowTabs button,.calcRecordInfo small) {font-size:12px!important;line-height:1.4!important;}
:root:root :is(.refCompareItem b,.compareValue) {flex-wrap:wrap!important;white-space:normal!important;}
@media(max-width:899px) {
  :root:root .refBalanceAmount {font-size:clamp(28px,7.7vw,38px)!important;line-height:1.15!important;white-space:normal!important;overflow-wrap:anywhere;}
  :root:root .refShareCards {margin-left:0!important;gap:8px!important;}
  :root:root .refAnalyticsMain {column-gap:12px!important;}
  :root:root .refShareCardLabel {flex-wrap:wrap;gap:4px!important;font-size:12px!important;}
  :root:root .refCapitalRow:not(.capitalProjectionRow) {grid-template-columns:28px minmax(0,1fr) minmax(0,1.1fr) 16px!important;}
  :root:root .refCapitalRow .refRowMeta {justify-content:flex-end!important;text-align:right!important;line-height:1.3!important;flex-wrap:wrap!important;}
  :root:root .refCapitalRow .refRowMeta > span {white-space:normal!important;overflow-wrap:anywhere;}
  :root:root .refAnalyticsModal .analyticsTop .sumRow {gap:8px!important;padding:8px!important;grid-template-columns:minmax(0,1fr) minmax(112px,1.25fr)!important;}
  :root:root .refAnalyticsModal .analyticsTop .sumValues {width:100%!important;min-width:0!important;grid-template-columns:minmax(0,1fr) 6px 36px!important;gap:3px!important;}
  :root:root .refAnalyticsModal .analyticsTop .sumRowBalance .sumValues {grid-template-columns:minmax(0,1fr)!important;min-width:0!important;}
  :root:root .refAnalyticsModal .analyticsTop .sumValue {white-space:normal!important;overflow-wrap:anywhere;text-align:right!important;line-height:1.3!important;}
  :root:root .refAnalyticsModal .analyticsTop .sumPct {width:36px!important;}
}
/* v133 — complete Wallet & Finance visual system, across every application module. */
:root:root {
  --ui-font:Arial,Helvetica,system-ui,sans-serif;
  --display-font:Georgia,'Times New Roman',serif;
  --surface-shadow:0 2px 3px #20232908,0 10px 14px #20232912;
  --ui-radius:10px;
  --nav-surface:#343536;
  --chart-balance:#a87922; --chart-start:#bfc2c6; --chart-end:#595f67;
  --chart-debts:#a66f57; --chart-goals:#8c946c;
}
:root:root[data-theme=golden] {
  --bg:#e3e4e6!important;--phone:#ececed!important;--card:#fff!important;--card2:#fdfdfd!important;
  --text:#303234!important;--muted:#696c70!important;--line:#e1e2e3!important;
  --gold:#996b16!important;--gold2:#efb332!important;
  --accent-top:#ffe295;--accent-bottom:#e4a026;--accent-soft:#fff5d9;--surface-soft:#f6f6f6;
  --analytics-income:#efb332!important;--analytics-expense:#858a90!important;
}
:root:root[data-theme=light] {
  --bg:#e8e9eb!important;--phone:#f0f1f2!important;--card:#fff!important;--card2:#fff!important;
  --gold:#886b30!important;--gold2:#d2ad63!important;
  --accent-top:#f5e1b1;--accent-bottom:#d4b16a;--surface-soft:#f7f8f9;
}
:root:root[data-theme=dark],:root:root[data-theme=platinum] {
  --surface-shadow:0 2px 3px #00000018,0 10px 18px #00000029;
  --nav-surface:#17191d;--chart-balance:#d9b769;--chart-start:#646d79;--chart-end:#c4cedd;
  --chart-debts:#ce957c;--chart-goals:#b8c18f;
}
:root:root body,:root:root button,:root:root input,:root:root select,:root:root textarea {font-family:var(--ui-font)!important;letter-spacing:0;}
:root:root .phone {border-radius:22px!important;}
:root:root .content {gap:16px!important;}
:root:root :is(.glass,.refBalanceCard,.refAnalyticsCard,.premiumEditableTx,.calcRecordItem) {
  border-radius:var(--ui-radius)!important;background:var(--card)!important;
  border:1px solid var(--line)!important;box-shadow:var(--surface-shadow)!important;
}
:root:root :is(.refBalanceCard,.refAnalyticsCard,.forecastCard,.homeCalculatorCard,.rates,.moduleTotal,.calculatorPanel,.calculatorInputs) {padding:20px!important;}
:root:root .analyticsAbove {padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;}
:root:root .refBalanceCard::before,:root:root .phone::before {content:none!important;}
:root:root :is(h1,h2,.moduleHeader h2,.modal h2,.refBalanceTitle,.budgetTitleText,.calcRecordsHeader h1) {
  font-family:var(--display-font)!important;font-weight:400!important;letter-spacing:-.025em!important;color:var(--text)!important;line-height:1.15!important;
}
:root:root :is(.moduleHeader h2,.modal h2,.calcRecordsHeader h1) {font-size:30px!important;}
:root:root .refBalanceTitle,:root:root .budgetTitleText {font-size:24px!important;}
:root:root :is(.sectionHead>b,.sectionHead h3,.settingsBlock h3,.rateEditor h3,.recurringFilterLabel,.homeCalculatorCopy b) {
  font-family:var(--ui-font)!important;font-size:15px!important;line-height:1.35!important;font-weight:600!important;letter-spacing:0!important;color:var(--text)!important;
}
:root:root :is(.metric strong,.moduleTotal strong,.refBalanceAmount,.calcKpi strong,.capitalTotalBox strong,.forecastOut strong) {
  font-family:var(--display-font)!important;font-weight:400!important;letter-spacing:-.035em!important;
  font-variant-numeric:lining-nums tabular-nums!important;text-shadow:none!important;
}
:root:root .refBalanceAmount {font-size:44px!important;line-height:1.15!important;margin:14px 0 18px!important;}
:root:root .metric {padding:18px!important;}
:root:root .metricBody p {font-size:14px!important;font-weight:600!important;color:var(--text)!important;}
:root:root .metricBody strong {font-size:27px!important;line-height:1.2!important;}
:root:root .metricBody>svg {width:23px!important;height:23px!important;stroke-width:1.4!important;}
:root:root :is(.refEquivalentItem b,.refShareCard b,.sumValue,.sumPct,.refCompareItem b,.refRowMeta,.flowStateValue,.flowRowValues) {
  font-family:var(--ui-font)!important;font-weight:500!important;letter-spacing:0!important;font-variant-numeric:tabular-nums!important;
}
:root:root :is(.refDivider,.tx,.entryFoot) {border-color:var(--line)!important;}
:root:root .refDivider {background:var(--line)!important;opacity:1!important;}
:root:root :is(.refCapitalRow,.refShareCard,.refCompareItem,.forecastPick,.forecastOut,.capitalTotalBox,.capitalScope,.entryCard,.cryptoFormula,.cryptoPlan,.cryptoMetrics>div,.calcKpi,.wfBlock,.flowSection,.analyticsSection,.sumRow,.modalCompareGrid>div) {
  border:1px solid var(--line)!important;border-radius:8px!important;background:var(--surface-soft)!important;box-shadow:none!important;color:var(--text)!important;
}
:root:root .refCapitalRow {min-height:48px!important;height:auto!important;padding-block:9px!important;}
:root:root .refCapitalRow b {font-family:var(--ui-font)!important;font-weight:500!important;font-size:14px!important;line-height:1.35!important;}
:root:root .refShareCard {background:var(--card)!important;border:0!important;border-left:2px solid var(--analytics-expense)!important;border-radius:0!important;padding:4px 10px!important;}
:root:root .refShareCard.income {border-left-color:var(--analytics-income)!important;}
:root:root .refShareCard b {font-family:var(--display-font)!important;font-size:28px!important;font-weight:400!important;}
:root:root :is(.refIconBadge,.txIcon,.compareIcon,.homeCalculatorIcon,.flowStateIcon,.calcRecordGlyph) {
  border:1px solid color-mix(in srgb,var(--gold) 16%,transparent)!important;background:var(--accent-soft)!important;
  color:var(--gold)!important;box-shadow:none!important;border-radius:50%!important;
}
:root:root :is(.homeCalculatorIcon svg,.refIconBadge svg,.txIcon svg,.compareIcon svg) {stroke-width:1.5!important;}
:root:root :is(input,select,textarea,.searchBox,.categoryValue,.recurrenceRow,.inputWithUnit,.currencyPill,.refCurrencyPill,.monthSelectButton,.analyticsCurrencyPill,.entryTitleInput) {
  border-color:var(--line)!important;border-radius:7px!important;background-color:var(--field)!important;color:var(--text)!important;box-shadow:inset 0 1px 2px #00000003!important;
}
:root:root :is(input,select,textarea)::placeholder {color:var(--muted)!important;opacity:.8;}
:root:root :is(.primary,.secondary,.goldSmall,.backBtn,.iconBtn,.goldFab,.miniAdd,.moduleBtn,.calcBack,.calcPrimary,.calcSecondary,.calcMenuButton,.serverAuthPrimary,.serverAuthSecondary,.fileImport,.txActions button) {
  border-radius:7px!important;font-weight:600!important;letter-spacing:0!important;
}
:root:root :is(.primary,.calcPrimary,.serverAuthPrimary,.goldSmall,.goldFab,.miniAdd) {
  background:linear-gradient(180deg,var(--accent-top) 0%,var(--gold2) 65%,var(--accent-bottom) 100%)!important;
  border:1px solid color-mix(in srgb,var(--accent-bottom) 60%,transparent)!important;
  box-shadow:inset 0 1px #ffffff60,0 2px 4px #734a1826!important;
}
:root:root :is(.secondary,.backBtn,.moduleBtn,.calcBack,.calcSecondary,.fileImport) {background:var(--card)!important;color:var(--gold)!important;}
:root:root :is(.periodTabs,.flowTabs,.seg,.calculatorTabs,.calcSeg,.recurringFilterChips) {border-radius:8px!important;background:var(--surface-soft)!important;border-color:var(--line)!important;}
:root:root :is(.periodTabs button,.flowTabs button,.seg button,.calculatorTabs button,.calcSeg button,.recurringFilterChips button,.calcSheetTabs button) {border-radius:5px!important;font-weight:500!important;}
:root:root :is(.periodTabs button.active,.flowTabs button.active,.calculatorTabs button.active,.calcSeg button.active,.recurringFilterChips button.active,.calcSheetTabs button.active) {
  background:var(--card)!important;color:var(--gold)!important;border:1px solid var(--line)!important;
  box-shadow:0 2px 4px #0000000c,inset 0 -2px var(--gold2)!important;
}
:root:root :is(.catGrid button,.settingsBlock,.rateEditor,.repeatToggle,.calcEditorTools,.calcSpreadsheetWrap) {border-radius:8px!important;}
:root:root .catGrid button {background:var(--card)!important;font-size:14px!important;}
:root:root .catGrid button.selected {background:var(--accent-soft)!important;border-color:var(--gold2)!important;box-shadow:inset 0 -2px var(--gold2)!important;}
:root:root .nav.appNav {
  background:var(--nav-surface)!important;border:1px solid #ffffff18!important;border-radius:12px!important;
  box-shadow:0 6px 20px #191b2233!important;padding:7px 10px!important;
}
:root:root .nav.appNav button {color:#e0e1e3!important;border-radius:6px!important;font-weight:400!important;}
:root:root .nav.appNav button.active {
  background:linear-gradient(180deg,var(--accent-top),var(--accent-bottom))!important;color:var(--accent-ink)!important;
  box-shadow:inset 0 1px #ffffff40!important;
}
:root:root .nav.appNav button svg {stroke-width:1.5!important;}
:root:root .nav.appNav button.navAdd {border-radius:50%!important;border:1px solid #ffffff50!important;box-shadow:0 3px 8px #00000033,inset 0 1px #ffffff70!important;}
:root:root :is(.modal,.refAnalyticsModal,.monthModal,.premiumMonthModal,.choiceModalUnified,.serverAuthCard) {border-radius:16px!important;background:var(--card)!important;box-shadow:var(--modal-shadow)!important;}
:root:root :is(.modal h2,.modalHeading) {margin-top:10px!important;margin-bottom:24px!important;}
:root:root .close {background:var(--surface-soft)!important;border:1px solid var(--line)!important;border-radius:50%!important;color:var(--muted)!important;display:grid;place-items:center;}
:root:root :is(.choiceMenuUnified,.budgetMenu,.recurrenceMenu) {border-radius:9px!important;padding:6px!important;}
:root:root .monthListPremium {background:transparent!important;box-shadow:none!important;border-radius:0!important;}
:root:root :is(.monthListPremium button,.budgetMenuPick,.txBalanceList button) {border-radius:7px!important;background:var(--field)!important;color:var(--text)!important;}
:root:root :is(.monthListPremium button.selected,.budgetMenuPick.selected,.txBalanceList button.selected) {background:var(--accent-soft)!important;border-color:var(--gold2)!important;color:var(--gold)!important;}
:root:root :is(.premiumTxList,.entryList) {background:transparent!important;border:0!important;box-shadow:none!important;}
:root:root .premiumEditableTx {border-radius:10px!important;padding:18px!important;}
:root:root .txHeadline>b {font-weight:600!important;}
:root:root .txHeadline>strong {font-family:var(--ui-font)!important;font-weight:500!important;}
:root:root :is(.txBudgetBadge,.recurrenceBadge) {border-radius:5px!important;background:var(--surface-soft)!important;border-color:var(--line)!important;}
:root:root .serverAuthShell {background:var(--bg)!important;}
:root:root .serverAuthCard {padding:34px 26px!important;}
:root:root .serverAuthLogo {border-radius:18px!important;}
:root:root .serverAuthCard h1 {font-size:38px!important;}
:root:root .calculationRecordsPhone {border-radius:18px!important;}
:root:root :is(.calcSpreadsheet th,.calcRowNumber,.calcColHeader) {background:var(--surface-soft)!important;color:var(--muted)!important;border-color:var(--line)!important;}
:root:root .calcSpreadsheet td {border-color:var(--line)!important;}
/* Chart geometry and values are untouched; every swatch uses its series color. */
:root:root .designerDonutSvg {filter:drop-shadow(0 3px 3px #00000014)!important;}
:root:root .designerDonutOuterRing {stroke:var(--analytics-outline)!important;}
:root:root .designerDonutInnerDisc {fill:var(--card)!important;}
:root:root .designerDonutTrack {stroke:var(--analytics-track)!important;}
:root:root .designerDonutIncome {stroke:var(--analytics-income)!important;}
:root:root .designerDonutExpense {stroke:var(--analytics-expense)!important;}
:root:root .donutPctSvg {fill:var(--text)!important;}
:root:root .monthlyBar {border-radius:3px 3px 0 0!important;box-shadow:0 3px 3px #00000015,inset 0 1px #ffffff50!important;}
:root:root .monthlyBar.income {background:linear-gradient(180deg,var(--accent-top),var(--analytics-income))!important;}
:root:root .monthlyBar.expense {background:linear-gradient(180deg,color-mix(in srgb,var(--analytics-expense) 70%,white),var(--analytics-expense))!important;}
:root:root .monthlyLegend .income:before {background:var(--analytics-income)!important;}
:root:root .monthlyLegend .expense:before {background:var(--analytics-expense)!important;}
:root:root .flowRowBar {background:var(--track)!important;}
:root:root .flow-in .flowDot,:root:root .flow-in .flowRowBar>span {background:var(--analytics-income)!important;}
:root:root .flow-cut .flowDot,:root:root .flow-cut .flowRowBar>span {background:var(--analytics-expense)!important;}
:root:root .flow-end .flowDot,:root:root .flow-end .flowRowBar>span {background:var(--gold2)!important;}
:root:root .flowWedge {stroke:var(--card)!important;}
:root:root .monthlyChart {border-color:var(--line)!important;background-image:repeating-linear-gradient(to top,transparent 0,transparent 39px,var(--line) 40px,transparent 41px)!important;}
@media(max-width:899px) {
  :root:root .phone {border-radius:0!important;}
  :root:root .content {gap:14px!important;}
  :root:root :is(.refBalanceCard,.refAnalyticsCard,.forecastCard,.homeCalculatorCard,.rates,.moduleTotal,.calculatorInputs) {padding:16px!important;}
  :root:root .refBalanceAmount {font-size:clamp(32px,9vw,42px)!important;}
  :root:root .metric {padding:14px!important;}
  :root:root .metricBody strong {font-size:clamp(21px,5.5vw,27px)!important;}
  :root:root .summaryGrid.compact .metric {min-height:116px!important;}
  :root:root .metricBody {display:grid!important;grid-template-columns:1fr!important;gap:8px!important;}
  :root:root .metricBody>div {min-width:0;}
  :root:root .metricBody strong {margin:6px 0!important;}
  :root:root .refShareCard b {font-size:25px!important;}
  :root:root .refShareCardLabel {font-size:12px!important;}
  :root:root .refCompareItem {padding:9px!important;}
  :root:root .nav.appNav {min-height:66px!important;}
  :root:root .nav.appNav button {font-size:12px!important;}
  :root:root .calculationRecordsPhone {border-radius:0!important;}
}
@media(max-width:359px) {
  :root:root :is(.refBalanceCard,.refAnalyticsCard,.forecastCard,.homeCalculatorCard,.rates) {padding:12px!important;}
  :root:root .refShareCard {padding:4px 6px!important;}
  :root:root .metric {padding:12px!important;}
}
@media(hover:hover) {
  :root:root :is(.secondary,.backBtn,.iconBtn,.catGrid button,.monthListPremium button,.calcSecondary):hover {border-color:var(--gold2)!important;background:var(--accent-soft)!important;}
  :root:root .nav.appNav button:not(.active):not(.navAdd):hover {background:#ffffff12!important;}
}

:root:root .monthlyBar.balance {background:linear-gradient(180deg,color-mix(in srgb,var(--chart-balance) 70%,white),var(--chart-balance))!important;}
:root:root .monthlyLegend .balance:before {background:var(--chart-balance)!important;}

:root:root .monthlyBar.capital {background:linear-gradient(180deg,color-mix(in srgb,var(--chart-balance) 70%,white),var(--chart-balance))!important;}
:root:root .monthlyLegend .capital:before {background:var(--chart-balance)!important;}

:root:root .monthlyBar.start {background:linear-gradient(180deg,color-mix(in srgb,var(--chart-start) 70%,white),var(--chart-start))!important;}
:root:root .monthlyLegend .start:before {background:var(--chart-start)!important;}

:root:root .monthlyBar.end {background:linear-gradient(180deg,color-mix(in srgb,var(--chart-end) 70%,white),var(--chart-end))!important;}
:root:root .monthlyLegend .end:before {background:var(--chart-end)!important;}

:root:root .monthlyBar.debts {background:linear-gradient(180deg,color-mix(in srgb,var(--chart-debts) 70%,white),var(--chart-debts))!important;}
:root:root .monthlyLegend .debts:before {background:var(--chart-debts)!important;}

:root:root .monthlyBar.goals {background:linear-gradient(180deg,color-mix(in srgb,var(--chart-goals) 70%,white),var(--chart-goals))!important;}
:root:root .monthlyLegend .goals:before {background:var(--chart-goals)!important;}

:root:root .flow-cut .flowRowBar>.flowBarFill.limitOver,
:root:root .flow-cut .flowRowBar>.flowBarFill.limitWarn {
  background:linear-gradient(90deg,var(--analytics-expense) 0%,var(--analytics-expense) var(--limit-marker),var(--red) var(--limit-marker),var(--red) 100%)!important;
}
:root:root .flowLimitMark {background:var(--text)!important;}
