.player-overview {
  --overview-active: var(--atlas-series-warm);
  --overview-new: var(--atlas-series-cool);
  --overview-retention: var(--atlas-red);
  --overview-panel: var(--color-surface);
  --overview-border: color-mix(in srgb, var(--color-border) 65%, var(--color-surface));
  display: grid; gap: 14px; min-width: 0; color: var(--color-text);
}
.overview-metrics-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: -5px; color: var(--color-muted); font-size: 11px; }
.overview-metrics-heading > span:first-child { color: var(--color-text); font-size: 13px; font-weight: 600; }
.overview-metrics-heading i { padding-left: 5px; font-style: normal; color: var(--atlas-series-warm); }
.player-overview-cards { position: relative; z-index: 3; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; }
.player-overview-card { position: relative; display: grid; grid-template-rows: 17px 35px 16px; align-content: center; gap: 5px; min-width: 0; height: 105px; padding: 12px 15px; border: 1px solid var(--overview-border); border-radius: 7px; background: var(--overview-panel); transition: border-color .15s, background .15s; }
.player-overview-card:hover { border-color: var(--atlas-series-warm); background: var(--color-surface-soft); }
.player-overview-card.is-selected { border-color: var(--atlas-action-border); background: linear-gradient(130deg, var(--atlas-action-hover), var(--atlas-action)); }
.player-overview-card.is-selected .player-overview-value { color: var(--atlas-action-ink); }
.player-overview-card.is-selected :is(h2, .player-overview-card-foot) { color: color-mix(in srgb, var(--atlas-action-ink) 80%, var(--color-muted)); }
.player-overview-value[aria-label="—"] { color: var(--color-muted); }
#app .overview-card-select { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; padding: 0; margin: 0; border: 0; border-radius: inherit; background: transparent; cursor: pointer; box-shadow: none; }
#app .overview-card-select:hover { background: transparent; }
.overview-card-select:focus-visible { outline: 2px solid var(--atlas-action-border); outline-offset: 3px; }
.player-overview-card-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
.player-overview-card h2 { overflow: hidden; margin: 0; color: var(--color-muted); font-size: 12px; font-weight: 400; line-height: 17px; white-space: nowrap; text-overflow: ellipsis; }
.player-overview-value { display: block; margin: 0; font-size: 29px; line-height: 35px; font-weight: 550; letter-spacing: -.025em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.player-overview-value small { margin: 0 3px; font-size: 11px; font-weight: 400; letter-spacing: 0; color: var(--color-muted); }
.player-overview-card-foot { overflow: hidden; margin: 0; color: var(--color-muted); font-size: 10px; line-height: 16px; white-space: nowrap; text-overflow: ellipsis; }
.overview-card-help { z-index: 2; flex-shrink: 0; line-height: 14px; }
.overview-card-help > summary { display: grid; place-items: center; width: 15px; height: 15px; border: 1px solid var(--color-border); border-radius: 50%; color: var(--color-muted); font-size: 10px; cursor: pointer; list-style: none; }
.overview-card-help > summary::-webkit-details-marker { display: none; }
.overview-help-popover { position: absolute; z-index: 20; top: 30px; left: 8px; width: 260px; max-width: calc(100vw - 44px); padding: 12px; border: 1px solid var(--overview-border); border-radius: 6px; background: var(--color-surface-soft); box-shadow: 0 6px 20px #0006; color: var(--color-text); font-size: 12px; line-height: 1.7; }
.player-overview-card:nth-child(6n) .overview-help-popover, .player-overview-card:nth-child(6n - 1) .overview-help-popover { right: 8px; left: auto; }
.overview-help-popover strong { font-size: 12px; font-weight: 550; }
.overview-help-popover p { margin: 6px 0 0; color: var(--color-muted); }
.player-overview-section { min-width: 0; padding: 18px 20px 10px; background: var(--overview-panel); border: 1px solid var(--overview-border); border-radius: 8px; }
.overview-toolbar, .overview-range-controls, .player-overview-section-head, .overview-trend-heading, .overview-table-scope, .overview-table-heading { display: flex; align-items: center; min-width: 0; }
.overview-toolbar { justify-content: space-between; gap: 14px; padding-bottom: 17px; margin-bottom: 16px; border-bottom: 1px solid var(--overview-border); }
.overview-range-controls { gap: 9px; flex-wrap: wrap; }
.overview-segmented { display: inline-flex; flex-shrink: 0; gap: 2px; padding: 3px; border: 1px solid var(--overview-border); border-radius: 6px; background: var(--color-bg); }
#app .overview-segmented button { padding: 5px 13px; border: 0; border-radius: 4px; background: transparent; color: var(--color-muted); font-size: 12px; line-height: 18px; white-space: nowrap; cursor: pointer; box-shadow: none; }
#app .overview-segmented button:hover { background: var(--color-surface-soft); color: var(--color-text); }
#app .overview-segmented button[aria-pressed="true"] { color: var(--atlas-action-ink); background: var(--atlas-action); }
.overview-date-picker { position: relative; z-index: 4; }
.overview-date-picker > summary { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--overview-border); border-radius: 6px; color: var(--color-text); background: var(--color-bg); list-style: none; font-size: 12px; line-height: 18px; cursor: pointer; font-variant-numeric: tabular-nums; }
.overview-date-picker > summary::-webkit-details-marker { display: none; }
.overview-date-picker > summary span { color: var(--color-muted); }
.overview-date-picker > summary i { font-style: normal; color: var(--atlas-series-warm); font-size: 17px; }
.overview-date-picker[open] > summary { border-color: var(--atlas-action-border); }
#overview-date-form { position: absolute; z-index: 10; top: calc(100% + 9px); right: 0; display: grid; gap: 12px; width: 340px; max-width: calc(100vw - 50px); padding: 20px; border: 1px solid var(--atlas-action-border); border-radius: 8px; background: var(--color-surface-soft); box-shadow: 0 12px 40px #0009; }
#overview-date-form strong { font-size: 15px; }
#overview-date-form p { margin: -6px 0 4px; color: var(--color-muted); font-size: 11px; }
#overview-date-form label { display: grid; gap: 7px; color: var(--color-muted); font-size: 11px; }
#app #overview-date-form input { width: 100%; min-width: 0; padding: 9px 10px; color: var(--color-text); color-scheme: dark; background: var(--color-bg); border: 1px solid var(--overview-border); border-radius: 5px; font: inherit; font-size: 13px; }
#app .overview-date-apply { margin-top: 4px; padding: 9px 12px; border: 1px solid var(--atlas-action-border); border-radius: 5px; background: var(--atlas-action); color: var(--atlas-action-ink); cursor: pointer; }
#app .overview-reset-metric { padding: 8px 10px; border: 0; color: var(--atlas-series-warm); font-size: 11px; background: transparent; cursor: pointer; box-shadow: none; }
.player-overview-section-head { justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.overview-trend-heading { flex-wrap: wrap; gap: 20px; }
.player-overview-section-head h2 { margin: 0; font-size: 17px; line-height: 24px; font-weight: 600; }
.overview-updated-at { color: var(--color-muted); font-size: 10px; white-space: nowrap; }
.overview-chart-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 17px; font-size: 11px; color: var(--color-muted); }
.overview-chart-legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.overview-chart-legend i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--point-color); }
/* Keep labels in CSS pixels while only the plot stretches with its container. */
.player-overview-chart { position: relative; display: block; width: 100%; height: 278px; min-width: 0; margin: 0 0 14px; }
.overview-chart-plot { position: absolute; inset: 0 18px 30px 42px; }
#app .player-overview-chart svg { display: block; width: 100%; height: 100%; max-width: none; overflow: visible; }
.overview-data-point { position: absolute; width: 5px; height: 5px; border: 1px solid var(--point-color); border-radius: 50%; background: var(--overview-panel); transform: translate(-50%, -50%); pointer-events: none; }
.overview-data-point.is-partial { width: 7px; height: 7px; border-width: 2px; }
.overview-chart-grid line { stroke: var(--overview-border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.overview-chart-y-labels { position: absolute; inset: 0 auto 30px 0; width: 32px; }
.overview-chart-y-labels span { position: absolute; right: 0; transform: translateY(-50%); }
.overview-chart-x-labels { position: absolute; right: 18px; bottom: 0; left: 42px; height: 20px; }
.overview-chart-x-labels span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.overview-chart-x-labels, .overview-chart-y-labels { color: var(--color-muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.overview-chart-target line { stroke: var(--color-muted); stroke-width: 1; stroke-dasharray: 3 4; opacity: 0; pointer-events: none; vector-effect: non-scaling-stroke; }
.overview-chart-target:hover line { opacity: .5; }
.overview-settlement-note { margin: 3px 0 10px; color: var(--color-muted); font-size: 10px; line-height: 1.7; }
.overview-table-scope { justify-content: space-between; gap: 12px; margin-top: 4px; padding-top: 13px; border-top: 1px solid var(--overview-border); }
.overview-table-scope > span, .overview-table-heading > span { color: var(--color-muted); font-size: 10px; }
.overview-retention-actions { display: flex; align-items: center; flex-shrink: 0; gap: 10px; }
#app .overview-calculate-analysis { padding: 6px 11px; border: 1px solid var(--overview-border); border-radius: 5px; background: transparent; color: var(--atlas-series-warm); font-size: 10px; line-height: 16px; cursor: pointer; box-shadow: none; }
#app .overview-calculate-analysis:hover:not(:disabled) { border-color: var(--atlas-action-border); background: var(--color-surface-soft); }
#app .overview-calculate-analysis:disabled { opacity: .55; cursor: wait; }
.overview-retention-error { margin: 10px 0; padding: 8px 10px; border: 1px solid color-mix(in srgb, var(--atlas-red) 40%, transparent); border-radius: 5px; color: var(--atlas-red); font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
#app .overview-table-scope .overview-segmented button { padding: 3px 10px; font-size: 10px; }
.overview-table-heading { gap: 12px; margin: 11px 0; }
.overview-table-heading h3 { margin: 0; font-size: 13px; font-weight: 550; }
.player-retention-table-wrap { max-width: 100%; overflow-x: auto; }
#app .player-retention-table { width: 100%; min-width: 820px; table-layout: fixed; border-collapse: collapse; font-variant-numeric: tabular-nums; }
#app .overview-lifecycle-table { min-width: 360px; }
#app .player-retention-table th, #app .player-retention-table td { padding: 11px 10px; border: 0; border-bottom: 1px solid var(--overview-border); text-align: right; background: transparent; font-size: 12px; line-height: 18px; }
#app .player-retention-table thead th { padding-top: 10px; padding-bottom: 10px; color: var(--color-muted); font-size: 10px; font-weight: 400; background: var(--color-surface-soft); }
#app .player-retention-table th:first-child { width: 16%; text-align: left; }
#app .player-retention-table tbody th { font-weight: 400; }
#app .player-retention-table tbody tr:hover { background: color-mix(in srgb, var(--color-surface-soft) 55%, transparent); }
#app .player-retention-table td strong { display: block; font-size: 12px; font-weight: 500; }
#app .player-retention-table :is(td, th) span { display: block; margin-top: 2px; color: var(--color-muted); font-size: 9px; line-height: 14px; }
#app .player-retention-table td[data-status="ready"] strong { color: var(--color-text); }
#app .player-retention-table td:not([data-status="ready"]) strong { color: var(--color-muted); font-weight: 400; }
#app .player-retention-table .overview-table-empty { padding: 25px 10px; text-align: center; color: var(--color-muted); }
.overview-pagination { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0 3px; color: var(--color-muted); font-size: 10px; }
.overview-pagination > div { display: flex; align-items: center; gap: 15px; }
#app .overview-pagination button { padding: 5px 10px; border: 1px solid var(--overview-border); border-radius: 5px; color: var(--color-text); background: transparent; font-size: 10px; cursor: pointer; box-shadow: none; }
#app .overview-pagination button:hover:not(:disabled) { border-color: var(--atlas-series-warm); background: var(--color-surface-soft); }
#app .overview-pagination button:disabled { cursor: default; opacity: .35; }
.overview-retention-notes { color: var(--color-muted); font-size: 11px; line-height: 1.8; }
.overview-retention-notes > summary { width: fit-content; cursor: pointer; }
.overview-retention-notes p { margin: 9px 0 0; }
.overview-retention-notes strong { color: var(--color-text); font-weight: 500; }
.player-overview-empty { color: var(--color-muted); text-align: center; font-size: 12px; line-height: 1.8; }
.overview-chart-empty { display: grid; align-content: center; justify-items: center; gap: 8px; height: 278px; padding: 24px; }
.overview-chart-empty strong { color: var(--color-text); font-size: 18px; font-weight: 500; }
.overview-message { justify-items: start; padding: 30px 24px; border: 1px solid var(--overview-border); border-radius: 8px; background: var(--color-surface); gap: 12px; }
.overview-message h2, .overview-message p { margin: 0; }
.overview-message h2 { font-size: 16px; }
.overview-message p { color: var(--color-muted); line-height: 1.7; overflow-wrap: anywhere; }
.overview-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 1279px) {
  .player-overview-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .player-overview-card { height: 100px; padding: 10px 12px; }
  .player-overview-card:nth-child(n) .overview-help-popover { right: auto; left: 8px; }
  .player-overview-card:nth-child(4n) .overview-help-popover { right: 8px; left: auto; }
  .overview-trend-heading { gap: 10px; }
  .overview-updated-at { font-size: 9px; }
}
@media (max-width: 760px) {
  .player-overview { gap: 10px; }
  .player-overview-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .player-overview-card { height: 98px; }
  .player-overview-value { font-size: 26px; }
  .player-overview-card:nth-child(odd) .overview-help-popover { right: auto; left: 8px; }
  .player-overview-card:nth-child(even) .overview-help-popover { right: 8px; left: auto; }
  .player-overview-section { padding: 12px 10px 8px; }
  .overview-toolbar { flex-wrap: wrap; gap: 10px; padding-bottom: 12px; margin-bottom: 12px; }
  .overview-range-controls { gap: 8px; width: 100%; }
  #app .overview-segmented button { padding: 4px 11px; }
  .overview-date-picker > summary { gap: 7px; padding: 7px 9px; font-size: 11px; }
  #overview-date-form { right: auto; left: 0; width: 280px; padding: 15px; }
  .player-overview-section-head { align-items: flex-start; flex-direction: column; gap: 8px; }
  .player-overview-section-head h2 { font-size: 15px; }
  .overview-chart-legend { font-size: 10px; }
  .player-overview-chart, .overview-chart-empty { height: 250px; }
  .overview-chart-x-labels { font-size: 8px; }
  .overview-table-scope { align-items: flex-start; flex-wrap: wrap; gap: 8px; }
  .overview-pagination { align-items: flex-start; gap: 9px; flex-wrap: wrap; }
  .overview-pagination > div { gap: 11px; margin-left: auto; }
}
