html[data-theme="a"] body.cc-app:has(.sc-overview-a) {
  background: var(--bg) !important;
  color: var(--t1);
}

html[data-theme="a"] body.cc-app:has(.sc-overview-a) :is(.cc-workspace, .cc-main) {
  background: transparent !important;
}

html[data-theme="a"] .sc-content:has(> .sc-overview-a) > :is(h1, .sc-lead, .sc-toolbar) {
  display: none;
}

html[data-theme="a"] body.cc-app .sc-overview-a {
  --overview-gap: 14px;
  display: grid;
  gap: var(--overview-gap);
  position: relative;
  font-family: var(--a-font);
  font-variant-numeric: tabular-nums;
  color: var(--t1);
}

html[data-theme="a"] body.cc-app .sc-overview-a :is(.sc-overview-top, .sc-overview-columns) {
  display: contents !important;
}

html[data-theme="a"] body.cc-app .sc-overview-a .sc-panel {
  min-width: 0;
  min-height: 0;
  margin: 0 !important;
  padding: 20px !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--a-radius-panel) !important;
  background: var(--s1) !important;
  color: var(--t1) !important;
  box-shadow: none !important;
}

html[data-theme="a"] body.cc-app .sc-overview-identity,
html[data-theme="a"] body.cc-app .sc-overview-wallet-footer {
  display: flex;
  align-items: center;
  gap: 10px;
}

html[data-theme="a"] body.cc-app .sc-overview-identity strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-theme="a"] body.cc-app .sc-overview-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--s3);
  color: var(--t1);
  font-weight: 600;
}

html[data-theme="a"] body.cc-app .sc-overview-a .sc-overview-bell {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  min-height: 44px;
  padding: 0;
  margin-left: auto;
  border: 1px solid var(--line2);
  border-radius: 50% !important;
  background: var(--s2) !important;
  color: var(--t1) !important;
}

html[data-theme="a"] body.cc-app .sc-overview-bell svg {
  width: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

html[data-theme="a"] body.cc-app .sc-overview-a .sc-overview-balances {
  margin: 8px 0 12px;
}

html[data-theme="a"] body.cc-app .sc-overview-a .sc-overview-balances > div {
  display: block;
}

html[data-theme="a"] body.cc-app .sc-overview-a .sc-overview-balances small {
  margin: 0;
  color: var(--t2);
}

html[data-theme="a"] body.cc-app .sc-overview-a .sc-overview-balances > div > small:first-child {
  display: block;
}

html[data-theme="a"] body.cc-app .sc-overview-a .sc-overview-balances strong {
  margin: 2px 0;
  color: var(--t1);
  font-size: clamp(27px, 9vw, var(--fs-hero)) !important;
  overflow-wrap: anywhere;
}

html[data-theme="a"] body.cc-app .sc-overview-decimal {
  font-size: .53em;
  color: var(--t3);
}

html[data-theme="a"] body.cc-app .sc-overview-allocation {
  margin-top: 10px;
}

html[data-theme="a"] body.cc-app .sc-overview-allocation-bar {
  display: flex;
  height: 7px;
  overflow: hidden;
  border-radius: var(--a-radius-pill);
  background: var(--s3);
}

html[data-theme="a"] body.cc-app .sc-overview-allocation-bar span {
  flex: 0 1 0;
}

html[data-theme="a"] body.cc-app .sc-overview-allocation-bar span:first-child {
  background: var(--warn);
}

html[data-theme="a"] body.cc-app .sc-overview-allocation-bar span:nth-child(2) {
  background: var(--a-meter);
}

html[data-theme="a"] body.cc-app .sc-overview-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 12px;
  margin-top: 6px;
  color: var(--t2);
  font-size: var(--fs-xs);
}

html[data-theme="a"] body.cc-app .sc-overview-legend > span::before {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-inline-end: 5px;
  border-radius: 50%;
  background: var(--warn);
  content: "";
}

html[data-theme="a"] body.cc-app .sc-overview-legend > span:nth-child(2)::before {
  background: var(--a-meter);
}

html[data-theme="a"] body.cc-app .sc-overview-a .sc-overview-hold {
  margin: 0;
  color: var(--t2);
  font-size: var(--fs-xs);
}

html[data-theme="a"] body.cc-app .sc-overview-wallet-footer > .sc-overview-hold {
  order: -1;
}

html[data-theme="a"] body.cc-app .sc-overview-wallet-footer > .sc-overview-hold[open] {
  flex-basis: 100%;
}

html[data-theme="a"] body.cc-app .sc-overview-hold summary {
  width: fit-content;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: var(--t2) !important;
  min-height: 0 !important;
  padding: 2px 0 !important;
  cursor: pointer;
}

html[data-theme="a"] body.cc-app .sc-overview-a .sc-overview-card-hold p {
  margin: 4px 0;
  color: var(--t2);
}

html[data-theme="a"] body.cc-app .sc-overview-a .sc-overview-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px !important;
  margin-top: 0;
}

html[data-theme="a"] body.cc-app .sc-overview-a .a-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  color: var(--t1) !important;
}

html[data-theme="a"] body.cc-app .sc-overview-a .a-button--primary {
  color: var(--lime-ink) !important;
}

html[data-theme="a"] body.cc-app .sc-overview-wallet-footer {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 6px;
}

html[data-theme="a"] body.cc-app .sc-overview-a .sc-overview-available-count,
html[data-theme="a"] body.cc-app .sc-overview-a .sc-overview-count::after {
  content: none;
}

html[data-theme="a"] body.cc-app .sc-overview-a .sc-overview-available-count > small {
  display: inline;
}

html[data-theme="a"] body.cc-app .sc-overview-a .sc-overview-available-count > .sc-overview-count {
  display: inline;
  margin: 0;
  color: var(--t2);
  font-size: var(--fs-xs) !important;
}

html[data-theme="a"] body.cc-app .sc-overview-a .sc-overview-count::after {
  content: none;
}

html[data-theme="a"] body.cc-app .sc-overview-a .sc-overview-available-count > small {
  display: inline;
}

html[data-theme="a"] body.cc-app .sc-overview-a .sc-overview-available-count > .sc-overview-count {
  margin-inline-start: .5em;
  color: var(--t1);
}

html[data-theme="a"] body.cc-app .sc-overview-a :is(.sc-overview-stack-panel, .sc-overview-ledger) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr;
  align-items: start;
  gap: 8px;
}

html[data-theme="a"] body.cc-app .sc-overview-a .sc-panel h2 {
  margin: 0 !important;
  color: var(--t1) !important;
  font-size: var(--fs-lg) !important;
}

html[data-theme="a"] body.cc-app .sc-overview-card-total {
  color: var(--t3);
}

html[data-theme="a"] body.cc-app .sc-overview-a .sc-overview-more {
  position: static;
  color: var(--t2) !important;
}

html[data-theme="a"] body.cc-app .sc-overview-a :is(.sc-overview-card-list, .sc-overview-recent, .sc-overview-card-notice, .sc-overview-empty-action) {
  grid-column: 1 / -1;
}

html[data-theme="a"] body.cc-app .sc-overview-a .sc-overview-empty-action {
  justify-self: start;
}

html[data-theme="a"] body.cc-app .sc-overview-a .sc-help {
  color: var(--t2) !important;
}

html[data-theme="a"] body.cc-app .sc-overview-a .sc-overview-entry {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0 8px;
  min-height: 49px;
  padding: 5px 0 !important;
  border-bottom: 1px solid var(--line) !important;
}

html[data-theme="a"] body.cc-app .sc-overview-a .sc-overview-entry > div {
  grid-row: 1 / span 2;
  gap: 0;
}

html[data-theme="a"] body.cc-app .sc-overview-a .sc-overview-entry strong {
  display: block;
  overflow: hidden;
  color: var(--t1);
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-theme="a"] body.cc-app .sc-overview-a .sc-overview-entry small {
  color: var(--t2);
}

html[data-theme="a"] body.cc-app .sc-overview-a .sc-overview-entry::before {
  content: "▤";
  grid-row: 1 / span 2;
  width: 32px;
  height: 32px;
  background: var(--s3);
  color: var(--t2);
}

html[data-theme="a"] body.cc-app .sc-overview-a .sc-overview-entry[data-direction="in"]::before {
  content: "↓";
  color: var(--pos);
}

html[data-theme="a"] body.cc-app .sc-overview-a .sc-overview-entry[data-fee="true"]::before {
  content: "•";
}

html[data-theme="a"] body.cc-app .sc-overview-a .sc-overview-entry > small:not([hidden]) {
  display: block !important;
  grid-column: 3;
  text-align: right;
  max-width: 160px;
}

html[data-theme="a"] body.cc-app .sc-overview-a .sc-overview-amount {
  color: var(--t1) !important;
}

html[data-theme="a"] body.cc-app .sc-overview-a [data-direction="in"] > .sc-overview-amount {
  color: var(--pos) !important;
}

html[data-theme="a"] body.cc-app .sc-overview-a :is(.sc-overview-timezone, .sc-overview-today, [hidden]) {
  display: none !important;
}

@media (min-width: 1024px) {
  html[data-theme="a"] body.cc-app .sc-overview-a {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 20px;
  }

  html[data-theme="a"] body.cc-app .sc-overview-a .sc-overview-ledger {
    grid-column: 1 / -1;
  }

  html[data-theme="a"] body.cc-app .sc-content:has(> .sc-overview-a) > .sc-toolbar {
    display: flex;
    position: static;
    justify-content: flex-end;
    margin-top: 12px;
  }

  html[data-theme="a"] body.cc-app .sc-content:has(> .sc-overview-a) > .sc-toolbar .button {
    border-color: var(--line2) !important;
    background: var(--s2) !important;
    color: var(--t1) !important;
  }
}

@media (max-width: 1023px) {
  html[data-theme="a"] body.cc-app.cc-ready:has(.sc-overview-a) .cc-topbar {
    display: none !important;
  }

  html[data-theme="a"] body.cc-app:has(.sc-overview-a) .cc-main {
    padding: max(12px, env(safe-area-inset-top, 0px)) 16px calc(var(--a-nav-bottom) + 74px);
  }
}

html[data-theme="a"]:is([data-layout="duo-outer-app"], [data-layout="duo-outer-safari"]) body.cc-app .sc-overview-a {
  --overview-gap: 2px;
}

html[data-theme="a"]:is([data-layout="duo-outer-app"], [data-layout="duo-outer-safari"]) body.cc-app .sc-overview-a .sc-panel {
  padding: 4px !important;
  border: 0 !important;
  background: transparent !important;
}

html[data-theme="a"][data-layout="duo-outer-app"] body.cc-app:has(.sc-overview-a) {
  --duo-nogo-w: 16vw;
  --duo-nogo-h: 23dvh;
}

html[data-theme="a"][data-layout="duo-outer-app"] body.cc-app.cc-ready:has(.sc-overview-a) .cc-topbar {
  display: block !important;
  position: absolute;
  inset: 0 0 auto;
  z-index: 0;
  height: calc(var(--duo-nogo-h) + 80px) !important;
  padding: 0 !important;
  background: none !important;
  border: 0 !important;
  pointer-events: none;
}

html[data-theme="a"][data-layout="duo-outer-app"] body.cc-app:has(.sc-overview-a) .cc-topbar > * {
  display: none !important;
}

html[data-theme="a"][data-layout="duo-outer-app"] body.cc-app .sc-overview-wallet > :is(.sc-overview-identity, .sc-overview-balances) {
  margin-right: max(var(--duo-nogo-w), calc(var(--a-outer-right) - 16px));
}

html[data-theme="a"][data-layout="duo-outer-app"] body.cc-app .sc-overview-a .sc-overview-actions,
html[data-theme="a"][data-layout="duo-outer-app"] body.cc-app .sc-overview-a .sc-overview-wallet-footer {
  margin-right: 64px;
}

html[data-theme="a"][data-layout="duo-outer-app"] body.cc-app .sc-overview-a .sc-overview-identity {
  min-height: 44px;
}

html[data-theme="a"][data-layout="duo-outer-app"] body.cc-app .sc-overview-a .sc-overview-balances {
  min-height: calc(var(--duo-nogo-h) - 84px);
}

html[data-theme="a"][data-layout="duo-outer-app"] body.cc-app .sc-overview-a .sc-overview-today:not([hidden]) {
  display: block !important;
  position: absolute;
  right: 14px;
  top: var(--duo-nogo-h);
  writing-mode: vertical-rl;
  pointer-events: none;
  color: var(--t2);
  font-size: var(--fs-xs);
}

html[data-theme="a"][data-layout="duo-inner-landscape"] body.cc-app .sc-overview-a {
  grid-template-columns: minmax(0, calc(50vw - 88px - var(--a-nav-left))) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: 24px;
}

html[data-theme="a"][data-layout="duo-inner-landscape"] body.cc-app .sc-overview-wallet {
  grid-row: 1 / 3;
  align-self: start;
}

html[data-theme="a"][data-layout="duo-inner-portrait"] body.cc-app .sc-overview-a {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(calc(50dvh - 12px), auto) auto;
  align-items: start;
}

html[data-theme="a"][data-layout="duo-inner-portrait"] body.cc-app .sc-overview-a .sc-overview-ledger {
  grid-column: 1 / -1;
}

html[data-theme="a"]:is([data-layout="duo-outer-app"], [data-layout="duo-outer-safari"]) body.cc-app .sc-overview-wallet {
  overflow: visible;
}

html[data-theme="a"]:is([data-layout="duo-outer-app"], [data-layout="duo-outer-safari"]) body.cc-app .sc-overview-a .sc-overview-entry {
  min-height: 44px;
}

/* Leave a viewport-fixed hit-test surface over the system capsule when content scrolls. */
html[data-theme="a"][data-layout="duo-outer-app"] body.cc-app:has(.sc-overview-a) .cc-workspace::before {
  content: "";
  position: fixed;
  z-index: 32;
  top: 0;
  right: 0;
  width: var(--duo-nogo-w);
  height: var(--duo-nogo-h);
}

html[data-theme="a"]:is([data-layout="duo-outer-app"], [data-layout="duo-outer-safari"]) body.cc-app .sc-overview-a {
  line-height: 1.35;
}

html[data-theme="a"]:is([data-layout="duo-outer-app"], [data-layout="duo-outer-safari"]) body.cc-app .sc-overview-a :is(.sc-overview-stack-panel, .sc-overview-ledger) {
  gap: 4px 8px;
}

html[data-theme="a"] body.cc-app .sc-overview-a .sc-overview-bell {
  cursor: pointer;
}

@media (max-width: 760px) {
  html[data-theme="a"] body.cc-app:has(.sc-overview-a):has(> .cc-mobile-nav:not([hidden]))::after {
    content: "";
    position: fixed;
    z-index: 34;
    inset: auto 0 0;
    height: var(--a-nav-bottom);
    background: var(--bg);
    pointer-events: none;
  }
}

/* 12-03 白话（P1-6）：总览钱包卡里一句 95% 说明，紧跟「在卡上 · 还能开卡」。 */
html[data-theme="a"] body.cc-app .sc-overview-allocation-why {
  margin: 2px 0 0;
  color: var(--t3);
  font-size: var(--fs-xs);
  line-height: 1.35;
}
