:root {
  --red: #ef334b;
  --green: #18af61;
  --blue: #5c82f4;
  --ink: #111827;
  --muted: #808692;
  --line: #edf0f4;
  --bg: #f5f6f9;
  --num: Arial, "Helvetica Neue", sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  min-height: 100vh;
  background: #dfe4ec;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

.phone-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 0;
}

.app-frame {
  position: relative;
  width: min(100vw, 390px);
  height: min(100vh, 844px);
  overflow: hidden;
  background: #fff;
}

@media (min-width: 430px) {
  .phone-shell {
    padding: 12px;
  }

  .app-frame {
    height: min(100vh - 24px, 844px);
    border-radius: 28px;
    box-shadow: 0 24px 70px rgba(13, 30, 54, .18);
  }
}

.screen {
  position: absolute;
  inset: 0;
  background: #fff;
  overflow: hidden;
}

.screenshot-scroll {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  scrollbar-width: none;
}

.screenshot-scroll::-webkit-scrollbar,
.analysis-scroll::-webkit-scrollbar {
  display: none;
}

.screenshot-img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  pointer-events: none;
}

.hotspot {
  position: absolute;
  background: rgba(255, 255, 255, 0);
  border: 0;
  padding: 0;
  outline: none;
}

.hotspot:active,
.hotspot:focus,
.nav-hitbar button:active,
.nav-hitbar button:focus,
.pixel-hotspot:active,
.pixel-hotspot:focus {
  background: transparent;
  outline: none;
}

.home-assets {
  left: 0;
  top: 186px;
  width: 25%;
  height: 115px;
}

.home-account {
  left: 12px;
  top: 62px;
  right: 12px;
  height: 94px;
}

.mine-assets {
  left: 22px;
  top: 292px;
  right: 18px;
  height: 170px;
}

.nav-hitbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 72px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: rgba(255, 255, 255, 0);
  z-index: 4;
}

.nav-hitbar button {
  background: transparent;
}

.pixel-analysis-screen {
  background: #fff;
  overflow-y: auto;
  scrollbar-width: none;
}

.pixel-analysis-screen::-webkit-scrollbar {
  display: none;
}

.pixel-base {
  position: relative;
  width: 390px;
  height: auto;
  display: block;
  user-select: none;
  pointer-events: none;
}

.pixel-hotspot {
  position: absolute;
  z-index: 5;
  background: transparent;
  padding: 0;
  outline: none;
}

.pixel-back {
  left: 0;
  top: 18px;
  width: 52px;
  height: 56px;
}

.pixel-tab-one,
.pixel-tab-two,
.pixel-tab-three {
  top: 54px;
  height: 58px;
}

.pixel-tab-one {
  left: 0;
  width: 130px;
}

.pixel-tab-two {
  left: 130px;
  width: 130px;
}

.pixel-tab-three {
  left: 260px;
  width: 130px;
}

.pixel-period {
  top: 283px;
  height: 54px;
}

.pixel-period-0 { left: 0; width: 50px; }
.pixel-period-1 { left: 50px; width: 88px; }
.pixel-period-2 { left: 138px; width: 70px; }
.pixel-period-3 { left: 208px; width: 48px; }
.pixel-period-4 { left: 256px; width: 68px; }
.pixel-period-5 { left: 324px; width: 66px; }

.pixel-mask {
  position: absolute;
  z-index: 2;
  background: #fff;
}

.tab-mask {
  left: 0;
  top: 49px;
  width: 390px;
  height: 65px;
}

.pixel-tabs {
  position: absolute;
  left: 0;
  top: 49px;
  z-index: 3;
  width: 390px;
  height: 65px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid #eef1f5;
  background: #fff;
  pointer-events: none;
}

.pixel-tabs span {
  position: relative;
  display: grid;
  place-items: center;
  color: #4f5561;
  font-size: 15px;
  line-height: 1;
  font-weight: 400;
}

.pixel-tabs span.active {
  color: #5c82f4;
  font-weight: 500;
}

.pixel-tabs span.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 24px;
  height: 3px;
  border-radius: 4px;
  background: #5c82f4;
  transform: translateX(-50%);
}

.period-mask {
  left: 0;
  top: 283px;
  width: 390px;
  height: 54px;
}

.pixel-period-labels {
  position: absolute;
  left: 0;
  top: 283px;
  z-index: 3;
  width: 390px;
  height: 54px;
  display: grid;
  grid-template-columns: 50px 88px 70px 48px 68px 66px;
  border-bottom: 1px solid #edf0f4;
  background: #fff;
  pointer-events: none;
}

.pixel-period-labels span {
  position: relative;
  display: grid;
  place-items: center;
  color: #525863;
  font-size: 15px;
  line-height: 1;
  font-weight: 400;
  white-space: nowrap;
  transform: scaleX(1);
  transform-origin: center;
}

.pixel-period-labels span.active {
  color: #5c82f4;
  font-weight: 500;
}

.pixel-period-labels span.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 24px;
  height: 3px;
  border-radius: 4px;
  background: #5c82f4;
  transform: translateX(-50%);
}

.pixel-num {
  position: absolute;
  z-index: 3;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  text-align: center;
  font-family: Arial, "Helvetica Neue", sans-serif;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: 0;
  transform: scaleX(.88);
  transform-origin: center;
  white-space: nowrap;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.asset-mask { left: 145px; top: 148px; width: 122px; height: 33px; }
.asset-num { left: 130px; top: 151px; width: 152px; font-size: 25px; font-weight: 500; }
.total-mask { left: 18px; top: 210px; width: 180px; height: 42px; }
.total-num { left: 2px; top: 217px; width: 200px; font-size: 26px; font-weight: 500; }
.yesterday-mask { left: 238px; top: 210px; width: 128px; height: 42px; }
.yesterday-num { left: 235px; top: 217px; width: 128px; font-size: 26px; font-weight: 500; }
.month-mask { left: 54px; top: 417px; width: 250px; height: 56px; }
.month-num { left: 38px; top: 422px; width: 292px; font-size: 44px; font-weight: 500; }
.pnl-title-mask { left: 14px; top: 337px; width: 126px; height: 32px; }
.note-mask { left: 62px; top: 472px; width: 312px; height: 28px; }
.pnl-title {
  position: absolute;
  left: 16px;
  top: 346px;
  z-index: 4;
  color: #111827;
  font-size: 20px;
  font-weight: 850;
  line-height: 1;
  pointer-events: none;
}
.pnl-title i {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-left: 4px;
  border: 1.4px solid #67707d;
  border-radius: 50%;
  color: #67707d;
  font-family: Arial, "Helvetica Neue", sans-serif;
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  transform: translateY(-1px);
}
.pixel-note {
  position: absolute;
  left: 66px;
  top: 481px;
  z-index: 4;
  width: 304px;
  color: #9a9fa8;
  font-size: 12.5px;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
}
.ordinary-mask { left: 31px; top: 524px; width: 136px; height: 58px; }
.credit-mask { left: 226px; top: 524px; width: 136px; height: 58px; }
.cumulative-rate-mask { left: 34px; top: 628px; width: 104px; height: 24px; }
.hs300-rate-mask { left: 154px; top: 628px; width: 84px; height: 22px; }
.dirty-total-label-mask { left: 58px; top: 188px; width: 102px; height: 28px; }
.dirty-center-mark-mask { left: 184px; top: 238px; width: 30px; height: 32px; }
.dirty-month-dash-mask { left: 308px; top: 458px; width: 34px; height: 24px; }
.dirty-legend-left-mask { left: 34px; top: 632px; width: 34px; height: 22px; }
.redrawn-total-label {
  position: absolute;
  left: 72px;
  top: 190px;
  z-index: 4;
  color: #767d89;
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  pointer-events: none;
}
.account-mini-label {
  position: absolute;
  z-index: 4;
  width: 116px;
  color: #8d939d;
  font-size: 12.5px;
  line-height: 1;
  text-align: center;
  pointer-events: none;
}
.account-mini-num {
  position: absolute;
  z-index: 4;
  width: 116px;
  color: #111827;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  transform: none;
  pointer-events: none;
}
.credit-num {
  background: transparent;
  padding: 0;
  margin: 0;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.ordinary-label { left: 41px; top: 536px; }
.ordinary-num { left: 41px; top: 558px; }
.credit-label { left: 236px; top: 536px; }
.credit-num { left: 236px; top: 558px; }
.legend-edit {
  position: absolute;
  z-index: 4;
  width: 78px;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  color: var(--green);
  font-family: Arial, "Helvetica Neue", sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
  transform: scaleX(.94);
  transform-origin: center;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.legend-edit.pos {
  color: var(--red);
}
.legend-edit.neg {
  color: var(--green);
}
.cumulative-rate-num { left: 48px; top: 631px; }
.hs300-rate-num { left: 159px; top: 631px; }

.analysis-extra {
  position: relative;
  z-index: 6;
  margin-top: -20px;
  padding: 18px 20px 34px;
  background: #fff;
  border-top: 1px solid #edf0f4;
}

.extra-title {
  color: #111827;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 12px;
}

.extra-title.small {
  margin-top: 20px;
}

.detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 42px;
  border-bottom: 1px solid #edf0f4;
  color: #737985;
  font-size: 15px;
}

.detail-row b {
  color: #111827;
  font-family: Arial, "Helvetica Neue", sans-serif;
  font-size: 16px;
}

.metric-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.metric-cards span {
  display: grid;
  gap: 7px;
  padding: 12px 8px;
  border-radius: 6px;
  background: #f6f8fc;
  text-align: center;
}

.metric-cards small {
  color: #8d939d;
  font-size: 12px;
}

.metric-cards .metric-value {
  display: inline-block;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #111827;
  font-family: Arial, "Helvetica Neue", sans-serif;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  transform: none;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.metric-cards .metric-value.pos {
  color: var(--red);
}

.metric-cards .metric-value.neg {
  color: var(--green);
}

.analysis-screen {
  background: #fff;
}

.analysis-scroll {
  height: 100%;
  overflow-y: auto;
  scrollbar-width: none;
  padding-bottom: 24px;
}

.fake-status {
  height: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  padding: 0 30px;
  color: #111;
  font-size: 21px;
  font-weight: 800;
  line-height: 1;
  background: #fff;
}

.fake-status .brand {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 15px;
  font-weight: 800;
  color: #333;
  white-space: nowrap;
}

.fake-status .brand i {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.fake-status span:last-child {
  justify-self: end;
  font-size: 16px;
  white-space: nowrap;
}

.analysis-header {
  height: 61px;
  display: grid;
  grid-template-columns: 54px 1fr 54px;
  align-items: center;
  padding: 0 16px;
  background: #fff;
}

.back-btn {
  background: transparent;
  color: #555b64;
  font-size: 38px;
  font-weight: 300;
  line-height: 1;
  text-align: left;
  transform: translateY(-2px);
}

.analysis-header h1 {
  margin: 0;
  text-align: center;
  font-size: 25px;
  line-height: 1;
  font-weight: 900;
}

.analysis-tabs {
  height: 64px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.analysis-tabs button {
  position: relative;
  background: transparent;
  color: #5b616d;
  font-size: 21px;
  font-weight: 400;
}

.analysis-tabs .active {
  color: var(--blue);
  font-weight: 800;
}

.analysis-tabs .active::after,
.periods .active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 28px;
  height: 4px;
  border-radius: 4px;
  background: var(--blue);
  transform: translateX(-50%);
}

.analysis-summary {
  height: 274px;
  display: grid;
  grid-template-rows: 98px 110px 40px;
  align-items: center;
  text-align: center;
  background: #fff;
  border-bottom: 8px solid #f5f6f9;
}

.metric-block {
  min-width: 0;
}

.metric-label {
  color: #7b818d;
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
}

.info-dot {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-left: 4px;
  border: 1.5px solid #8d94a0;
  border-radius: 50%;
  color: #7b818d;
  font-size: 12px;
  font-weight: 500;
  transform: translateY(-1px);
}

.editable {
  user-select: none;
  cursor: pointer;
  touch-action: manipulation;
  border-radius: 6px;
  padding: 3px 6px;
}

.editable:active {
  background: #f3f6ff;
}

.metric-value {
  display: inline-block;
  margin-top: 17px;
  background: transparent;
  color: var(--red);
  font-family: var(--num);
  font-size: 23px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  transform: scaleX(.9);
  transform-origin: center;
}

.asset-metric .metric-value {
  font-size: 24px;
}

.pair-grid {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}

.pair-grid .metric-block:first-child {
  height: 54px;
  border-right: 1px solid #edf0f4;
}

.pair-grid .metric-label {
  font-size: 19px;
}

.pair-grid .metric-value {
  font-size: 24px;
}

.down-mark {
  color: #a8adb5;
  font-size: 33px;
  line-height: 1;
  font-weight: 200;
}

.periods {
  height: 62px;
  display: grid;
  grid-template-columns: 48px 88px 70px 48px 68px 68px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.periods button {
  position: relative;
  min-width: 0;
  background: transparent;
  color: #525863;
  font-size: 16px;
  font-weight: 400;
  white-space: nowrap;
  padding: 0;
}

.periods .active {
  color: var(--blue);
  font-weight: 900;
}

.profit-section {
  padding: 22px 18px 0;
  background: #fff;
  text-align: center;
}

.profit-section h2 {
  margin: 0 0 48px;
  text-align: left;
  color: var(--ink);
  font-size: 25px;
  line-height: 1;
  font-weight: 900;
}

.profit-label {
  margin-bottom: 20px;
  color: #888e99;
  font-size: 20px;
  line-height: 1;
}

.profit-value {
  display: inline-block;
  margin-bottom: 20px;
  background: transparent;
  color: var(--green);
  font-family: var(--num);
  font-size: 43px;
  line-height: .95;
  font-weight: 500;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  transform: scaleX(.9);
  transform-origin: center;
}

.profit-section p {
  margin: 0 0 28px;
  color: #8d939d;
  font-size: 16px;
  line-height: 1.2;
}

.account-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  padding: 0 34px;
  margin-bottom: 24px;
}

.account-row > div {
  display: grid;
  justify-items: center;
  color: #8d939d;
  font-size: 16px;
}

.account-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
  border: 3px solid #5d83f4;
  border-radius: 6px;
  color: #5d83f4;
  font-size: 22px;
}

.account-row b {
  display: inline-block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 20px;
}

.account-row b.pos,
.account-row b.neg {
  font-family: var(--num);
  font-size: 23px;
  font-weight: 500;
  transform: scaleX(.9);
}

.chart-area {
  position: relative;
  height: 240px;
  padding: 14px 18px 0;
  border-top: 1px solid #e5e7eb;
  background: #fff;
}

.legend {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  align-items: start;
  color: #333;
  font-size: 17px;
  text-align: left;
}

.legend small {
  display: block;
  margin-top: 5px;
  margin-left: 42px;
  color: var(--green);
  font-size: 16px;
}

.red-line,
.blue-line {
  display: inline-block;
  width: 32px;
  height: 2px;
  margin-right: 6px;
  vertical-align: middle;
  position: relative;
}

.red-line {
  background: var(--red);
}

.blue-line {
  background: #5b83f1;
}

.red-line::after,
.blue-line::after {
  content: "";
  position: absolute;
  right: -3px;
  top: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.red-line::after {
  color: var(--red);
}

.blue-line::after {
  color: #5b83f1;
}

.checks {
  white-space: nowrap;
  line-height: 1.55;
}

.checks span {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 7px;
  border: 1.5px solid #c9cdd3;
  vertical-align: -2px;
}

.gridline {
  position: absolute;
  left: 20px;
  right: 20px;
  border-top: 1px dashed #dfe2e7;
}

.gridline.top {
  top: 95px;
}

.gridline.mid {
  top: 157px;
}

.chart {
  position: absolute;
  left: 60px;
  bottom: 20px;
  width: 145px;
  height: 82px;
}

.axis {
  position: absolute;
  right: 20px;
  color: #9a9fa8;
  font-size: 17px;
}

.axis.a1 {
  top: 86px;
}

.axis.a2 {
  top: 148px;
}

.pos {
  color: var(--red);
}

.neg {
  color: var(--green);
}

.edit-mask {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 10, 20, .35);
  z-index: 20;
}

.edit-mask[hidden] {
  display: none;
}

.edit-dialog {
  width: min(330px, 100%);
  padding: 20px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(4, 10, 20, .22);
}

.edit-dialog h2 {
  margin: 0 0 14px;
  font-size: 21px;
}

.edit-dialog input {
  width: 100%;
  padding: 12px;
  border: 1px solid #dce2ed;
  border-radius: 8px;
  outline: none;
  font-size: 22px;
}

.edit-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.edit-actions button {
  padding: 12px;
  border-radius: 8px;
  background: #eef2f8;
  color: #3f4a5f;
}

.edit-actions button:last-child {
  background: var(--red);
  color: #fff;
  font-weight: 800;
}
