:root{--bg:#202630;--panel:#292f3a;--panel2:#303846;--muted:#858e9e;--white:#e9ecf1;--red:#f5405b;--green:#2abb89;--yellow:#ffda35}*{box-sizing:border-box}html,body{margin:0;background:var(--bg);color:var(--white);font-family:-apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif}button,input,select{font:inherit}button{cursor:pointer;color:inherit;border:0;background:none}#shell{height:100dvh;display:flex;flex-direction:column;overflow:hidden}.hidden{display:none!important}.status{height:calc(45px + env(safe-area-inset-top));padding:env(safe-area-inset-top) 22px 0;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;font-size:15px;font-weight:600}.page{height:100%;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none;padding-bottom:18px}.page::-webkit-scrollbar{display:none}.bottom{flex-shrink:0;height:68px;display:flex;justify-content:space-around;border-top:1px solid #2d3440;background:var(--bg)}.bottom button{width:20%;display:flex;align-items:center;flex-direction:column;justify-content:center;gap:5px;color:#8992a0;font-size:11px}.bottom button.active{color:#f0f1f3}.navicon{font-size:26px;line-height:1}.bottom button.active .navicon{color:var(--yellow)}.homeIndicator{height:calc(18px + env(safe-area-inset-bottom));flex-shrink:0;display:flex;align-items:center;justify-content:center;padding-bottom:env(safe-area-inset-bottom)}.homeIndicator:after{content:"";height:5px;width:134px;border-radius:10px;background:#f7f8f9}.top{position:sticky;top:0;z-index:3;background:var(--bg);padding:12px 16px 9px}.topline{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:40px}.topline .tabs{flex:1}.tabs{display:flex;gap:19px;overflow-x:auto;white-space:nowrap;scrollbar-width:none;align-items:center}.tabs::-webkit-scrollbar{display:none}.tabs button{color:var(--muted);padding:8px 0;font-size:17px;flex-shrink:0}.tabs button.sel{color:var(--white);font-weight:600}.tabs.under button.sel{border-bottom:3px solid var(--yellow)}.search{background:#2c3340;border-radius:9px;padding:12px;color:var(--muted);font-size:14px;flex:1}.dots{font-size:21px}.section{margin:14px 16px;background:var(--panel);border-radius:13px;padding:13px}.section h3{margin:0 0 14px;font-size:15px;color:var(--muted);font-weight:500}.subtabs{display:flex;gap:20px;overflow:auto;white-space:nowrap;scrollbar-width:none}.subtabs button{padding:9px 0;color:var(--muted)}.subtabs .sel{color:var(--white)}.muted{color:var(--muted)}.small{font-size:12px}.tiny{font-size:11px}.big{font-size:33px;font-weight:650;letter-spacing:.2px}.medium{font-size:19px;font-weight:600}.row{display:flex;align-items:center;justify-content:space-between;gap:8px}.coinrow{display:grid;grid-template-columns:minmax(0,1fr) 100px 83px;gap:7px;align-items:center;min-height:64px}.coininfo{display:flex;gap:9px;align-items:center;min-width:0}.coinicon{width:29px;height:29px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:17px;flex-shrink:0;font-weight:bold;color:white}.cointext{min-width:0}.cointext .name{font-size:15px;white-space:nowrap}.cointext .desc{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:3px}.price{text-align:right;font-size:16px;white-space:nowrap}.price .muted{font-size:11px;margin-top:3px}.change{border-radius:6px;background:var(--red);color:white;text-align:center;padding:9px 3px;font-size:14px;font-weight:600}.change.up{background:var(--green)}.tablehead{display:grid;grid-template-columns:1fr 100px 83px;color:var(--muted);font-size:12px;gap:7px;margin:13px 0 8px}.tablehead span:nth-child(n+2){text-align:right}.yellow{background:var(--yellow);color:#242b33;border-radius:7px;padding:11px 18px;font-weight:600}.green{background:var(--green);color:white;border-radius:7px;padding:10px;font-weight:600}.red{background:var(--red);color:white;border-radius:7px;padding:10px;font-weight:600}.ghost{background:#303846;border-radius:7px;padding:10px}.wide{width:100%}.pill{background:#303846;border-radius:7px;padding:9px 12px}.tilegrid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:14px 16px}.tilegrid .section{margin:0;min-height:155px}.hero{padding:18px 16px 7px}.hero .big{font-size:36px;margin:12px 0}.divider{border-bottom:1px solid #343b46}.assetrow{padding:17px 0;border-bottom:1px solid #343b46}.assetrow:last-child{border:0}.assetbtn{background:#353e4d;border-radius:5px;padding:6px 15px;font-size:12px}.allocation{height:8px;background:#ffda35;border-radius:3px;margin:15px 0 0;overflow:hidden}.allocation:before{content:"";display:block;width:93%;height:100%;background:#2778dc}.tradeTop{position:sticky;top:0;z-index:3;background:var(--bg);padding:10px 16px}.tradebody{padding:10px 16px}.tradegrid{display:grid;grid-template-columns:57% 43%;gap:10px}.tradegrid .field{background:#2c3441;border-radius:8px;padding:10px;margin:8px 0;font-size:14px;min-height:42px}.tradegrid .field input{background:transparent;border:0;color:var(--white);width:100%;outline:0}.orderhead{display:flex;justify-content:space-between;color:var(--muted);font-size:11px;margin-bottom:8px}.orderrow{display:flex;justify-content:space-between;font-size:12px;line-height:1.8;position:relative}.orderrow.sell{color:var(--red)}.orderrow.buy{color:var(--green)}.orderrow .qty{color:#ddd}.orderrow .depth{position:absolute;right:0;top:0;bottom:0;opacity:.12;z-index:-1}.ordercenter{font-size:21px;font-weight:700;text-align:center;margin:5px}.fixedchart{position:sticky;bottom:0;background:var(--bg);padding:10px 16px;border-top:1px solid #303846;font-size:12px;z-index:2}.chip{font-size:11px;background:#303846;border:1px solid #394251;border-radius:3px;padding:3px 5px;color:#c7cbd1}.empty{padding:40px 10px;text-align:center;color:var(--muted)}.empty .medium{color:var(--white);margin:12px}.modal{position:fixed;inset:0;z-index:20;background:#000a;display:flex;align-items:flex-end}.sheet{width:100%;max-height:90dvh;overflow:auto;background:#2a313e;border-radius:19px 19px 0 0;padding:18px 18px calc(22px + env(safe-area-inset-bottom))}.sheetHead{display:flex;justify-content:space-between;align-items:center;font-size:18px}.sheet label{display:block;font-size:12px;color:#aeb5c2;margin:12px 0 5px}.sheet input,.sheet select{width:100%;border:1px solid #465063;border-radius:8px;padding:11px;background:#202630;color:white}.sheet .wide{margin-top:10px}.sheet h3{font-size:15px;margin:22px 0 7px}.editorgrid{display:grid;grid-template-columns:1fr 1fr;gap:0 12px}.splash{position:fixed;inset:0;z-index:10;background:#080b15}.splash img{width:100%;height:100%;object-fit:cover}.splash button{position:absolute;inset:0;width:100%;height:100%}.setup{position:fixed;inset:0;z-index:11;background:#202630;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:30px;text-align:center;gap:20px}.setup input{max-width:280px}.setup button{background:var(--yellow);padding:12px;border-radius:8px;color:#222}.settingsTap{font-size:20px;padding:8px;color:#b7c0cc}.fauxChart{height:38px;width:90px}.balanceAction{display:flex;justify-content:space-around;margin:25px 0}.balanceAction div{text-align:center;font-size:12px}.balanceAction span{display:block;background:var(--panel);padding:15px;border-radius:12px;font-size:24px;margin-bottom:7px}.marketList{padding:0 16px}.marketList .coinrow{min-height:65px}.homeList{padding:0 16px}.copyCard{border:1px solid #3b4553;border-radius:13px;padding:15px;margin-top:15px}.settingsHint{font-size:10px;color:#818a98;text-align:center;margin:8px}
/* iPhone Safari: keep the navigation visible and make the central viewport scrollable. */
#shell{height:100vh;height:100dvh;min-height:0;overflow:hidden}
#page{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;overflow:hidden}
#page>.page{flex:1 1 auto;min-height:0;height:auto;overflow-y:auto;-webkit-overflow-scrolling:touch;touch-action:pan-y}
#page>.top,#page>.tradeTop,#page>.fixedchart{flex:0 0 auto}
.bottom{position:relative;z-index:5}

/* v4: use the iPhone's own status bar and home indicator */
.status,.homeIndicator{display:none!important}
#shell{padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}
.bottom{height:65px}
/* Assets proportions */
#page>.top:has([data-atab]){padding-top:8px;padding-bottom:8px}
#page>.page[data-scroll="Assets"] .hero{padding-top:20px;padding-bottom:6px}
#page>.page[data-scroll="Assets"] .hero .big{font-size:37px;margin:20px 0 16px}
#page>.page[data-scroll="Assets"] .balanceAction{margin:26px 0 20px}
#page>.page[data-scroll="Assets"] .balanceAction span{min-width:58px;min-height:58px}
#page>.page[data-scroll="Assets"] .section{margin-top:14px;margin-bottom:14px}
#page>.page[data-scroll="Assets"] .assetrow{padding:15px 0}

/* V5 vector navigation and coin marks */
.navicon{display:flex;align-items:center;justify-content:center;width:29px;height:29px}.navicon svg{width:27px;height:27px;display:block}.bottom button.active .navicon{color:var(--yellow)}.coinicon svg{width:100%;height:100%;display:block}.section .coinicon{vertical-align:middle;width:24px;height:24px;margin-right:3px}.bottom{height:68px}.bottom button{gap:5px}.bottom button .navicon{font-size:0}

/* Icon refinement work-in-progress; retained for final combined release */
.ui-icon{display:inline-flex;position:relative;width:23px;height:23px;align-items:center;justify-content:center;flex-shrink:0}.ui-icon svg{width:100%;height:100%}.headStar{font-size:26px;color:#fcd535}.messageIcon b{position:absolute;right:-10px;top:-10px;background:#fcd535;color:#222;font-size:9px;padding:1px 3px;border-radius:8px}.scanIcon{float:right;color:#8d96a5}.xauLogo{color:#9da5b4}.uLogo{display:inline-flex;align-items:center;justify-content:center;border-radius:50%;width:24px;height:24px;background:#101116;color:#e0c472;font-weight:700}.section[style*="grid-template-columns:1fr 1fr 1fr"]>div:not(:last-child){border-right:1px solid #39414e}

/* Final iPhone layout: native status bar and safe-area handled only once. */
#shell{height:100dvh;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}
#page{min-height:0;flex:1 1 auto}
.bottom{height:65px;min-height:65px;border-top:1px solid #303743}
.bottom button{font-size:11px;gap:5px}
.navicon,.navicon svg{width:28px;height:28px}
/* Home: compact original-inspired geometry */
#page>.page[data-scroll="Home"] .hero{padding-top:13px;padding-bottom:6px}
#page>.page[data-scroll="Home"] .hero .big{font-size:33px;margin:9px 0 14px}
#page>.page[data-scroll="Home"] .hero .yellow{padding:9px 19px}
#page>.page[data-scroll="Home"] .tilegrid .section{min-height:148px}
#page>.page[data-scroll="Home"] .section[style*="grid-template-columns:1fr 1fr 1fr"]{gap:0!important}
#page>.page[data-scroll="Home"] .section[style*="grid-template-columns:1fr 1fr 1fr"]>div{padding:0 8px}
#page>.page[data-scroll="Home"] .section[style*="grid-template-columns:1fr 1fr 1fr"]>div:first-child{padding-left:0}
#page>.page[data-scroll="Home"] .section[style*="grid-template-columns:1fr 1fr 1fr"]>div:last-child{padding-right:0}
#page>.page[data-scroll="Home"] .coinicon{width:23px;height:23px}
.ui-icon{width:22px;height:22px}
/* Accessible tap targets and smooth scrolling */
#page>.page{overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch}
.bottom button{touch-action:manipulation}

/* Home V8: reference-matched layout, scoped so other screens stay functional */
.homeHeader{background:var(--bg);flex:0 0 auto;padding:4px 16px 7px}.homeHeaderTop{height:43px;display:flex;align-items:center;gap:13px}.homeProfile{font-size:26px;color:#fcd535;line-height:1}.homeHeadIcon{width:23px;height:23px;display:flex;position:relative;align-items:center;justify-content:center}.homeHeadIcon svg{width:22px;height:22px}.homeMode{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#2d3440;border-radius:7px;padding:8px 10px;font-size:14px;flex:1;white-space:nowrap}.homeMode span{color:#8e97a6}.homeMessage em{font-style:normal;position:absolute;right:-9px;top:-8px;background:#fcd535;color:#202630;font-size:8px;font-weight:700;border-radius:7px;padding:1px 3px}.homeV8{padding-bottom:18px!important}.homeSearch{height:38px;background:#2d3440;border-radius:8px;margin:4px 16px 0;padding:0 11px;display:flex;align-items:center;gap:8px;font-size:13px;color:#b4bac6}.homeMagnifier{font-size:23px;line-height:1;color:#8c95a5}.homeScan{margin-left:auto;display:flex;width:19px;height:19px}.homeScan svg{width:100%;height:100%}.homeBalance{padding:21px 17px 13px}.homeBalanceLabel{font-size:13px;color:#969fad}.homeBalanceLabel span{font-size:16px}.homeBalanceMain{display:flex;align-items:center;justify-content:space-between;margin:6px 0 11px}.homeTotal{font-size:34px;font-weight:700;letter-spacing:-.7px;color:#f0f1f4;line-height:1.25}.homeDeposit{background:#fcd535;color:#202630;font-size:14px;font-weight:650;border-radius:7px;padding:11px 19px}.homePnl{font-size:12px;color:#969fad;display:flex;gap:6px;align-items:center}.homePnl>span:nth-child(1){color:#f04762}.homePnl .pnlArrow{color:#9da5b2}.homeMarketStrip{margin:4px 16px 13px;background:#2b323e;border-radius:12px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:15px 10px}.homeMarketStrip>div{padding:0 9px;min-width:0}.homeMarketStrip>div:not(:last-child){border-right:1px solid #424956}.stripTitle{font-size:14px;font-weight:600}.stripCoin{display:flex;align-items:center;gap:5px;font-size:11px;margin:9px 0 7px;color:#aeb5c0;white-space:nowrap}.stripCoin .coinicon{width:19px!important;height:19px!important;font-size:12px}.stripChange{font-size:13px;font-weight:600}.stripChange.neg{color:#f04660}.stripChange.pos{color:#2cc894}.homeCards{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:0 16px 17px}.homeCard{background:#2b323e;border-radius:12px;padding:13px 12px;min-height:143px}.homeCardTitle{font-size:15px;font-weight:650;display:flex;justify-content:space-between}.homeCardTitle span{color:#8e97a6;font-size:21px;font-weight:400;line-height:15px}.homeSwap{display:flex;justify-content:center;align-items:center;gap:15px;margin:20px 0 15px;font-size:18px}.homeSwap .coinicon{width:29px!important;height:29px!important}.homeCardButton{background:#3a4351;text-align:center;border-radius:6px;padding:7px;font-size:12px}.homeEarnLine{display:flex;align-items:center;gap:8px;margin:11px 0 0}.homeEarnLine .coinicon,.homeEarnLine .uLogo{width:23px!important;height:23px!important}.homeEarnLine span:last-child{display:flex;flex-direction:column}.homeEarnLine strong{font-size:12px}.homeEarnLine small{font-size:10px;color:#8e97a6}.homeMarketList{padding:0 16px}.homeCategory{display:flex;gap:20px;align-items:center;overflow:auto;white-space:nowrap;font-size:16px;color:#929baa}.homeCategory strong{font-weight:550}.homeCategory .chosen{color:#f0f1f4}.homeSubcategory{display:flex;gap:20px;align-items:center;margin-top:17px;font-size:13px;color:#8d96a4}.homeSubcategory strong{background:#39414d;border-radius:6px;padding:6px 10px;color:#f1f3f5}.homeMarketList .tablehead{margin-top:18px}.homeMarketList .coinrow{min-height:62px}.homeViewMore{font-size:13px;color:#9da5b2;text-align:center;padding:16px}.homeStocks{padding:5px 16px 18px}.homeStocks .tablehead{margin-top:17px}.homeStocks .coinrow{min-height:62px}
