/* Contact links use distinct accents within the original blue and white theme. */
.prediction-platform .site-contact-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 2px;
}
.prediction-platform .site-contact-cards .site-contact-card {
  --contact-ink: #08695d;
  --contact-line: #b6e5d6;
  --contact-tint: #f0fbf7;
  --contact-icon: #cdefe4;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: clamp(130px, 41vw, 160px);
  min-height: 47px;
  padding: 6px 10px;
  border: 1px solid var(--contact-line);
  border-radius: 12px;
  background: linear-gradient(135deg, #fff, var(--contact-tint));
  color: var(--contact-ink) !important;
  box-shadow: 0 3px 9px rgba(31,105,148,.08);
  text-align: left;
}
.prediction-platform .site-contact-cards .card-telegram {
  --contact-ink: #08679d;
  --contact-line: #b8def6;
  --contact-tint: #eff8ff;
  --contact-icon: #d7ebff;
}
.prediction-platform .site-contact-cards .site-contact-card:hover { border-color: var(--contact-ink); }
.prediction-platform .site-contact-cards .site-contact-card:focus-visible { outline: 2px solid #1679bc; outline-offset: 3px; }
.site-contact-icon {
  position: relative;
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  border-radius: 9px;
  background: var(--contact-icon);
}
.card-wangwang .site-contact-icon::before {
  content: '';
  position: absolute;
  inset: 8px 7px 9px;
  border: 2px solid currentColor;
  border-radius: 5px;
}
.card-wangwang .site-contact-icon::after {
  content: '';
  position: absolute;
  left: 10px;
  bottom: 7px;
  width: 5px;
  height: 5px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  background: var(--contact-icon);
  transform: skewY(-30deg);
}
.card-telegram .site-contact-icon::before {
  content: '';
  position: absolute;
  inset: 7px;
  background: currentColor;
  clip-path: polygon(0 43%, 100% 0, 78% 100%, 49% 71%, 32% 92%, 36% 61%, 81% 22%, 25% 53%);
}
.site-contact-copy { display: grid; gap: 2px; min-width: 0; line-height: 1.15; }
.site-contact-label, .site-contact-value { overflow-wrap: anywhere; }
.site-contact-label { font-size: 11px; }
.site-contact-value { font-size: 13px; font-weight: 800; }

/* Keep complete equations visible in the prediction and statistics tables. */
.prediction-platform .draw-formula {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2px, .7vw, 5px);
  white-space: nowrap;
  vertical-align: middle;
}
.prediction-platform :is(.draw-ball,.draw-total) {
  display: inline-grid;
  place-items: center;
  min-width: 0;
  width: clamp(22px, 5vw, 30px);
  height: clamp(22px, 5vw, 30px);
  padding: 0;
  border: 1px solid;
  border-radius: 50%;
  color: #075a96;
  line-height: 1;
  font-size: clamp(12px, 3vw, 15px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.prediction-platform .draw-ball-a { background: #eaf6ff; border-color: #bcdef8; }
.prediction-platform .draw-ball-b { background: #f0edff; border-color: #d9cff5; color: #5940a1; }
.prediction-platform .draw-ball-c { background: #e8f8f1; border-color: #bde5d5; color: #0a6751; }
.prediction-platform .draw-total {
  width: clamp(26px, 6vw, 35px);
  border-radius: 7px;
  color: #7b4109;
  background: #fff0db;
  border-color: #f0d293;
  box-shadow: none;
}
.prediction-platform .draw-operator { color: #516b82; font-size: clamp(10px, 2.5vw, 13px); font-weight: 750; line-height: 1; }
.prediction-platform :is(#table,.stats-history-table) { font-variant-numeric: tabular-nums; }
.prediction-platform #table { table-layout: fixed; }
.prediction-platform #table th { text-align: center; }
.prediction-platform #table th:nth-child(1) { width: 18%; }
.prediction-platform #table th:nth-child(2) { width: 13%; }
.prediction-platform #table th:nth-child(3) { width: 36%; }
.prediction-platform #table th:nth-child(4) { width: 21%; }
.prediction-platform #table th:nth-child(5) { width: 12%; }
.prediction-platform :is(#table,.stats-history-table) :is(.draw-issue,.draw-time,.draw-result-cell) { text-align: center; }
.prediction-platform .draw-issue { color: #295575; font-weight: 740; white-space: nowrap; }
.prediction-platform .draw-time { color: #516b82; white-space: nowrap; }
.prediction-platform #table :is(.prediction-cell,.outcome-cell) { white-space: nowrap; }
.prediction-platform .stats-history-table td { height: 43px; }
.prediction-platform .stats-history-table td:last-child { width: 42%; }
.prediction-platform .stats-more { min-height: 42px; font-weight: 740; }
.prediction-platform :is(.stats-more,.stats-history-table tr)[hidden] { display: none !important; }
.prediction-platform .trend-table-wrap:focus-visible { outline: 2px solid #1679bc; outline-offset: 2px; }

@media (max-width: 450px) {
  .prediction-platform #table th:nth-child(3) { width: 38%; }
  .prediction-platform #table th:nth-child(4) { width: 20%; }
  .prediction-platform #table th:nth-child(5) { width: 11%; }
  .prediction-platform .draw-formula { gap: 2px; }
  .prediction-platform .draw-ball { width: 17px; height: 17px; font-size: 10px; }
  .prediction-platform .draw-total { width: 21px; height: 18px; font-size: 10px; border-radius: 5px; }
  .prediction-platform .trend-sum-badge.draw-total { width: 27px; height: 24px; font-size: 12px; }
  .prediction-platform .draw-operator { font-size: 9px; }
  .prediction-platform #table :is(td,th) { padding-inline: 2px !important; font-size: 11px !important; }
  .prediction-platform #table .badge_szjys { min-width: 18px; min-height: 18px; padding: 2px 4px; line-height: 1; font-size: 10px; }
  .prediction-platform #table .draw-pending-status { padding: 3px 4px; font-size: 10px; }
  .prediction-platform #table .draw-pending-countdown { padding-inline: 5px; }
  .prediction-platform .stats-history-table .draw-ball { width: 20px; height: 20px; font-size: 11px; }
  .prediction-platform .stats-history-table .draw-total { width: 25px; height: 22px; font-size: 11px; }
}

/* Compact centered header and aligned platform directory. */
.prediction-platform .site-brand-blue {
  color: #164f75;
  font-size: clamp(27px, 4.5vw, 35px);
  font-weight: 850;
  letter-spacing: .045em;
  line-height: 1.28;
  text-align: center;
  overflow-wrap: anywhere;
}
.prediction-platform .scratch-launch-btn {
  border-color: #bf2937;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(180deg, #e44752 0%, #d83343 54%, #c52a39 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.34), 0 2px 5px rgba(130,36,48,.17);
  text-shadow: none;
  transition: box-shadow .14s ease, filter .14s ease;
}
.prediction-platform .scratch-launch-btn:hover {
  filter: brightness(1.035);
  transform: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.38), 0 2px 6px rgba(130,36,48,.2);
}
.prediction-platform .scratch-launch-btn:active {
  background: linear-gradient(180deg, #c62d3c, #d73544);
  filter: none;
  transform: none;
  box-shadow: inset 0 1px 3px rgba(105,16,28,.17);
}
.prediction-platform .scratch-launch-btn:focus-visible {
  outline: 2px solid #ba2631;
  outline-offset: 3px;
}
.prediction-platform .site-head-blue {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 19px 16px 16px;
  background: radial-gradient(ellipse at 50% 0%, #edf8ff 0%, #f8fcff 72%);
  border-bottom: 1px solid #e1eef7;
}
.prediction-platform .site-head-blue::after { display: none; }
.prediction-platform .site-identity { min-width: 0; max-width: 100%; }
.prediction-platform .site-head-blue .site-url-blue {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
  margin: 6px 0 0;
  padding: 0;
  border: 0;
  color: #486e87;
  background: none;
  box-shadow: none;
}
.prediction-platform .site-head-blue .site-remember-label { font-size: 11px; font-weight: 650; color: #526f83; }
.prediction-platform .site-head-blue .site-display-url {
  color: #176691 !important;
  font-size: 13px;
  overflow-wrap: anywhere;
  text-shadow: none;
}
.prediction-platform .platform-nav-wrap { padding: 11px 14px; background: #fff; }
.prediction-platform .platform-nav-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.prediction-platform .platform-nav-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-height: 68px;
  padding: 7px 5px;
  border-color: #d8eaf6;
  border-radius: 11px;
  background: linear-gradient(180deg,#fff,#f4faff);
  box-shadow: none;
}
.prediction-platform .platform-nav-card::before { display: none; }
.prediction-platform .platform-nav-card:hover { background: #edf7ff; border-color: #98cce9; box-shadow: none; }
.prediction-platform .platform-nav-logo { width: 30px; height: 30px; border-radius: 8px; box-shadow: none; }
.prediction-platform .platform-nav-copy { max-width: 100%; flex: 0 1 auto; text-align: center; }
.prediction-platform .platform-nav-copy strong { font-size: 12px; }
.prediction-platform .platform-nav-copy small { overflow: hidden; text-overflow: ellipsis; }
.prediction-platform .platform-nav-card:focus-visible { outline: 2px solid #1679bc; outline-offset: -2px; }
@media (max-width: 640px) {
  .prediction-platform .site-head-blue { padding: 16px 10px 13px; }
  .prediction-platform .site-head-blue .site-url-blue { margin-top: 3px; }
      .prediction-platform .platform-nav-wrap { padding: 8px 10px; }
  .prediction-platform .platform-nav-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .prediction-platform .platform-nav-card { min-height: 57px; gap: 4px; padding: 5px 3px; }
  .prediction-platform .platform-nav-logo { width: 24px; height: 24px; border-radius: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  .prediction-platform :is(.platform-nav-card,.scratch-launch-btn) { transition: none; }
}

/* Compact contact popover anchored in the lower-left corner. */
.prediction-platform .support-launch,
.prediction-platform .support-dialog {
  --support-left: max(10px, env(safe-area-inset-left));
  --support-bottom: max(10px, env(safe-area-inset-bottom));
}
.prediction-platform .support-launch {
  position: fixed;
  z-index: 6000;
  left: var(--support-left);
  bottom: var(--support-bottom);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 35px;
  padding: 4px 8px 4px 5px;
  border: 1px solid #bad9eb;
  border-radius: 10px;
  background: linear-gradient(180deg, #fff, #f4faff);
  box-shadow: 0 2px 7px rgba(22,79,117,.12);
  color: #185e88;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}
.prediction-platform .support-launch:hover,
.prediction-platform .support-launch[aria-expanded="true"] { background: #eaf6fc; border-color: #98c7e3; }
.prediction-platform :is(.support-launch,.support-close):focus-visible { outline: 2px solid #155e9b; outline-offset: 3px; }
.support-symbol {
  display: grid;
  place-items: center;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  color: #126592;
  background: #e1f1fb;
}
.support-headset {
  position: relative;
  width: 12px;
  height: 11px;
  border: 1.5px solid currentColor;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
}
.support-headset::before,
.support-headset::after {
  content: '';
  position: absolute;
  bottom: -1px;
  width: 3px;
  height: 5px;
  border-radius: 2px;
  background: currentColor;
}
.support-headset::before { left: -2px; }
.support-headset::after { right: -2px; }
.prediction-platform .support-dialog {
  position: fixed;
  z-index: 6001;
  inset: auto auto calc(var(--support-bottom) + 40px) var(--support-left);
  width: min(216px, calc(100vw - 20px));
  max-height: min(268px, calc(100dvh - 64px));
  padding: 8px 9px 9px;
  margin: 0;
  overflow-y: auto;
  border: 1px solid #cfe4f1;
  border-radius: 12px;
  background: #fff;
  color: #164f75;
  box-shadow: 0 7px 22px rgba(33,83,119,.18), 0 1px 4px rgba(33,83,119,.08);
  text-align: left;
}
.support-dialog-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; padding-bottom: 5px; border-bottom: 1px solid #edf4f8; }
.support-dialog-heading h2 { margin: 0; color: #205a7d; font-size: 13px; font-weight: 780; }
.support-dialog-heading form { margin: 0; }
.support-close {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: #f0f6fa;
  color: #285d81;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.prediction-platform .support-dialog .site-contact-cards { flex-direction: column; gap: 4px; margin: 0; }
.prediction-platform .support-dialog .site-contact-card { width: 100%; min-height: 34px; padding: 3px 7px; border-radius: 8px; box-shadow: none; }
.prediction-platform .support-dialog .site-contact-icon { width: 25px; height: 25px; flex-basis: 25px; border-radius: 7px; }
.support-dialog .card-wangwang .site-contact-icon::before { inset: 7px 6px 8px; }
.support-dialog .card-wangwang .site-contact-icon::after { left: 8px; bottom: 6px; }
.support-dialog .card-telegram .site-contact-icon::before { inset: 6px; }
.support-dialog .site-contact-label { font-size: 10px; }
.support-dialog .site-contact-value { font-size: 12px; }

/* Ambient color movement stays inside the controls and never intercepts a scratch. */
.prediction-platform .scratch-launch-btn {
  background-image: linear-gradient(112deg, #bd2836 4%, #ca2e3d 30%, #d83b48 48%, #ca2d3b 65%, #bd2836 94%);
  background-size: 215% 100%;
  background-position: 45% 50%;
}
.prediction-platform .scratch-launch-btn:active { animation-play-state: paused; }
.prediction-platform .scratch-stage::after {
  content: '';
  position: absolute;
  z-index: 4;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #c8e6fb 0%, #89c9f5 30%, #c7c7fa 49%, #b5e4f8 65%, #c8e6fb 100%);
  background-size: 215% 100%;
  background-position: 45% 50%;
  opacity: .85;
  pointer-events: none;
}
@keyframes draw-mellow-flow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@media (prefers-reduced-motion: no-preference) {
  .prediction-platform .scratch-launch-btn { animation: draw-mellow-flow 7.2s ease-in-out infinite; }
  .prediction-platform .scratch-modal.is-open .scratch-stage::after { animation: draw-mellow-flow 8.5s ease-in-out infinite; }
}

.prediction-platform .site-contact-cards .card-navigation {
  --contact-ink: #55498c;
  --contact-line: #d8d0ef;
  --contact-tint: #f7f3ff;
  --contact-icon: #eae2fb;
}
.card-navigation .site-contact-icon::before,
.card-navigation .site-contact-icon::after { content: ''; position: absolute; }
.card-navigation .site-contact-icon::before { inset: 5px; border: 1px solid currentColor; border-radius: 50%; }
.card-navigation .site-contact-icon::after {
  inset: 8px;
  background: currentColor;
  clip-path: polygon(100% 0, 73% 72%, 0 100%, 28% 28%);
}
