/* Compact terminal layout inspired by the reference, with Kenshin branding. */
html[data-theme="dark"]{--bg:#0e1319;--paper:#161d25;--raised:#141b22;--line:#2a333e;--ink:#e5eaf1;--muted:#9aa5b3;--header:#141b23;--soft:#22344e;--accent:#739be2;--accent-text:#87aceb;--green:#78d39c;--chart-line:#79cda1;--chart-fill:#69bd93;--chart-grid:#28333e;--chart-label:#929eab;--negative:#ee8d91;--red:#ee8d91}
html[data-theme="light"]{--bg:#f4f6f9;--paper:#fff;--raised:#f7f9fb;--line:#dbe2e9;--ink:#202d3d;--muted:#68788b;--header:#fff;--soft:#e8f0fb;--accent:#477bc5;--accent-text:#376eb8;--green:#238050;--chart-line:#329362;--chart-fill:#5fb889;--chart-grid:#e1e7ed;--chart-label:#6e7c8e;--negative:#bd4b57;--red:#bd4b57}
body{background:var(--bg);font-size:14px}.sidebar{display:none}.app-shell{margin:0 auto;max-width:1100px}.topbar{position:sticky;top:0;z-index:30;height:66px;padding:0 12px;gap:8px;border-bottom:1px solid var(--line);background:var(--header);display:flex}.mobile-brand{display:flex;padding:0;flex-shrink:0}.mobile-brand .kenshin-logo{--logo-width:64px;border-radius:0}.theme-switch{padding:2px;gap:0;margin:0;background:var(--raised);border:1px solid var(--line);border-radius:20px;flex-shrink:0}.theme-switch button{width:23px;height:28px;min-height:28px;border-radius:15px}.theme-switch button svg{width:14px;height:14px}.theme-switch button.active,.theme-switch button[aria-pressed="true"]{background:var(--soft);color:var(--accent-text);box-shadow:none}.desktop-title{display:block;text-align:center;font-size:14px;font-weight:700;white-space:nowrap;color:var(--ink);margin:auto;letter-spacing:0}.header-actions{flex-shrink:0;margin:0;gap:0}.preparing{display:none}.apply-button{font-size:10px;padding:7px 8px;min-height:32px;border-radius:8px;background:#f6d34a;color:#152441;border:0;white-space:nowrap}main{padding:8px 12px 95px;max-width:1100px}.page-heading{display:none}.preview-bar{min-height:28px;margin:0 0 8px;padding:4px 8px;border-radius:6px;font-size:10px;line-height:1.5}.preview-bar svg{width:12px;height:12px}.preview-bar button{font-size:10px;min-height:22px}.preview-bar.demo{background:var(--raised);border:1px solid var(--line);color:var(--muted)}.preview-bar>span{gap:5px}.view.active{animation:none}
.monthly-return-strip{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 12px;background:var(--paper);border:1px solid var(--line);border-radius:11px;margin-bottom:6px;min-height:46px}.monthly-return-strip>span{font-size:11px;color:var(--muted)}.monthly-return-strip strong{font-size:21px;color:var(--green);white-space:nowrap}.profit-overview{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-bottom:8px}.profit-metric{background:var(--paper);border:1px solid var(--line);border-radius:10px;min-height:72px;padding:10px 11px}.profit-metric .metric-label{font-size:11px;color:var(--muted);font-weight:400}.profit-metric .metric-label svg{display:none}.profit-metric>strong{color:var(--green);font-size:24px;margin:4px 0 0;line-height:1.25;letter-spacing:-.4px;font-weight:650}.profit-metric>strong small{font-size:11px;margin-left:3px}.profit-metric .metric-note,.profit-metric .spark{display:none}.negative-text{color:var(--negative)!important}.panel{padding:14px;border-radius:12px}.analysis-grid{display:block;margin:0 0 8px}.chart-panel{padding:12px 10px 8px;position:relative}.chart-panel .eyebrow{display:none}.chart-panel .panel-head h2{font-size:14px;margin:0}.chart-panel .unit{display:none}.chart-toolbar{margin:0;position:absolute;right:10px;top:8px}.chart-toolbar>div:first-child{display:none}.segmented{background:var(--raised);border-radius:7px;padding:2px}.segmented button{min-height:27px;padding:4px 7px;font-size:11px}.segmented button.selected{background:var(--soft);color:var(--ink);box-shadow:none}.chart-wrap,#profit-chart{height:214px;min-height:214px}.chart-wrap{margin:14px 0 0}.chart-bottom{font-size:10px;padding-top:4px}.chart-bottom span{font-size:10px}.chart-bottom span:last-child{display:none}.stats-panel{padding:0;overflow:hidden;margin-bottom:8px}.stats-panel>h2{font-size:12px;font-weight:600;color:var(--muted);margin:0;padding:8px 12px;border-bottom:1px solid var(--line)}.stats-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 12px;min-height:37px;border-bottom:1px solid var(--line);font-size:13px}.stats-row:last-child{border-bottom:0}.stats-row .metric-label{font-size:13px;gap:5px}.stats-row>span,.stats-row .metric-label{color:var(--muted)}.stats-row>strong{color:var(--ink);font-size:14px;font-weight:600;white-space:nowrap}.stats-row>strong small{font-size:11px;margin-left:3px}.stats-row .metric-note{display:none}.stats-row .inline-info{min-height:20px;min-width:20px}.balance-overview{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:16px}.balance-overview .balance-card{background:var(--paper);padding:14px;border-radius:12px;min-height:0}.balance-overview .balance-amount{font-size:27px}.balance-overview .balance-sub{flex-wrap:wrap;font-size:11px}.balance-overview .balance-sub>span:last-child{font-size:11px}.balance-overview .balance-footer span{font-size:11px}.balance-overview .balance-footer strong{font-size:14px}.balance-overview .balance-top{font-size:12px}.balance-overview .balance-top .account-chip{font-size:8px}.overview-panel .eyebrow{display:none}.overview-panel h2{font-size:14px;margin:0}.overview-panel .test-name{margin-top:10px;padding-bottom:10px}.overview-panel .test-name strong{font-size:13px}.overview-panel .test-name>div>span{font-size:11px}.overview-panel .ea-avatar{width:32px;height:35px;font-size:16px}.detail-list{margin-top:10px}.detail-list>div{padding:7px 0;font-size:12px}.guide-link{font-size:12px;margin-top:8px}.section-heading{margin-top:20px}.section-heading h2{font-size:15px}.section-heading>.muted,.section-heading .eyebrow{display:none}.explore-grid{gap:8px}.explore-card{border-radius:12px;padding:14px;gap:10px}.explore-card h3{font-size:13px}.explore-card p{font-size:11px}.explore-icon{width:30px;height:34px}.explore-icon svg{width:20px;height:20px}.explore-card .chevron{width:15px}
.bottom-nav{position:fixed;display:flex;justify-content:space-around;align-items:stretch;left:50%;right:auto;transform:translateX(-50%);bottom:calc(9px + env(safe-area-inset-bottom));width:calc(100% - 24px);max-width:480px;height:66px;padding:5px 8px;border:1px solid var(--line);border-radius:36px;background:linear-gradient(180deg,var(--paper),var(--raised));box-shadow:0 4px 18px #0003;z-index:50;backdrop-filter:blur(14px)}.bottom-nav a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;flex:1;min-width:0;border-radius:28px;color:var(--muted);font-size:10px;line-height:1.3;padding:5px 0;position:relative}.bottom-nav a svg{width:21px;height:21px;stroke-width:1.6}.bottom-nav a.active{color:var(--accent-text);background:var(--soft);box-shadow:inset 0 1px 3px #ffffff10}.bottom-nav a.active:before{display:none}.bottom-nav a.active svg{background:none;box-shadow:none}.bottom-nav a span{font-size:10px}.desktop-nav{display:none}
#calendar>.panel{padding:14px 10px}.calendar-nav{width:100%;justify-content:space-between}.calendar-nav strong{font-size:17px}.calendar-nav .icon-button{width:32px;height:32px;background:var(--raised)}#calendar .panel-head>div:first-child{display:none}.calendar-summary{order:3;margin:12px 0 0;border:0;justify-content:center;gap:22px}.calendar-summary>span{font-size:11px}.calendar-summary strong{font-size:20px}.calendar-weekdays{margin-top:12px;border-bottom:0}.calendar-weekdays span{font-size:12px}.calendar-grid{gap:4px}.calendar-cell{border:0;min-height:70px;padding:6px 0;gap:4px;border-radius:9px;background:transparent}.calendar-cell>span:first-child{font-size:14px}.calendar-cell small{font-size:10px;color:var(--accent-text);font-weight:600}.calendar-cell.positive{background:transparent}.calendar-cell.negative{background:#b7546015}.calendar-cell.negative small{color:var(--negative)}.calendar-cell.selected{background:var(--soft);outline:1px solid var(--line)}.calendar-cell.outside{opacity:.28}.daily-rate{font-size:9px;color:var(--green)}.calendar-legend{font-size:10px;margin-top:12px}.daily-detail{margin-top:10px}.daily-detail h2{font-size:14px}.day-result-summary strong{font-size:18px}.trade-summary{grid-template-columns:1fr;gap:8px;margin-bottom:8px}.trade-summary .panel{padding:12px}.trade-summary .eyebrow{display:none}.trade-summary h2{font-size:14px}.position-floating{font-size:27px;margin:8px 0 0}.position-floating small{font-size:11px}.trade-summary .detail-list>div{font-size:13px;padding:9px 0}.trade-row{padding:12px 0;gap:9px}.trade-avatar{width:32px;height:32px;font-size:10px;border-radius:6px}.trade-main h3{font-size:13px}.trade-main p{font-size:11px}.trade-result strong{font-size:16px}.trade-result small{font-size:10px}.side-pill{font-size:9px}.history-filters{gap:8px;margin-top:12px}.search-field input,.select-field select{height:40px;font-size:12px}.search-field>span,.select-field>span{font-size:11px}.history-total{font-size:12px;padding:12px 0}.history-total strong{font-size:21px}.load-more{font-size:12px}.empty-state{padding:45px 15px}.empty-state h3{font-size:15px}.empty-state p{font-size:12px}.note-panel p{font-size:12px}#apply{padding-top:5px}.apply-intro-card{border-radius:12px}.apply-line-card,.risk-guide-card,.settings-panel{border-radius:12px}.apply-section-nav button{border-radius:8px}.settings-panel{scroll-margin-top:80px}#toast{bottom:92px;background:var(--paper);color:var(--ink);border:1px solid var(--line);font-size:12px}footer{padding:24px 0 10px;font-size:11px}.footer-brand{font-size:12px}footer small{font-size:10px}
@media(max-width:760px){.balance-overview{grid-template-columns:1fr}.balance-overview .balance-card{padding:14px;min-height:0}.balance-overview .balance-amount{font-size:27px}.balance-overview .balance-footer{gap:12px}.balance-overview .balance-divider{margin:11px 0 10px}.profit-overview{grid-template-columns:1fr 1fr;gap:6px}.profit-metric{padding:10px 11px;min-height:72px}.profit-metric>strong{font-size:24px;margin:4px 0 0}.profit-metric .metric-label{font-size:11px}.chart-toolbar{gap:0}.chart-toolbar .segmented button{font-size:10px;padding:4px 7px}.chart-panel .panel-head h2{font-size:13px}.overview-panel .test-name{display:none}.overview-panel .guide-link{margin-top:8px}.overview-panel .detail-list{margin-top:8px}.overview-panel .detail-list>div{font-size:12px}.explore-grid{grid-template-columns:1fr}.calendar-cell{min-height:70px}.calendar-cell small{font-size:10px}.daily-rate{font-size:9px}.calendar-summary{margin-top:10px}.page-heading{display:none}.theme-switch button{width:23px}.topbar{height:64px;gap:6px}.mobile-brand .kenshin-logo{--logo-width:60px}.desktop-title{font-size:13px}.apply-button{font-size:10px;min-height:32px;padding:6px 7px}.topbar .theme-switch{margin:0}.chart-wrap,#profit-chart{height:214px;min-height:214px}.stats-panel{margin-bottom:8px}}
@media(max-width:360px){main{padding-left:10px;padding-right:10px}.topbar{padding:0 9px;gap:4px}.mobile-brand .kenshin-logo{--logo-width:48px}.theme-switch button{width:20px;height:27px;min-height:27px}.theme-switch button svg{width:13px;height:13px}.desktop-title{font-size:11px}.apply-button{font-size:9px;padding:6px}.profit-metric>strong{font-size:22px}.profit-metric{padding:9px}.monthly-return-strip>span{font-size:10px}.monthly-return-strip strong{font-size:20px}.chart-panel .panel-head h2{font-size:12px}.chart-toolbar .segmented button{padding:4px 5px;font-size:9px}.calendar-cell small{font-size:9px}.daily-rate{font-size:8px}.bottom-nav a span{font-size:9px}.preview-bar,.preview-bar button{font-size:9px}}
.monthly-return-strip{min-height:42px;padding:8px 12px}.monthly-return-strip strong{line-height:1.2}.profit-metric{min-height:64px;padding:8px 11px}.profit-metric>strong{line-height:1.2;font-size:23px}.chart-wrap,#profit-chart{height:188px;min-height:188px}.chart-panel .panel-head{min-height:28px;align-items:center}.chart-panel .panel-head h2{line-height:1.4}.chart-wrap{margin-top:7px}.chart-bottom{display:none}.preview-bar{min-height:24px;padding:2px 8px}.chart-toolbar .segmented button{min-height:27px}.chart-toolbar{top:10px}@media(max-width:760px){.profit-metric{min-height:64px;padding:8px 11px}.profit-metric>strong{font-size:23px}.chart-wrap,#profit-chart{height:188px;min-height:188px}}
.calendar-summary{display:flex;width:fit-content;max-width:100%;padding:9px 18px;margin:14px auto 0;border-radius:24px;background:var(--raised);gap:20px}.calendar-summary>span{font-size:10px;line-height:1.4;gap:3px}.calendar-summary strong{font-size:19px;line-height:1.4;color:var(--ink)}.calendar-legend{font-size:9px;justify-content:center;gap:9px}.calendar-weekdays{padding:8px 0}.calendar-weekdays span:first-child{color:#cf8d91}.calendar-weekdays span:last-child{color:var(--accent-text)}.calendar-cell{min-height:66px}.calendar-weekdays,.calendar-grid{margin-left:0;margin-right:0}.daily-detail>p{font-size:12px}.calendar-cell .daily-rate{color:var(--green)}
.positions-heading{display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:9px 3px;margin-bottom:8px;gap:10px}.positions-heading h2{font-size:12px;color:var(--muted);margin:0}.positions-heading .count-pill{font-size:10px;background:transparent}.positions-heading #position-floating{font-size:14px;font-weight:600}.positions-heading #position-floating small{font-size:10px;color:var(--muted);margin-left:6px}.trade-summary .panel-head,.trade-summary h2{display:none}.trade-summary .detail-list{margin:0}.trade-summary .detail-list>div{padding:8px 0}.trade-summary .detail-list>div:first-child{padding-top:2px}.trade-summary .detail-list>div:last-child{padding-bottom:2px}.trade-summary .detail-list dd{font-weight:600}.trade-avatar{background:var(--soft);color:var(--accent-text)}#history .eyebrow{display:none}#history .history-filters{display:grid;grid-template-columns:1fr 1fr}#history .search-field input,#history .select-field select{font-size:11px}#history .search-field input{padding-right:5px}#history .search-field>span,#history .select-field>span{display:none}
