/* The same Manrope / cream / orange system, adapted for touch and iOS safe areas. */
#device-nav{display:none}.device-app #quit{display:none}.device-app{overscroll-behavior-y:none}
.device-connection{font-size:11px;color:var(--muted)}#device-settings{margin-top:24px}.device-export{width:min(520px,94vw)}
.device-app #toast:not(.show){visibility:hidden;pointer-events:none}
.device-draft{padding:18px;margin-bottom:24px;border:2px solid var(--ink);border-radius:10px;background:var(--yellow);box-shadow:var(--shadow)}.device-draft p{font-size:12px}
@media(max-width:700px){
 .device-app{--rail-width:0px;-webkit-text-size-adjust:100%;padding-top:env(safe-area-inset-top)}
 .device-app .main-shell,.device-app.sidebar-hidden .main-shell{margin-left:0!important;width:100%;min-width:0}
 .device-app #sidebar{z-index:120;width:min(300px,88vw);padding-top:max(20px,env(safe-area-inset-top));padding-bottom:calc(90px + env(safe-area-inset-bottom));height:100dvh}
 .device-app.sidebar-hidden #sidebar{transform:translateX(-105%);width:min(300px,88vw);visibility:hidden}
 .device-app .menu-backdrop{z-index:110}.device-app .sidebar-head .brand-name{opacity:1;transform:none}
 .device-app header{padding:10px 14px;gap:8px;min-height:64px;flex-wrap:wrap}
 .device-app .workspace-switch,.device-app #breadcrumb{display:none}.device-app .header-right{justify-content:space-between;width:100%;gap:12px}
 .device-app .date-control{font-size:12px;gap:8px}.device-app .date-control .date-input{width:185px}.device-app .date-control input{font-size:16px}
 .device-app main{padding:20px 14px 28px;min-width:0;width:100%;overflow-x:clip}.device-app footer{padding:16px 14px 100px;gap:12px;flex-wrap:wrap}
 .device-app h1{font-size:25px}.device-app .page-head{gap:12px;align-items:flex-start;flex-direction:column;margin-bottom:20px}
 .device-app .actions{gap:10px}.device-app .actions button{min-height:44px}.device-app .page-head .actions{width:100%}
 .device-app button,.device-app .secondary,.device-app .primary{min-height:44px}.device-app input:not([type=checkbox]),.device-app select,.device-app textarea{font-size:16px;min-height:44px;max-width:100%}
 .device-app .icon-button,.device-app .theme-toggle{min-width:44px;min-height:44px}.device-app button.info-button{min-height:30px;min-width:30px}
 .device-app .metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.device-app .metric{padding:15px 12px;min-height:135px;min-width:0}
 .device-app .metric-label{font-size:9px;margin-bottom:12px}.device-app .metric-value{font-size:clamp(19px,5.5vw,27px);letter-spacing:-.7px;overflow-wrap:anywhere}
 .device-app .metric-note{font-size:11px;line-height:1.5}.device-app .panel{min-width:0}.device-app .panel-head,.device-app .panel-body{padding:16px}
 .device-app .panel-head{gap:12px;flex-wrap:wrap}.device-app .panel-head h2{font-size:15px}.device-app .panel-head input{width:100%;min-width:0}
 .device-app .grid,.device-app .grid-2,.device-app .settings-sections,.device-app .form-grid{grid-template-columns:1fr}
 .device-app .tabs{max-width:100%;overflow-x:auto;flex-wrap:nowrap;padding-bottom:6px;scrollbar-width:thin}.device-app .tabs button{flex-shrink:0}
 .device-app .table-scroll{max-width:100%;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}.device-app table{font-size:12px}
 .device-app .table-scroll button{min-height:36px}.device-app .donut-wrap{gap:20px;flex-wrap:wrap}.device-app .allocation-list{width:100%;min-width:0}
 .device-app .overview-etf-summary{grid-template-columns:1fr 1fr;gap:12px}.device-app .overview-etf-summary dd{font-size:20px}.device-app .overview-etf-summary .pnl-cell{flex-wrap:wrap}
 .device-app dialog[open]{position:fixed;inset:var(--device-top,0px) 0 auto!important;margin:10px auto!important;width:calc(100% - 20px)!important;max-width:620px;max-height:calc(var(--device-height,100dvh) - 20px)!important;border-radius:14px;padding:0!important}
 .device-app dialog .dialog-head{padding:16px;gap:10px;flex-shrink:0}.device-app dialog .dialog-head h2{font-size:20px;overflow-wrap:anywhere}
 .device-app dialog .dialog-body{padding:16px;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;min-height:0}
 .device-app dialog .dialog-actions{flex-wrap:wrap;gap:12px;padding-bottom:env(safe-area-inset-bottom)}.device-app dialog .dialog-actions>div{display:flex;flex-wrap:wrap;gap:10px}
 .device-app .deposit-balances,.device-app .deposit-facts,.device-app .fund-two{grid-template-columns:1fr}.device-app .deposit-balance>strong{font-size:26px}
 .device-app .date-calendar{max-width:calc(100vw - 24px)}.device-app .date-calendar button{min-height:36px}
 #device-nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));position:fixed;inset:auto 0 0;z-index:130;background:var(--paper);border-top:2px solid var(--ink);padding:8px max(5px,env(safe-area-inset-left)) calc(8px + env(safe-area-inset-bottom));gap:2px}
 #device-nav a,#device-nav button{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:5px;font-size:10px;min-height:49px;padding:4px 0;border:0;background:transparent;box-shadow:none;color:var(--muted);border-radius:8px}
 #device-nav a.active{background:var(--orange);color:var(--ink)}#device-nav svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
 .device-keyboard #device-nav{display:none}.device-app #toast{bottom:calc(90px + env(safe-area-inset-bottom));left:14px;right:14px;max-width:none;width:auto;transform:none}
 .device-app .reference-grid,.device-app .reference-layout{grid-template-columns:1fr}.device-app svg{max-width:100%}
}
@media(max-width:359px){.device-app .metrics,.device-app .overview-etf-summary{grid-template-columns:1fr}.device-app .metric{min-height:115px}.device-app main{padding-left:10px;padding-right:10px}}
@media(prefers-reduced-motion:reduce){.device-app *{scroll-behavior:auto!important}}
