:root {
  color-scheme: light;
  --canvas: #edf2f3;
  --surface: #ffffff;
  --surface-soft: #f6f9f8;
  --ink: #14252b;
  --muted: #64747b;
  --line: #d6e0e1;
  --navy: #12303a;
  --navy-soft: #1d4651;
  --teal: #168c83;
  --teal-soft: #cfeee8;
  --coral: #d85a4d;
  --coral-soft: #f8dfdc;
  --gold: #d1a546;
  --gold-soft: #f5e9c9;
  --white: #ffffff;
  --mono: "Aptos Mono", "Cascadia Mono", Consolas, monospace;
  --sans: "Microsoft YaHei UI", "Noto Sans CJK SC", "PingFang SC", sans-serif;
}

* {
  box-sizing: border-box;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html {
  background: var(--canvas);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
}

button,
a {
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(22, 140, 131, 0.34);
  outline-offset: 3px;
}

.shell {
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0 32px;
}

.masthead,
.panel-heading,
.stage-heading,
.brand,
.scoreboard,
.kill-groups,
.legend,
footer {
  display: flex;
  align-items: center;
}

.masthead {
  justify-content: space-between;
  border-bottom: 1px solid var(--navy);
  padding-bottom: 18px;
}

.brand {
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  background: var(--navy);
  color: var(--gold-soft);
  font: 800 16px/1 var(--mono);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 17px;
}

.brand small,
.subtle,
.panel-note,
footer,
.lock-meta small {
  color: var(--muted);
  font-size: 12px;
}

.brand small {
  margin-top: 4px;
}

.scoreboard {
  gap: 0;
  justify-content: space-between;
  min-height: 154px;
  margin: 24px 0 16px;
  background: var(--navy);
  color: var(--white);
  padding: 22px 24px;
}

.scoreboard-copy {
  min-width: 255px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--teal);
  font: 700 11px/1 var(--mono);
  letter-spacing: 0.08em;
}

.scoreboard .eyebrow {
  color: #9edbd3;
}

.issue-line {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.issue-line strong {
  color: var(--gold-soft);
  font: 700 68px/0.9 var(--mono);
}

.issue-line span {
  color: #bfd0d3;
  font-size: 15px;
}

.scoreboard .subtle {
  margin: 10px 0 0;
  color: #b9cbcf;
}

.scoreboard-stat {
  min-width: 125px;
  border-left: 1px solid rgba(255, 255, 255, 0.24);
  padding-left: 20px;
}

.scoreboard-stat span,
.scoreboard-stat strong {
  display: block;
}

.scoreboard-stat span {
  color: #b9cbcf;
  font-size: 12px;
}

.scoreboard-stat strong {
  margin-top: 8px;
  color: var(--white);
  font: 700 20px/1.15 var(--mono);
  overflow-wrap: anywhere;
}

.error-banner {
  margin: 0 0 16px;
  border: 1px solid var(--coral);
  border-radius: 12px;
  background: var(--coral-soft);
  color: #762d25;
  padding: 12px 14px;
  font-size: 13px;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 342px;
  align-items: start;
  gap: 16px;
}

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

.side-column {
  position: sticky;
  top: 16px;
}

.panel,
.number-stage {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--surface);
}

.panel {
  padding: 20px;
}

.panel-heading,
.stage-heading {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

h1,
h2 {
  margin: 0;
  font-weight: 800;
}

h1 {
  font-size: 29px;
}

h2 {
  font-size: 19px;
}

.final-panel {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--white);
}

.final-panel .eyebrow {
  color: #9edbd3;
}

.final-panel h1 {
  color: var(--white);
}

.lock-meta {
  display: grid;
  justify-items: end;
  gap: 7px;
  text-align: right;
}

.state-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  color: #c8d5d7;
  padding: 4px 10px;
  font-size: 12px;
}

.state-pill.locked {
  border-color: var(--teal);
  background: rgba(22, 140, 131, 0.22);
  color: #b8ebe4;
}

.state-pill.pending {
  border-color: rgba(255, 255, 255, 0.3);
}

.state-pill.hidden {
  border-color: rgba(245, 233, 201, 0.48);
  background: rgba(209, 165, 70, 0.12);
  color: var(--gold-soft);
}

.final-panel .lock-meta small {
  color: #b9cbcf;
}

.final-result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 245px;
  gap: 20px;
  align-items: start;
}

.section-label {
  display: block;
  margin-bottom: 12px;
  color: #a9c2c6;
  font: 700 11px/1 var(--mono);
  letter-spacing: 0.08em;
}

.final-numbers {
  display: grid;
  grid-template-columns: repeat(8, minmax(40px, 1fr));
  gap: 7px;
}

.final-number {
  display: grid;
  min-height: 46px;
  place-items: center;
  border: 1px solid rgba(245, 233, 201, 0.5);
  background: rgba(209, 165, 70, 0.15);
  color: var(--gold-soft);
  font: 800 19px/1 var(--mono);
}

.zodiac-block {
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  padding-left: 20px;
}

.zodiac-list,
.current-zodiacs {
  display: grid;
  gap: 8px;
}

.zodiac-chip {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  padding: 7px 10px;
}

.final-zodiac {
  border-color: rgba(158, 219, 211, 0.42);
  background: rgba(22, 140, 131, 0.15);
  color: var(--white);
}

.zodiac-rank {
  color: var(--teal);
  font: 700 11px/1 var(--mono);
}

.final-zodiac .zodiac-rank {
  color: #9edbd3;
}

.zodiac-chip strong {
  font-size: 16px;
}

.zodiac-chip small {
  color: var(--muted);
  font: 11px/1 var(--mono);
}

.final-zodiac small {
  color: #b9cbcf;
}

.disclaimer {
  margin: 18px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding-top: 12px;
  color: #b9cbcf;
  font-size: 12px;
}

.primary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(250px, 0.75fr);
  gap: 16px;
  align-items: stretch;
}

.top-panel,
.current-zodiac-panel {
  min-width: 0;
}

.top-numbers {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
}

.number-card {
  position: relative;
  min-height: 87px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  padding: 9px;
}

.number-card .rank {
  color: var(--muted);
  font: 700 10px/1 var(--mono);
}

.number-card strong {
  display: block;
  margin-top: 12px;
  color: var(--navy);
  font: 800 26px/0.9 var(--mono);
}

.number-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font: 11px/1 var(--mono);
}

.current-zodiac-panel {
  background: var(--surface-soft);
}

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

.current-zodiacs .zodiac-chip {
  min-height: 62px;
  grid-template-columns: 20px minmax(0, 1fr);
  align-content: center;
}

.current-zodiacs .zodiac-chip small {
  grid-column: 2;
}

.kill-panel {
  background: #fffaf9;
}

.kill-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.kill-token {
  display: grid;
  min-width: 58px;
  min-height: 58px;
  place-items: center;
  border: 1px solid var(--coral);
  background: var(--coral-soft);
  color: #9e382f;
  font: 800 24px/1 var(--mono);
}

.kill-token small {
  margin-top: -14px;
  color: #b65249;
  font: 700 10px/1 var(--mono);
}

.kill-zodiac-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.kill-zodiac-token {
  min-width: 0;
  min-height: 34px;
  padding: 4px 8px;
  font-size: 14px;
}

.kill-zodiac-token small {
  margin-top: 1px;
  font-size: 10px;
}

.muted-value {
  color: var(--muted);
  font: 700 12px/1.55 var(--mono);
}

.kill-groups {
  display: grid;
  grid-template-columns: minmax(210px, 1.45fr) repeat(4, minmax(105px, 1fr));
  align-items: start;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.kill-groups > div {
  min-width: 0;
  padding: 0;
}

.kill-groups > div + div {
  border-left: 1px solid var(--line);
  padding-left: 12px;
}

.kill-groups > div > span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.kill-groups p {
  margin: 4px 0 0;
  color: #87332c;
  font: 700 12px/1.55 var(--mono);
  overflow-wrap: anywhere;
}

.experts-panel {
  padding-bottom: 10px;
}

.expert-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list-toggle {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-soft);
  color: var(--navy);
  cursor: pointer;
  font-weight: 700;
  padding: 9px 14px;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.list-toggle:hover,
.list-toggle:focus-visible {
  border-color: var(--teal);
  background: var(--teal);
  color: var(--white);
}

.list-toggle[hidden] {
  display: none;
}

.expert-item {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}

.expert-main {
  display: grid;
  grid-template-columns: 30px 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.expert-rank {
  color: var(--teal);
  font: 700 12px/1 var(--mono);
}

.expert-avatar {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #9ecac6;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal);
  font: 800 16px/1 var(--mono);
}

.expert-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.expert-identity {
  min-width: 0;
}

.expert-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}

.expert-name a {
  color: var(--navy);
  text-decoration: none;
}

.expert-name a:hover,
.expert-name a:focus-visible,
.expert-link:hover,
.expert-link:focus-visible {
  color: var(--teal);
  text-decoration: underline;
}

.expert-identity small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.expert-link {
  margin-left: 8px;
  color: var(--navy-soft);
  text-decoration: none;
  font-weight: 700;
}

.expert-accuracy {
  color: var(--teal);
  font: 800 18px/1 var(--mono);
}

.expert-details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 10px 0 0 92px;
  color: var(--muted);
  font: 11px/1.4 var(--mono);
}

.update-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
}

.update-status i {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--muted);
}

.update-status.updated {
  color: var(--teal);
}

.update-status.updated i {
  background: var(--teal);
}

.update-status.not_updated {
  color: var(--muted);
}

.update-status.failed {
  color: var(--coral);
}

.update-status.failed i {
  background: var(--coral);
}

.prediction-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 11px 0 0 92px;
}

.structured-prediction-list {
  display: grid;
  gap: 7px;
  margin: 11px 0 0 92px;
}

.structured-prediction {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 8px 10px;
  font-size: 11px;
}

.structured-prediction.kill {
  background: rgba(216, 90, 77, 0.08);
}

.structured-prediction > strong {
  color: var(--navy);
  font-size: 12px;
}

.structured-prediction.kill > strong {
  color: var(--coral);
}

.structured-sections {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.structured-section {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.structured-section b {
  color: var(--muted);
  font-weight: 700;
}

.structured-section span {
  overflow-wrap: anywhere;
}

.prediction-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  padding: 5px 7px;
  color: var(--ink);
  font-size: 11px;
}

.prediction-group b {
  color: var(--coral);
  font-weight: 700;
}

.prediction-group span {
  overflow-wrap: anywhere;
}

.empty-inline,
.loading {
  color: var(--muted);
  font-size: 13px;
}

.number-stage {
  overflow: hidden;
  padding: 20px;
}

.legend {
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
}

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

.legend i {
  display: inline-block;
  width: 9px;
  height: 9px;
}

.legend-high {
  background: var(--teal);
}

.legend-mid {
  background: #b4c2c4;
}

.legend-kill {
  background: var(--coral);
}

.number-ribbon {
  display: grid;
  grid-template-columns: repeat(49, minmax(0, 1fr));
  gap: 3px;
  min-width: 0;
  overflow: hidden;
  overflow-y: hidden;
}

.ribbon-number {
  display: grid;
  min-width: 0;
  min-height: 31px;
  place-items: center;
  background: #dce5e5;
  color: var(--ink);
  font: 700 10px/1 var(--mono);
  cursor: default;
  transition: transform 130ms ease, box-shadow 130ms ease;
}

.ribbon-number:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 0 rgba(18, 48, 58, 0.18);
}

.ribbon-number.high {
  background: var(--teal);
  color: var(--white);
}

.ribbon-number.low {
  background: #b7c4c5;
}

.ribbon-number.kill {
  background: var(--coral);
  color: var(--white);
}

.lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.8fr);
  gap: 16px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 9px 7px;
  font-size: 12px;
}

th {
  color: var(--muted);
  font-weight: 500;
}

td:nth-child(3),
td:nth-child(4) {
  text-align: right;
  font-family: var(--mono);
}

.factor-name {
  font-weight: 700;
}

.consensus {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.consensus-bar {
  display: block;
  width: 44px;
  height: 5px;
  background: var(--canvas);
}

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

.history-panel,
.hit-rate-panel {
  overflow: hidden;
}

.history-list {
  display: grid;
  gap: 0;
}

.draw-item {
  border-top: 1px solid var(--line);
  padding: 13px 0;
}

.draw-item-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.draw-item-head strong {
  font-size: 13px;
}

.draw-item-head span,
.draw-item small {
  color: var(--muted);
  font-size: 11px;
}

.draw-balls {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  margin: 10px 0 7px;
}

.draw-balls span {
  display: grid;
  flex: 0 0 27px;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--navy);
  font: 700 10px/1 var(--mono);
}

.draw-balls i {
  width: 1px;
  height: 20px;
  margin: 0 2px;
  background: var(--line);
}

.draw-balls .special-ball {
  border-color: var(--gold);
  background: var(--gold-soft);
  color: #765714;
}

.draw-balls .special-ball.wave-red {
  border-color: #aa2d2d;
  background: #bd3939;
  color: #ffffff;
}

.draw-balls .special-ball.wave-blue {
  border-color: #2f659f;
  background: #3978bd;
  color: #ffffff;
}

.draw-balls .special-ball.wave-green {
  border-color: #1f6443;
  background: #287453;
  color: #ffffff;
}

.draw-balls .special-attribute {
  border-color: #9ecac6;
  background: #edf8f7;
  color: #146c68;
}

.range-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-bottom: 14px;
}

.range-tab {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-soft);
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
}

.range-tab:hover,
.range-tab.active {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--navy);
}

.hit-rate-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.rate-card {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  padding: 12px;
}

.rate-card span,
.rate-card small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.rate-card strong {
  display: block;
  margin: 8px 0 5px;
  color: var(--teal);
  font: 800 23px/1 var(--mono);
}

.sample-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 13px 0;
  color: var(--muted);
  font-size: 11px;
}

.sample-line strong {
  color: var(--navy);
  font-family: var(--mono);
}

.hit-rate-list {
  display: grid;
}

.hit-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  font-size: 11px;
}

.hit-item > div {
  min-width: 0;
}

.hit-item strong,
.hit-item small {
  display: block;
}

.hit-item small {
  margin-top: 3px;
  color: var(--muted);
  font: 10px/1.2 var(--mono);
}

.hit-item > span {
  color: var(--teal);
  font: 700 10px/1 var(--mono);
  white-space: nowrap;
}

.hit-item.pending > span {
  color: var(--muted);
}

footer {
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 14px;
}

footer a {
  color: var(--navy);
  font-weight: 700;
}

@media (max-width: 1180px) {
  .dashboard-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  .scoreboard {
    flex-wrap: wrap;
    gap: 18px 0;
  }

  .scoreboard-copy {
    width: 100%;
  }

  .scoreboard-stat {
    flex: 1;
  }

  .top-numbers {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .number-ribbon {
    grid-template-columns: repeat(49, 20px);
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-color: var(--line) transparent;
    scrollbar-width: thin;
  }

}

@media (max-width: 900px) {
  .dashboard-layout {
    display: block;
  }

  .side-column {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 16px;
  }

  .lower-grid,
  .primary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .shell {
    width: min(100% - 24px, 560px);
    padding-top: 14px;
  }

  .masthead,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .masthead {
    gap: 16px;
  }

  .scoreboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 20px;
  }

  .scoreboard-copy {
    grid-column: 1 / -1;
  }

  .scoreboard-stat {
    min-width: 0;
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.24);
    padding: 12px 0 0;
  }

  .final-result-grid {
    grid-template-columns: 1fr;
  }

  .zodiac-block {
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    border-left: 0;
    padding: 16px 0 0;
  }

  .final-numbers {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .current-zodiacs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .current-zodiacs .zodiac-chip {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .current-zodiacs .zodiac-chip small {
    grid-column: auto;
  }

  .kill-groups {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px 12px;
  }

  .kill-groups > div {
    padding: 0 0 2px;
  }

  .kill-groups > div + div {
    border-left: 0;
    padding-left: 0;
  }

  .kill-groups > div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
    padding-top: 9px;
  }

  .expert-main {
    grid-template-columns: 24px 36px minmax(0, 1fr) auto;
    gap: 8px;
  }

  .expert-avatar {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .expert-accuracy {
    font-size: 15px;
  }

  .expert-details,
  .prediction-list,
  .structured-prediction-list {
    margin-left: 0;
  }

  .structured-prediction {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .side-column {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 375px) {
  .shell {
    width: min(100% - 16px, 359px);
  }

  .panel,
  .number-stage {
    padding: 15px;
  }

  .scoreboard {
    padding: 16px;
  }

  .brand strong {
    font-size: 15px;
  }

  .brand small {
    max-width: 240px;
    line-height: 1.5;
  }

  .issue-line strong {
    font-size: 56px;
  }

  .scoreboard-stat strong {
    font-size: 17px;
  }

  .top-numbers {
    gap: 6px;
  }

  .number-card {
    min-height: 78px;
    padding: 7px;
  }

  .number-card strong {
    margin-top: 10px;
    font-size: 22px;
  }

  .number-card small {
    font-size: 10px;
  }

  .final-number {
    min-height: 42px;
    font-size: 17px;
  }

  .current-zodiacs {
    gap: 5px;
  }

  .current-zodiacs .zodiac-chip {
    padding: 7px;
  }

  .hit-rate-summary {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Jiulong terminal redesign: one dark operating surface with restrained motion. */
:root {
  color-scheme: dark;
  --canvas: #081116;
  --surface: #0e1b21;
  --surface-soft: #12252c;
  --surface-raised: #172e36;
  --ink: #edf6f4;
  --muted: #8da7a9;
  --line: #29434a;
  --navy: #102d37;
  --navy-soft: #1a424d;
  --teal: #4fd1c5;
  --teal-soft: #123c3d;
  --coral: #ff756b;
  --coral-soft: #3a2227;
  --gold: #efc76c;
  --gold-soft: #4b3b1e;
  --white: #f5fbf9;
  --mono: "Aptos Mono", "Cascadia Mono", Consolas, monospace;
  --sans: "Microsoft YaHei UI", "Noto Sans CJK SC", "PingFang SC", sans-serif;
}

html,
body {
  background: var(--canvas);
}

body {
  min-width: 320px;
  color: var(--ink);
}

body::selection {
  background: rgba(79, 209, 197, 0.35);
  color: var(--white);
}

button:focus-visible,
a:focus-visible {
  outline-color: rgba(79, 209, 197, 0.72);
}

.shell {
  width: min(1480px, calc(100% - 48px));
  padding: 28px 0 52px;
}

.masthead {
  display: none;
}

.scoreboard {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 1.25fr) repeat(4, minmax(132px, 1fr));
  grid-template-rows: auto 1fr;
  gap: 24px 0;
  min-height: 286px;
  margin: 0 0 22px;
  overflow: hidden;
  border: 1px solid #31525a;
  border-radius: 18px;
  background: #0d2933;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.scoreboard-topline {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(169, 218, 214, 0.2);
  padding-bottom: 16px;
}

.scoreboard-brand,
.scoreboard-brand > div {
  display: flex;
  align-items: center;
}

.scoreboard-brand {
  gap: 12px;
}

.scoreboard-brand > div {
  align-items: flex-start;
  flex-direction: column;
  gap: 3px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(79, 209, 197, 0.6);
  border-radius: 12px;
  background: rgba(79, 209, 197, 0.14);
  color: var(--teal);
  font: 800 17px/1 var(--sans);
}

.scoreboard-brand strong {
  color: var(--white);
  font-size: 20px;
  letter-spacing: 0.02em;
}

.scoreboard-brand small {
  color: #9cb9ba;
  font-size: 11px;
  letter-spacing: 0.12em;
}

.scoreboard-copy {
  min-width: 0;
  padding-right: 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal);
  font: 700 10px/1 var(--mono);
  letter-spacing: 0.18em;
}

.scoreboard .eyebrow,
.final-panel .eyebrow {
  color: #a8e6df;
}

.issue-line {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.issue-line strong {
  color: var(--gold);
  font: 800 clamp(64px, 7vw, 92px)/0.86 var(--mono);
  letter-spacing: -0.04em;
}

.issue-line span {
  color: #bad0d1;
  font-size: 16px;
}

.scoreboard .subtle {
  margin: 14px 0 0;
  color: #a9c4c5;
  font-size: 12px;
}

.scoreboard-stat {
  min-width: 0;
  border-left: 1px solid rgba(190, 224, 222, 0.22);
  padding-left: 22px;
}

.scoreboard-stat span,
.scoreboard-stat strong {
  display: block;
}

.scoreboard-stat span {
  color: #9dbabb;
  font-size: 11px;
}

.scoreboard-stat strong {
  margin-top: 9px;
  color: var(--white);
  font: 800 20px/1.15 var(--mono);
  overflow-wrap: anywhere;
}

.error-banner {
  margin: 0 0 18px;
  border: 1px solid rgba(255, 117, 107, 0.46);
  border-radius: 12px;
  background: var(--coral-soft);
  color: #ffc3bd;
  padding: 12px 14px;
  font-size: 13px;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 382px;
  align-items: start;
  gap: 20px;
}

.main-column,
.side-column {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.side-column {
  position: sticky;
  top: 18px;
}

.panel,
.number-stage {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.panel {
  padding: 22px;
}

.panel-heading,
.stage-heading {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

h1,
h2 {
  margin: 0;
  color: var(--white);
  font-weight: 800;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(25px, 3vw, 34px);
}

h2 {
  font-size: 20px;
}

.panel-note,
footer,
.lock-meta small {
  color: var(--muted);
  font-size: 11px;
}

.final-panel {
  border-color: rgba(79, 209, 197, 0.42);
  background: #0d2b35;
  color: var(--white);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.lock-meta {
  display: grid;
  justify-items: end;
  gap: 8px;
  text-align: right;
}

.state-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(213, 239, 236, 0.3);
  border-radius: 8px;
  color: #c5d9da;
  padding: 4px 10px;
  font: 700 11px/1 var(--mono);
}

.state-pill.locked {
  border-color: rgba(79, 209, 197, 0.72);
  background: rgba(79, 209, 197, 0.16);
  color: #b9f3ec;
}

.final-panel .lock-meta small,
.final-panel .disclaimer {
  color: #a9c4c5;
}

.final-result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 24px;
  align-items: start;
}

.section-label {
  display: block;
  margin-bottom: 13px;
  color: #a8c3c5;
  font: 700 10px/1 var(--mono);
  letter-spacing: 0.16em;
}

.final-numbers {
  display: grid;
  grid-template-columns: repeat(8, minmax(38px, 1fr));
  gap: 8px;
}

.final-number {
  display: grid;
  min-height: 49px;
  place-items: center;
  border: 1px solid rgba(239, 199, 108, 0.48);
  border-radius: 11px;
  background: rgba(239, 199, 108, 0.11);
  color: #ffdda0;
  font: 800 19px/1 var(--mono);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.final-number:hover {
  border-color: var(--gold);
  background: rgba(239, 199, 108, 0.22);
  transform: translateY(-3px);
}

.zodiac-block {
  border-left: 1px solid rgba(185, 222, 220, 0.2);
  padding-left: 20px;
}

.zodiac-list,
.current-zodiacs {
  display: grid;
  gap: 9px;
}

.zodiac-chip {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 43px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  padding: 7px 10px;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.zodiac-chip:hover {
  border-color: rgba(79, 209, 197, 0.62);
  background: var(--surface-raised);
  transform: translateX(3px);
}

.final-zodiac {
  border-color: rgba(158, 229, 221, 0.4);
  background: rgba(79, 209, 197, 0.12);
  color: var(--white);
}

.zodiac-rank {
  color: var(--teal);
  font: 700 10px/1 var(--mono);
}

.final-zodiac .zodiac-rank {
  color: #a8e6df;
}

.zodiac-chip strong {
  color: var(--white);
  font-size: 16px;
}

.zodiac-chip small {
  color: var(--muted);
  font: 10px/1 var(--mono);
}

.final-zodiac small {
  color: #abc5c7;
}

.disclaimer {
  margin: 20px 0 0;
  border-top: 1px solid rgba(185, 222, 220, 0.2);
  padding-top: 13px;
  font-size: 11px;
}

.primary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(255px, 0.75fr);
  gap: 20px;
  align-items: stretch;
}

.top-numbers {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 9px;
}

.number-card {
  position: relative;
  min-height: 96px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 10px;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.number-card:hover {
  border-color: rgba(79, 209, 197, 0.68);
  background: var(--surface-raised);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
  transform: translateY(-4px);
}

.number-card .rank {
  color: var(--muted);
  font: 700 9px/1 var(--mono);
  letter-spacing: 0.06em;
}

.number-card strong {
  display: block;
  margin-top: 14px;
  color: var(--white);
  font: 800 27px/0.9 var(--mono);
}

.number-card small {
  display: block;
  margin-top: 9px;
  color: #9ab4b6;
  font: 10px/1 var(--mono);
}

.current-zodiac-panel {
  background: #102228;
}

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

.current-zodiacs .zodiac-chip {
  min-height: 65px;
  grid-template-columns: 20px minmax(0, 1fr);
  align-content: center;
}

.current-zodiacs .zodiac-chip small {
  grid-column: 2;
}

.kill-panel {
  border-color: rgba(255, 117, 107, 0.32);
  background: #1a171b;
}

.kill-panel .eyebrow {
  color: #ff9b92;
}

.kill-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.kill-token {
  display: grid;
  min-width: 58px;
  min-height: 58px;
  place-items: center;
  border: 1px solid rgba(255, 117, 107, 0.62);
  border-radius: 11px;
  background: rgba(255, 117, 107, 0.12);
  color: #ffaaa3;
  font: 800 23px/1 var(--mono);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.kill-token:hover {
  border-color: var(--coral);
  background: rgba(255, 117, 107, 0.23);
  transform: translateY(-3px);
}

.kill-token small {
  margin-top: -13px;
  color: #d98782;
  font: 700 9px/1 var(--mono);
}

.kill-zodiac-token {
  min-width: 0;
  min-height: 35px;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 14px;
}

.kill-zodiac-token small {
  margin-top: 1px;
  font-size: 9px;
}

.muted-value,
.empty-inline,
.loading {
  color: var(--muted);
}

.muted-value {
  font: 700 11px/1.55 var(--mono);
}

.kill-groups {
  display: grid;
  grid-template-columns: minmax(210px, 1.45fr) repeat(4, minmax(105px, 1fr));
  align-items: start;
  gap: 13px;
  padding-top: 13px;
  border-top: 1px solid rgba(255, 117, 107, 0.24);
}

.kill-groups > div {
  min-width: 0;
}

.kill-groups > div + div {
  border-left: 1px solid rgba(255, 117, 107, 0.24);
  padding-left: 13px;
}

.kill-groups > div > span {
  display: block;
  color: #a98b8c;
  font-size: 10px;
}

.kill-groups p {
  margin: 5px 0 0;
  color: #ffaaa3;
  font: 700 11px/1.55 var(--mono);
  overflow-wrap: anywhere;
}

.experts-panel,
.history-panel,
.hit-rate-panel {
  background: #0d1a20;
}

.expert-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.expert-item {
  border-top: 1px solid rgba(141, 167, 169, 0.18);
  padding: 15px 0;
}

.expert-main {
  display: grid;
  grid-template-columns: 30px 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.expert-rank {
  color: var(--teal);
  font: 700 11px/1 var(--mono);
}

.expert-avatar {
  width: 42px;
  height: 42px;
  border-color: rgba(79, 209, 197, 0.44);
  background: var(--teal-soft);
  color: var(--teal);
}

.expert-name a,
.expert-link,
footer a {
  color: var(--white);
}

.expert-name a:hover,
.expert-name a:focus-visible,
.expert-link:hover,
.expert-link:focus-visible,
footer a:hover,
footer a:focus-visible {
  color: var(--teal);
}

.expert-accuracy {
  color: var(--teal);
  font: 800 17px/1 var(--mono);
}

.expert-details,
.prediction-list,
.structured-prediction-list {
  color: var(--muted);
}

.structured-prediction,
.prediction-group {
  border-color: rgba(141, 167, 169, 0.2);
  border-radius: 8px;
  background: var(--surface-soft);
}

.structured-prediction > strong,
.prediction-group b {
  color: var(--teal);
}

.structured-prediction.kill > strong,
.prediction-group b {
  color: var(--coral);
}

.list-toggle,
.range-tab {
  border-color: var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
  color: #c4d7d7;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.list-toggle:hover,
.list-toggle:focus-visible,
.range-tab:hover,
.range-tab.active {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--white);
  transform: translateY(-1px);
}

.number-stage {
  overflow: hidden;
  padding: 22px;
  background: #0b181e;
}

.legend {
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 10px;
}

.legend i {
  border-radius: 2px;
}

.number-ribbon {
  gap: 4px;
}

.number-ribbon:focus-visible {
  outline: 3px solid rgba(79, 209, 197, 0.68);
  outline-offset: 5px;
}

.ribbon-number {
  min-height: 34px;
  border-radius: 6px;
  background: #1b3138;
  color: #bfd0d1;
  transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
}

.ribbon-number:hover {
  box-shadow: 0 7px 16px rgba(0, 0, 0, 0.25);
  filter: brightness(1.14);
  transform: translateY(-4px);
}

.ribbon-number.high {
  background: #1f7771;
  color: var(--white);
}

.ribbon-number.low {
  background: #31464a;
}

.ribbon-number.kill {
  background: #b04b4d;
  color: var(--white);
}

.lower-grid {
  gap: 20px;
}

.table-wrap {
  overflow-x: auto;
  scrollbar-color: var(--line) transparent;
}

th,
td {
  border-bottom-color: rgba(141, 167, 169, 0.18);
}

th {
  color: var(--muted);
}

.factor-name,
td:nth-child(3),
td:nth-child(4) {
  color: var(--white);
}

.consensus-bar {
  background: #1d343a;
}

.consensus-bar i {
  background: var(--teal);
}

.draw-item,
.sample-line,
.hit-item {
  border-color: rgba(141, 167, 169, 0.18);
}

.draw-item-head strong,
.hit-item strong {
  color: var(--white);
}

.draw-balls span {
  border-color: var(--line);
  background: var(--surface-soft);
  color: #d4e2e1;
}

.draw-balls i {
  background: var(--line);
}

.draw-balls .special-ball {
  border-color: var(--gold);
  background: var(--gold-soft);
  color: #ffe0a1;
}

.draw-balls .special-ball.wave-red {
  border-color: #ff6863;
  background: #a63f47;
}

.draw-balls .special-ball.wave-blue {
  border-color: #6da8e8;
  background: #2d659c;
}

.draw-balls .special-ball.wave-green {
  border-color: #6fd49b;
  background: #26734f;
}

.draw-balls .special-attribute {
  border-color: rgba(79, 209, 197, 0.52);
  background: var(--teal-soft);
  color: #a9e8e1;
}

.rate-card {
  border-color: var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.rate-card strong {
  color: var(--teal);
}

footer {
  border-top-color: rgba(141, 167, 169, 0.22);
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes terminal-rise {
    from { opacity: 0.01; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .scoreboard,
  .dashboard-layout > *,
  .number-stage,
  footer {
    animation: terminal-rise 560ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .dashboard-layout > *:nth-child(2),
  .number-stage,
  footer {
    animation-delay: 90ms;
  }

  .scoreboard-topline {
    animation: terminal-rise 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .final-number,
  .number-card,
  .zodiac-chip,
  .kill-token,
  .ribbon-number {
    animation: terminal-rise 460ms cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: calc(var(--stagger, 0) * 28ms);
  }
}

@media (max-width: 1180px) {
  .dashboard-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

  .scoreboard {
    grid-template-columns: minmax(240px, 1.2fr) repeat(4, minmax(108px, 1fr));
  }

  .top-numbers {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .number-ribbon {
    grid-template-columns: repeat(49, 22px);
    overflow-x: auto;
    padding-bottom: 6px;
  }
}

@media (max-width: 900px) {
  .dashboard-layout {
    display: block;
  }

  .side-column {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 20px;
  }

  .lower-grid,
  .primary-grid {
    grid-template-columns: 1fr;
  }

  .scoreboard {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .scoreboard-copy {
    grid-column: 1 / -1;
    padding-right: 0;
  }
}

@media (max-width: 620px) {
  .shell {
    width: min(100% - 24px, 560px);
    padding-top: 14px;
  }

  .scoreboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 17px 14px;
    min-height: 0;
    padding: 18px;
  }

  .scoreboard-topline {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
    padding-bottom: 14px;
  }

  .scoreboard-copy {
    grid-column: 1 / -1;
  }

  .scoreboard-stat {
    border-left: 0;
    border-top: 1px solid rgba(190, 224, 222, 0.22);
    padding: 12px 0 0;
  }

  .final-result-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .zodiac-block {
    border-top: 1px solid rgba(185, 222, 220, 0.2);
    border-left: 0;
    padding: 18px 0 0;
  }

  .final-numbers {
    grid-template-columns: repeat(4, minmax(38px, 1fr));
  }

  .current-zodiacs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .current-zodiacs .zodiac-chip {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .current-zodiacs .zodiac-chip small {
    grid-column: auto;
  }

  .kill-groups {
    grid-template-columns: 1fr 1fr;
    gap: 11px 14px;
  }

  .kill-groups > div + div {
    border-left: 0;
    padding-left: 0;
  }

  .kill-groups > div:nth-child(n + 3) {
    border-top: 1px solid rgba(255, 117, 107, 0.24);
    padding-top: 10px;
  }

  .expert-main {
    grid-template-columns: 24px 36px minmax(0, 1fr) auto;
    gap: 8px;
  }

  .expert-avatar {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .expert-accuracy {
    font-size: 15px;
  }

  .expert-details,
  .prediction-list,
  .structured-prediction-list {
    margin-left: 0;
  }

  .structured-prediction {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .side-column {
    grid-template-columns: 1fr;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 375px) {
  .shell {
    width: min(100% - 16px, 359px);
  }

  .panel,
  .number-stage {
    padding: 16px;
  }

  .scoreboard {
    padding: 16px;
  }

  .scoreboard-brand strong {
    font-size: 17px;
  }

  .issue-line strong {
    font-size: 58px;
  }

  .scoreboard-stat strong {
    font-size: 17px;
  }

  .number-card {
    min-height: 82px;
    padding: 8px;
  }

  .number-card strong {
    margin-top: 11px;
    font-size: 23px;
  }

  .final-number {
    min-height: 43px;
    font-size: 17px;
  }

  .current-zodiacs {
    gap: 6px;
  }

  .hit-rate-summary {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scoreboard,
  .dashboard-layout > *,
  .number-stage,
  footer,
  .scoreboard-topline,
  .final-number,
  .number-card,
  .zodiac-chip,
  .kill-token,
  .ribbon-number {
    animation: none !important;
  }
}

/* Compact recommendation header: the primary task starts above the fold. */
.final-heading {
  display: grid;
  grid-template-columns: minmax(170px, 0.78fr) minmax(330px, 1.42fr) auto;
  align-items: center;
  gap: 24px;
  margin-bottom: 22px;
}

.final-title-wrap {
  min-width: 0;
}

.final-title-wrap h1 {
  white-space: nowrap;
}

.final-generated {
  margin: 9px 0 0;
  color: #a9c4c5;
  font-size: 11px;
  line-height: 1.35;
}

.final-context {
  display: grid;
  grid-template-columns: minmax(120px, 1.25fr) repeat(3, minmax(82px, 1fr));
  align-items: stretch;
  min-width: 0;
  border-left: 1px solid rgba(185, 222, 220, 0.2);
}

.final-issue-summary,
.final-summary-stat {
  min-width: 0;
  padding: 0 16px;
}

.final-issue-summary + .final-summary-stat,
.final-summary-stat + .final-summary-stat {
  border-left: 1px solid rgba(185, 222, 220, 0.16);
}

.final-issue-summary > span,
.final-summary-stat > span {
  display: block;
  color: #a8c3c5;
  font: 700 10px/1.2 var(--mono);
  letter-spacing: 0.08em;
}

.final-issue-summary > div {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 6px;
}

.final-issue-summary strong {
  color: var(--gold);
  font: 800 40px/0.9 var(--mono);
  letter-spacing: -0.04em;
}

.final-issue-summary small {
  color: #bad0d1;
  font-size: 12px;
}

.final-summary-stat strong {
  display: block;
  margin-top: 9px;
  color: var(--white);
  font: 800 17px/1.15 var(--mono);
  overflow-wrap: anywhere;
}

.final-heading-actions {
  display: grid;
  justify-items: end;
  gap: 13px;
  min-width: 168px;
}

.account-panel {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.account-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
  text-align: right;
}

.account-kicker {
  color: var(--teal);
  font: 700 10px/1 var(--mono);
  letter-spacing: 0.12em;
}

.account-copy strong {
  max-width: 190px;
  overflow: hidden;
  color: var(--navy);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-copy small {
  overflow: hidden;
  max-width: 190px;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-logout {
  min-height: 38px;
  border: 1px solid #8fc8c2;
  border-radius: 4px;
  background: #f3fbfa;
  color: var(--navy);
  cursor: pointer;
  padding: 8px 13px;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.account-logout:hover,
.account-logout:focus-visible {
  border-color: var(--teal);
  background: var(--teal);
  color: var(--white);
}

.account-logout:disabled {
  cursor: wait;
  opacity: 0.65;
}

@media (max-width: 1180px) {
  .final-heading {
    grid-template-columns: minmax(150px, 0.7fr) minmax(280px, 1.3fr) auto;
    gap: 16px;
  }

  .final-context {
    grid-template-columns: minmax(96px, 1.15fr) repeat(3, minmax(68px, 1fr));
  }

  .final-issue-summary,
  .final-summary-stat {
    padding: 0 10px;
  }

  .final-issue-summary strong {
    font-size: 34px;
  }
}

@media (max-width: 900px) {
  .final-heading {
    grid-template-columns: minmax(150px, 0.7fr) minmax(0, 1.3fr);
  }

  .final-heading-actions {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
  }
}

@media (max-width: 620px) {
  .final-heading {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 20px;
  }

  .final-title-wrap h1 {
    white-space: normal;
  }

  .final-generated {
    margin-top: 7px;
  }

  .final-context {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: auto auto;
    border-top: 1px solid rgba(185, 222, 220, 0.2);
    border-left: 0;
    padding-top: 14px;
  }

  .final-issue-summary {
    grid-column: 1 / -1;
    padding: 0 0 12px;
  }

  .final-issue-summary + .final-summary-stat,
  .final-summary-stat + .final-summary-stat {
    border-left: 1px solid rgba(185, 222, 220, 0.16);
    padding: 0 10px;
  }

  .final-summary-stat:first-of-type {
    border-left: 0;
    padding-left: 0;
  }

  .final-summary-stat:last-of-type {
    padding-right: 0;
  }

  .final-issue-summary > div {
    margin-top: 5px;
  }

  .final-issue-summary strong {
    font-size: 38px;
  }

  .final-heading-actions {
    grid-column: auto;
    grid-row: auto;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .final-heading-actions .account-panel {
    width: 100%;
    justify-content: space-between;
  }

  .account-copy {
    text-align: left;
  }

  .final-heading-actions .lock-meta {
    justify-items: start;
    text-align: left;
  }
}

/* Soft white data-board theme: bright surfaces with semantic accent colors. */
:root {
  color-scheme: light;
  --canvas: #f3f6f8;
  --surface: #ffffff;
  --surface-soft: #f7fafb;
  --surface-raised: #edf5f5;
  --ink: #18303a;
  --muted: #5f7078;
  --line: #d7e1e4;
  --navy: #173d49;
  --navy-soft: #2b5d69;
  --teal: #0b776f;
  --teal-soft: #dff3ef;
  --coral: #bf4039;
  --coral-soft: #fff0ee;
  --gold: #9a6800;
  --gold-soft: #fff3d7;
  --white: #ffffff;
}

html,
body {
  background: var(--canvas);
}

body {
  color: var(--ink);
}

::selection {
  background: #bde6e0;
  color: var(--ink);
}

button:focus-visible,
a:focus-visible,
.number-ribbon:focus-visible {
  outline-color: rgba(11, 119, 111, 0.42);
}

.panel,
.number-stage {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(24, 48, 58, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

h1,
h2,
.panel-heading h1,
.panel-heading h2 {
  color: var(--ink);
}

.eyebrow,
.scoreboard .eyebrow,
.final-panel .eyebrow,
.kill-panel .eyebrow {
  color: var(--teal);
}

.panel-note,
.lock-meta small,
.final-panel .lock-meta small,
.final-panel .disclaimer,
.final-generated,
.section-label,
.final-context span,
.final-issue-summary small,
.final-summary-stat strong,
.final-summary-stat > span {
  color: var(--muted);
}

.final-panel {
  border-color: #a9d9d3;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 14px 34px rgba(11, 119, 111, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.final-panel h1,
.final-panel .final-summary-stat strong,
.zodiac-chip strong,
.final-zodiac,
.number-card strong,
.factor-name,
td:nth-child(3),
td:nth-child(4),
.draw-item-head strong,
.hit-item strong,
.sample-line strong {
  color: var(--ink);
}

.final-heading {
  border-color: var(--line);
}

.final-context {
  border-left-color: var(--line);
}

.final-issue-summary + .final-summary-stat,
.final-summary-stat + .final-summary-stat {
  border-left-color: var(--line);
}

.final-issue-summary strong {
  color: var(--gold);
}

.final-issue-summary small {
  color: var(--muted);
}

.state-pill {
  border-color: #a9c7c8;
  color: var(--navy-soft);
}

.state-pill.locked {
  border-color: #73bdb5;
  background: var(--teal-soft);
  color: #075e58;
}

.final-number {
  border-color: #d4b56a;
  background: var(--gold-soft);
  color: #704900;
}

.final-number:hover {
  border-color: var(--gold);
  background: #ffeab7;
}

.zodiac-block,
.disclaimer {
  border-color: var(--line);
}

.zodiac-chip {
  border-color: var(--line);
  background: var(--surface-soft);
}

.zodiac-chip:hover {
  border-color: #8fc8c2;
  background: var(--surface-raised);
}

.final-zodiac {
  border-color: #9ed6d0;
  background: var(--teal-soft);
}

.zodiac-rank,
.final-zodiac .zodiac-rank {
  color: var(--teal);
}

.zodiac-chip small,
.final-zodiac small {
  color: #4c6269;
}

.current-zodiac-panel {
  background: var(--surface-soft);
}

.number-card {
  border-color: var(--line);
  background: var(--surface-soft);
}

.number-card:hover {
  border-color: #8fc8c2;
  background: var(--surface-raised);
  box-shadow: 0 10px 22px rgba(24, 48, 58, 0.1);
}

.number-card small,
.number-card .rank {
  color: var(--muted);
}

.kill-panel {
  border-color: #efc2bd;
  background: #fffaf9;
}

.kill-token {
  border-color: #df827b;
  background: var(--coral-soft);
  color: #9e302a;
}

.kill-token:hover {
  border-color: var(--coral);
  background: #ffe2de;
}

.kill-token small,
.kill-groups p,
.structured-prediction.kill > strong,
.prediction-group b {
  color: #a63b34;
}

.kill-groups,
.kill-groups > div + div {
  border-color: #efcfcc;
}

.kill-groups > div > span,
.muted-value,
.empty-inline,
.loading {
  color: var(--muted);
}

.experts-panel,
.history-panel,
.hit-rate-panel,
.number-stage {
  background: var(--surface);
}

.expert-item,
th,
td,
.draw-item,
.sample-line,
.hit-item,
footer {
  border-color: var(--line);
}

.expert-rank,
.expert-accuracy,
.update-status.updated,
.hit-item > span,
.rate-card strong {
  color: var(--teal);
}

.expert-avatar {
  border-color: #9ed6d0;
  background: var(--teal-soft);
  color: var(--teal);
}

.expert-name a,
.expert-link,
footer a {
  color: var(--navy);
}

.structured-prediction,
.prediction-group,
.list-toggle,
.range-tab,
.rate-card,
.draw-balls span {
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--ink);
}

.structured-prediction.kill {
  background: var(--coral-soft);
}

.structured-prediction > strong {
  color: var(--teal);
}

.list-toggle:hover,
.list-toggle:focus-visible,
.range-tab:hover,
.range-tab.active {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--navy);
}

.number-ribbon:focus-visible {
  outline-color: rgba(11, 119, 111, 0.5);
}

.ribbon-number {
  background: #e5edef;
  color: var(--ink);
}

.ribbon-number:hover {
  box-shadow: 0 7px 16px rgba(24, 48, 58, 0.14);
}

.ribbon-number.high {
  background: #16786f;
  color: var(--white);
}

.ribbon-number.low {
  background: #c9d5d8;
  color: var(--ink);
}

.ribbon-number.kill {
  background: #b23e39;
  color: var(--white);
}

.consensus-bar {
  background: #e3ecee;
}

.consensus-bar i {
  background: var(--teal);
}

.draw-balls span {
  color: var(--navy);
}

.draw-balls i {
  background: var(--line);
}

.draw-balls .special-ball {
  border-color: #d3ae58;
  background: var(--gold-soft);
  color: #704900;
}

.draw-balls .special-ball.wave-red {
  border-color: #9f302f;
  background: #b83e3e;
  color: var(--white);
}

.draw-balls .special-ball.wave-blue {
  border-color: #285d91;
  background: #356fa8;
  color: var(--white);
}

.draw-balls .special-ball.wave-green {
  border-color: #246442;
  background: #2e7a52;
  color: var(--white);
}

.draw-balls .special-attribute {
  border-color: #8fc8c2;
  background: var(--teal-soft);
  color: #075e58;
}

.legend-mid {
  background: #aebdc1;
}

footer a:hover,
footer a:focus-visible,
.expert-name a:hover,
.expert-name a:focus-visible,
.expert-link:hover,
.expert-link:focus-visible {
  color: var(--teal);
}

@media (prefers-reduced-motion: no-preference) {
}

/* The hidden window is represented by one calm, live countdown. */
.final-countdown {
  position: relative;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 28px;
  min-height: 164px;
  overflow: hidden;
  border: 1px solid #a9d9d3;
  border-radius: 12px;
  background: #f7fbfa;
  padding: 26px 30px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.final-countdown[hidden],
.final-result-grid[hidden] {
  display: none;
}

.final-countdown::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--teal);
  content: "";
  transform: scaleX(0.32);
  transform-origin: left center;
}

.countdown-mark {
  display: grid;
  align-content: center;
  gap: 9px;
  width: 92px;
  height: 92px;
  border: 1px solid #8fc8c2;
  border-radius: 10px;
  background: #ffffff;
  padding: 21px 18px;
}

.countdown-mark span {
  display: block;
  height: 4px;
  border-radius: 2px;
  background: var(--teal);
  transform-origin: left center;
}

.countdown-mark span:nth-child(1) {
  width: 76%;
}

.countdown-mark span:nth-child(2) {
  width: 100%;
  background: var(--gold);
}

.countdown-mark span:nth-child(3) {
  width: 54%;
}

.countdown-display {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 18px;
  min-width: 0;
}

.countdown-label {
  color: var(--teal);
  font: 700 11px/1 var(--mono);
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.countdown-display strong {
  color: var(--ink);
  font: 800 38px/1 var(--mono);
  letter-spacing: 0;
  white-space: nowrap;
}

.countdown-target {
  border-left: 1px solid var(--line);
  color: var(--muted);
  padding-left: 18px;
  font: 700 15px/1 var(--mono);
  white-space: nowrap;
}

@media (prefers-reduced-motion: no-preference) {
  .final-countdown::after {
    animation: countdown-scan 2.8s ease-in-out infinite alternate;
  }

  .countdown-mark span {
    animation: countdown-pulse 1.8s ease-in-out infinite;
  }

  .countdown-mark span:nth-child(2) {
    animation-delay: 180ms;
  }

  .countdown-mark span:nth-child(3) {
    animation-delay: 360ms;
  }

  @keyframes countdown-scan {
    from { transform: scaleX(0.22); opacity: 0.45; }
    to { transform: scaleX(0.78); opacity: 1; }
  }

  @keyframes countdown-pulse {
    0%, 100% { transform: scaleX(0.86); opacity: 0.62; }
    50% { transform: scaleX(1); opacity: 1; }
  }
}

@media (prefers-reduced-motion: reduce) {
  .final-countdown::after,
  .countdown-mark span {
    animation: none;
  }
}

@media (max-width: 620px) {
  .final-countdown {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 18px;
    min-height: 132px;
    padding: 20px;
  }

  .countdown-mark {
    width: 72px;
    height: 72px;
    gap: 7px;
    padding: 16px 13px;
  }

  .countdown-display {
    grid-template-columns: 1fr auto;
    gap: 9px 12px;
  }

  .countdown-label {
    grid-column: 1 / -1;
  }

  .countdown-display strong {
    font-size: 27px;
  }

  .countdown-target {
    padding-left: 12px;
    font-size: 13px;
  }
}

/* Compact copy controls keep shareable recommendations next to their source. */
.panel-heading-tools,
.section-heading-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.copy-button {
  min-height: 30px;
  border: 1px solid rgba(13, 43, 53, 0.3);
  border-radius: 7px;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  padding: 5px 9px;
  font: 700 11px/1 var(--mono);
  white-space: nowrap;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease,
    transform 160ms ease;
}

.copy-button:hover:not(:disabled),
.copy-button:focus-visible:not(:disabled) {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
  transform: translateY(-1px);
}

.copy-button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.section-heading-tools {
  justify-content: space-between;
  margin-bottom: 13px;
}

.section-heading-tools .section-label {
  margin-bottom: 0;
}

.copy-button-final {
  border-color: rgba(185, 222, 220, 0.48);
  color: #d3eeeb;
}

  .copy-button-final:hover:not(:disabled),
.copy-button-final:focus-visible:not(:disabled) {
  border-color: var(--gold);
  background: var(--gold);
  color: #0d2b35;
}

/* Make the two dense analysis views readable at a glance. */
.number-stage {
  padding: 24px;
}

.number-stage .stage-heading {
  align-items: flex-end;
  margin-bottom: 18px;
}

.number-stage .legend {
  gap: 8px;
}

.number-stage .legend span {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--ink);
  padding: 5px 9px;
  font-weight: 700;
}

.number-stage .legend i {
  width: 11px;
  height: 11px;
  border-radius: 3px;
}

.number-ribbon {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 8px;
  overflow: visible;
  padding: 0;
}

.ribbon-number {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  min-width: 0;
  min-height: 72px;
  overflow: hidden;
  border: 1px solid #cad8da;
  border-radius: 7px;
  background: #f7fafb;
  color: var(--ink);
  padding: 8px 8px 10px;
}

.ribbon-number:hover {
  box-shadow: 0 8px 18px rgba(24, 48, 58, 0.15);
  filter: none;
  transform: translateY(-2px);
}

.ribbon-number strong {
  grid-column: 1 / -1;
  align-self: end;
  color: var(--navy);
  font: 800 22px/1 var(--mono);
}

.ribbon-number small {
  grid-column: 1 / -1;
  align-self: end;
  margin-top: 5px;
  color: var(--muted);
  font: 700 9px/1 var(--mono);
  white-space: nowrap;
}

.ribbon-status {
  grid-column: 1 / -1;
  justify-self: start;
  border-radius: 4px;
  background: #e5edef;
  color: #52696f;
  padding: 3px 5px;
  font: 800 9px/1 var(--mono);
}

.ribbon-score {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  width: var(--score);
  height: 3px;
  background: #8ba0a5;
}

.ribbon-number.high {
  border-color: #65aaa4;
  background: var(--teal-soft);
  color: var(--ink);
}

.ribbon-number.high strong {
  color: var(--teal);
}

.ribbon-number.high .ribbon-status,
.ribbon-number.high .ribbon-score {
  background: var(--teal);
  color: var(--white);
}

.ribbon-number.kill {
  border-color: #dc8b84;
  background: var(--coral-soft);
  color: var(--ink);
}

.ribbon-number.kill strong,
.ribbon-number.kill small {
  color: #91342f;
}

.ribbon-number.kill .ribbon-status,
.ribbon-number.kill .ribbon-score {
  background: var(--coral);
  color: var(--white);
}

.ribbon-number.lower-score:not(.kill) {
  background: #eef3f4;
}

.factors-panel .table-wrap {
  overflow: visible;
}

.factors-panel table {
  table-layout: fixed;
}

.factors-panel th:nth-child(1) { width: 28%; }
.factors-panel th:nth-child(2) { width: 18%; }
.factors-panel th:nth-child(3) { width: 38%; }
.factors-panel th:nth-child(4) { width: 16%; }

.factor-row td {
  height: 58px;
  padding: 8px 7px;
}

.factor-name {
  display: flex;
  align-items: center;
  gap: 10px;
}

.factor-rank {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #a9cac7;
  border-radius: 6px;
  background: var(--teal-soft);
  color: var(--teal);
  font: 800 10px/1 var(--mono);
}

.factor-label {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.factor-label small {
  color: var(--muted);
  font: 700 9px/1 var(--mono);
}

.factor-label strong,
.factor-item strong {
  color: var(--navy);
  font-size: 14px;
}

.factor-kill .factor-rank {
  border-color: #e1aaa5;
  background: var(--coral-soft);
  color: var(--coral);
}

.factor-consensus {
  text-align: left !important;
}

.consensus {
  display: grid;
  grid-template-columns: 52px minmax(70px, 1fr);
  align-items: center;
  justify-content: stretch;
  gap: 10px;
}

.consensus-value {
  color: var(--teal);
  font: 800 12px/1 var(--mono);
  text-align: right;
}

.consensus-bar {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 5px;
  background: #e3ecee;
}

.consensus-bar i {
  border-radius: inherit;
  background: var(--teal);
}

.factor-kill .consensus-value {
  color: var(--coral);
}

.factor-kill .consensus-bar i {
  background: var(--coral);
}

.factor-source {
  text-align: right;
}

.factor-source strong {
  display: block;
  color: var(--navy);
  font: 800 17px/1 var(--mono);
}

.factor-source small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

@media (max-width: 1180px) {
  .number-ribbon {
    grid-template-columns: repeat(10, minmax(0, 1fr));
    overflow: visible;
    padding-bottom: 0;
  }
}

@media (max-width: 760px) {
  .number-ribbon {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .number-stage {
    padding: 18px;
  }

  .number-stage .stage-heading {
    align-items: flex-start;
    gap: 12px;
  }

  .number-stage .legend span {
    min-height: 25px;
    padding: 4px 7px;
    font-size: 9px;
  }

  .number-ribbon {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
  }

  .ribbon-number {
    min-height: 66px;
    padding: 7px 6px 9px;
  }

  .ribbon-number strong {
    font-size: 19px;
  }

  .ribbon-number small {
    font-size: 8px;
  }

  .factors-panel .table-wrap {
    overflow: visible;
  }

  .factors-panel table,
  .factors-panel tbody {
    display: block;
    width: 100%;
  }

  .factors-panel thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  #factor-table {
    display: grid;
    gap: 8px;
  }

  #factor-table .factor-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface-soft);
    padding: 10px;
  }

  #factor-table .factor-row td {
    display: block;
    width: auto;
    height: auto;
    border: 0;
    padding: 0;
  }

  .factor-item {
    align-self: center;
    text-align: right;
  }

  .factor-consensus {
    align-self: center;
  }

  .factor-source {
    align-self: center;
  }

  .consensus {
    grid-template-columns: 48px minmax(70px, 1fr);
  }
}

@media (max-width: 620px) {
  .panel-heading-tools {
    align-items: flex-end;
    flex-direction: column;
    gap: 7px;
  }

  .section-heading-tools {
    gap: 8px;
  }
}

/* Keep zodiac and wave color visible on every recommended number. */
.number-card {
  min-height: 116px;
}

.number-card strong {
  margin-top: 9px;
}

.number-attributes {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 9px;
}

.number-zodiac,
.number-wave {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 20px;
  border: 1px solid #afd5d2;
  border-radius: 5px;
  background: var(--teal-soft);
  color: #075e58;
  padding: 3px 5px;
  font: 800 9px/1 var(--mono);
  white-space: nowrap;
}

.number-wave {
  border-color: #cbd7d9;
  background: #eef3f4;
  color: #52696f;
}

.number-wave.wave-red {
  border-color: #dca19c;
  background: #fbe6e4;
  color: #a23530;
}

.number-wave.wave-blue {
  border-color: #9bbbd7;
  background: #e9f2fa;
  color: #285d91;
}

.number-wave.wave-green {
  border-color: #99c8ad;
  background: #e8f5ed;
  color: #246442;
}

.number-card > small {
  margin-top: 7px;
}

@media (max-width: 620px) {
  .number-card {
    min-height: 108px;
  }

  .number-attributes {
    gap: 3px;
    margin-top: 7px;
  }

  .number-zodiac,
  .number-wave {
    min-height: 18px;
    padding: 2px 4px;
    font-size: 8px;
  }
}

/* Wave cards: the number stays above a large, quiet zodiac watermark. */
.top-numbers .number-card {
  isolation: isolate;
  border-color: transparent;
  background: #245d58;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 -14px 24px rgba(0, 0, 0, 0.12);
}

.top-numbers .number-card::before {
  content: attr(data-zodiac);
  position: absolute;
  z-index: 0;
  inset: 50% -8px auto;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.22);
  font: 900 68px/0.8 var(--sans);
  letter-spacing: 0.02em;
  text-align: center;
  white-space: nowrap;
  transform: translateY(-50%) rotate(-9deg) scale(1.08);
  pointer-events: none;
}

.top-numbers .number-card.neutral-number,
.kill-numbers > .kill-token.neutral-number:not(.wave-red):not(.wave-blue):not(.wave-green) {
  background: #fff;
  color: #24343b;
  border: 1px solid #d5dfe3;
  box-shadow: none;
}

.top-numbers .number-card.neutral-number:hover,
.kill-numbers > .kill-token.neutral-number:hover {
  background: #fff;
  border-color: #9caeb5;
  box-shadow: none;
  filter: none;
}

.top-numbers .number-card.neutral-number > strong,
.kill-numbers > .kill-token.neutral-number > strong {
  color: #24343b;
  text-shadow: none;
}

.top-numbers .number-card.neutral-number > .rank,
.top-numbers .number-card.neutral-number > small,
.kill-numbers > .kill-token.neutral-number > small {
  color: #52636b;
}

.top-numbers .number-card.wave-red {
  background: #b6423e;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 -14px 24px rgba(102, 18, 14, 0.2);
}

.top-numbers .number-card.wave-blue {
  background: #286598;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), inset 0 -14px 24px rgba(10, 36, 78, 0.2);
}

.top-numbers .number-card.wave-green {
  background: #27805c;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), inset 0 -14px 24px rgba(8, 57, 38, 0.2);
}

.top-numbers .number-card:hover {
  border-color: rgba(255, 255, 255, 0.55);
  background: #347d77;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 10px 22px rgba(0, 0, 0, 0.24);
}

.top-numbers .number-card.wave-red:hover {
  background: #c64f4a;
}

.top-numbers .number-card.wave-blue:hover {
  background: #3476ad;
}

.top-numbers .number-card.wave-green:hover {
  background: #309a70;
}

.top-numbers .number-card .rank,
.top-numbers .number-card > small {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.82);
}

.top-numbers .number-card strong {
  position: relative;
  z-index: 1;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.24);
}

.top-numbers .number-card .number-attributes {
  position: relative;
  z-index: 1;
}

.top-numbers .number-card .number-zodiac,
.top-numbers .number-card .number-wave {
  border-color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.top-numbers .number-card .number-wave.wave-red,
.top-numbers .number-card .number-wave.wave-blue,
.top-numbers .number-card .number-wave.wave-green {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

@media (max-width: 620px) {
  .top-numbers .number-card::before {
    font-size: 58px;
  }
}

/* Match the recommendation cards: wave color is the surface and zodiac is a quiet watermark. */
.kill-numbers > .kill-token,
.number-ribbon .ribbon-number {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.kill-numbers > .kill-token::before,
.number-ribbon .ribbon-number::before {
  content: attr(data-zodiac);
  position: absolute;
  z-index: 0;
  inset: 50% -8px auto;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.23);
  font: 900 54px/0.8 var(--sans);
  letter-spacing: 0.02em;
  text-align: center;
  white-space: nowrap;
  transform: translateY(-50%) rotate(-9deg) scale(1.08);
  pointer-events: none;
}

.kill-numbers > .kill-token {
  grid-template-rows: 1fr auto;
  border-color: transparent;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 -12px 18px rgba(0, 0, 0, 0.14);
}

.kill-numbers > .kill-token.wave-red,
.number-ribbon .ribbon-number.wave-red {
  border-color: rgba(255, 255, 255, 0.28);
  background: #b6423e;
}

.kill-numbers > .kill-token.wave-blue,
.number-ribbon .ribbon-number.wave-blue {
  border-color: rgba(255, 255, 255, 0.28);
  background: #286598;
}

.kill-numbers > .kill-token.wave-green,
.number-ribbon .ribbon-number.wave-green {
  border-color: rgba(255, 255, 255, 0.28);
  background: #27805c;
}

.kill-numbers > .kill-token:not(.wave-red):not(.wave-blue):not(.wave-green) {
  background: #245d58;
}

.kill-numbers > .kill-token:hover,
.number-ribbon .ribbon-number:hover {
  border-color: rgba(255, 255, 255, 0.68);
  filter: brightness(1.08);
}

.kill-numbers > .kill-token > strong,
.kill-numbers > .kill-token > small,
.number-ribbon .ribbon-number > strong,
.number-ribbon .ribbon-number > small,
.number-ribbon .ribbon-number > .ribbon-status,
.number-ribbon .ribbon-number > .ribbon-score {
  position: relative;
  z-index: 1;
}

.kill-numbers > .kill-token > strong,
.number-ribbon .ribbon-number > strong {
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}

.kill-numbers > .kill-token > small {
  color: rgba(255, 255, 255, 0.86);
}

.number-ribbon .ribbon-number > .ribbon-status {
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(0, 0, 0, 0.16);
  color: rgba(255, 255, 255, 0.94);
}

.number-ribbon .ribbon-number.high > .ribbon-status {
  color: #ffe36e;
}

.number-ribbon .ribbon-number > .ribbon-score {
  background: rgba(255, 255, 255, 0.8);
}

@media (max-width: 620px) {
  .kill-numbers > .kill-token::before,
  .number-ribbon .ribbon-number::before {
    font-size: 45px;
  }

  .number-ribbon .ribbon-number > .ribbon-status {
    padding: 2px 4px;
    font-size: 8px;
  }
}
