.live-status{font-size:11px;color:var(--muted);display:flex;align-items:center;gap:7px}.live-status:before{content:'';width:6px;height:6px;border-radius:50%;background:#69a9d3}.live-status.error:before{background:#c65e67}.live-overlay{position:fixed;inset:0;z-index:100;background:#11203312;cursor:progress}.live-error{position:fixed;bottom:100px;left:50%;transform:translateX(-50%);width:min(550px,92vw);z-index:99;background:var(--card);border:1px solid #c65e67;padding:20px;border-radius:18px;box-shadow:0 10px 50px #0002;line-height:1.6}.live-error button{margin:10px 6px 0 0}.setup{max-width:600px;margin:40px auto;padding:32px;background:var(--card);border:1px solid var(--line);border-radius:24px}.setup h1{font-size:28px;margin:15px 0}.setup p{line-height:1.8}.setup .field{margin-top:20px}.setup .btn{margin-top:24px}.live-ready .notice{flex-wrap:wrap;gap:8px}.live-navlink{color:var(--green);text-decoration:none;font-size:12px}body[data-live] .notice{margin-bottom:22px}
/* Keep intrinsic text widths from enlarging mobile grid tracks. */
.cards,.grid,.twocol{min-width:0}.cards>*,.grid>*,.twocol>*{min-width:0}.grow{min-width:0;overflow-wrap:anywhere}.period select{min-width:0;width:auto;max-width:calc(100% - 80px)}
@media(max-width:400px){.cards{grid-template-columns:minmax(0,1fr)}.cards .amount{font-size:28px}.expense-summary{grid-template-columns:minmax(0,1fr)}.formgrid{grid-template-columns:minmax(0,1fr)}.sectiontop{gap:10px;flex-wrap:wrap}}
@media(max-width:700px){#install-app{display:none}}
.payment-tools{display:flex;justify-content:flex-end;margin-bottom:16px}.payment-tools .btn{white-space:normal}.entry .btn{flex-shrink:0}@media(max-width:400px){.entry{flex-wrap:wrap}.entry .btn{max-width:100%}}
.person-month{margin-top:24px;padding-top:20px;border-top:1px solid var(--line,#e5e9e7)}.person-month>.sectiontop{margin-bottom:8px;gap:16px;flex-wrap:wrap}.person-month>.sectiontop h3{text-transform:capitalize;font-size:18px}.month-subtotal{text-align:right;padding-top:12px}
.person-month>.sectiontop h3{text-transform:none}.person-month>.sectiontop h3::first-letter{text-transform:uppercase}.payment-tools label{display:grid;gap:7px}.home-forecast .amount{display:block;margin:10px 0}
/* No celular, a ação fica abaixo do texto: nomes e valores têm espaço próprio. */
@media(max-width:700px){
 .entry{display:grid;grid-template-columns:36px minmax(0,1fr);gap:12px;align-items:start}
 .entry>.entryicon{grid-column:1;grid-row:1}
 .entry>.grow{grid-column:2;min-width:0;overflow-wrap:break-word;word-break:normal}
 .entry>.grow h3,.entry>.grow .sub{overflow-wrap:break-word;word-break:normal}
 .entry>.btn,.entry>.value,.entry>.tag{grid-column:2;max-width:100%}
 .entry>.btn{width:100%;white-space:normal;margin:0}
 .entry>.value{white-space:nowrap}
 .payment-tools{flex-wrap:wrap;gap:12px}
 .actions{flex-wrap:wrap}.actions>.btn{flex:1 1 140px;max-width:100%}
}
.danger{color:#a83f48}.expense-row .link.danger{margin-left:12px}.entry>.danger{margin-top:4px}
.home-forecast{padding:18px}.home-forecast h2{font-size:17px}.home-forecast .payment-tools{justify-content:flex-start;margin:10px 0}.home-forecast input{padding:9px 12px}.home-forecast .heroNote{padding:12px;margin:10px 0;line-height:1.5}.home-forecast .amount{font-size:24px;margin:5px 0}.home-forecast details{font-size:12px}.expense-row>.pf-partial{grid-column:2 / -1;justify-self:start}.expense-row>button.pf-partial{padding:8px 12px}.entry>.pf-partial{grid-column:2 / -1}
.account-home,.account-warning{margin-top:20px}.account-home>section{margin-top:22px}.account-item{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;border-bottom:1px solid var(--line);padding:16px 0}.account-item:last-child{border-bottom:0}.account-item>div:first-child{min-width:0;flex:1}.account-item h3{overflow-wrap:break-word;margin-bottom:6px}.account-item .sub{line-height:1.6;margin:6px 0}.account-actions{display:flex;gap:7px;flex-wrap:wrap;max-width:330px}.account-actions .btn{padding:9px 12px}.account-filters{margin-top:16px;margin-bottom:16px}.account-search{display:flex;justify-content:flex-end;margin-bottom:12px}.expense-row>.account-edit,.expense-row>.account-history,.entry>.account-edit,.entry>.account-history{grid-column:2 / -1;justify-self:start;padding:8px 12px}.account-warning>p{margin:12px 0;line-height:1.6}
@media(max-width:700px){.account-item{flex-direction:column;gap:10px}.account-actions{width:100%;max-width:none}.account-actions .btn{flex:1 1 auto}.account-home .sectiontop{flex-wrap:wrap}.account-home .sectiontop h2{font-size:18px}.account-item h3{font-size:15px}.account-warning h2{font-size:18px}}
.mobile-shortcuts{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 16px}.month-switch{display:flex;align-items:center;gap:8px;min-width:0}.month-switch select{max-width:220px!important;width:auto!important;min-width:0}.month-switch .btn{font-size:24px;padding:6px 14px;min-height:44px}.mobile-month-summary{display:none}.mobile-options{grid-column:2/-1;justify-self:start}.fast-details{margin:16px 0}.fast-details summary{cursor:pointer;padding:10px 0}.fast-details .field{margin-top:12px}.favorite-check{display:flex;align-items:center;gap:10px;margin-top:16px;line-height:1.6}.favorite-check input{width:20px;height:20px}.draft-note{margin-top:16px}.recent-undo{position:fixed;bottom:100px;left:50%;transform:translateX(-50%);z-index:98;display:flex;align-items:center;gap:16px;width:max-content;max-width:92vw;border:1px solid var(--line);border-radius:16px;padding:12px 16px;background:var(--card);box-shadow:0 8px 30px #0002}.recent-undo .btn{font-weight:700}.calendar-week,.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}.calendar-week{margin-top:20px;text-align:center;font-size:12px}.calendar-day{position:relative;border:1px solid var(--line);border-radius:9px;background:var(--card);color:var(--ink);min-height:48px;padding:5px 0}.calendar-day small{display:block;color:var(--green);height:12px}.calendar-day.selected{background:var(--soft);border:2px solid var(--green)}.calendar-day.today{font-weight:800;text-decoration:underline}#calendar-items{margin-top:22px}#calendar-items>.sub{margin:10px 0}#privacy-values{font-size:12px;padding:9px 12px}.field input,.field select{max-width:100%}
@media(max-width:700px){.mobile-item-action{display:none!important}.mobile-month-summary{display:flex;position:sticky;top:0;z-index:15;gap:8px;align-items:center;justify-content:space-between;background:var(--card);border:1px solid var(--line);padding:12px;border-radius:12px;margin-bottom:12px;box-shadow:0 3px 10px #0001;font-size:11px}.mobile-month-summary>span:first-child{max-width:80px}.mobile-month-summary strong{display:block;font-size:14px;margin-top:3px}.btn,.choice,.link{min-height:44px}input,select{font-size:16px!important}.tools{flex-wrap:wrap;justify-content:flex-end}#privacy-values{order:5}.mobile-options{min-width:95px}.entry>.mobile-options{width:auto}.account-actions .mobile-options{flex:1}.mobile-shortcuts .btn{flex:1 1 110px;padding:10px}.recent-undo{bottom:100px;width:90vw;justify-content:space-between}.month-switch{max-width:100%}.month-switch select{flex:1;max-width:190px!important}.calendar-day{min-height:46px}#modal:has(#calendar-grid){padding:22px 16px}}
#modal>.recent-undo{position:sticky;bottom:0;left:auto;transform:none;width:100%;max-width:none;margin-top:16px}
.mobile-item-action{display:none!important}
.movement-tools{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin-bottom:16px}.movement-tools>.btn{margin:0;white-space:normal}@media(max-width:700px){.movement-tools{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.movement-tools>.btn{min-width:0;width:100%;height:100%;padding:9px 6px;font-size:12px;line-height:1.4}}
#modal>.toast{position:fixed;top:16px;bottom:auto;left:50%;transform:translateX(-50%);max-width:calc(100vw - 32px);width:max-content;z-index:202;margin:0;pointer-events:none}#modal>.live-error{position:fixed;top:16px;bottom:auto;z-index:203;max-height:calc(100dvh - 32px);overflow:auto}#modal>.live-overlay{z-index:200}
.live-overlay{display:grid;place-items:center;color:var(--ink);font-weight:700;background:color-mix(in srgb,var(--card) 88%,transparent)}

.pf-movement-top,.pf-segments,.pf-movement-controls{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:16px}
.pf-segments>.btn{flex:1}
.pf-movement-totals{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:16px}
.pf-movement-total{text-align:left;color:var(--ink);font:inherit;padding:16px;min-width:0}
.pf-movement-total strong{display:block;font-size:clamp(17px,4vw,26px);margin-top:6px;overflow-wrap:anywhere}
.pf-movement-total.active{background:var(--soft);border-color:var(--green)}
.pf-movement-controls .field{min-width:130px;flex:1}
.pf-movement-group{margin-bottom:12px;padding:16px}
.pf-movement-group h2{font-size:17px}
.pf-movement-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 12px}
.pf-movement-item .account-actions{grid-column:1/-1;max-width:none;display:flex;justify-content:flex-end}
.pf-movement-amount{text-align:right;overflow-wrap:anywhere;max-width:145px}
.pf-movement-item h3{font-size:16px}
.pf-movement-item .account-actions .btn{flex:0 1 auto}
#pf-movement-list+.movement-tools{margin-top:16px}
.logo b img{width:100%;height:100%;display:block}

.pf-compact{width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;text-align:left;padding:10px 0;background:none;color:var(--ink);border:0;border-bottom:1px solid var(--line);font:inherit;min-height:48px}
.pf-compact:last-child{border-bottom:0}.pf-compact strong,.pf-compact small{display:block}.pf-compact small{color:var(--muted);margin-top:3px;font-size:12px}.pf-compact>strong{text-align:right;white-space:nowrap}.pf-compact>strong span{display:inline;color:var(--muted)}.pf-compact:focus-visible{outline:2px solid var(--green);outline-offset:2px}
.pf-item-totals{display:grid;grid-template-columns:1fr auto;gap:8px;margin:16px 0}.pf-item-totals dd{margin:0;font-weight:700;text-align:right}
.pf-today{margin:12px 0}.pf-today p{margin:8px 0}.pf-today h2+.btn{margin-top:12px}.pf-scenario-table{width:100%;border-collapse:collapse;font-size:13px}.pf-scenario-table th,.pf-scenario-table td{padding:7px 3px;text-align:right;border-bottom:1px solid var(--line)}.pf-scenario-table th:first-child{text-align:left}
#scenario-results{margin-top:16px}

.pf-home-balance h2{font-size:16px}.pf-home-balance .amount{display:block;margin:8px 0 18px}.pf-home-balance p{margin:5px 0}
.pf-home-shortcuts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.pf-home-shortcuts button{min-height:44px}
.pf-calendar-negative{position:relative;border-color:#c65e67}.pf-calendar-negative::after{content:'';background:#c65e67;width:7px;height:7px;border-radius:50%;position:absolute;top:5px;right:5px}.pf-calendar-legend span{color:#c65e67}
.pf-transaction.account-item{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:6px;padding:4px 0;border-bottom:1px solid var(--line)}
.pf-transaction .pf-compact{border:0;padding:5px 0}.pf-transaction .account-actions{width:auto;max-width:none;align-items:center;justify-content:flex-end;gap:4px}.pf-transaction .account-actions .btn{padding:5px 7px;font-size:12px;min-width:0}
.pf-detail-actions{position:sticky;bottom:0;background:var(--card)}
@media(max-width:440px){.pf-transaction.account-item{grid-template-columns:minmax(0,1fr)}.pf-transaction .account-actions .btn{min-height:40px}.pf-transaction .pf-compact{min-height:42px}}

/* Calendar spacing and rounded surfaces on narrow screens. */
#modal:has(#calendar-grid) {
 width:min(100% - 24px,620px);
 max-height:90dvh;
 border-radius:28px;
 padding:clamp(16px,4vw,30px);
 scrollbar-width:thin;
}
#modal:has(#calendar-grid) h2 {
 font-size:clamp(20px,5vw,25px);
 margin-bottom:16px;
}
#modal:has(#calendar-grid) .formgrid {
 grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);
 gap:10px;
}
#modal:has(#calendar-grid) .field :is(input,select),
#modal:has(#calendar-grid) .btn {border-radius:16px}
#modal:has(#calendar-grid) > .sub {margin:10px 0;line-height:1.55}
#calendar-grid {margin-top:14px}
.calendar-week,.calendar-grid {gap:clamp(3px,1vw,7px)}
.calendar-week {margin:0 0 6px;color:var(--muted)}
.calendar-day {
 border-radius:clamp(10px,3vw,16px);
 min-height:44px;
 font-size:14px;
}
.calendar-day.selected {font-weight:800}
#calendar-items {
 margin-top:18px;
 padding:clamp(12px,3vw,20px);
 border:1px solid var(--line);
 border-radius:22px;
}
#calendar-items>.heroNote {
 border-radius:16px;
 margin:10px 0;
 padding:12px;
 font-weight:700;
}
#calendar-items .account-item {gap:8px;padding:12px 0}
#calendar-items .account-actions .btn {flex:0 1 auto}
#modal:has(#calendar-grid)>.actions {margin-top:14px}
.pf-nav-icon{display:inline-block;width:1em;height:1em;vertical-align:-.12em}
#modal:has(#calendar-grid) .formgrid{grid-template-columns:minmax(0,1fr)}
.pf-calendar-month-nav{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:6px;align-items:center}
#modal .pf-calendar-month-nav .btn{padding:0;min-height:44px;font-size:23px}
#modal .pf-calendar-month-nav select{width:100%;min-width:0;min-height:44px}
.pf-native-date{position:absolute!important;width:1px!important;height:1px!important;opacity:0;pointer-events:none}
.pf-date-controls{display:grid;gap:6px;min-width:0}
.pf-date-controls[hidden],.pf-date-controls [hidden]{display:none!important}
.pf-date-controls select{width:100%;min-width:0;border-radius:16px;min-height:44px}
.pf-date-controls .pf-calendar-month-nav .btn{padding:0;min-height:44px;font-size:23px}
.pf-date-clear{justify-self:start}
.pf-ended-subscriptions{margin-top:16px;padding:12px;border:1px solid var(--line);border-radius:18px}.pf-ended-subscriptions summary{cursor:pointer}

/* Shared visual treatment for the main screens and dialogs. */
body.live-ready .card{border-radius:22px}
body.live-ready .btn{border-radius:14px}
body.live-ready .field :is(input,select,textarea){border-radius:14px}
#modal{border-radius:28px}
#modal h2{letter-spacing:-.025em}
#modal form .field{min-width:0}
#modal form .field label{font-weight:600}
#modal form input[inputmode="decimal"],#modal form input[name="value"]{font-weight:700}
#modal .actions{gap:8px}
#modal .actions .primary{margin-left:auto}
.pf-home-balance .amount{font-size:clamp(30px,8vw,50px);line-height:1.12;letter-spacing:-.045em}
.pf-home-balance p{font-size:.9rem;opacity:.85}
.pf-home-shortcuts>.btn{min-height:48px;width:100%}
.pf-movement-group{padding:clamp(12px,3vw,20px)}
.pf-movement-group>.sectiontop{padding-bottom:8px;margin-bottom:0;border-bottom:1px solid var(--line)}
.pf-transaction.account-item{gap:3px 10px;padding:5px 0}
.pf-transaction .pf-compact{padding:4px 0}
.pf-transaction .account-actions .btn:not(.mobile-options){background:var(--soft);color:var(--green);font-weight:700}
.pf-transaction .account-actions .mobile-options{background:transparent}
#modal:has(#calendar-grid) .pf-calendar-month-nav{padding:4px;border:1px solid var(--line);border-radius:18px;background:var(--bg)}
#modal:has(#calendar-grid) .calendar-day.selected{background:var(--soft);color:var(--green)}
#calendar-items>.heroNote{font-size:clamp(16px,4vw,20px);line-height:1.4}
.pf-people-view .person{width:100%;min-width:0;border-radius:18px}
.pf-people-view .person .grow{min-width:0}
.pf-people-view article.card{padding:clamp(14px,4vw,22px)}
.bottom button:not(.add){padding:5px 4px;border-radius:16px;min-width:0;flex:1}
.bottom button.active{background:var(--soft)}
.bottom button .pf-nav-icon{display:block;width:22px;height:22px}
.bottom .add .pf-nav-icon{margin:auto;width:25px;height:25px}
@media(max-width:440px){
 .pf-transaction .account-actions{padding-bottom:3px}
 .bottom{gap:4px}
 .bottom .add{flex:0 0 52px}
}

.pf-dashboard{display:grid;gap:10px}
.pf-dashboard .pf-home-balance{display:grid;grid-template-columns:1.1fr 1fr;gap:12px;align-items:center;margin:0;padding:16px}
.pf-dashboard .pf-home-balance>div{min-width:0}
.pf-dashboard .pf-home-balance h2{font-size:.82rem;margin:0 0 4px;letter-spacing:0}
.pf-dashboard .pf-home-balance .amount{margin:0;font-size:clamp(20px,5.8vw,42px)}
.pf-dashboard .pf-home-balance strong{overflow-wrap:anywhere}
.pf-dashboard .pf-home-balance small{display:block;margin-top:4px}
.pf-dashboard-alert{color:#ffc3bd}
.pf-dashboard .pf-today{margin:0;padding:12px 16px}
.pf-dashboard .pf-today h2{margin:0 0 6px;font-size:1rem}
.pf-dashboard-today{display:flex;gap:4px 14px;flex-wrap:wrap;font-size:.87rem}
.pf-dashboard .pf-home-shortcuts{gap:6px}
.pf-dashboard .pf-home-shortcuts>.btn{min-height:44px;padding:6px;font-size:.85rem}
.pf-completed{margin-top:10px;padding:12px 16px}
.pf-completed summary{display:flex;justify-content:space-between;align-items:center;gap:8px;cursor:pointer;min-height:32px;font-weight:700}
.pf-completed summary span::before{content:'›';display:inline-block;margin-right:8px}
.pf-completed[open] summary span::before{transform:rotate(90deg)}
.pf-completed summary small{color:var(--muted);margin-left:3px}
.pf-person-month-totals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:8px 0}
.pf-person-month-totals>div,.pf-compare>section{min-width:0;padding:9px;background:var(--bg);border-radius:14px}
.pf-person-month-totals dt,.pf-compare p{font-size:.82rem}
.pf-person-month-totals dd{margin:4px 0 0;font-size:.9rem;font-weight:700;overflow-wrap:anywhere}
.pf-compare{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0}
.pf-compare h3{font-size:.95rem}
.pf-compare p{margin:6px 0}
.pf-compare strong,.pf-compare small{display:block}
.pf-compare strong{overflow-wrap:anywhere}
.pf-dashboard .pf-home-next{
 width:100%;min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:10px;
 text-align:left;margin-top:9px;padding:8px 0 0;border:0;border-top:1px solid var(--line);
 background:none;color:var(--ink);
}
.pf-home-next>span{min-width:0}
.pf-home-next>span strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pf-home-next small{display:block;color:var(--muted);margin-bottom:3px}
.pf-home-next>strong{flex-shrink:0}
.pf-dashboard .pf-home-next.pf-home-due{display:grid;gap:5px}
.pf-home-due-heading,.pf-home-due-row{display:flex;justify-content:space-between;gap:10px;align-items:center}
.pf-home-due-heading{font-size:.75rem;color:var(--muted)}
.pf-home-due-heading strong{color:var(--ink)}
.pf-home-due-row{font-size:.8rem;line-height:1.3}
.pf-home-next .pf-home-due-row strong,.pf-home-next .pf-home-due-heading strong{display:inline;white-space:nowrap;overflow:visible}
.pf-home-due-row>span{min-width:0;overflow-wrap:anywhere}
.pf-dashboard .pf-home-next.pf-home-due{width:100%;grid-template-columns:minmax(0,1fr);gap:0;margin:0;padding:0;border-top:0}
.pf-home-due-heading{padding:2px 0 10px;align-items:center}
.pf-home-due-heading small{font-size:.75rem;margin-bottom:4px}
.pf-home-next .pf-home-due-heading>span>strong{font-size:1.1rem;line-height:1.2}
.pf-home-due-count{font-size:.75rem;padding:6px 9px;background:var(--bg);border-radius:12px;white-space:nowrap}
.pf-home-due-row{display:grid;grid-template-columns:minmax(0,1fr) max-content;gap:12px;min-height:32px;border-top:1px solid var(--line);padding:4px 0;font-size:.84rem}
.pf-home-due-row>strong{font-variant-numeric:tabular-nums;text-align:right}
.pf-home-due-total{display:grid;grid-template-columns:minmax(0,1fr) max-content;gap:12px;align-items:center;margin-top:8px;padding:10px;border-radius:12px;background:var(--soft);color:var(--green);font-size:.85rem}
.pf-home-due-total>strong{font-size:1.05rem;font-variant-numeric:tabular-nums}
.pf-dashboard-today+.pf-home-due{margin-top:10px!important}
@media(max-height:700px) and (max-width:700px){
 .pf-home-due-row{min-height:26px;padding:3px 0;font-size:.8rem}
 .pf-home-due-heading{padding-bottom:6px}
 .pf-home-due-total{padding:7px 9px;margin-top:5px}
 main:has(#app.pf-dashboard){padding-top:8px}
 main:has(#app.pf-dashboard)>.pf-dashboard{gap:5px}
 #app.pf-dashboard .pf-home-balance{padding:8px 13px}
 .pf-dashboard .pf-home-month-flow>div{padding:4px 8px}
 .pf-home-due-total{padding:5px 9px}
}
.pf-home-month-flow{grid-column:1/-1;grid-row:2;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:0}
.pf-home-month-flow>div{min-width:0;padding:8px;border-radius:12px;background:#ffffff12}
.pf-home-month-flow dt{font-size:.76rem;line-height:1.2}
.pf-home-month-flow dd{font-size:clamp(.86rem,4vw,1.1rem);font-weight:700;margin:4px 0 0;overflow-wrap:anywhere}
.pf-dashboard .pf-home-shortcuts{grid-template-columns:repeat(3,minmax(0,1fr))}
.pf-dashboard .pf-home-shortcuts>.btn:nth-child(4){grid-column:1/-1}
@media(max-width:640px){
 main:has(.pf-dashboard) header :is(.eyebrow, p.muted){display:none}
 main:has(.pf-dashboard) header h1{font-size:clamp(21px,6vw,28px);line-height:1.15;margin:0}
 main:has(.pf-dashboard) header{align-items:center;gap:8px;margin-bottom:8px}
 main:has(.pf-dashboard) .notice{margin-bottom:10px}
}
@media(max-width:700px){
 main:has(.pf-dashboard){
  box-sizing:border-box;
  min-height:100dvh;
  display:flex;
  flex-direction:column;
  padding-bottom:calc(84px + env(safe-area-inset-bottom));
 }
 main:has(.pf-dashboard) header{align-items:center;flex-wrap:wrap;gap:6px;margin-bottom:8px}
 main:has(.pf-dashboard) header .tools{gap:4px;min-width:0}
 main:has(.pf-dashboard) header .avatar{display:none}
 main:has(.pf-dashboard) header #privacy-values{font-size:0;width:44px;padding:0}
 main:has(.pf-dashboard) header #privacy-values::before{content:'◉';font-size:18px}
 main:has(.pf-dashboard)>.pf-dashboard{
  display:flex;
  flex:1;
  flex-direction:column;
  gap:clamp(8px,1.5dvh,14px);
 }
 .pf-dashboard .pf-home-balance{
  flex:1 0 auto;grid-template-columns:1fr;align-content:center;gap:8px;
  padding:clamp(12px,2.5dvh,22px);
 }
 .pf-dashboard .pf-home-balance .amount{font-size:clamp(26px,8vw,42px)}
 .pf-dashboard .pf-home-forecast{display:flex;flex-wrap:wrap;gap:4px 8px;justify-content:space-between;align-items:center;border-top:1px solid #ffffff40;padding-top:7px}
 .pf-dashboard .pf-home-forecast h2{margin:0}
 .pf-dashboard .pf-today{padding:12px}
 .pf-dashboard .pf-home-shortcuts{grid-auto-rows:minmax(44px,auto)}
}
@media(max-width:700px) and (max-height:700px){
 main:has(.pf-dashboard){padding-top:12px;padding-bottom:calc(76px + env(safe-area-inset-bottom))}
 main:has(.pf-dashboard) .notice{padding:6px 12px;gap:4px;margin-bottom:8px}
 main:has(.pf-dashboard)>.pf-dashboard{gap:7px}
 .pf-dashboard .pf-home-balance{padding:11px 13px;gap:6px}
 .pf-dashboard .pf-home-next{margin-top:6px;padding-top:5px}
}

#modal:has(#calendar-grid){
 box-sizing:border-box;width:min(480px,calc(100% - 24px));
 padding:clamp(10px,3vw,20px);max-height:calc(100dvh - 24px);
}
.pf-calendar-header,.pf-calendar-toolbar,.pf-calendar-day-heading{
 display:flex;justify-content:space-between;align-items:center;gap:6px;
}
#modal .pf-calendar-header h2{margin:0;font-size:clamp(17px,5vw,24px)}
#modal .pf-calendar-close{min-width:44px;min-height:44px;padding:0;font-size:23px}
#modal:has(#calendar-grid) .pf-calendar-month-nav{margin-top:6px;padding:2px;gap:4px}
.pf-calendar-toolbar{margin-top:6px}
.pf-calendar-toolbar select,.pf-calendar-toolbar .btn{min-height:44px;padding:5px 9px}
.pf-calendar-toolbar select{flex:1;min-width:0}
#modal:has(#calendar-grid) #calendar-grid{margin-top:8px}
#modal:has(#calendar-grid) :is(.calendar-week,.calendar-grid){gap:3px}
#modal:has(#calendar-grid) .calendar-day{
 display:grid;place-content:center;min-height:clamp(29px,6.3dvh,44px);
 padding:0;line-height:1.05;touch-action:manipulation;cursor:pointer;
}
#modal:has(#calendar-grid) .calendar-day[aria-pressed="true"]{outline:2px solid var(--green);outline-offset:-2px}
#modal:has(#calendar-grid) .calendar-day small{height:9px;font-size:9px}
.pf-calendar-markers{display:flex;gap:4px 10px;flex-wrap:wrap;margin-top:6px;font-size:.7rem;color:var(--muted)}
#modal:has(#calendar-grid) #calendar-items{margin-top:7px;padding:7px 9px;border-radius:15px}
.pf-calendar-day-heading h3{margin:0;font-size:.9rem}
#modal .pf-calendar-day-heading .btn{min-height:44px;padding:4px 7px;font-size:.78rem}
.pf-calendar-totals{margin:2px 0;font-size:.76rem}
.pf-review-tabs{margin:12px 0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
.pf-review-tabs .btn{padding:5px;font-size:.8rem;min-width:0}
.pf-month-chart{display:block;width:100%;margin-top:8px;border-radius:14px;background:var(--bg)}
.pf-chart-dates{display:flex;justify-content:space-between;padding:5px 8px;color:var(--muted);font-size:.8rem}
.pf-review-category-section{margin-bottom:16px}
.pf-category{border:1px solid var(--line);border-radius:14px;margin-top:6px;padding:0 10px}
.pf-category summary,.pf-review-values>div{display:flex;justify-content:space-between;align-items:center;gap:10px;min-height:44px}
.pf-category summary{cursor:pointer}
.pf-category summary span::before{content:'›';margin-right:7px}
.pf-category[open] summary span::before{content:'⌄'}
.pf-review-values{margin:4px 0}
.pf-review-values>div{border-top:1px solid var(--line);padding:4px 0}
.pf-review-values dd{margin:0;white-space:nowrap;font-weight:700}
.pf-review-values small{display:block;color:var(--muted)}
#calendar-items>.heroNote{margin:4px 0 0;padding:6px 8px;font-size:.8rem;line-height:1.3}
