:root {
  --ink: #172630;
  --muted: #60707c;
  --line: #d3dbe1;
  --line-soft: #e7ecef;
  --panel: #ffffff;
  --surface: #f2f5f7;
  --surface-strong: #e8edf0;
  --navy: #122e45;
  --red: #d62828;
  --gray: #656d76;
  --orange: #ef8a22;
  --teal: #00a6a6;
  --blue: #276887;
  --gold: #b77c12;
  --radius: 6px;
  --shadow-sm: 0 3px 12px rgba(25, 45, 58, 0.07);
  --shadow-md: 0 9px 26px rgba(25, 45, 58, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--surface);
  color: var(--ink);
  font-family: "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
  letter-spacing: 0;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
}

button,
select {
  font: inherit;
  letter-spacing: 0;
}

.app-header {
  min-height: 76px;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--navy);
  color: #ffffff;
  border-bottom: 1px solid #0a2437;
  box-shadow: 0 6px 20px rgba(14, 34, 49, 0.18);
}

.brand-block {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
  font-weight: 700;
}

.brand-block h1 {
  margin: 0;
  font-size: 21px;
  line-height: 1.3;
  font-weight: 650;
}

.brand-block p {
  margin: 3px 0 0;
  color: #c5d1da;
  font-size: 11px;
}

.header-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
  padding-left: 20px;
  color: #aebdca;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 12px;
}

.header-meta strong {
  color: #ffffff;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-weight: 500;
}

main {
  width: min(1840px, 100%);
  margin: 0 auto;
  padding: 22px 28px 42px;
}

.control-band {
  min-height: 64px;
  display: flex;
  align-items: end;
  gap: 14px;
  padding: 13px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.mode-switch {
  height: 36px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #aeb8c1;
  border-radius: 4px;
  overflow: hidden;
  background: #ffffff;
}

.mode-button {
  height: 34px;
  padding: 0 17px;
  border: 0;
  border-right: 1px solid #c8d0d6;
  background: #ffffff;
  color: #45515c;
  cursor: pointer;
  font-weight: 600;
}

.mode-button:last-child {
  border-right: 0;
}

.mode-button.active {
  background: var(--navy);
  color: #ffffff;
}

.control {
  min-width: 122px;
  display: grid;
  gap: 5px;
}

.control > span {
  color: var(--muted);
  font-size: 11px;
}

.control select {
  width: 100%;
  height: 36px;
  padding: 0 30px 0 10px;
  border: 1px solid #b8c1c8;
  border-radius: 4px;
  background: #ffffff;
  color: var(--ink);
}

.control select:disabled {
  border-color: #cbd3d9;
  background: #eef2f4;
  color: #32404b;
  cursor: default;
  opacity: 1;
}

.product-filter {
  margin-left: auto;
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.product-button {
  height: 34px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid color-mix(in srgb, var(--product-color) 28%, #bcc5cc);
  border-radius: 4px;
  background: color-mix(in srgb, var(--product-color) 4%, #ffffff);
  color: #3f4d58;
  cursor: pointer;
  font-weight: 600;
}

.product-button::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--product-color);
}

.product-button.inactive {
  color: #9099a1;
  background: #f4f6f7;
  border-color: #cbd2d7;
  font-weight: 500;
}

.product-button.inactive::before {
  background: #b9c0c6;
}

.view-context {
  min-height: 54px;
  margin: 13px 0 15px;
  padding: 8px 2px 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-left: 4px solid var(--blue);
}

.view-context strong {
  display: block;
  font-size: 15px;
}

.view-context span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.range-badge {
  flex: 0 0 auto;
  padding-left: 16px;
  border-left: 1px solid var(--line);
  color: #38444f;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 12px;
}

.product-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.game-card {
  min-width: 0;
  min-height: 196px;
  padding: 16px;
  background: color-mix(in srgb, var(--product-color) 2%, var(--panel));
  border: 1px solid var(--line);
  border-top: 3px solid var(--product-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.game-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.game-card-header h2 {
  margin: 0;
  color: #27333d;
  font-size: 16px;
  font-weight: 650;
}

.game-card-header span {
  display: block;
  margin-top: 4px;
  color: #77828b;
  font-size: 10px;
  line-height: 1.4;
}

.game-card-header i {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--product-color);
}

.game-total {
  margin-top: 18px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.game-total span,
.game-metrics span {
  color: #66717c;
  font-size: 10px;
}

.game-total strong {
  min-width: 0;
  color: #1f2b35;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 28px;
  line-height: 1;
  font-weight: 700;
  white-space: nowrap;
}

.game-metrics {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line-soft);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.game-metrics > div {
  min-width: 0;
  padding: 10px 12px;
  display: grid;
  gap: 5px;
  background: #ffffff;
}

.game-metrics strong {
  overflow: hidden;
  color: #33404b;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.platform-split {
  margin-top: 9px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #818a92;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 9px;
}

.section-heading {
  min-height: 68px;
  margin-top: 24px;
  padding-bottom: 10px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.compact-heading {
  min-height: 58px;
  margin-top: 0;
}

.section-heading h2,
.data-status h2 {
  margin: 0;
  color: #25313b;
  font-size: 18px;
  font-weight: 700;
}

.section-heading h2 {
  display: flex;
  align-items: center;
  gap: 9px;
}

.section-heading h2::before {
  width: 4px;
  height: 18px;
  flex: 0 0 4px;
  content: "";
  background: var(--blue);
  border-radius: 1px;
}

.section-heading p,
.data-status p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.legend-note,
.future-scope {
  color: #7a858e;
  font-size: 11px;
}

.chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.chart-panel {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.chart-panel-toolbar {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  padding: 7px 14px 0;
  color: var(--muted);
  font-size: 11px;
}

.chart-panel-toolbar[hidden] {
  display: none;
}

.chart-segmented {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid #b8c1c9;
  border-radius: 4px;
  background: #ffffff;
}

.chart-segmented button {
  min-width: 54px;
  height: 27px;
  padding: 0 12px;
  border: 0;
  border-right: 1px solid #cbd2d8;
  background: #ffffff;
  color: #4b5761;
  cursor: pointer;
}

.chart-segmented button:last-child {
  border-right: 0;
}

.chart-segmented button.active {
  background: var(--navy);
  color: #ffffff;
}

.chart {
  width: 100%;
  height: 420px;
}

.weekly-section {
  margin-top: 16px;
}

.weekly-chart-grid {
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.weekly-chart {
  height: 300px;
}

.weekly-table-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.weekly-table-block,
.content-share-section {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.weekly-table-title {
  min-height: 30px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: #f8fafb;
}

.weekly-table-title strong {
  color: #26333d;
  font-size: 11px;
}

.weekly-table-title span {
  color: #7a858e;
  font-size: 9px;
}

.weekly-matrix-scroll {
  max-width: 100%;
  overflow-x: auto;
}

.weekly-matrix {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  color: #34414c;
  font-size: 9px;
}

.weekly-matrix th,
.weekly-matrix td {
  height: 30px;
  padding: 3px 5px;
  border-right: 1px solid #edf0f2;
  border-bottom: 1px solid #edf0f2;
  text-align: center;
  white-space: nowrap;
}

.weekly-matrix thead th {
  height: 30px;
  background: #edf2f5;
  color: #5f6b75;
  font-weight: 600;
}

.weekly-matrix tr:last-child td {
  border-bottom: 0;
}

.weekly-matrix th:last-child,
.weekly-matrix td:last-child {
  border-right: 0;
}

.weekly-matrix .matrix-week {
  width: 88px;
  position: sticky;
  left: 0;
  z-index: 2;
  background: #ffffff;
  text-align: left;
}

.weekly-matrix thead .matrix-week {
  z-index: 3;
  background: #edf2f5;
}

.matrix-week strong,
.matrix-week span,
.matrix-week small {
  display: block;
}

.matrix-week strong {
  color: #31404b;
  font-size: 9px;
}

.matrix-week span {
  margin-top: 1px;
  color: #7b858e;
  font-size: 8px;
}

.matrix-week small {
  margin-top: 1px;
  color: #9a6a12;
  font-size: 8px;
  font-weight: 500;
}

.product-group-heading {
  border-bottom: 2px solid var(--product-color) !important;
}

.product-group-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #293640;
  font-size: 9px;
  font-weight: 650;
}

.product-group-label i {
  width: 7px;
  height: 7px;
  display: inline-block;
  background: var(--product-color);
}

.compact-weekly-matrix,
.content-mix-matrix {
  min-width: max(500px, calc(88px + var(--product-count) * 102px));
}

.weekly-matrix .heat-cell {
  position: relative;
  background: var(--heat-color);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.weekly-matrix .heat-cell.is-peak {
  box-shadow: inset 0 -1px var(--product-color);
}

.content-share-section {
  margin-top: 16px;
  padding: 12px;
}

.content-share-section[hidden] {
  display: none;
}

.ytb-creator-analysis-section {
  margin-top: 18px;
}

.ytb-creator-analysis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ytb-creator-chart {
  height: 340px;
}

.ytb-creator-key {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.creator-key-official {
  background: #31485c;
}

.creator-key-sponsored {
  background: #c9973a;
}

.creator-key-creator {
  background: #df6a6f;
}

.creator-key-organic {
  background: #65a99f;
}

.ytb-creator-table-panel {
  display: flex;
  height: 340px;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.ytb-creator-table-scroll {
  flex: 1;
  max-width: 100%;
  overflow-x: auto;
}

.ytb-creator-table {
  height: 100%;
  width: 100%;
  min-width: 540px;
  border-collapse: collapse;
  table-layout: fixed;
  color: #34414c;
  font-size: 10px;
}

.ytb-creator-table th,
.ytb-creator-table td {
  height: 54px;
  padding: 7px 8px;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  text-align: center;
  vertical-align: middle;
}

.ytb-creator-table thead th {
  height: 38px;
  background: #edf3f6;
  color: #33414b;
  font-size: 9px;
  font-weight: 650;
}

.ytb-creator-table th:first-child {
  width: 70px;
}

.ytb-creator-table th:last-child,
.ytb-creator-table td:last-child {
  border-right: 0;
}

.ytb-creator-table tbody tr:last-child th,
.ytb-creator-table tbody tr:last-child td {
  border-bottom: 0;
}

.ytb-creator-table tbody th {
  color: #26333d;
  font-weight: 650;
  white-space: nowrap;
}

.ytb-creator-table tbody th i {
  width: 7px;
  height: 7px;
  margin-right: 6px;
  display: inline-block;
  background: var(--product-color);
}

.ytb-creator-table td strong,
.ytb-creator-table td small {
  display: block;
  font-variant-numeric: tabular-nums;
}

.ytb-creator-table td strong {
  color: #2f3d48;
  font-size: 10px;
}

.ytb-creator-table td small {
  margin-top: 3px;
  color: #7c878f;
  font-size: 8px;
}

.ytb-creator-table .creator-mix-pending {
  background: #fbf7ed;
}

.ytb-creator-table .creator-mix-pending strong {
  color: #8a681f;
}

.ytb-creator-note {
  min-height: 32px;
  margin: 0;
  padding: 8px 10px;
  border-top: 1px solid var(--line-soft);
  background: #f8fafb;
  color: #7a858e;
  font-size: 9px;
}

.ytb-fan-summary-section {
  margin-top: 18px;
}

.ytb-fan-summary-section[hidden] {
  display: none;
}

.ytb-fan-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ytb-fan-chart {
  height: 320px;
}

.ytb-fan-table-panel {
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.ytb-fan-table-scroll {
  overflow-x: auto;
}

.ytb-fan-summary-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  color: #34414c;
  font-size: 10px;
}

.ytb-fan-summary-table th,
.ytb-fan-summary-table td {
  height: 30px;
  padding: 5px 8px;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.ytb-fan-summary-table thead th {
  background: #edf3f6;
  color: #33414b;
  font-weight: 650;
}

.ytb-fan-summary-table th:first-child,
.ytb-fan-summary-table td:first-child {
  width: 12%;
  text-align: center;
}

.ytb-fan-summary-table tbody th {
  color: #27343e;
  font-weight: 650;
}

.ytb-fan-summary-table tbody th i {
  display: inline-block;
  width: 3px;
  height: 12px;
  margin-right: 6px;
  vertical-align: -2px;
  background: var(--product-color);
}

.ytb-fan-summary-table tr:last-child th,
.ytb-fan-summary-table tr:last-child td {
  border-bottom: 0;
}

.ytb-fan-summary-table th:last-child,
.ytb-fan-summary-table td:last-child {
  border-right: 0;
}

.summary-share-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}

.summary-share-ring {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(from -90deg, #2d8f84 0 var(--fan-share), #dfe9e7 var(--fan-share) 100%);
  box-shadow: 0 0 0 1px rgba(45, 143, 132, 0.12), 0 2px 5px rgba(36, 71, 67, 0.12);
}

.summary-share-ring::before {
  position: absolute;
  inset: 5px;
  content: "";
  border-radius: 50%;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(45, 143, 132, 0.08);
}

.summary-share-ring strong {
  position: relative;
  z-index: 1;
  color: #275e58;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}

.ytb-fan-summary-row th,
.ytb-fan-summary-row td {
  height: 50px;
}

.fan-supplement-heading {
  margin-top: 14px;
  padding: 11px 0 7px;
  border-top: 1px solid var(--line);
}

.fan-supplement-heading h3 {
  margin: 0;
  color: #25313b;
  font-size: 14px;
  font-weight: 650;
}

.fan-supplement-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.fan-supplement-overview {
  margin-top: 0;
}

.fan-supplement-table-title {
  min-height: 30px;
  padding: 5px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line-soft);
}

.fan-supplement-table-title strong {
  color: #26333d;
  font-size: 11px;
}

.fan-supplement-table-title span {
  color: #7a858e;
  font-size: 9px;
}

.fan-layer-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.fan-layer-block {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.fan-layer-scroll {
  overflow-x: auto;
}

.fan-layer-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  color: #34414c;
  font-size: 9px;
}

.fan-layer-table th,
.fan-layer-table td {
  height: 34px;
  padding: 5px 8px;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  text-align: center;
  vertical-align: middle;
}

.fan-layer-table thead th {
  height: 28px;
  background: #edf3f6;
  color: #33414b;
  font-weight: 650;
  text-align: center;
}

.fan-layer-table th:first-child {
  width: 112px;
  text-align: center;
}

.fan-layer-table tr:last-child th,
.fan-layer-table tr:last-child td {
  border-bottom: 0;
}

.fan-layer-table th:last-child,
.fan-layer-table td:last-child {
  border-right: 0;
}

.fan-layer-table tr.is-total {
  background: #f5f7f8;
}

.fan-layer-data {
  background: #ffffff;
  transition: background-color 120ms ease;
}

.fan-layer-data:hover {
  background: #f7f9fa;
}

.fan-layer-cell {
  display: grid;
  grid-template-columns: minmax(52px, 0.8fr) minmax(72px, 1.6fr) 44px;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.fan-layer-cell strong {
  color: #2f3d48;
  font-size: 9px;
  font-weight: 650;
}

.fan-layer-cell small {
  color: color-mix(in srgb, var(--product-color) 76%, #33414b);
  font-size: 9px;
  font-weight: 700;
}

.fan-compare-bar {
  height: 14px;
  overflow: hidden;
  border: 1px solid #d8dfe3;
  border-radius: 2px;
  background: #e9edef;
}

.fan-compare-bar i {
  display: block;
  width: var(--compare-width);
  height: 100%;
  background: color-mix(in srgb, var(--product-color) 78%, #ffffff);
}

.fan-layer-table tr.is-total .fan-layer-data {
  background: #f1f4f5;
}

.fan-supplement-empty {
  padding: 16px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.share-key {
  display: flex;
  align-items: center;
}

.share-key {
  gap: 10px;
  color: #68737d;
  font-size: 10px;
}

.share-key span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.share-key i {
  width: 12px;
  height: 6px;
  display: inline-block;
}

.share-key-official {
  background: #31485c;
}

.share-key-fan {
  background: #65b4a8;
}

.content-share-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.content-mix-table-block {
  border-color: #d4dbe0;
}

.content-mix-cell {
  height: 46px !important;
  padding: 4px 6px !important;
  text-align: left !important;
}

.mix-values {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 5px;
}

.mix-values span {
  min-width: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
}

.mix-values small {
  color: #7a858e;
  font-size: 8px;
}

.mix-values strong {
  color: #33414c;
  font-size: 8px;
  font-variant-numeric: tabular-nums;
}

.fan-progress-line {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  color: #77828b;
  font-size: 8px;
}

.fan-progress-line > span {
  flex: 0 0 auto;
}

.fan-progress-line > strong {
  width: 31px;
  flex: 0 0 31px;
  color: #315d57;
  text-align: right;
  font-size: 8px;
  font-variant-numeric: tabular-nums;
}

.fan-progress {
  height: 4px;
  min-width: 30px;
  flex: 1;
  overflow: hidden;
  background: #e6eaed;
}

.fan-progress i {
  width: var(--fan-share);
  height: 100%;
  display: block;
  background: #65b4a8;
}

.share-empty {
  color: #9aa3aa;
  font-weight: 500;
}

.gantt-section {
  margin-top: 16px;
  padding: 14px 18px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.gantt-key {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #66717b;
  font-size: 10px;
}

.gantt-key span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.key-bar {
  width: 18px;
  height: 7px;
  display: inline-block;
  background: #91a4b5;
}

.key-diamond {
  width: 8px;
  height: 8px;
  display: inline-block;
  transform: rotate(45deg);
}

.key-ob {
  background: var(--red);
}

.key-version {
  background: var(--blue);
}

.key-banner {
  background: var(--gold);
}

.gantt-scroll {
  width: 100%;
  margin-top: 8px;
  overflow-x: auto;
  border-top: 1px solid var(--line-soft);
}

.gantt {
  width: calc(100% - 2px);
  min-width: 1050px;
}

.gantt-axis,
.gantt-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
}

.gantt-axis {
  min-height: 40px;
  border-bottom: 1px solid var(--line);
}

.gantt-axis-title {
  padding-top: 14px;
  color: #7b858e;
  font-size: 10px;
}

.gantt-axis-track {
  position: relative;
}

.gantt-axis-track::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: #aeb7bf;
}

.gantt-axis-track span {
  position: absolute;
  left: var(--tick-left);
  bottom: 8px;
  transform: translateX(-50%);
  color: #69747e;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 9px;
}

.gantt-axis-track span::after {
  content: "";
  width: 1px;
  height: 5px;
  position: absolute;
  left: 50%;
  bottom: -8px;
  background: #aeb7bf;
}

.gantt-axis-track span:first-child {
  transform: none;
}

.gantt-axis-track span:first-child::after {
  left: 0;
}

.gantt-axis-track span:last-child {
  transform: translateX(-100%);
}

.gantt-axis-track span:last-child::after {
  right: 0;
  left: auto;
}

.gantt-row {
  min-height: 116px;
  border-bottom: 1px solid var(--line-soft);
}

.gantt-row:last-child {
  border-bottom: 0;
}

.gantt-product {
  padding-top: 14px;
  font-size: 12px;
  font-weight: 650;
}

.gantt-track {
  min-height: 116px;
  position: relative;
}

.gantt-track::before {
  content: "";
  position: absolute;
  top: 48px;
  right: 0;
  left: 0;
  height: 1px;
  background: #c6cdd3;
}

.gantt-bar {
  height: 22px;
  position: absolute;
  top: 8px;
  left: var(--bar-left);
  width: var(--bar-width);
  min-width: 16px;
  overflow: hidden;
  border-left: 2px solid var(--product-color);
  background: color-mix(in srgb, var(--product-color) 23%, #ffffff);
}

.gantt-bar.bar-1 {
  background: color-mix(in srgb, var(--product-color) 13%, #eef2f4);
}

.gantt-bar span {
  display: block;
  padding: 4px 6px 0;
  overflow: hidden;
  color: #34414c;
  font-size: 9px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gantt-milestone {
  position: absolute;
  top: 44px;
  left: var(--milestone-left);
  color: var(--blue);
  transform: translateX(-4px);
}

.gantt-milestone i {
  width: 8px;
  height: 8px;
  display: block;
  background: currentColor;
  transform: rotate(45deg);
}

.gantt-milestone span {
  width: 128px;
  position: absolute;
  top: 12px;
  left: 10px;
  color: #4e5963;
  font-size: 9px;
  line-height: 1.35;
}

.gantt-milestone.lane-1 span {
  top: 35px;
}

.gantt-milestone.lane-2 span {
  top: 58px;
}

.gantt-milestone.align-right {
  transform: translateX(-8px);
}

.gantt-milestone.align-right span {
  right: 10px;
  left: auto;
  text-align: right;
}

.milestone-ob {
  color: var(--red);
}

.milestone-version {
  color: var(--blue);
}

.milestone-banner {
  color: var(--gold);
}

.data-status {
  min-height: 90px;
  margin-top: 28px;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto;
  align-items: center;
  gap: 22px;
  background: var(--surface-strong);
  border: 1px solid #cbd3d9;
  border-left: 4px solid var(--navy);
  border-radius: var(--radius);
}

@media (min-width: 1600px) {
  main {
    width: min(1880px, 100%);
    padding: 26px 34px 48px;
  }

  .game-card {
    min-height: 202px;
    padding: 18px;
  }

  .chart {
    height: 450px;
  }

  .weekly-chart {
    height: 320px;
  }

  .ytb-fan-chart {
    height: 350px;
  }

  .ytb-creator-chart {
    height: 370px;
  }
}

.freshness-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
}

.freshness-item {
  display: grid;
  gap: 3px;
  color: #6a747d;
  font-size: 10px;
}

.freshness-item strong {
  color: #33404b;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 11px;
}

@media (max-width: 1180px) {
  .control-band {
    align-items: center;
    flex-wrap: wrap;
  }

  .product-filter {
    width: 100%;
    margin-left: 0;
  }

  .product-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .data-status {
    grid-template-columns: 1fr;
  }

  .freshness-list {
    justify-content: flex-start;
  }

  .weekly-table-stack,
  .content-share-stack,
  .ytb-creator-analysis-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .app-header {
    padding: 10px 14px;
  }

  .header-meta {
    display: none;
  }

  main {
    padding: 12px 10px 24px;
  }

  .control-band {
    padding: 10px;
    gap: 10px;
  }

  .mode-switch {
    width: 100%;
  }

  .mode-button {
    flex: 1;
  }

  .control {
    width: 100%;
  }

  .product-filter {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-button {
    justify-content: center;
  }

  .view-context {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .range-badge {
    padding-left: 10px;
    white-space: normal;
  }

  .product-overview-grid,
  .chart-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    padding-bottom: 8px;
  }

  .chart {
    height: 310px;
  }

  .weekly-chart {
    height: 280px;
  }

  .weekly-chart-grid {
    grid-template-columns: 1fr;
  }

  .ytb-fan-chart-grid {
    grid-template-columns: 1fr;
  }

  .ytb-creator-key {
    justify-content: flex-start;
  }

  .ytb-creator-chart {
    height: 320px;
  }

  .ytb-fan-summary-table {
    min-width: 720px;
  }

  .fan-layer-grid {
    grid-template-columns: 1fr;
  }

  .fan-layer-table {
    min-width: 560px;
  }

  .compact-weekly-matrix,
  .content-mix-matrix {
    min-width: max(500px, calc(88px + var(--product-count) * 102px));
  }

  .chart-panel-toolbar {
    justify-content: space-between;
    padding: 8px 10px 0;
  }

  .gantt-section {
    padding: 10px;
  }

  .gantt-key {
    flex-wrap: wrap;
  }
}
