.status-block,
.waiting-plaque,
.countdown-hud small,
.history-card {
  display: none !important;
}

.draw-meta {
  justify-content: flex-start;
}

.countdown-hud {
  padding: 11px 20px;
}

.countdown-hud strong {
  margin-top: 0;
}

.countdown-hud.hidden {
  display: none;
}

.stage-shade {
  background: linear-gradient(180deg, #0206098c 0, transparent 22%, transparent 68%, #020609df 100%);
}

.stage-history {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 8px 18px;
  border-top: 1px solid #1c3443;
  background: #07131b;
}

.stage-history > span {
  flex: 0 0 auto;
  color: #91b5c6;
  font-size: 10px;
  letter-spacing: .12em;
}

.stage-history .history-grid {
  display: flex;
  gap: 7px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.stage-history .history-grid::-webkit-scrollbar {
  display: none;
}

.stage-history .history-item {
  flex: 0 0 48px;
  padding: 0;
  border: 0;
  background: transparent;
}

.stage-history .result-ball {
  width: 31px;
  height: 31px;
  font-size: 17px;
}

.stage-history .history-item span {
  margin-top: 3px;
  font-size: 8px;
}

.stage-history .empty {
  margin: 0;
  color: #6e8c9b;
  font-size: 10px;
}

.archive-card {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid #1c3443;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(15, 28, 38, .97), rgba(6, 13, 19, .98));
  box-shadow: 0 18px 45px #0005;
}

.archive-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 13px;
}

.archive-heading small {
  color: #6f96aa;
  font-size: 9px;
  letter-spacing: .16em;
}

.archive-heading h2 {
  margin: 3px 0 0;
  font-size: 16px;
}

.archive-heading > span {
  color: #7897a7;
  font-size: 11px;
  white-space: nowrap;
}

.archive-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.archive-row {
  min-height: 52px;
  display: grid;
  grid-template-columns: minmax(112px, .75fr) 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #18313f;
  border-radius: 10px;
  background: #08131a;
}

.archive-row time,
.archive-issue {
  color: #83a2b2;
  font-size: 11px;
}

.archive-balls {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
}

.archive-balls b {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #eaf7fc;
  color: #07111a;
  font-size: 12px;
}

.archive-balls b.special {
  background: #ffbd60;
}

.mouse-history-row {
  grid-template-columns: minmax(130px, 1fr) 104px 118px;
}

.mouse-history-row .result-ball {
  width: 31px;
  height: 31px;
  margin: 0;
  font-size: 16px;
}

.mouse-outcome,
.result-attributes {
  display: flex;
  align-items: center;
  gap: 6px;
}

.result-attributes i {
  display: grid;
  place-items: center;
  min-width: 27px;
  height: 25px;
  padding: 0 6px;
  border: 1px solid #2a4a5b;
  border-radius: 4px;
  background: #10232e;
  color: #a8d9ec;
  font-size: 12px;
  font-style: normal;
}

.archive-more {
  width: 100%;
  margin-top: 12px;
  padding: 10px 14px;
  border: 1px solid #26536a;
  border-radius: 10px;
  background: #0d2230;
  color: #8ddfff;
  cursor: pointer;
}

.archive-more:hover {
  border-color: #55ccff;
  background: #123044;
}

.archive-more:disabled {
  cursor: wait;
  opacity: .65;
}

.archive-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
}

.archive-pagination button {
  min-width: 86px;
  padding: 9px 14px;
  border: 1px solid #26536a;
  border-radius: 5px;
  background: #0d2230;
  color: #8ddfff;
  cursor: pointer;
}

.archive-pagination button:disabled {
  cursor: default;
  opacity: .35;
}

.archive-pagination span {
  min-width: 62px;
  text-align: center;
  color: #8ca7b5;
  font-size: 12px;
}

.official-history {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #1b3442;
}

.api-state a {
  color: #71d6ff;
}

.official-result-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.official-result-actions a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 7px 11px;
  border: 1px solid #28536a;
  border-radius: 4px;
  background: #0b1d27;
  color: #8edfff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-decoration: none;
}

.official-result-actions .official-video-link {
  border-color: #4dbbe8;
  background: #11394b;
  color: #c2efff;
}

.official-result-actions a:hover {
  border-color: #88dcff;
  background: #17495e;
}

@media (max-width: 480px) {
  .official-result-actions {
    align-items: stretch;
  }

  .official-result-actions a {
    width: 100%;
  }
}

@media (max-width: 800px) {
  .draw-meta { height: 54px; }
  .stage-history { min-height: 52px; padding: 6px 10px; }
  .stage-history .history-item { flex-basis: 42px; }
  .archive-list { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .stage-history > span { display: none; }
  .stage-history .result-ball { width: 28px; height: 28px; font-size: 15px; }
  .archive-card { padding: 14px 10px; }
  .archive-row { grid-template-columns: 98px minmax(0, 1fr); padding: 7px 8px; }
  .archive-balls { gap: 3px; }
  .archive-balls b { width: 24px; height: 24px; font-size: 11px; }
  .mouse-history-row { grid-template-columns: minmax(118px, 1fr) 92px 108px; }
  .mouse-history-row .result-ball { width: 28px; height: 28px; }
}

/* Compact information layout inspired by the supplied reference page. */
body {
  background: #05090d;
}

.shell {
  width: min(1180px, 94vw);
  padding-top: 8px;
}

.site-header {
  height: 66px;
  border-bottom: 1px solid #1a2b36;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.api-link {
  padding: 6px 10px;
  border: 1px solid #28546a;
  border-radius: 4px;
  color: #81dcff;
  font-size: 11px;
  text-decoration: none;
}

.api-link:hover {
  border-color: #58cdf7;
  background: #102835;
}

.brand-mark {
  width: 36px;
  height: 36px;
  font-size: 18px;
  box-shadow: none;
}

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

.brand small {
  font-size: 9px;
}

.game-tabs {
  gap: 0;
  margin: 10px 0 12px;
  border: 1px solid #213746;
  border-radius: 6px;
  overflow: hidden;
}

.game-tab {
  min-height: 48px;
  padding: 9px 16px;
  border: 0;
  border-right: 1px solid #213746;
  border-radius: 0;
  background: #0a141b;
}

.game-tab:last-child {
  border-right: 0;
}

.game-tab:hover,
.game-tab.active {
  border-color: #213746;
  background: #123349;
  box-shadow: inset 0 -3px #58cdf7;
}

.draw-card,
.archive-card,
.external-panel,
.latest-result {
  border-radius: 6px;
  box-shadow: none;
}

.draw-titlebar {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 9px 18px;
  border-bottom: 1px solid #1c3443;
  background: #0b171f;
}

.draw-titlebar > div {
  display: grid;
  gap: 2px;
}

.draw-titlebar small {
  color: #668596;
  font-size: 9px;
  letter-spacing: .14em;
}

.draw-titlebar strong {
  font-size: 16px;
}

.issue-block {
  margin-left: auto;
  text-align: right;
}

.draw-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 284px;
  background: #061017;
}

.stage-column {
  min-width: 0;
}

.stage {
  aspect-ratio: 16 / 9;
}

.stage-shade {
  background: linear-gradient(180deg, #02060935 0, transparent 28%, transparent 75%, #02060980 100%);
  box-shadow: none;
}

.draw-sidebar {
  min-width: 0;
  border-left: 1px solid #1c3443;
  background: #08131a;
}

.countdown-hud {
  position: relative;
  inset: auto;
  transform: none;
  width: auto;
  min-width: 0;
  min-height: 126px;
  display: grid;
  place-content: center;
  padding: 18px;
  border: 0;
  border-bottom: 1px solid #1c3443;
  border-radius: 0;
  background: #0c1a23;
  box-shadow: none;
  backdrop-filter: none;
}

.countdown-hud strong {
  font-size: 44px;
  letter-spacing: .08em;
  text-shadow: none;
}

.countdown-hud.hidden {
  display: none;
}

.stage-history {
  min-height: 0;
  display: block;
  padding: 14px;
  border: 0;
  background: transparent;
}

.stage-history > span {
  display: block;
  margin-bottom: 10px;
  color: #9ab5c3;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
}

.stage-history .history-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px 5px;
  overflow: visible;
}

.stage-history .history-item {
  min-width: 0;
  width: auto;
  flex: none;
}

.stage-history .result-ball {
  width: 32px;
  height: 32px;
}

.timeline-bar {
  height: 4px;
}

.archive-card {
  margin-top: 12px;
  padding: 16px 18px;
  background: #09131a;
}

.mouse-sync-note {
  margin: 10px 3px 0;
  color: #7897a7;
  font-size: 12px;
}

.mouse-sync-note a {
  color: #7edcff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mouse-sync-note a:hover {
  color: #b6edff;
}

.archive-list {
  grid-template-columns: 1fr;
}

.archive-row {
  min-height: 45px;
  border-radius: 4px;
  background: #071017;
}

.external-hero {
  min-height: 78px;
  padding: 14px 20px;
  justify-content: center;
  border-bottom: 1px solid #1c3443;
  background: #0b171f;
}

.external-hero h1 {
  margin: 3px 0;
  font-size: 24px;
}

.external-hero p {
  font-size: 12px;
  color: #819dac;
}

.latest-result {
  padding: 18px 20px;
  background: #08131a;
}

.balls {
  min-height: 48px;
}

.balls b,
.ball-placeholder {
  width: 44px;
  height: 44px;
  font-size: 18px;
}

.official-history {
  margin-top: 18px;
  padding-top: 16px;
}

footer {
  padding-top: 18px;
}

/* Mouse draw identity colours: 1 red, 2 blue, 3 green, 4 black. */
.result-ball.red {
  background: #ef3340;
  color: #fff;
}

.result-ball.blue {
  background: #1677e8;
  color: #fff;
}

.result-ball.green {
  background: #18a957;
  color: #fff;
}

.result-ball.black {
  border: 2px solid #dce9ef;
  background: #050608;
  color: #fff;
  box-shadow: inset 0 0 0 1px #000, 0 0 0 1px #516875, 0 5px 15px #0008;
}

.result-overlay[data-result="1"] strong {
  color: #ff4050;
  text-shadow: 0 0 25px #ef3340, 0 0 85px #ef334077;
}

.result-overlay[data-result="2"] strong {
  color: #2d8cff;
  text-shadow: 0 0 25px #1677e8, 0 0 85px #1677e877;
}

.result-overlay[data-result="3"] strong {
  color: #28bd67;
  text-shadow: 0 0 25px #18a957, 0 0 85px #18a95777;
}

.result-overlay[data-result="4"] strong {
  color: #050608;
  -webkit-text-stroke: 3px #f0f7fa;
  text-shadow: 0 0 12px #fff, 0 0 40px #a9bdc7;
}

@media (max-width: 860px) {
  .draw-layout {
    grid-template-columns: 1fr;
  }

  .draw-sidebar {
    order: -1;
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    border-left: 0;
    border-bottom: 1px solid #1c3443;
  }

  .countdown-hud {
    min-height: 104px;
    border-right: 1px solid #1c3443;
    border-bottom: 0;
  }

  .countdown-hud strong {
    font-size: 34px;
  }

  .stage-history {
    padding: 10px 12px;
  }

  .stage-history > span {
    margin-bottom: 7px;
  }
}

@media (max-width: 560px) {
  .shell {
    width: 100%;
    padding: 0 8px 18px;
  }

  .site-header {
    height: 58px;
  }

  .header-actions {
    gap: 7px;
  }

  .api-link {
    padding: 5px 7px;
    font-size: 9px;
  }

  .connection {
    gap: 5px;
    font-size: 9px;
  }

  .connection span {
    display: block;
    max-width: none;
    white-space: nowrap;
  }

  .game-tabs {
    grid-template-columns: repeat(2, 1fr);
  }

  .game-tab:nth-child(2) {
    border-right: 0;
  }

  .game-tab:nth-child(-n+2) {
    border-bottom: 1px solid #213746;
  }

  .draw-titlebar {
    min-height: 52px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 8px 12px;
  }

  .issue-block {
    min-width: 112px;
    margin-left: 0;
    white-space: nowrap;
  }

  .issue-block small {
    display: none;
  }

  .issue-block strong {
    font-size: 13px;
  }

  .draw-sidebar {
    grid-template-columns: 128px minmax(0, 1fr);
  }

  .countdown-hud {
    min-height: 94px;
    padding: 10px;
  }

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

  .stage-history {
    padding: 8px;
  }

  .stage-history > span {
    display: block;
    font-size: 9px;
  }

  .stage-history .history-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
  }

  .stage-history .result-ball {
    width: 25px;
    height: 25px;
    font-size: 13px;
  }

  .stage-history .history-item span {
    display: none;
  }

  .archive-card,
  .latest-result {
    padding: 13px 10px;
  }

  .mouse-sync-note {
    margin: 9px 10px 0;
    font-size: 10px;
  }

  .mouse-history-row {
    grid-template-columns: minmax(108px, 1fr) 84px 104px;
  }
}

/* Keep the result number, size and parity in fixed columns. */
.mouse-history-row {
  grid-template-columns: minmax(130px, 1fr) 104px 145px;
}

.mouse-outcome {
  width: 145px;
  display: grid;
  grid-template-columns: 31px 108px;
  align-items: center;
  gap: 6px;
  justify-self: end;
}

.mouse-history-row .result-ball {
  width: 31px;
  min-width: 31px;
  max-width: 31px;
  height: 31px;
  min-height: 31px;
  aspect-ratio: 1;
  flex: none;
  border-radius: 50%;
}

.mouse-outcome .result-attributes {
  display: grid;
  grid-template-columns: 54px 48px;
  gap: 6px;
}

.mouse-outcome .result-attributes i {
  width: 100%;
  min-width: 0;
  padding: 0 4px;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .mouse-history-row {
    grid-template-columns: minmax(100px, 1fr) 76px 127px;
    gap: 6px;
  }

  .mouse-outcome {
    width: 127px;
    grid-template-columns: 28px 95px;
    gap: 4px;
  }

  .mouse-history-row .result-ball {
    width: 28px;
    min-width: 28px;
    max-width: 28px;
    height: 28px;
    min-height: 28px;
  }

  .mouse-outcome .result-attributes {
    grid-template-columns: 47px 44px;
    gap: 4px;
  }

  .mouse-outcome .result-attributes i {
    height: 23px;
    padding: 0 3px;
    font-size: 9px;
  }
}
