/* The app shell owns the status inset once, including full-page features. */
#app{padding-top:env(safe-area-inset-top);background-image:linear-gradient(var(--surface),var(--surface))!important;background-position:top!important;background-size:100% env(safe-area-inset-top,0px)!important;background-repeat:no-repeat!important}
#app>.cash-header{padding-top:12px}
#app>.page-header{padding-top:16px}
#app>.report-header,#app.wallet-page>.wallet-header{padding-top:8px}
/* Feature shortcuts use the full app canvas and retain the primary navigation. */
#app.feature-page-active>main.feature-page-host{padding:0;display:flex;overflow:hidden;min-height:0;flex:1}
.feature-screen{display:flex;flex-direction:column;flex:1;min-width:0;min-height:0;width:100%;margin:0;border:0;border-radius:0;background:var(--canvas);color:var(--ink);overflow:hidden}
.feature-screen>.dialog-head{display:flex;align-items:center;flex-wrap:nowrap;flex:none;gap:4px;padding:10px 12px;background:#fff;color:var(--ink);border-bottom:2px solid var(--line);min-height:56px}
.feature-screen>.dialog-head h2{flex:1;min-width:0;margin:0;text-align:left;font-size:20px;font-weight:900;line-height:1.2;white-space:normal;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow-wrap:anywhere}
.feature-screen>.dialog-head :is(.dialog-icon,.budget-head-action){display:flex;align-items:center;justify-content:center;width:36px;min-width:36px;min-height:36px;flex:0 0 36px;padding:6px;font-size:18px;color:var(--accent)}
.feature-screen>.dialog-head .system-icon{width:18px;height:18px}
/* Keep the selected period between the title and actions, without a second row. */
.feature-screen>.feature-head-with-date h2{flex:1 1 0;font-size:18px;order:0}
.feature-screen>.feature-head-with-date>.feature-date-controls{flex:0 1 190px;width:44vw;min-width:148px;max-width:190px;order:1;color:var(--accent)}
.feature-screen>.feature-head-with-date>:not(h2):not(.feature-date-controls){order:2}
.feature-date-controls>.bp-month{width:100%;margin:0;gap:0}
.feature-date-controls>.bp-month button{display:flex;align-items:center;justify-content:center;min-height:36px;min-width:32px;padding:4px 2px;border-radius:8px;font-size:13px;font-weight:800;white-space:nowrap;line-height:1.2}
.feature-date-controls>.bp-month [data-bp-month]{min-width:0;gap:2px}
.feature-date-controls>.bp-month .system-icon{width:16px;height:16px;flex-shrink:0}
.feature-date-controls>[data-refund-period]{width:100%;min-height:36px;padding:3px 5px;line-height:1.35;font-size:12px;font-weight:800;overflow-wrap:normal;border-radius:8px}
.feature-date-controls>[data-refund-period] .system-icon{width:12px;height:12px;vertical-align:middle}
.feature-date-controls button:active{background:var(--soft)}
.feature-screen>.dialog-body{flex:1;min-width:0;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:12px 14px}
.feature-screen>:is(footer,.recurring-footer,.loan-bottom){flex:none}
.feature-screen>.ux-footer,.feature-shortcut-footer{flex:none;padding:10px 12px;background:#fff;border-top:1px solid var(--line)}
.feature-screen>.ux-footer>button{width:100%}
.feature-screen :is(.budget-footer,.recurring-footer)>button:first-child{background:var(--brand);color:#234b08;border-bottom:4px solid var(--brand-dark);border-radius:16px;font-weight:900}
.bottom.has-feature{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:3px;padding-inline:5px}
.bottom.has-feature button{padding-inline:2px;min-width:0}
.bottom.has-feature [data-nav-label]{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;line-height:1.15;max-width:100%;font-size:11px;min-height:25px;text-align:center}
.bottom.has-feature .navicon{flex-shrink:0}
.feature-shortcut-options{border:0;padding:0;margin:0 0 12px;min-width:0}
.feature-shortcut-options legend{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.feature-shortcut-settings .feature-shortcut-option{display:grid;grid-template-columns:32px minmax(0,1fr) 22px;align-items:center;gap:10px;min-height:52px;margin:0;padding:10px 6px;border-bottom:1px solid var(--line);cursor:pointer}
.feature-shortcut-option:has(input:checked){color:var(--accent);background:var(--soft)}
.feature-shortcut-option>span:nth-child(2){min-width:0;overflow-wrap:anywhere;font-weight:700}
.feature-shortcut-settings .feature-shortcut-option input{width:20px;height:20px;min-height:0;margin:0;accent-color:var(--accent)}
.feature-shortcut-settings [type=submit]{width:100%}
@media(max-width:350px){.bottom.has-feature [data-nav-label]{font-size:10px}.feature-screen>.dialog-head h2{font-size:18px}.feature-screen>.feature-head-with-date h2{font-size:16px}.feature-screen>.feature-head-with-date>.feature-date-controls{flex-basis:148px}}
