/* Home fit v34: readable phone layout, same desktop grid. */
.ix-home-logo { display: none; }
body[data-page="home"] { overflow-x: clip; }

@media (max-width: 760px) {
  body[data-page="home"] .ix-home-logo { display: inline-flex; align-items: center; flex: 0 0 auto; }
  body[data-page="home"] .ix-home-logo img { height: 28px; width: auto; max-width: 148px; display: block; }
  body[data-page="home"] .merged-topbar { flex-wrap: wrap; }
  body[data-page="home"] {
    padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px));
  }
  body[data-page="home"] .main {
    padding: 12px 12px calc(124px + env(safe-area-inset-bottom, 0px)) !important;
  }
  body[data-page="home"] .merged-portfolio,
  body[data-page="home"] .portfolio {
    min-width: 0;
  }
  body[data-page="home"] .ikon-share-copy strong {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    line-height: 1.35;
  }
  body[data-page="home"] .feature-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  body[data-page="home"] .feature-grid .feature {
    min-height: 72px;
  }
  body[data-page="home"] .feature-grid .feature-top strong,
  body[data-page="home"] .feature-grid .feature p {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    line-height: 1.25;
  }
  body[data-page="home"] .feature-grid .feature-top strong {
    font-size: 12px !important;
  }
  body[data-page="home"] .feature-grid .feature p {
    font-size: 11px !important;
  }
  body[data-page="home"] .stats {
    grid-template-columns: 1fr 1fr !important;
  }
  body[data-page="home"] .final-plan-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  body[data-page="home"] .final-plan-card {
    padding: 16px 14px !important;
    align-items: flex-start !important;
  }
  body[data-page="home"] .final-plan-card h3,
  body[data-page="home"] .final-plan-card p {
    font-size: 16px !important;
  }
  body[data-page="home"] .final-plan-card small {
    font-size: 12px !important;
    text-align: left !important;
  }
  body[data-page="home"] .final-plan-heading {
    align-items: flex-start;
    gap: 6px;
  }
  body[data-page="home"] .merged-portfolio .action,
  body[data-page="home"] .ikon-copy-btn {
    min-height: 44px;
  }
}

@media (max-width: 380px) {
  body[data-page="home"] .feature-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (min-width: 761px) {
  body[data-page="home"] .shell {
    grid-template-columns: clamp(208px, 16vw, 246px) minmax(0, 1fr) !important;
  }
  body[data-page="home"] .sidebar {
    display: flex !important;
  }
  body[data-page="home"] .mobile-nav,
  body[data-page="home"] .ikon-dock {
    display: none !important;
  }
  body[data-page="home"] .main {
    min-width: 0;
    padding-bottom: 28px !important;
  }
  body[data-page="home"] .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body[data-page="home"] .final-plan-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  body[data-page="home"] .feature-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

body[data-page="home"] .stats {
  align-items: stretch;
}
body[data-page="home"] .stats .stat {
  min-height: 84px;
  height: 100%;
  padding: 12px 14px !important;
  gap: 10px !important;
  border-radius: 14px;
}
body[data-page="home"] .stats .stat .svgicon {
  width: 26px !important;
  height: 26px !important;
}
body[data-page="home"] .stats .stat-text {
  min-width: 0;
  flex: 1;
}
body[data-page="home"] .stats .stat span {
  font-size: 12px !important;
  line-height: 1.25 !important;
  white-space: normal !important;
}
body[data-page="home"] .stats .stat b {
  font-size: 20px !important;
  line-height: 1.2 !important;
  letter-spacing: -0.3px;
  margin-top: 2px;
}

@media (max-width: 760px) {
  body[data-page="home"] .stats .stat {
    min-height: 84px;
    padding: 10px !important;
    gap: 8px !important;
  }
  body[data-page="home"] .stats .stat .svgicon {
    width: 22px !important;
    height: 22px !important;
  }
  body[data-page="home"] .stats .stat span { font-size: 12px !important; }
  body[data-page="home"] .stats .stat b { font-size: 18px !important; }
}

body[data-page="home"] .merged-portfolio{background:#fff!important;color:#3D0191!important;border:1px solid #eadcf8!important}
body[data-page="home"] .merged-portfolio .port-head,body[data-page="home"] .merged-portfolio .balance{color:#078646!important}
body[data-page="home"] .merged-portfolio .welcome h1,body[data-page="home"] .merged-portfolio .identity,body[data-page="home"] .merged-portfolio .righthead{color:#3D0191!important}
body[data-page="home"] .ix-port-line{position:relative;display:flex;align-items:center;gap:16px;min-height:128px;padding:4px 150px 4px 2px;box-sizing:border-box}
body[data-page="home"] .ikon-reinvest{flex:none;flex-direction:row;align-items:center;gap:8px;width:auto}
body[data-page="home"] .ikon-reinvest svg{width:42px;height:42px}
body[data-page="home"] .ikon-reinvest span{color:#3D0191!important;font-size:12px;white-space:nowrap}
body[data-page="home"] .ikon-reinvest b{color:#078646!important}
body[data-page="home"] .ix-port-line .port-head{padding-left:0!important;margin:0!important}
body[data-page="home"] .ix-port-line .balance{margin:2px 0 0!important;letter-spacing:0!important;font-size:32px!important;line-height:1.1!important;max-width:none!important;font-weight:700!important}
body[data-page="home"] .ix-coin{position:absolute;right:0;top:50%;width:128px;height:auto;transform:translateY(-50%);z-index:1;pointer-events:none;user-select:none}
body[data-page="home"] .ikon-share-strip{position:relative;z-index:3}
body[data-page="home"] .merged-portfolio .trend{opacity:0}
body[data-page="home"] .merged-portfolio .trend path{stroke:#078646!important}
@media(max-width:760px){
  body[data-page="home"] .ix-port-line{min-height:84px;padding-right:84px;justify-content:flex-start;gap:10px}
  body[data-page="home"] .ikon-reinvest{flex-direction:column;gap:2px}
  body[data-page="home"] .ikon-reinvest span{font-size:10px}
  body[data-page="home"] .ix-port-line .balance{font-size:26px!important}
  body[data-page="home"] .ix-coin{width:76px}
  body[data-page="home"] .merged-portfolio .balance,body[data-page="home"] .merged-portfolio .port-head{max-width:100%}
}
body[data-page="home"] .merged-portfolio .trend stop{stop-color:#078646!important}
body[data-page="home"] .merged-portfolio .trend circle{stroke:#078646!important;fill:#fff!important}
