.nav-label {
  border-left: 1px solid var(--line);
  padding: 0 25px;
  display: flex;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #4f4b44;
}

.nav-label.active {
  color: var(--coral);
  background: rgba(255, 250, 240, .5);
}

.bottom-grid {
  grid-template-columns: minmax(720px, 1.25fr) minmax(720px, 1.45fr) minmax(340px, .72fr);
  gap: 16px;
}

.screen-growth {
  padding: 13px 16px 9px;
}

.screen-goal {
  font-size: 28px;
}

.screen-progress {
  height: 58px;
  display: grid;
  grid-template-columns: 125px 1fr 58px;
  gap: 12px;
  align-items: center;
}

.screen-progress > div:first-child strong {
  display: block;
  font-size: 27px;
}

.screen-progress span {
  display: block;
  font-size: 10px;
  color: var(--muted);
}

.screen-bar {
  height: 7px;
  border: 1px solid var(--ink);
  border-radius: 7px;
  overflow: hidden;
}

.screen-bar i {
  display: block;
  height: 100%;
  background: var(--coral);
}

.screen-progress > b {
  font-size: 14px;
  text-align: right;
}

.screen-sankey {
  height: calc(100% - 111px);
  min-height: 135px;
  display: block;
}

.screen-channels {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2px 0 8px;
}

.screen-channel {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 7px;
  align-items: center;
  font-size: 11px;
}

.screen-channel i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.screen-channel b {
  font-size: 11px;
}

.screen-sankey svg {
  width: 100%;
  height: 100%;
}

.screen-sankey > .screen-channels,
.screen-sankey > .screen-target {
  display: none;
}

.allocation-source {
  fill: var(--ink);
  stroke: var(--ink);
  stroke-width: 2;
}

.allocation-flow { stroke-linejoin: round; }
.allocation-flow-goal { opacity: .22; stroke: currentColor; stroke-width: .7; }
.allocation-flow-done { opacity: .96; }

.allocation-channel-node {
  stroke: var(--card);
  stroke-width: 1;
}
.allocation-channel-goal { opacity: .28; }
.allocation-channel-done { opacity: 1; }

.allocation-callout {
  fill: none;
  stroke-width: 1.2;
}

.allocation-source-kicker,
.allocation-source-period,
.allocation-source-total,
.allocation-label,
.allocation-value {
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

.allocation-source-kicker,
.allocation-source-period {
  fill: #fffaf0;
  font-size: 10px;
}

.allocation-source-total {
  fill: #fff;
  font-size: 25px;
  font-weight: 900;
}

.allocation-label {
  fill: var(--ink);
  font-size: 10px;
  font-weight: 800;
}

.allocation-value {
  fill: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.sankey-stage {
  display: block;
  padding-top: 15px;
}

.sankey-stage > .channel-list,
.sankey-stage > .target-node {
  display: none;
}

.sankey-stage > svg {
  width: 100%;
  height: 100%;
}

.sankey-stage .allocation-source-kicker,
.sankey-stage .allocation-source-period {
  font-size: 15px;
}

.sankey-stage .allocation-source-total {
  font-size: 36px;
}

.sankey-stage .allocation-label {
  font-size: 15px;
}

.sankey-stage .allocation-value {
  font-size: 13px;
}

.screen-target {
  align-self: center;
  background: var(--ink);
  color: #fff;
  border-radius: 7px;
  box-shadow: 4px 4px 0 var(--coral);
  padding: 17px 7px;
  text-align: center;
}

.screen-target span,
.screen-target small {
  display: block;
  font-size: 9px;
}

.screen-target strong {
  display: block;
  font-size: 25px;
  margin: 5px 0;
}

.screen-target small {
  color: #ffacad;
}

.screen-growth > p {
  font-size: 9px;
  color: var(--muted);
  margin: 3px 0 0;
}

.signals {
  padding-left: 14px;
  padding-right: 14px;
}

.signals .signal-grid {
  grid-template-columns: 1fr;
  gap: 5px;
}

.signals .signal-item {
  padding: 9px;
}

.signals .signal-item b { font-size: 12px; }
.signals .signal-item span { font-size: 9px; }

.signals .averages div {
  padding: 3px 5px;
}

@media (max-width: 1280px), (max-height: 759px) {
  .bottom-grid { grid-template-columns: 1fr; }
  .screen-growth { min-height: 420px; }
}

/* 投屏模式：固定 1920×1080 设计画布，按浏览器可视区域整体等比缩放。 */
body.tv-fit {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

body.tv-fit .shell {
  position: absolute;
  width: 1920px;
  height: 1080px;
  min-height: 1080px;
  padding: 0 22px 14px;
  overflow: hidden;
  transform-origin: top left;
}

body.tv-fit .masthead { height: 72px; }
body.tv-fit #daily-view { height: 1008px; min-height: 0; }
body.tv-fit .hero { height: 205px; grid-template-columns: 43% 57%; padding: 0; }
body.tv-fit .overview { margin-top: 0; }
body.tv-fit .metric-grid { height: 293px; grid-template-columns: repeat(4, 1fr); }
body.tv-fit .metric-card { min-height: 0; }
body.tv-fit .bottom-grid {
  height: calc(100% - 547px);
  grid-template-columns: minmax(720px, 1.25fr) minmax(720px, 1.45fr) minmax(340px, .72fr);
}
body.tv-fit .screen-growth { min-height: 0; }

.passing-line {
  stroke: #171715;
  stroke-width: 2.2;
  stroke-dasharray: 8 5;
  opacity: .82;
}

.passing-label-bg {
  fill: var(--yellow);
  stroke: #171715;
  stroke-width: 1;
}

.metric-card.alert .passing-label-bg {
  fill: #171715;
  stroke: #fffaf0;
}

.passing-label {
  fill: #171715;
  font-size: 9px;
  font-weight: 900;
}

.metric-card.alert .passing-label {
  fill: #fffaf0;
}
