#mobileQuickAdd,.mobile-reports-card{display:none!important}
@media(max-width:680px){
 body .side #nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:2px;overflow:visible;align-items:center}
 body .side #nav>[data-view=reports]{display:none!important}
 body .side #nav>button{min-width:0;padding:7px 1px;min-height:60px}
 body .side #nav>button>span{font-size:10px;max-width:100%;letter-spacing:0;white-space:nowrap;overflow:visible;text-overflow:clip}
 body .side #nav #mobileQuickAdd{display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:3px;border:0;background:transparent!important;box-shadow:none;color:inherit;overflow:visible;position:relative}
 body .side #nav #mobileQuickAdd .quick-add-disc{display:grid;place-items:center;width:52px;height:52px;min-width:52px;margin-top:-24px;border-radius:50%;background:#7935e8;color:#fff;font-size:34px;font-weight:400;line-height:1;box-shadow:0 0 0 6px var(--p),0 5px 15px #39207035}
 body .side #nav #mobileQuickAdd .quick-add-caption{font-size:9px;color:inherit}
 body .side #nav #mobileQuickAdd:focus-visible{outline:3px solid #ab7af1;outline-offset:2px}
 body .side #nav #mobileQuickAdd:disabled{opacity:.45;cursor:not-allowed}
 body #more .mobile-reports-card{display:block!important}
 body #transactions .pocket-log-add{display:none}
 body .side{overflow:visible}
}

/* Account access belongs to the sidebar panel; phones retain a compact access button. */
body #more #hostMoreAccountActions{display:none!important}
.mobile-account-access{display:none!important}
@media(max-width:1100px){body #more .mobile-account-access{display:inline-flex!important;align-items:center;min-height:44px;margin:0 0 14px}}

@media(max-width:1100px){body #more .mobile-account-access{width:100%;justify-content:space-between;text-align:left;padding:12px 16px;border-radius:14px}body #more .mobile-account-access::after{content:'›';font-size:22px}}

/* Keep labels above browser/OS insets; never size nav against padded dock height. */
@media(max-width:1100px){
 body .side{height:auto;box-sizing:border-box;bottom:var(--pocket-dock-bottom,0px);padding:8px 8px calc(12px + env(safe-area-inset-bottom,0px))}
 body .side #nav{height:auto;min-height:64px}
 body .side #nav>button{height:64px;box-sizing:border-box}
 body .side #nav>button>span{line-height:1.3}
 body{padding-bottom:calc(100px + env(safe-area-inset-bottom,0px))}
}
@media(max-width:680px){
 .modal,.host-modal{box-sizing:border-box;max-width:100%;width:100%;min-width:0}
 body .modal .dialog,body .host-modal-card{box-sizing:border-box;min-width:0;max-width:100%;overflow-x:hidden}
 body #modal #form .dialog-content{box-sizing:border-box;width:100%;min-width:0;overflow-x:hidden}
 body .modal .form>*{min-width:0;max-width:100%;box-sizing:border-box;overflow-wrap:anywhere}
 body .modal input,body .modal select,body .modal textarea{box-sizing:border-box;min-width:0;max-width:100%}
 body #modal #form .pocket-type-source{display:none!important}
 body #modal .pocket-entry-types button{min-width:0;font-size:14px}
 body #modal .dual-currency-card{padding:12px;min-width:0;box-sizing:border-box}
 body #modal .dual-toggle{display:flex;gap:10px;align-items:flex-start;white-space:normal}
 body #modal .dual-toggle input{flex:0 0 20px;width:20px;min-height:20px}
 body #modal .dual-toggle span{min-width:0}
 body #modal .dual-fields{grid-template-columns:minmax(0,1fr)!important}
 body #modal .dual-fields>*{grid-column:1!important;min-width:0}
 body .modal label>div{min-width:0;flex-wrap:wrap}
 body .modal .btn{max-width:100%;white-space:normal;overflow-wrap:anywhere}
 body #pocketSheet{box-sizing:border-box;width:100%;max-width:100%;max-height:calc(var(--mobile-visible-height,100dvh) - 12px)}
 body .pocket-totals{gap:8px}
 body .pocket-totals>div{min-width:0;text-align:right}
 body .pocket-totals small{text-align:right}
 body .pocket-totals b{white-space:nowrap;overflow-wrap:normal;font-size:clamp(10px,3vw,14px);font-variant-numeric:tabular-nums;letter-spacing:-.3px}
 body .pocket-view-switch{align-items:center}
}
@media(max-width:380px){body #modal #form .form{grid-template-columns:minmax(0,1fr)}}

@media(max-width:680px){
 body #modal .purple-type-choices{display:none!important}
 body #defaultDashboard .clean-balance .clean-card-head{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;align-items:center}
 body #cleanBalanceLabel{display:flex;align-items:center;gap:6px;flex-wrap:nowrap;min-width:0}
 body #cleanBalanceLabel .balance-visibility{margin-left:auto}
 body #defaultDashboard .clean-balance .clean-card-head>label{width:100%;min-width:0}
 body #cleanPeriod{width:100%;box-sizing:border-box;min-height:44px}
 body #defaultDashboard .clean-totals{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;width:100%;margin:22px 0}
 body #defaultDashboard .clean-totals>div{min-width:0;border:0!important;padding:0!important}
 body #defaultDashboard .clean-totals b{font-size:clamp(13px,4vw,19px);white-space:nowrap;font-variant-numeric:tabular-nums;letter-spacing:-.4px}
 body #defaultDashboard .clean-totals>small{grid-column:1/-1;margin:0}
}

/* Accounts are chosen once, from the route panel. Native selects retain validation. */
body #transferModal .pocket-transfer-source{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;overflow:hidden!important;clip-path:inset(50%);white-space:nowrap}
body .pocket-transfer-account{display:grid;gap:5px;width:100%;min-height:48px;padding:10px;border:1px solid transparent;border-radius:12px;text-align:inherit;background:transparent;color:var(--ink);font:inherit;cursor:pointer}
body .pocket-transfer-account:hover{background:color-mix(in srgb,var(--b) 9%,var(--p))}
body .pocket-transfer-account:focus-visible{outline:3px solid var(--b);outline-offset:2px}
body .pocket-transfer-account strong{overflow-wrap:anywhere}
body .pocket-transfer-account small{text-transform:none;font-size:11px;color:var(--b)}
/* One compact header and control layout on every app view. */
body .pocket-small-switch{display:inline-flex!important;align-items:center;gap:8px;min-height:44px!important;width:auto!important;flex:0 0 auto!important;padding:7px 10px!important;font-size:12px!important;border-radius:12px}
body .pocket-small-switch::after{content:'';width:32px;height:18px;flex:0 0 32px;border-radius:20px;background:radial-gradient(circle at 9px 9px,#fff 6px,transparent 6.5px),#92899f}
body .pocket-small-switch[aria-checked=true]::after{background:radial-gradient(circle at 23px 9px,#fff 6px,transparent 6.5px),#7935e8}
body .pocket-small-switch:focus-visible{outline:3px solid var(--b);outline-offset:2px}
#pocketLogspaceDetails{box-sizing:border-box;width:min(560px,calc(100% - 24px));max-height:calc(var(--mobile-visible-height,100dvh) - 24px);padding:18px;border:1px solid var(--line);border-radius:20px;background:var(--p);color:var(--ink);overflow:auto}
#pocketLogspaceDetails::backdrop{background:#160d2866}
#pocketLogspaceDetails>header{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}
#pocketLogspaceDetails h2{font-size:20px;margin:0}
#pocketLogspaceDetails>header .btn{min-width:44px;min-height:44px}
#pocketLogspaceDetails #hostMoreWorkspace{border:0;box-shadow:none;padding:0;cursor:default}
#pocketLogspaceDetails #hostMoreWorkspace>.more-icon,#pocketLogspaceDetails #hostMoreWorkspace>h3{display:none}
#pocketLogspaceDetails .host-workspace-quick-actions{display:grid;grid-template-columns:1fr;gap:10px;margin-top:18px}
#pocketLogspaceDetails .btn{max-width:100%;white-space:normal;overflow-wrap:anywhere}
@media(max-width:680px){
 body .main .top{padding:14px!important;gap:10px!important;margin-bottom:16px!important}
 body .main .top h1{font-size:24px!important;margin:0}
 body .main .top p{font-size:12px!important;margin:5px 0}
 body .main .top .actions{display:flex!important;gap:7px!important;align-items:center;flex-wrap:wrap}
 body #manageCategories .head,body #manageAccounts .head{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
 body #manageCategories .head h2,body #manageAccounts .head h2{font-size:17px;margin:0;flex:1}
 body #manageCategories .head .actions,body #manageAccounts .head .actions{display:flex;flex-wrap:nowrap;gap:6px}
 body #manageCategories .head .btn,body #manageAccounts .head .btn{padding:8px 10px;min-height:44px;font-size:12px}
 body .reorder-item{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:10px!important;padding:14px 0!important;align-items:start!important;border-bottom:1px solid var(--line)}
 body .reorder-item>div:first-child{display:grid!important;grid-template-columns:24px 28px 36px minmax(0,1fr);align-items:center;gap:8px!important;width:100%;min-width:0}
 body .reorder-item .position,body .reorder-item .handle{margin:0;width:100%;box-sizing:border-box;padding:4px;text-align:center}
 body .reorder-item .record-icon{margin:0;width:36px;height:36px;box-sizing:border-box}
 body .reorder-item b{min-width:0;overflow-wrap:anywhere;font-size:14px}
 body .reorder-item .usage-count{grid-column:4;margin:0;font-size:11px}
 body .reorder-item>div:first-child>small:not(.usage-count){grid-column:4;margin:0}
 body .reorder-item .reorder{display:grid!important;grid-template-columns:44px 44px minmax(0,1fr) minmax(0,1fr);gap:6px!important;width:100%;margin:0!important}
 body .reorder-item .reorder .btn{margin:0;padding:7px 5px;font-size:12px;min-height:44px;min-width:0;width:100%}
 body .pocket-logspace-tile{padding:16px}
 body .pocket-logspace-tile .more-icon{width:36px;height:36px;margin-bottom:8px}
}

/* Compact amounts with inline currency choices, using the same saved fields. */
body #pocketSheet .pocket-currency-list{grid-template-columns:minmax(0,1fr)!important;gap:8px}
body #pocketSheet .pocket-currency-list .pocket-choice{padding:10px 12px;min-height:48px;text-align:left}
@media(max-width:680px){
 body #modal #form .pocket-currency-source{display:none!important}
 body #modal .pocket-amount-field{position:relative;min-width:0}
 body #modal #form .pocket-amount-field input{font-size:18px!important;font-weight:600;min-height:48px;padding:12px 84px 12px 12px}
 body #modal #form .pocket-amount-field input::placeholder{font-size:16px;font-weight:400}
 body #modal #form .pocket-amount-currency{position:absolute;right:5px;bottom:5px;display:flex!important;align-items:center;justify-content:center;width:72px;min-height:38px;height:38px;padding:5px;border:0;border-left:1px solid var(--line);border-radius:0 8px 8px 0;background:var(--p);font-size:12px;font-weight:650;color:var(--b)}
 body #modal .pocket-pad-open{display:none!important}
 body #modal .dual-fields{gap:12px}
 body #modal .dual-currency-card{padding:12px}
}

/* Consolidated controls and summaries on phones, tablets and desktop. */
body #pocketDesktopQuickAdd{position:fixed;right:24px;bottom:24px;z-index:39;border-radius:18px;min-height:48px;box-shadow:var(--shadow)}
body #transactions .pocket-log-add{display:none!important}
body .pocket-timeline-head{display:block!important;padding:18px 20px;margin-bottom:16px;border:1px solid var(--line);border-radius:18px;background:var(--p)}
body .pocket-totals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;padding-top:12px}
body .pocket-totals>div{min-width:0;text-align:right}
body .pocket-totals small,body .pocket-totals b{display:block;font-variant-numeric:tabular-nums}
body .pocket-totals small{font-size:12px;color:var(--muted);margin-bottom:6px}
body .pocket-totals b{font-size:clamp(12px,2vw,22px);white-space:nowrap}
body .pocket-goal-summary{display:grid;gap:5px;margin-top:14px;padding:12px;width:100%;min-width:0;text-align:left;color:inherit;border:1px solid #ffffff35;border-radius:12px;background:#ffffff0c;cursor:pointer;font:inherit}
body .pocket-goal-summary small{margin:0;font-size:10px;color:inherit;opacity:.8}
body .pocket-goal-summary strong{font-size:13px;overflow-wrap:anywhere}
body .pocket-goal-summary span{font-size:11px;color:inherit}
body .pocket-goal-summary progress{width:100%;height:6px;accent-color:#d2b4ff}
body .pocket-goal-summary:focus-visible{outline:3px solid currentColor;outline-offset:2px}
@media(max-width:1100px){body #pocketDesktopQuickAdd{bottom:calc(100px + env(safe-area-inset-bottom))}}
@media(max-width:680px){body #pocketDesktopQuickAdd{display:none!important}body .pocket-totals{gap:8px}body .pocket-totals b{font-size:clamp(10px,3vw,14px)}}
/* A common quiet transition instead of independent bouncing cards. */
@keyframes pocket-flow{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}
body[data-motion=full] .view.on,body[data-motion=full] .settings-pane.on,body[data-motion=full] .modal.on>.dialog,body[data-motion=full] .host-modal-card,body[data-motion=full] dialog[open]{animation:pocket-flow 200ms cubic-bezier(.22,.61,.36,1) both!important}
body[data-motion=full] .view.on .motion-reveal,body[data-motion=full] .view.on .card{animation:none!important;transform:none;opacity:1}
body[data-motion=reduced] .view.on,body[data-motion=reduced] .settings-pane.on,body[data-motion=reduced] dialog[open]{animation:fade-in 100ms ease both!important}
body[data-motion=off] .view.on,body[data-motion=off] .settings-pane.on,body[data-motion=off] dialog[open]{animation:none!important}
@media(prefers-reduced-motion:reduce){body .view.on,body .settings-pane.on,body dialog[open],body .modal.on>.dialog,body .host-modal-card{animation:none!important}}
#bankSuggestions{display:grid;gap:10px;padding:12px;margin-top:12px;border:1px solid var(--line);border-radius:14px;background:var(--bg);font-size:12px}
#bankSuggestions[hidden]{display:none}
#bankSuggestions>small{color:var(--muted);line-height:1.5}
.bank-match{display:grid;grid-template-columns:32px minmax(0,1fr) auto;align-items:center;gap:10px}
.bank-match:not(:has(img)){grid-template-columns:minmax(0,1fr) auto}
.bank-match img{width:32px;height:32px;object-fit:contain;background:#fff;border-radius:7px}
.bank-match .btn{min-height:44px;font-size:11px;padding:6px 9px}
@media(max-width:380px){.bank-match{grid-template-columns:32px minmax(0,1fr)}.bank-match .btn{grid-column:1/-1}}

body[data-motion=full] .financial-pane.on,body[data-motion=full] .activity-pane.on{animation:pocket-flow 200ms cubic-bezier(.22,.61,.36,1) both!important}
body[data-motion=reduced] .financial-pane.on,body[data-motion=reduced] .activity-pane.on{animation:fade-in 100ms ease both!important}
body[data-motion=off] .financial-pane.on,body[data-motion=off] .activity-pane.on{animation:none!important}
@media(prefers-reduced-motion:reduce){body[data-motion] .view.on,body[data-motion] .settings-pane.on,body[data-motion] dialog[open],body[data-motion] .modal.on>.dialog,body[data-motion] .host-modal-card,body[data-motion] .financial-pane.on,body[data-motion] .activity-pane.on{animation:none!important}}

body #defaultDashboard .clean-totals{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:16px}body #defaultDashboard .clean-totals>div{min-width:0;padding-right:0;border-right:0}body #defaultDashboard .clean-totals>small{grid-column:1/-1;margin-left:0}

.pocket-display-options{margin-top:16px;border:1px solid var(--line);border-radius:12px;padding:12px}.pocket-display-options>summary{cursor:pointer;font-weight:600;min-height:24px}.pocket-display-options>.setting{margin-top:12px}
/* Override the dashboard's more-specific legacy action styles. */
body .main .top>.actions>button.add,body .main .top>.actions>button.transferAdd,body.clean-dashboard-on .main .top>.actions>button.add,body.clean-dashboard-on .main .top>.actions>button.transferAdd{display:none!important}
body .modal .dialog-content>h2,body .modal .dialog-content>.head{position:static!important;margin:0 0 14px;padding:0 44px 10px 0;font-size:20px;background:transparent;border-bottom:1px solid var(--line)}
body #modal .dialog-content>.pocket-entry-types{position:static!important;padding:0 0 12px;flex-shrink:0}
body .modal .dialog-content{scroll-padding-top:16px}
body .pocket-item-meta{grid-column:4;display:flex!important;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}
body .reorder-item .pocket-item-meta>small{margin:0!important;display:inline!important;font-size:11px;line-height:1.3;padding:0!important}
body .reorder-item .pocket-item-meta>small:empty{display:none!important}
body.hide-usage-counts .reorder-item .pocket-item-meta>.usage-count{display:none!important}
@media(max-width:680px){
 body #modal #form>.actions,body .modal .dialog>.actions,body .modal .dialog>.confirm-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;padding:10px 14px calc(10px + env(safe-area-inset-bottom))!important}
 body #modal #form>.actions>.btn,body .modal .dialog>.actions>.btn,body .modal .dialog>.confirm-actions>.btn{min-height:44px!important;width:100%;margin:0!important;padding:9px 8px!important;font-size:14px!important}
 body .reorder-item{gap:7px!important;padding:10px 0!important}
 body .reorder-item>div:first-child{grid-template-columns:22px 26px 32px minmax(0,1fr);gap:5px!important;padding:0!important}
 body .reorder-item .record-icon{width:32px;height:32px}
 body .reorder-item .reorder{gap:5px!important}
}
/* Gentle feedback uses compositor-only transforms and respects motion settings. */
@keyframes pocket-settle{from{opacity:.5;transform:translateY(4px)}to{opacity:1;transform:none}}
body[data-motion=full] .reorder-item,body[data-motion=full] .bank-match{animation:pocket-settle 180ms ease-out both}
body[data-motion=full] .btn,body[data-motion=full] .pocket-choice,body[data-motion=full] .pocket-small-switch::after{transition:transform 140ms ease,background-color 180ms ease,border-color 180ms ease,box-shadow 180ms ease}
body[data-motion=full] .btn:active:not(:disabled),body[data-motion=full] .pocket-choice:active{transform:scale(.98)}
body[data-motion=full] .pocket-goal-summary progress{transition:opacity 180ms ease}
@media(prefers-reduced-motion:reduce){body[data-motion] .reorder-item,body[data-motion] .bank-match{animation:none!important}body[data-motion] .btn,body[data-motion] .pocket-choice{transition:none!important;transform:none!important}}
#bankIconSearch{box-sizing:border-box;width:min(520px,calc(100% - 24px));max-height:calc(var(--mobile-visible-height,100dvh) - 24px);padding:16px;border:1px solid var(--line);border-radius:18px;background:var(--p);color:var(--ink);overflow:auto}
#bankIconSearch::backdrop{background:#160d2866}
#bankIconSearch header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
#bankIconSearch h2{font-size:19px;margin:0}
#bankIconSearch label{display:grid;gap:6px;font-size:12px}
#bankIconSearch input{width:100%;box-sizing:border-box;min-height:44px;padding:10px;border:1px solid var(--line);border-radius:10px;background:var(--bg);color:var(--ink);font-size:16px}
.bank-icon-results{display:grid;grid-template-columns:1fr;gap:8px;margin-top:12px}
.bank-icon-option{display:flex;align-items:center;gap:12px;text-align:left;padding:10px;min-height:52px;border:1px solid var(--line);border-radius:12px;background:var(--bg);color:var(--ink);font:inherit;cursor:pointer}
.bank-icon-option img{width:36px;height:36px;object-fit:contain;border-radius:8px;background:white}
.bank-icon-option strong,.bank-icon-option small{display:block}.bank-icon-option strong{font-size:13px}.bank-icon-option small{font-size:11px;color:var(--muted);margin-top:3px}
.bank-icon-option:focus-visible{outline:3px solid var(--b);outline-offset:2px}.bank-icon-option:disabled{opacity:.6;cursor:default}
#searchBankIcons{min-height:44px;font-size:13px}
#searchBankIcons[hidden]{display:none!important}
@media(max-width:680px){body #modal #form .dialog-content>#modalTitle{padding:0 44px 10px 0!important;margin:0 0 12px!important;font-size:20px!important}}
/* Hidden parent prevents any dashboard/theme button rule from exposing sources. */
body .main .top .pocket-action-sources{display:none!important;visibility:hidden!important}
#reportsBack{display:inline-flex;align-items:center;min-height:44px;margin-bottom:14px}
/* Use the same columns at every width for management rows. */
body #accountList .reorder-item,body #categoryList .reorder-item{display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:center!important;gap:12px!important;padding:12px 0!important;border-bottom:1px solid var(--line)}
body #accountList .reorder-item>div:first-child,body #categoryList .reorder-item>div:first-child{display:grid!important;grid-template-columns:24px 28px 36px minmax(0,1fr);grid-template-rows:auto auto;align-items:center;gap:4px 8px!important;min-width:0;width:100%;padding:0!important}
body .reorder-item .position,body .reorder-item .handle,body .reorder-item .record-icon{grid-row:1/3;align-self:center;margin:0!important}
body .reorder-item .position{grid-column:1;text-align:center}
body .reorder-item .handle{grid-column:2;text-align:center}
body .reorder-item .record-icon{grid-column:3;display:flex;align-items:center;justify-content:center;width:36px;height:36px}
body .reorder-item>div:first-child>b{grid-column:4;grid-row:1;margin:0;min-width:0;overflow-wrap:anywhere;line-height:1.4}
body .reorder-item .pocket-item-meta{grid-column:4;grid-row:2;justify-content:flex-start;align-items:center;gap:8px;min-height:14px;margin:0!important;line-height:1.3}
body .reorder-item .pocket-item-meta>small{margin:0!important;text-align:left;font-size:11px}
body #accountList .reorder-item .reorder,body #categoryList .reorder-item .reorder{display:grid!important;grid-template-columns:44px 44px 72px 88px;align-items:center;gap:6px!important;margin:0!important;width:auto}
body .reorder-item .reorder>.btn{width:100%;margin:0;padding:8px 6px;font-size:12px;min-height:44px;white-space:normal}
body .archive-row{display:grid;grid-template-columns:minmax(0,1fr) 88px;align-items:center;gap:12px;padding:12px 0}
body .archive-name-with-icon{display:flex;align-items:center;gap:8px;min-width:0;line-height:1.4}
body .archive-name-with-icon .record-icon{width:36px;height:36px;flex:0 0 36px;margin:0}
body .archive-name-with-icon b{overflow-wrap:anywhere}
body .archive-row>span>small{display:block;margin:3px 0 0 44px!important;font-size:11px}
body .archive-row>.btn{min-height:44px;width:100%;padding:8px 6px;font-size:12px}
body .account-card-title{display:flex;align-items:center;gap:8px;min-height:36px}
@media(max-width:900px){
 body #accountList .reorder-item,body #categoryList .reorder-item{grid-template-columns:minmax(0,1fr);gap:8px!important}
 body #accountList .reorder-item .reorder,body #categoryList .reorder-item .reorder{grid-template-columns:44px 44px minmax(0,1fr) minmax(0,1fr);width:100%;gap:6px!important}
}
@media(max-width:380px){body #accountList .reorder-item>div:first-child,body #categoryList .reorder-item>div:first-child{grid-template-columns:22px 26px 32px minmax(0,1fr);gap:4px 6px!important}}

/* Shared compact header; long identities wrap before either switch shrinks. */
body .main>.top>div:first-child{min-width:0;flex:1}
body .main>.top .pocket-header-controls{display:flex!important;align-items:center;flex-wrap:wrap;gap:8px;width:100%;margin-top:12px}
body .main>.top .pocket-header-controls>#hostActiveWorkspace{display:inline-flex!important;align-items:center;gap:6px;min-height:44px;box-sizing:border-box;max-width:100%;margin:0!important;padding:7px 10px!important;border-radius:12px;font-size:12px;flex:0 1 auto;min-width:0}
body .main>.top .pocket-header-controls>#hostActiveWorkspace strong{min-width:0;overflow-wrap:anywhere;font-size:13px}
body .main>.top .pocket-header-controls>#hostActiveWorkspace>span{font-size:10px}
body .main>.top .pocket-header-controls>#hostActiveWorkspace>small{flex-shrink:0;font-size:11px}
body .main>.top .pocket-header-controls>.pocket-small-switch{display:inline-flex!important;margin:0!important;min-height:44px!important;box-sizing:border-box;white-space:nowrap}
@media(max-width:680px){body .main>.top{display:block!important}body .main>.top .pocket-header-controls{gap:6px}body .main>.top .pocket-header-controls>#hostActiveWorkspace{gap:5px;padding-inline:8px!important}body .main>.top .pocket-header-controls>.pocket-small-switch{padding-inline:8px!important}}

/* Currency remains visible beside amounts on desktop as well as mobile. */
body #modal .pocket-amount-field{position:relative;min-width:0}
body #modal #form .pocket-amount-field input{padding-right:94px!important;box-sizing:border-box;width:100%}
body #modal #form .pocket-amount-currency{position:absolute;right:5px;bottom:5px;display:flex!important;align-items:center;justify-content:center;width:80px;min-height:38px;height:38px;padding:5px;border:0;border-left:1px solid var(--line);border-radius:0 8px 8px 0;background:var(--p);font-size:12px;font-weight:650;color:var(--b)}
body #modal .pocket-pad-open{display:none!important}
body #modal #form .pocket-currency-source{display:none!important}
.pocket-shortcuts{margin:12px 0;padding:10px 12px;border:1px solid var(--line);border-radius:12px;color:var(--ink)}
.pocket-shortcuts summary{cursor:pointer;font-weight:650;min-height:24px}
.pocket-shortcuts small{display:block;color:var(--muted);font-size:11px;margin-top:8px}
.pocket-shortcut-list>div{display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:6px;margin:8px 0}
.pocket-shortcut-list .btn{min-height:44px;white-space:normal;overflow-wrap:anywhere}
.pocket-save-status{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 12px;margin-bottom:12px;border-radius:10px;background:var(--p);color:var(--ink);font-size:12px}
.pocket-save-status[hidden],.pocket-save-status button[hidden]{display:none!important}
#pocketUndo{position:fixed;bottom:calc(100px + var(--mobile-dock-bottom,0px));left:50%;transform:translateX(-50%);z-index:12000;display:flex;align-items:center;gap:16px;max-width:calc(100% - 24px);padding:10px 14px;border:1px solid var(--line);border-radius:14px;background:var(--p);color:var(--ink);box-shadow:0 6px 24px #170c2930}
#pocketUndo .btn{min-height:44px}

/* Account first, category beneath: retain original cells for filters and exports. */
body #transactions .panel .tablewrap>table :is(th,td):nth-child(6){display:none!important}
body #transactions .panel .tablewrap>table th:nth-child(3){width:23%}
body #transactions .panel .tablewrap>table th:nth-child(5){width:18%}
body #transactions .pocket-account-category{display:block;margin:3px 0 0 26px;font-size:11px;font-weight:400;line-height:1.4;color:var(--muted)}
body #transactions .pocket-account-category .record-icon{width:14px!important;height:14px!important;font-size:11px!important;padding:0!important;background:transparent!important;border-radius:0}
body #transactions tr[data-log-type=income] .amt,body #transactions tr[data-log-type=expense] .amt,body #transactions tr[data-log-type=income] .pill,body #transactions tr[data-log-type=expense] .pill{color:#b4233c!important}
body.dark #transactions tr[data-log-type=income] .amt,body.dark #transactions tr[data-log-type=expense] .amt,body.dark #transactions tr[data-log-type=income] .pill,body.dark #transactions tr[data-log-type=expense] .pill{color:#ff8797!important}
.pocket-mobile-type{display:none}
body .main>.top .pocket-header-controls>.pocket-small-switch{position:relative;display:flex!important;flex-direction:column;justify-content:center;gap:3px;min-width:62px!important;min-height:58px!important;padding:7px 10px!important;font-size:11px!important;line-height:1.2;border:1px solid var(--line);background:color-mix(in srgb,var(--b) 5%,var(--p));color:var(--ink)}
body .pocket-header-controls>#theme::before{content:'☀';font-size:24px;line-height:22px}
body .pocket-header-controls>#theme[aria-checked=true]::before{content:'☾'}
body .pocket-header-controls>.pocket-small-switch::after{position:absolute;top:5px;right:5px;width:5px;height:5px;flex:none;background:#92899f}
body .pocket-header-controls>.pocket-small-switch[aria-checked=true]::after{background:var(--b)}
body .main>.top .pocket-header-controls>#hostActiveWorkspace{min-height:58px}
@media(max-width:680px){
 body #transactions .panel .tablewrap>table tbody tr.pocket-transaction{grid-template-columns:minmax(0,1fr) minmax(100px,38%) 30px;gap:8px;padding:14px 0}
 body #transactions .panel .tablewrap>table tbody tr.pocket-transaction td:nth-child(2){grid-column:1/-1;grid-row:1;justify-self:start;padding:3px 8px;font-size:11px}
 body #transactions .panel .tablewrap>table tbody tr.pocket-transaction td:nth-child(3){grid-column:1;grid-row:2;font-size:14px}
 body #transactions .panel .tablewrap>table tbody tr.pocket-transaction td:nth-child(8){grid-column:2;grid-row:2;font-size:13px}
 body #transactions .panel .tablewrap>table tbody tr.pocket-transaction td:nth-child(9){grid-column:3;grid-row:2}
 body #transactions .pocket-account-copy{margin-top:6px;color:var(--ink);font-weight:600;font-size:12px}
 body #transactions .pocket-party{display:block;color:var(--muted);font-size:11px;font-weight:400}
 body #transactions .pocket-account-category{font-size:10px;margin-top:3px}
 body #transactions .pocket-mobile-type{display:block;margin-top:6px}
 body #transactions .pocket-mobile-type .pill{font-size:10px;font-weight:400}
}

body #transactions .pocket-account-category .transaction-record-label{font-size:inherit;font-weight:400;color:var(--muted)}
body #transactions .pocket-account-category .record-icon img{width:14px!important;height:14px!important}

/* Restore compact switches and income semantics. */
body .main>.top .pocket-header-controls>.pocket-small-switch{flex-direction:row;gap:8px;min-width:0!important;min-height:44px!important;font-size:12px!important;padding:7px 10px!important;background:var(--p)}
body .pocket-header-controls>.pocket-small-switch::after{position:static;width:32px;height:18px;flex:0 0 32px;background:radial-gradient(circle at 9px 9px,#fff 6px,transparent 6.5px),#92899f}
body .pocket-header-controls>.pocket-small-switch[aria-checked=true]::after{background:radial-gradient(circle at 23px 9px,#fff 6px,transparent 6.5px),#7935e8}
body .main>.top .pocket-header-controls>#hostActiveWorkspace{min-height:44px}
body #transactions tr[data-log-type=income] .amt,body #transactions tr[data-log-type=income] .pill{color:#087b55!important}
body.dark #transactions tr[data-log-type=income] .amt,body.dark #transactions tr[data-log-type=income] .pill{color:#65dba8!important}
@media(max-width:680px){
 body #transactions .panel .tablewrap>table tbody tr.pocket-transaction td:first-child:has(.tx-select),body #transactions.mobile-selecting .panel .tablewrap>table tbody tr.pocket-transaction td:first-child:has(.tx-select){display:none!important}
 body #transactions.mobile-selecting .panel .tablewrap>table tbody tr.pocket-transaction td:nth-child(2){margin-top:0!important;padding-left:8px!important;min-height:0}
 body #transactions .panel .tablewrap>table tbody tr.pocket-transaction.selected-row{background:color-mix(in srgb,var(--b) 10%,var(--p))!important;box-shadow:inset 3px 0 var(--b)!important;border-radius:10px;padding-left:8px;padding-right:8px}
}

@media(max-width:680px){
 body #subscriptionModal .pocket-native-select{position:absolute!important;width:1px!important;height:1px!important;clip-path:inset(50%);overflow:hidden;padding:0;border:0}
 body #subscriptionModal .pocket-picker{display:block;text-align:left;width:100%;min-height:48px;padding:12px;border:1px solid var(--line);border-radius:13px;background:var(--p);color:var(--ink);font:inherit;overflow-wrap:anywhere}
}

/* Less repeated chrome: grouped mobile dates and one action menu. */
body #transactions .transaction-actions>.transaction-edit{display:none!important}
body #transactions .panel .tablewrap>table thead th{background:color-mix(in srgb,var(--b) 6%,var(--p))}
@media(hover:hover) and (min-width:681px){body #transactions .panel .tablewrap>table tbody tr.pocket-transaction:hover{background:color-mix(in srgb,var(--b) 4%,var(--p))}}
body #defaultDashboard .clean-totals>div:nth-child(2)>b{color:#b4233c!important}
body #defaultDashboard .clean-balance .clean-totals>div:nth-child(2)>b{color:#ffccd5!important}
body #defaultDashboard .clean-row-amount:not(.positive)>b{color:#b4233c!important}
body.dark #defaultDashboard .clean-row-amount:not(.positive)>b{color:#ff8797!important}
@media(max-width:680px){
 body #transactions .panel .tablewrap>table tbody tr.pocket-transaction{border-bottom:0!important;padding-top:14px;padding-bottom:14px}
 body #transactions .panel .tablewrap>table tbody tr.pocket-transaction::before{display:none!important}
 body #transactions .panel .tablewrap>table tbody tr.pocket-transaction td:nth-child(n){border:0!important}
 body #transactions .panel .tablewrap>table tbody tr.pocket-transaction[data-same-day=true] td:nth-child(2){display:none!important}
 body #transactions .panel .tablewrap>table tbody tr.pocket-transaction[data-same-day=true] td:nth-child(3),body #transactions .panel .tablewrap>table tbody tr.pocket-transaction[data-same-day=true] td:nth-child(8),body #transactions .panel .tablewrap>table tbody tr.pocket-transaction[data-same-day=true] td:nth-child(9){grid-row:1}
 body #transactions .pocket-mobile-type{display:none!important}
 body #transactions .panel .tablewrap>table tbody tr.pocket-transaction td:nth-child(2){background:transparent;color:var(--muted);padding:6px 0;font-size:12px;justify-self:start;text-align:left}
}
@media(max-width:680px){body #openSearchFilters{font-size:0!important;min-width:44px;width:48px;padding:10px!important;justify-content:center}body #openSearchFilters::before{content:'☷';font-size:22px;margin:0}body #openSearchFilters #searchFilterCount{font-size:11px}}
body #overview #expenses,body #overview #expenseTotalTop{color:#b4233c!important}body.dark #overview #expenses,body.dark #overview #expenseTotalTop{color:#ff8797!important}
body #accountList .reorder:has(.pocket-delete-account){grid-template-columns:44px 44px 72px 88px 72px}
@media(max-width:900px){body #accountList .reorder:has(.pocket-delete-account){grid-template-columns:44px 44px minmax(0,1fr) minmax(0,1fr)}body #accountList .pocket-delete-account{grid-column:3/5}}
@media(max-width:680px){body #transactions .panel .tablewrap>table tbody tr.pocket-transaction::before,body #transactions .panel .tablewrap>table tbody tr.pocket-transaction::after{display:none!important;content:none!important}body #transactions .panel .tablewrap>table tbody tr.pocket-transaction td:nth-child(2){border-left:0!important;background-image:none!important}}
#recordDeleteDialog{box-sizing:border-box;width:min(480px,calc(100% - 24px));max-height:calc(100dvh - 24px);overflow:auto;border:1px solid var(--line);border-radius:22px;padding:24px;background:var(--p);color:var(--ink)}
#recordDeleteDialog::backdrop{background:#160d2877}#recordDeleteDialog h2{font-size:22px;padding-right:32px}#recordDeleteDialog p{line-height:1.6}#recordDeleteDialog .delete-close{float:right}#recordDeleteName{display:block;padding:12px;background:color-mix(in srgb,var(--b) 7%,var(--p));border-radius:12px}.delete-advice{padding:12px;background:color-mix(in srgb,var(--b) 8%,var(--p));border-radius:12px}#recordDeleteImpact{color:var(--muted);display:block;line-height:1.5}.delete-actions{display:grid;gap:8px;margin-top:18px}.delete-actions .btn{min-height:44px}
body :is(#accountList,#categoryList) .reorder:has(.record-delete-button){grid-template-columns:44px 44px 72px 88px 72px}
@media(max-width:900px){body :is(#accountList,#categoryList) .reorder:has(.record-delete-button){grid-template-columns:44px 44px minmax(0,1fr) minmax(0,1fr)}body .record-delete-button{grid-column:3/5}}
.bank-icon-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}body #bankSuggestions{padding:12px!important;margin:10px 0!important}body #bankSuggestions>small{font-size:11px!important}body #bankSuggestions .bank-match{gap:8px;padding:6px 0}.bank-match .btn{min-height:44px}body #searchBankIcons{font-size:12px;min-height:44px}
