:root{--ink:#243139;--muted:#76858b;--line:#e5ebed;--green:#087f65;--gain:#ca5b52;--loss:#128570;color:var(--ink);background:#f5f7f8;font-family:Inter,"Segoe UI","Microsoft YaHei",sans-serif}
body{background:#f5f7f8;color:var(--ink);min-height:100dvh}
.app-header{height:calc(68px + env(safe-area-inset-top));padding-left:20px;padding-right:17px;background:#f5f7f8f5;border-bottom:0;backdrop-filter:blur(16px)}.app-header>div{gap:10px}.app-header h1{font-size:20px;font-weight:650;letter-spacing:-.3px}.app-header button{width:40px;height:40px;border-radius:12px;background:#fff;color:#527167;box-shadow:0 1px 2px #12312504;border:1px solid #e7edeb;font-size:24px}.app-header .brand{width:29px;height:32px;border-radius:9px;background:#203b32;display:flex;align-items:center;justify-content:center;gap:3px;color:transparent;font-size:0}.brand i{height:10px;width:3px;background:#a2e1b9;border-radius:2px;transform:translateY(3px)}.brand i:nth-child(2){height:17px;transform:none}.brand i:nth-child(3){height:12px;transform:translateY(-3px)}
#app-scroll{inset:calc(68px + env(safe-area-inset-top)) 0 calc(78px + env(safe-area-inset-bottom));scrollbar-width:none}.page{padding:12px 18px 28px}.preview-context{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:8px;color:#8b989d;letter-spacing:1.3px;margin:2px 2px 8px;line-height:1.5}.preview-context>span:last-child{font-size:9px;letter-spacing:0;color:#5c8a72;background:#eaf3ed;border:1px solid #e0ece4;border-radius:5px;padding:3px 6px}.summary-heading{margin:0 0 7px;min-height:34px;font-size:13px;color:#52666c;font-weight:500;gap:10px}.summary-heading .text-button{font-size:10px;color:#548275;padding:5px 0 5px 10px;min-height:36px;font-weight:500}
.quote-status{font-size:9px;color:#8c989f;gap:6px;padding:0 1px;min-height:22px;margin:0 0 13px}.quote-status>span:last-child{font-size:8px}.status-dot{background:#4baf8b;width:4px;height:4px}.overview-actions{gap:7px;margin:0 0 17px;grid-template-columns:1.35fr 1.25fr .9fr 36px}.overview-actions button{min-height:40px;padding:8px 6px;border:1px solid #e1e8e8;background:#fff;border-radius:9px;font-size:10px;font-weight:500;color:#667b76;box-shadow:0 1px 2px #17382e03}.overview-actions button.primary{background:#087f65;color:#fff;border-color:#087f65;box-shadow:0 3px 5px #087f650d}.overview-actions #layout-undo{padding:0;font-size:19px}
.top-grid{gap:12px;grid-template-rows:repeat(var(--top-rows,2),136px)}.metric,.content-module{background:#fff;border:1px solid #e3e9eb;border-radius:16px;box-shadow:0 2px 3px #1a433403}.metric{padding:18px 15px!important;display:flex;flex-direction:column;min-height:124px}.metric>span{font-size:11px;color:#75858a;letter-spacing:0}.metric>strong{font-family:Inter,"Segoe UI",sans-serif;font-size:25px;font-weight:550;letter-spacing:-.8px;margin-top:15px;line-height:1.2;font-variant-numeric:tabular-nums}.metric p{font-size:9px;color:#87959a;line-height:1.7;gap:3px}.metric p b{font-weight:550}.metric small{font-size:8px;letter-spacing:.7px;border-radius:4px;padding:1px 4px}
.metric.value{background:#203b32;border-color:#203b32;color:white;position:relative;isolation:isolate;overflow:hidden}.metric.value>span{color:#c3d4ca;font-size:11px}.metric.value p{color:#aec9b8;font-size:9px}.metric.value:after{content:'';position:absolute;width:130px;height:130px;border:1px solid #a2d7b91c;border-radius:50%;right:0;top:43px;box-shadow:0 0 0 20px #a2d7b907,0 0 0 41px #a2d7b904;z-index:-1;pointer-events:none}.metric.value>strong{font-size:34px;letter-spacing:-1.2px;margin-top:15px;font-weight:550}.metric.value .mini-more{color:#bdd5c4}.mini-more,.module-more{color:#8b9a9d;min-width:36px;min-height:36px;border-radius:8px}.metric>.mini-more{right:4px;top:3px}.metric.value>span{padding-right:20px}
.lower-modules{gap:16px;margin-top:17px}.content-module{padding:15px 15px 17px}.module-heading{min-height:36px;padding:0;margin-bottom:13px;align-items:center;gap:7px}.module-heading h2{font-size:15px;color:var(--ink);font-weight:650;letter-spacing:0}.module-heading .text-button{font-size:10px;color:#40846b;min-height:36px}.module-heading>div{gap:3px}.tile-content>strong{font-size:24px}.top-summary{padding:18px 15px!important}.tile-label{font-size:11px;color:#71847c}.tile-open-hint{color:#739a86}
.content-module[data-module-id=holdings]{padding:0;background:transparent;border:0;box-shadow:none}.content-module[data-module-id=holdings]>.module-heading{padding:0 2px}.stock-card{background:#fff;border-color:#e3e9eb;border-radius:15px;padding:17px 14px;box-shadow:0 2px 3px #1a433403;margin-bottom:12px}.stock-mark{width:33px;height:35px;border-radius:9px;background:#edf5f0;color:#438b6b;font-size:15px}.stock-heading{gap:10px}.stock-open{gap:9px}.stock-open b{font-size:13px;color:var(--ink);font-weight:650}.stock-open small{font-size:9px;color:#8b989d;margin-top:5px}.stock-money>strong{font-size:20px;letter-spacing:-.5px;font-weight:550}.stock-money>span{font-size:10px}.stock-facts{row-gap:15px;column-gap:10px;margin-top:18px;padding-top:16px;border-color:var(--line)}.stock-facts dt{font-size:9px;color:#8a989e}.stock-facts dd{font-size:12px;color:#34474e}.stock-native-total{font-size:9px;color:#80918b}.stock-native-total strong{color:#566e63;font-size:11px}.stock-foot{font-size:9px;border-color:var(--line);padding-top:12px;margin-top:15px;color:#8d9b9d}.stock-trade-actions summary{font-size:10px;color:#6c8779;min-height:35px}.group-dot{background:#74a48a}.holdings-primary-actions{gap:7px;grid-template-columns:1.2fr .8fr .8fr 1fr}.holdings-primary-actions button{font-size:10px;border-radius:9px;min-height:41px;background:#fff;border-color:var(--line)}.holdings-primary-actions .primary{background:var(--green);color:#fff}.search{background:white;border-color:var(--line);border-radius:10px}.search input{font-size:12px}.account-row,.account-summary{font-size:10px;color:#81908c}.account-row select{border-color:var(--line);background:#fff;border-radius:8px;color:#4d6960}
.calendar-card,.mobile-calendar{border:0}.calendar-day{border-color:#e7eceb;border-radius:8px}.calendar-date{color:#84958d}.calendar-toolbar button,.calendar-toolbar select{border-radius:7px;border-color:var(--line);font-size:10px}.calendar-note,.calendar-coverage{font-size:9px;line-height:1.8}.permanent-allocation{border-color:var(--line)}.permanent-data{background:#f4f8f5;border-radius:10px}.allocation-track{background:#eef2f2;height:5px}.allocation-fill{background:#399e7b;border-radius:5px}.widget-stock,.group-overview,.realized-item{border-color:var(--line)}.group-overview strong,.widget-stock strong{color:var(--ink)}
.bottom-nav{left:10px;right:10px;bottom:calc(8px + env(safe-area-inset-bottom));height:62px;padding:5px 5px;background:#ffffffef;border:1px solid #e3eae8;border-radius:18px;box-shadow:0 4px 22px #203e310c;backdrop-filter:blur(16px);grid-template-columns:repeat(5,minmax(0,1fr));gap:2px}.bottom-nav button{border-radius:12px;font-size:9px;color:#8c9a9b;gap:4px;font-weight:500}.bottom-nav button.selected{background:#edf6f0;color:#087f65;font-weight:650}.bottom-nav button>span{font-size:21px;line-height:24px}.bottom-nav button svg{width:21px;height:21px;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.toast{bottom:calc(91px + env(safe-area-inset-bottom));border-radius:10px;background:#253c32;color:#fff;font-size:12px;box-shadow:0 8px 30px #1d372822;max-width:calc(100% - 36px)}
.bottom-sheet{border:1px solid #e4eae8;border-bottom:0;border-radius:23px 23px 0 0;background:#fff;color:var(--ink);padding-top:9px;max-height:90dvh}.sheet-grip{width:30px;height:4px;background:#dbe5df;margin-bottom:10px}.sheet-heading h2{font-size:18px;font-weight:650;letter-spacing:-.3px}.sheet-heading p{color:#84938c;line-height:1.7}.close-button{border:1px solid #e5ebe8;background:#f7f9f8;color:#7d9287;border-radius:12px;width:36px!important;height:36px!important;min-height:36px;font-size:23px}.bottom-sheet>.sheet-heading,.phone-form>.sheet-heading{background:#fff;border-color:var(--line);padding-top:9px;padding-bottom:12px}.sheet-actions button{border-radius:10px;min-height:45px;font-size:12px}.primary,.button.primary{background:#087f65;color:#fff}.secondary{background:#fff;border-color:#dee7e3;color:#668171}.phone-form label{font-size:11px;color:#6c7f75}.phone-form input,.phone-form select,.setting-row select{border-color:#dfe7e4;background:#f9fbfa;color:var(--ink);border-radius:9px;font-size:14px}.phone-form input{min-height:43px}.setting-row{font-size:12px;border-color:var(--line);min-height:62px}.page-note{font-size:10px;color:#84958c}.form-caption{color:#8b9a91}.library-row,.arrange-row,.manager-list>div{border-color:var(--line)}.library-row>span{font-size:12px;color:var(--ink)}.library-row small{font-size:9px;color:#8b9a91;line-height:1.8}.library-row button{font-size:10px;min-height:36px;border:1px solid #d9e8de;background:#f0f7f2;color:#448363;border-radius:8px;padding:8px 10px}.mobile-hub-row{border-color:var(--line);border-radius:15px;padding:16px}.hub-index{background:#edf5ef;color:#5b8e71;border-radius:8px}.hub-row-heading h3{font-size:14px}.hub-row-heading p{color:#84948b;font-size:10px}.hub-row-actions button{font-size:10px;border-radius:8px}.wide-action{border-radius:10px;border-color:var(--line)}
body[data-theme=dark]{--ink:#e2e9e7;--muted:#9aacaa;--line:#344641;--green:#5cbf9b;--gain:#e79183;--loss:#66bba4;background:#17241f;color:var(--ink)}body[data-theme=dark] .app-header{background:#17241ff5}body[data-theme=dark] .metric,body[data-theme=dark] .content-module,body[data-theme=dark] .stock-card,body[data-theme=dark] .bottom-sheet,body[data-theme=dark] .mobile-hub-row{background:#20332b;border-color:var(--line);color:var(--ink)}body[data-theme=dark] .metric.value{background:#2a4837;border-color:#3d5e48}body[data-theme=dark] .bottom-nav,body[data-theme=dark] .app-header button,body[data-theme=dark] .overview-actions button:not(.primary),body[data-theme=dark] .holdings-primary-actions button:not(.primary),body[data-theme=dark] .search,body[data-theme=dark] .account-row select{background:#20332bf5;border-color:var(--line);color:#bfd3c5}body[data-theme=dark] .bottom-nav button.selected{background:#304b3b;color:#a8dcba}body[data-theme=dark] .content-module[data-module-id=holdings]{background:transparent}body[data-theme=dark] .stock-mark,body[data-theme=dark] .permanent-data,body[data-theme=dark] .preview-context>span:last-child{background:#2b4536;color:#b8d3c0;border-color:var(--line)}body[data-theme=dark] .stock-open b,body[data-theme=dark] .stock-facts dd,body[data-theme=dark] .module-heading h2,body[data-theme=dark] .library-row>span{color:var(--ink)}body[data-theme=dark] .bottom-sheet>.sheet-heading,body[data-theme=dark] .phone-form>.sheet-heading,body[data-theme=dark] .phone-form>.sheet-actions,body[data-theme=dark] #arrange-panel .sheet-actions,body[data-theme=dark] #library-panel .sheet-actions,body[data-theme=dark] #sort-panel .sheet-actions{background:#20332b;color:var(--ink)}body[data-theme=dark] .phone-form input,body[data-theme=dark] .phone-form select,body[data-theme=dark] .setting-row select,body[data-theme=dark] .close-button{background:#18271f;color:var(--ink);border-color:var(--line)}body[data-theme=dark] .primary,body[data-theme=dark] .button.primary{background:#387b57;color:#fff}
body[data-theme=dark] #app-scroll{background:#17241f}body[data-theme=dark] .summary-heading{color:#bdcec4}body[data-theme=dark] .quote-status,body[data-theme=dark] .preview-context,body[data-theme=dark] .stock-open small,body[data-theme=dark] .stock-facts dt,body[data-theme=dark] .stock-foot,body[data-theme=dark] .metric>span,body[data-theme=dark] .metric p{color:#a6b9af}
#module-view-panel{padding:0;overflow:visible;max-height:90dvh;max-height:min(90dvh,calc(100dvh - max(56px,env(safe-area-inset-top))));border:0;border-radius:24px 24px 0 0;animation:none!important;overscroll-behavior:none;transform:translate3d(0,0,0)}
#module-view-panel[open]{display:flex;flex-direction:column}
#module-view-panel::backdrop{opacity:1}
#module-view-panel[data-sheet-moving]{will-change:transform}
#module-view-panel>.module-sheet-grip{display:flex;align-items:center;justify-content:center;flex:0 0 40px;min-height:40px;width:100%;height:40px;margin:0;padding:0;background:transparent;border:0;border-radius:24px 24px 0 0;cursor:grab;touch-action:none;transform:none;box-shadow:none;user-select:none;-webkit-user-select:none}
#module-view-panel>.module-sheet-grip:focus-visible{outline-offset:-6px}
body:not([data-keyboard=true]) #module-view-panel>.module-sheet-grip:focus{outline:none}
#module-view-panel>.module-sheet-grip:active{cursor:grabbing;transform:none}
.module-sheet-grip>span{display:block;width:38px;height:4px;border-radius:4px;background:#cdd9d2}
#module-view-panel>.sheet-heading{position:relative;inset:auto;flex:0 0 auto;min-height:48px;padding:0 20px 15px;margin:0;background:transparent!important;border-bottom:1px solid var(--line);touch-action:none;user-select:none;-webkit-user-select:none;cursor:grab}
#module-view-panel>.sheet-heading h2{font-size:18px;line-height:1.5}
#module-view-body{min-height:0;flex:0 1 auto;overflow-y:auto;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;padding:18px 18px calc(24px + env(safe-area-inset-bottom));scrollbar-width:thin;touch-action:pan-y}
#module-view-body>.metric{min-height:148px}
#module-view-body .module-heading:not(:has(button,a,input,select)){display:none}
#module-view-panel .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
body[data-theme=dark] .module-sheet-grip>span{background:#587663}
@media(hover:hover) and (pointer:fine){#module-view-panel>.module-sheet-grip:hover>span{background:#89a695}}
@media(max-width:340px){.page{padding-left:12px;padding-right:12px}.app-header{padding-left:15px;padding-right:12px}.metric{padding:17px 12px!important}.metric>span{font-size:10px}.metric>strong{font-size:22px}.metric.value>strong{font-size:30px}.metric p{font-size:8px}.top-grid{gap:10px}.overview-actions{gap:5px}.overview-actions button{font-size:9px}.content-module{padding:14px 12px}.stock-card{padding:15px 12px}.bottom-nav button{font-size:8px}}
/* Every phone dialog uses the same grip, scroll boundary and dismissal motion. */
dialog[data-mobile-sheet]{max-width:480px;max-height:min(90dvh,calc(100dvh - max(56px,env(safe-area-inset-top))));padding:0 18px calc(20px + env(safe-area-inset-bottom));overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;border-radius:24px 24px 0 0;animation:none!important;transform:translate3d(0,0,0)}
dialog[data-mobile-sheet]::backdrop{opacity:1}
dialog[data-mobile-sheet][data-sheet-moving]{will-change:transform}
dialog[data-mobile-sheet]>.module-sheet-grip{display:flex;align-items:center;justify-content:center;position:sticky;top:0;z-index:12;width:calc(100% + 36px);height:40px;min-height:40px;padding:0;margin:0 -18px;border:0;border-radius:24px 24px 0 0;background:#fff;cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none;transform:none;box-shadow:none}
dialog[data-mobile-sheet]>.module-sheet-grip:active{cursor:grabbing;transform:none}
dialog[data-mobile-sheet]>.module-sheet-grip:focus-visible{outline-offset:-6px}
body:not([data-keyboard=true]) dialog[data-mobile-sheet]>.module-sheet-grip:focus{outline:none}
dialog[data-mobile-sheet] .sheet-dismiss-original{display:none!important}
dialog[data-mobile-sheet]>.phone-form{margin-top:0}
dialog[data-mobile-sheet] .sheet-heading{position:sticky;top:40px;z-index:11;min-height:48px;margin:0 -18px;padding:0 18px 14px;background:#fff;border-bottom:1px solid var(--line);touch-action:none;user-select:none;-webkit-user-select:none;cursor:grab}
dialog[data-mobile-sheet] .sheet-heading>h2,dialog[data-mobile-sheet] .sheet-heading>div{padding-right:0;max-width:100%}
dialog[data-mobile-sheet] .sheet-heading h2{font-size:18px;line-height:1.5}
body[data-theme=dark] dialog[data-mobile-sheet]>.module-sheet-grip,body[data-theme=dark] dialog[data-mobile-sheet] .sheet-heading{background:#20332b}
#module-view-panel{padding:0;overflow:visible}
#module-view-panel>.module-sheet-grip{position:relative;inset:auto;width:100%;margin:0}
#module-view-panel>.sheet-heading{position:relative;inset:auto;margin:0;padding:0 20px 15px}
#lower-modules .content-module>.module-heading{padding-right:44px}
#lower-modules .content-module>[data-module-options]{right:9px;top:15px;width:36px;height:36px;min-width:36px;min-height:36px}
#lower-modules .content-module[data-module-id=holdings]>.module-heading{padding-right:44px}
#lower-modules .content-module[data-module-id=holdings]>[data-module-options]{right:0;top:0}
