#unified-prl-dashboard {
  color: var(--xs-text, #455a74);
  padding-block: 18px 12px;
  scroll-margin-top: 72px;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

.unified-income-tabs {
  display: flex;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  padding: 4px;
  margin-bottom: 16px;
  border: 1px solid #dce7f4;
  border-radius: 12px;
  background: #f1f6fc;
  scroll-margin-top: 120px;
}

.unified-income-tabs button {
  flex: 1 1 auto;
  padding: 10px 16px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #445f7c;
  font: 600 14px/1.5 "Microsoft YaHei", "PingFang SC", sans-serif;
  white-space: nowrap;
  cursor: pointer;
}

.unified-income-tabs button[aria-selected='true'] {
  background: #1677ff;
  color: white;
}

.unified-income-tabs button:focus-visible {
  outline: 2px solid #155fbf;
  outline-offset: 2px;
}

#unified-ai-panel[hidden],
#unified-prl-panel[hidden] { display: none !important; }

.unified-income-terms {
  margin: 8px 0 0;
  font-size: 12px;
  color: #536d88;
  line-height: 1.8;
}

#unified-prl-dashboard[hidden],
#unified-prl-dashboard [hidden] {
  display: none;
}

#unified-prl-dashboard *,
#unified-prl-dashboard *::before,
#unified-prl-dashboard *::after {
  box-sizing: border-box;
}

#unified-prl-dashboard :where(h2, h3, p) {
  margin: 0;
}

#unified-prl-dashboard :is(button, input) {
  font-family: inherit;
}

#unified-prl-dashboard button,
.db-own summary {
  cursor: pointer;
}

#unified-prl-dashboard :is(button, summary, input):focus-visible {
  outline: 2px solid var(--xs-blue, #1677ff);
  outline-offset: 2px;
}

.db-toolbar,
.db-cardhead,
.db-goal-head,
.db-gpuhead,
.db-goal-value,
.db-ice > div:first-child {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.db-toolbar {
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.db-kicker,
.db-goal-head p {
  color: #3972b7;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: .5px;
}

.db-toolbar h2 {
  color: var(--xs-heading, #1e3b5a);
  font-size: 25px;
  font-weight: 700;
  line-height: 1.4;
}

.db-source {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  background: #fff;
  border: 1px solid var(--xs-line, #dce7f4);
  border-radius: 14px;
  box-shadow: var(--xs-card-shadow, 0 8px 25px rgba(32,70,116,.035));
}

.db-source button,
.db-goals button {
  color: var(--xs-muted, #536d88);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  line-height: 1.5;
}

.db-source button {
  padding: 8px 12px;
  font-size: 13px;
}

.db-source button[aria-pressed='true'],
.db-goals button[aria-pressed='true'] {
  color: #1769df;
  background: var(--xs-pale, #eaf3ff);
  font-weight: 600;
}

.db-grid,
.db-column {
  display: grid;
  min-width: 0;
  gap: 16px;
}

.db-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.db-extras {
  margin-top: 16px;
}

.db-card,
.db-goal {
  min-width: 0;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--xs-line, #dce7f4);
  border-radius: 19px;
  box-shadow: var(--xs-card-shadow, 0 8px 25px rgba(32,70,116,.035));
}

.db-cardhead h3,
.db-goal-head h3 {
  color: #1d3b5c;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.4;
}

.db-cardhead > span,
.db-gpuhead > span {
  flex: none;
  padding: 4px 8px;
  border-radius: 5px;
  color: #546d85;
  background: #f0f3f7;
  font-size: 11px;
  line-height: 1.4;
}

.db-goal {
  background: radial-gradient(ellipse at 100% 0%, rgba(245,190,70,.11), transparent 40%), linear-gradient(120deg, #f2f7ff, #fff 65%);
}

.db-goal-head h3 {
  margin-top: 3px;
  font-size: 23px;
  color: #173451;
}

.db-token,
.db-promo > span:first-child {
  display: grid;
  flex: none;
  place-items: center;
  border: 1px solid var(--xs-line, #dce7f4);
  border-radius: 9px;
}

.db-token {
  width: 43px;
  height: 43px;
  color: #276da7;
  background: #fff;
  font-size: 21px;
}

.db-goals {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0 20px;
}

.db-goals button {
  background: #fff;
  border-color: var(--xs-line, #dce7f4);
  padding: 6px 10px;
  font-size: 12px;
}

.db-goals button[aria-pressed='true'] {
  border-color: #bad7fa;
}

.db-total-label,
.db-assumption,
.db-member-note,
.db-friendhead small,
.db-friendhead > span:last-child,
.db-sub,
.db-ice > div:first-child {
  color: var(--xs-muted, #536d88);
  font-size: 12px;
  line-height: 1.65;
}

.db-goal-value {
  margin: 3px 0 9px;
  align-items: baseline;
  font-variant-numeric: tabular-nums;
  font-family: var(--xs-numbers, Bahnschrift, "Microsoft YaHei", sans-serif);
}

.db-goal-value > span {
  color: #276da7;
  font-size: 18px;
  font-weight: 600;
}

.db-goal-value b {
  font-size: clamp(33px, 4vw, 38px);
  font-weight: 550;
  line-height: 1.25;
  letter-spacing: -1px;
}

.db-goal-value small {
  color: #536d88;
  font-size: 15px;
  font-weight: 400;
}

.db-goal-value > strong {
  flex: none;
  color: #1769df;
  font-size: 17px;
  font-weight: 600;
}

.db-track,
.db-ice-track {
  overflow: hidden;
  height: 8px;
  border-radius: 10px;
  background: #e5edf7;
}

.db-track i,
.db-ice-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--xs-blue, #1677ff);
}

.db-motivation,
.db-ruletext,
.db-empty,
.db-own,
.db-preview {
  color: var(--xs-muted, #536d88);
  font-size: 13px;
  line-height: 1.8;
}

#unified-prl-dashboard .db-motivation {
  margin: 14px 0 4px;
  color: #23496f;
}

.db-motivation b {
  color: #1769df;
}

.db-budget,
.db-endpoint > div,
.db-connection {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.db-budget,
.db-endpoint {
  color: var(--xs-text, #455a74);
  font-size: 13px;
}

.db-budget input,
.db-endpoint input {
  min-width: 0;
  border: 1px solid #c9d8ea;
  border-radius: 9px;
  padding: 8px 9px;
  color: #23496f;
  background: #fff;
  font-size: 14px;
  line-height: 1.45;
}

.db-budget input {
  width: 102px;
}

.db-budget button,
.db-endpoint button,
.db-connection button {
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: var(--xs-blue, #1677ff);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

#unified-prl-dashboard .db-member-note {
  margin: 6px 0 14px;
}

.db-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}

.db-metrics > div,
.db-tiers > div {
  min-width: 0;
  border: 1px solid #e3ecf6;
  border-radius: 9px;
  padding: 11px 13px;
  background: #f5f8fc;
}

.db-metrics > div > span,
.db-tiers > div > small {
  display: block;
  color: var(--xs-muted, #536d88);
  font-size: 12px;
}

.db-metrics b,
.db-tiers strong {
  display: block;
  margin-top: 3px;
  color: #24547e;
  font: 500 24px/1.25 var(--xs-numbers, Bahnschrift, "Microsoft YaHei", sans-serif);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.db-metrics b small,
.db-tiers strong small {
  margin-right: 1px;
  font-size: 15px;
}

.db-own {
  border-top: 1px solid var(--xs-line, #dce7f4);
  padding-top: 12px;
}

.db-own summary {
  color: #23496f;
}

.db-own summary b {
  margin-left: 4px;
  color: #1769df;
}

.db-own p {
  overflow-wrap: anywhere;
}

.db-cardhead .db-online,
.db-gpuhead > .on {
  background: #eaf7f1;
  color: #247658;
}

.db-online i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 5px 1px 0;
  border-radius: 50%;
  background: #369769;
}

#unified-prl-dashboard .db-feed > .db-sub {
  margin-top: 5px;
}

.db-friend {
  border-top: 1px solid var(--xs-line, #dce7f4);
  margin-top: 14px;
  padding-top: 14px;
}

.db-friendhead,
.db-gpuhead {
  display: flex;
  align-items: center;
  gap: 9px;
}

.db-avatar {
  display: grid;
  flex: none;
  place-items: center;
  width: 35px;
  height: 35px;
  border: 1px solid #dceafa;
  border-radius: 9px;
  color: #3972a4;
  background: #edf5ff !important; /* API renderer supplies the previous activity palette inline. */
  font-size: 15px;
  font-weight: 600;
}

.db-friendhead > div {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
}

.db-friendhead > div > b,
.db-gpuhead strong,
.db-promo strong {
  color: #23496f;
  font-size: 14px;
  font-weight: 600;
}

.db-friendhead small,
.db-friendhead > span:last-child b,
.db-promo strong,
.db-promo small {
  display: block;
}

.db-friendhead > span:last-child {
  text-align: right;
}

.db-friendhead > span:last-child b {
  color: #1769df;
  font: 550 16px/1.4 var(--xs-numbers, Bahnschrift, "Microsoft YaHei", sans-serif);
}

.db-gpu {
  margin-top: 9px;
  padding: 11px 13px;
  border: 1px solid #e3ecf6;
  border-radius: 9px;
  background: #f5f8fc;
}

.db-gpuhead strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.db-gpu > p {
  color: var(--xs-muted, #536d88);
  font-size: 12px;
  line-height: 1.7;
}

.db-ice {
  margin-top: 8px;
}

.db-ice > div:first-child {
  flex-wrap: wrap;
  gap: 2px 8px;
}

.db-ice-track {
  height: 5px;
  margin-top: 4px;
}

.db-ice-track i {
  background: #71a6e8;
}

#unified-prl-dashboard .db-empty {
  margin-top: 14px;
}

.db-tiers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 16px 0 12px;
}

.db-tiers > div {
  padding: 10px;
}

.db-tiers span {
  color: #23496f;
  font-size: 12px;
  font-weight: 600;
}

.db-tiers strong {
  margin: 3px 0;
}

.db-tiers > div > small {
  font: 12px/1.5 var(--xs-numbers, Bahnschrift, "Microsoft YaHei", sans-serif);
}

#unified-prl-dashboard .db-ruletext + .db-ruletext {
  margin-top: 6px;
}

.db-promo {
  display: flex;
  width: 100%;
  text-align: left;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  padding: 11px 12px;
  border: 1px solid var(--xs-line, #dce7f4);
  border-radius: 9px;
  background: #fff;
}

.db-promo:first-of-type {
  margin-top: 16px;
}

.db-promo > span:first-child {
  width: 32px;
  height: 32px;
  border-color: #dceafa;
  background: #eef6ff;
}

.db-promo > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}

.db-promo small {
  margin-top: 2px;
  color: var(--xs-muted, #536d88);
  font-size: 12px;
  line-height: 1.5;
}

.db-promo > b {
  color: #3972b7;
  font-size: 20px;
  font-weight: 500;
}

.db-preview {
  margin-top: 6px;
  padding: 10px 14px;
  background: #f3f8ff;
  border-left: 2px solid #80adf0;
  border-radius: 0 6px 6px 0;
}

.db-connection,
.db-endpoint {
  min-width: 0;
  margin-bottom: 12px;
  border: 1px solid var(--xs-line, #dce7f4);
  border-radius: 12px;
  padding: 12px 16px;
  background: #fff;
}

.db-connection > span {
  flex: 1 1 220px;
  overflow-wrap: anywhere;
  color: #23496f;
  font-size: 13px;
}

.db-connection button {
  color: #1769df;
  border-color: #dceafa;
  background: #eef6ff;
}

.db-endpoint label {
  display: block;
  margin-bottom: 6px;
}

.db-endpoint input {
  flex: 1;
}

@media (hover: hover) {
  .db-source button:hover,
  .db-goals button:hover,
  .db-promo:hover,
  .db-connection button:hover {
    background: var(--xs-pale, #eaf3ff);
    color: #1769df;
  }

  .db-budget button:hover,
  .db-endpoint button:hover {
    background: var(--xs-blue-dark, #0d5fc7);
  }
}

@media (max-width: 780px) {
  .db-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 680px) {
  #unified-prl-dashboard {
    padding-block: 4px 10px;
  }

  .unified-income-tabs {
    width: 100%;
    box-sizing: border-box;
    scroll-margin-top: 80px;
  }

  .unified-income-tabs button {
    min-width: 0;
    white-space: normal;
    padding: 8px 4px;
    font-size: 13px;
    line-height: 1.5;
  }

  .db-toolbar {
    gap: 10px;
    margin-bottom: 14px;
  }

  .db-toolbar h2 {
    font-size: 22px;
  }

  .db-source {
    border-radius: 12px;
    padding: 3px;
  }

  .db-source button {
    padding: 7px 9px;
    font-size: 12px;
  }

  .db-grid,
  .db-column {
    gap: 14px;
  }

  .db-extras {
    margin-top: 14px;
  }

  .db-card,
  .db-goal {
    padding: 20px;
    border-radius: 16px;
  }

  .db-goals {
    gap: 5px;
  }

  .db-goals button {
    padding: 6px;
  }

  .db-tiers > div {
    padding-inline: 7px;
  }
}

