:root {
  --ink: #253248;
  --muted: #66738a;
  --line: #c8d5e6;
  --line-soft: #dde6f1;
  --paper: #ffffff;
  --page: #f7faff;
  --navy: #08245d;
  --blue: #1767c8;
  --cyan: #10abc4;
  --red: #f22749;
  --gold: #f2c84b;
  --shadow: 0 16px 36px rgba(38, 72, 122, 0.12);
  color: var(--ink);
  background: #fff;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  background: #fff;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: #fff;
  color: var(--ink);
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid rgba(23, 103, 200, 0.42);
  outline-offset: 1px;
}

[hidden] {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
  padding: 0 12px 36px;
  background: linear-gradient(#f7faff 0, #fff 250px);
}

.phone-shell {
  width: min(1000px, 100%);
  margin: 0 auto;
}

.phone-header {
  position: relative;
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  padding: 14px 18px 15px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 0 0 8px 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.18), transparent 30%, rgba(255, 255, 255, 0.16)),
    linear-gradient(135deg, var(--navy) 0%, var(--blue) 62%, #31a6f4 100%);
  color: #fff;
  box-shadow: var(--shadow);
}

.brand-lockup {
  display: grid;
  justify-items: center;
  gap: 2px;
}

.brand-title {
  color: #ff2d21;
  font-size: 28px;
  font-weight: 950;
  line-height: 1.15;
  letter-spacing: 0;
}

.brand-lockup span {
  font-size: 12px;
  font-weight: 800;
}

.ad-reservation {
  margin: 0 28px 12px;
}

.blank-ad {
  width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: #fff;
}

.blank-ad-top {
  height: 142px;
  box-shadow: 0 8px 24px rgba(43, 75, 119, 0.06);
}

.blank-ad-top.premium-ad-pearl {
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
  overflow: hidden;
  padding: 12px 24px;
  border-color: var(--line);
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.97), rgba(247, 250, 255, 0.98) 60%, rgba(233, 247, 253, 0.96)),
    var(--paper);
  box-shadow: 0 10px 26px rgba(38, 72, 122, 0.1);
  color: inherit;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.blank-ad-top.premium-ad-pearl:hover {
  border-color: #9bbce2;
  box-shadow: 0 12px 30px rgba(38, 72, 122, 0.16);
  transform: translateY(-1px);
}

.blank-ad-top.premium-ad-pearl:focus-visible {
  outline: 3px solid rgba(23, 103, 200, 0.34);
  outline-offset: 3px;
}

.premium-ad-pearl::before {
  content: "";
  position: absolute;
  inset: 6px;
  z-index: 1;
  border: 1px solid rgba(23, 103, 200, 0.12);
  border-radius: 4px;
  pointer-events: none;
}

.premium-ad-pattern,
.premium-ad-halo,
.premium-ad-sweep {
  position: absolute;
  pointer-events: none;
}

.premium-ad-pattern {
  inset: 0;
  z-index: -1;
  opacity: 0.2;
  background-image:
    linear-gradient(45deg, transparent 47%, rgba(23, 103, 200, 0.1) 48%, transparent 50%),
    linear-gradient(-45deg, transparent 47%, rgba(23, 103, 200, 0.1) 48%, transparent 50%);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(90deg, #000, transparent 42%, transparent 58%, #000);
  mask-image: linear-gradient(90deg, #000, transparent 42%, transparent 58%, #000);
  animation: premium-ad-pattern-drift 22s linear infinite;
}

.premium-ad-halo {
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 50% 30%, rgba(23, 103, 200, 0.08), transparent 36%),
    radial-gradient(circle at 8% 110%, rgba(16, 171, 196, 0.13), transparent 35%),
    radial-gradient(circle at 94% -10%, rgba(16, 171, 196, 0.13), transparent 32%);
  animation: premium-ad-halo 8s ease-in-out infinite;
}

.premium-ad-sweep {
  top: -100%;
  left: -24%;
  z-index: 2;
  width: 15%;
  height: 300%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(23, 103, 200, 0.09), transparent);
  animation: premium-ad-sweep 8s ease-in-out infinite;
}

.premium-ad-qr {
  position: absolute;
  top: 50%;
  left: 28px;
  z-index: 3;
  width: 108px;
  height: 108px;
  overflow: hidden;
  transform: translateY(-50%);
  border: 2px solid rgba(255, 255, 255, 0.98);
  border-radius: 10px;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(23, 103, 200, 0.18),
    0 8px 20px rgba(8, 36, 93, 0.16);
}

.premium-ad-qr img {
  position: absolute;
  top: -139%;
  left: 50%;
  width: 200%;
  max-width: none;
  transform: translateX(-50%);
}

.premium-ad-copy {
  position: relative;
  z-index: 3;
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 0 18px 0 130px;
  text-align: center;
}

.premium-ad-copy > span {
  margin: 0;
  white-space: nowrap;
}

.premium-ad-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.7px;
}

.premium-ad-brand::before,
.premium-ad-brand::after {
  content: "";
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(23, 103, 200, 0.46));
}

.premium-ad-brand::after {
  transform: scaleX(-1);
}

.premium-ad-headline {
  color: var(--navy);
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: 0.5px;
}

.premium-ad-headline em {
  color: var(--red);
  font-style: normal;
}

.premium-ad-service {
  color: var(--ink);
  font-size: clamp(14px, 2vw, 17px);
  font-weight: 800;
  line-height: 1.35;
}

.premium-ad-promise {
  color: var(--blue);
  font-size: clamp(12px, 1.7vw, 14px);
  font-weight: 750;
  line-height: 1.35;
}

.premium-ad-join {
  position: absolute;
  right: 18px;
  bottom: 12px;
  z-index: 4;
  padding: 6px 11px;
  border: 1px solid rgba(23, 103, 200, 0.2);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #fff;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  box-shadow: 0 5px 12px rgba(23, 103, 200, 0.2);
}

@keyframes premium-ad-sweep {
  0%, 58% {
    left: -24%;
    opacity: 0;
  }

  66% {
    opacity: 1;
  }

  86%, 100% {
    left: 122%;
    opacity: 0;
  }
}

@keyframes premium-ad-pattern-drift {
  to {
    background-position: 56px 28px;
  }
}

@keyframes premium-ad-halo {
  0%, 100% {
    opacity: 0.72;
    transform: scale(0.98);
  }

  50% {
    opacity: 1;
    transform: scale(1.03);
  }
}

.current-draw {
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(rgba(255, 255, 255, 0.98), rgba(247, 250, 254, 0.98));
}

.classic-latest-line,
.classic-countdown,
.classic-result-box {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
}

.classic-latest-line {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.classic-latest-line strong {
  color: var(--red);
  font-size: 18px;
}

.classic-latest-line em {
  color: #0862c5;
  font-size: 13px;
  font-style: normal;
}

.classic-countdown {
  height: 59px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 8px;
  color: #101827;
  font-weight: 800;
}

.classic-countdown strong {
  min-width: 52px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: linear-gradient(#ff4565, #e61238);
  color: #fff;
  font-family: Consolas, monospace;
  font-size: 34px;
  box-shadow: 0 5px 10px rgba(242, 39, 73, 0.2);
}

.classic-countdown em {
  font-size: 14px;
  font-style: normal;
}

.inline-refresh {
  width: 24px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #0862c5;
  cursor: pointer;
  font-size: 21px;
  line-height: 1;
}

.inline-refresh:disabled {
  cursor: wait;
  opacity: 0.45;
}

.classic-result-box {
  min-height: 136px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 12px;
}

.draw-formula {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-weight: 900;
}

.draw-formula > span {
  color: #26354c;
  font-size: 18px;
}

.formula-ball {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(#22c2c6, #089f9e);
  color: #fff;
  font-family: Consolas, monospace;
  font-size: 22px;
  box-shadow: 0 6px 12px rgba(6, 162, 165, 0.18);
}

.formula-ball.sum {
  background: linear-gradient(#4aa3f1, #176bd0);
}

.formula-ball.sum.low {
  background: linear-gradient(#47bd7d, #21965c);
}

.formula-ball.sum.high {
  background: linear-gradient(#ff546e, #e72847);
}

.draw-result {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.draw-result b,
.result-chip {
  min-width: 42px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(#44a8ef, #1678ce);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.draw-result b.hot,
.result-chip.hot {
  background: linear-gradient(#ff506b, #e72443);
}

.draw-result b.pattern,
.result-chip.pattern {
  min-width: 54px;
  background: linear-gradient(#77869c, #37455b);
}

.classic-stats-line {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.mi-mode-button {
  width: min(760px, calc(100% - 200px));
  height: 44px;
  display: block;
  margin: 14px auto 12px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(#ff3e5f, #ed143b);
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  font-weight: 900;
  box-shadow: 0 7px 16px rgba(242, 39, 73, 0.16);
}

.mi-mode-button:hover {
  background: linear-gradient(#ff5872, #e71238);
}

.blank-ad-secondary {
  height: 146px;
}

.tab-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  margin-bottom: 10px;
  border: 1px solid #118fa9;
  border-radius: 8px;
  background: #0faac5;
}

.tab-strip button {
  height: 46px;
  border: 0;
  border-right: 1px solid rgba(0, 128, 154, 0.38);
  border-bottom: 0;
  background: linear-gradient(#15b2cd, #09a1bd);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 850;
}

.tab-strip button:nth-child(3n) {
  border-right: 0;
}

.tab-strip button span {
  margin-right: 6px;
  font-size: 15px;
}

.tab-strip button.active {
  background: linear-gradient(#3475bf, #134799);
}

.tab-panel {
  min-height: 320px;
}

.history-tools {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 138px 42px 42px;
  gap: 8px;
  margin-bottom: 10px;
}

.history-tools input,
.history-tools button {
  height: 42px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.history-tools input {
  min-width: 0;
  padding: 0 11px;
}

.history-tools button {
  color: #0b68c8;
  cursor: pointer;
  font-size: 24px;
}

.history-summary {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.history-summary b {
  color: #142033;
}

.history-table {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}

.history-table-head,
.history-row {
  display: grid;
  grid-template-columns: 1fr 0.9fr 1.55fr 0.9fr;
}

.history-table-head {
  min-height: 42px;
  background: #f0f5fb;
  color: #52627a;
}

.history-table-head span,
.history-row > span {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px 8px;
  text-align: center;
}

.history-table-head span {
  font-size: 13px;
  font-weight: 850;
}

.history-row {
  min-height: 42px;
  border-top: 1px solid #e5ebf3;
  color: #17243a;
}

.history-row:hover {
  background: #f8fbff;
}

.history-row > span {
  font-size: 13px;
  font-weight: 750;
}

.history-formula {
  white-space: nowrap;
}

.history-type {
  display: flex;
  justify-content: center;
  gap: 7px;
}

.history-type .result-chip {
  min-width: 30px;
  width: 30px;
  height: 30px;
  font-size: 13px;
}

.loading-row,
.empty-row {
  min-height: 180px;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.period-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.period-selector button {
  height: 43px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #f8fbff;
  color: #78a3d7;
  cursor: pointer;
  font-weight: 850;
}

.period-selector button.active {
  border-color: #7b9dca;
  background: linear-gradient(#8cb5e4, #7899c4);
  color: #fff;
}

.data-range-summary {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  color: #53647c;
  font-size: 13px;
}

.data-range-summary strong {
  color: #111b2b;
  font-size: 13px;
}

.stats-dashboard,
.stats-block {
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}

.stats-dashboard {
  padding: 12px;
}

.stats-dashboard-head {
  min-height: 55px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.stats-dashboard-head > div {
  display: grid;
  gap: 2px;
}

.stats-dashboard-head span {
  color: #42516a;
  font-size: 13px;
  font-weight: 850;
}

.stats-dashboard-head strong {
  color: #101a2b;
  font-size: 21px;
}

.stats-dashboard-head > b {
  padding: 6px 10px;
  border: 1px solid #cbe0f8;
  border-radius: 6px;
  background: #f5faff;
  color: #1268c4;
  font-size: 12px;
}

.result-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.result-stat {
  min-height: 104px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 10px 18px;
  border: 1px solid #bdddf7;
  border-radius: 7px;
  background: #fafdff;
}

.result-stat.red {
  border-color: #ffb7c2;
  background: #fffafb;
}

.result-stat > div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.result-stat > div b {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(#43a8ef, #1678ce);
  color: #fff;
  font-size: 14px;
}

.result-stat.red > div b {
  background: linear-gradient(#ff506b, #e72443);
}

.result-stat > div span {
  color: #526582;
  font-size: 12px;
  font-weight: 850;
}

.result-stat > strong {
  color: #0f192a;
  font-size: 29px;
  line-height: 1;
  text-align: center;
}

.result-stat > strong small {
  margin-left: 3px;
  color: #53647b;
  font-size: 11px;
}

.result-stat > i {
  position: relative;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7eef7;
}

.result-stat > i::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--progress);
  border-radius: inherit;
  background: #2398e2;
}

.result-stat.red > i::after {
  background: #ee2850;
}

.stats-lower-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 12px;
}

.stats-block-title {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 11px;
  border-bottom: 1px solid var(--line-soft);
  background: #f2f7fc;
  color: #17416f;
  font-size: 12px;
  font-weight: 900;
}

.stats-block-title span {
  color: #71809a;
  font-weight: 700;
}

.compact-combo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.combo-stat {
  min-height: 49px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px;
  border-right: 1px solid #e5ebf3;
  border-bottom: 1px solid #e5ebf3;
}

.combo-stat:nth-child(2n) {
  border-right: 0;
}

.combo-stat:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.combo-stat .result-chip {
  min-width: 27px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  font-size: 12px;
}

.combo-stat em,
.extreme-grid em {
  margin-left: 5px;
  color: #52627b;
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
}

.combo-stat em strong,
.extreme-grid em strong {
  color: #e91f45;
  font-size: 15px;
}

.extreme-grid {
  min-height: 98px;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.extreme-grid > div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.extreme-grid > div + div {
  border-left: 1px solid #e5ebf3;
}

.extreme-chip {
  min-width: 43px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.extreme-chip.cool {
  background: #1e91db;
}

.extreme-chip.hot {
  background: #ef2b4e;
}

.heat-grid {
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  gap: 7px;
  padding: 12px;
}

.heat-grid > div {
  min-height: 54px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  border: 1px solid #d8e4f1;
  border-radius: 6px;
  background: #f7faff;
}

.heat-grid > div.hot {
  border-color: #ffbac5;
  background: #fff1f4;
}

.heat-grid > div.cold {
  background: #edf1f6;
  color: #8994a5;
}

.heat-grid span {
  font-size: 11px;
}

.heat-grid strong {
  font-size: 16px;
}

.shape-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.shape-stat-grid > div {
  min-height: 49px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  border-right: 1px solid #e5ebf3;
  border-bottom: 1px solid #e5ebf3;
}

.shape-stat-grid > div:nth-child(4n) {
  border-right: 0;
}

.shape-stat-grid > div:nth-last-child(-n + 4) {
  border-bottom: 0;
}

.shape-stat-grid span {
  color: #63728a;
  font-size: 11px;
}

.shape-stat-grid strong {
  font-size: 16px;
}

.panel-section {
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}

.panel-section-title {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid var(--line-soft);
  color: #34455f;
  font-size: 14px;
  font-weight: 900;
}

.panel-section-title span {
  color: var(--muted);
  font-size: 12px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.metric-card {
  min-height: 112px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  border-right: 1px solid var(--line-soft);
}

.metric-card:last-child {
  border-right: 0;
}

.metric-card strong {
  font-size: 23px;
}

.metric-card strong.hot {
  color: var(--red);
}

.metric-card strong.cool {
  color: #109bd3;
}

.metric-card span,
.metric-card small {
  color: var(--muted);
  font-size: 12px;
}

.combo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.combo-item {
  min-height: 76px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  border-right: 1px solid var(--line-soft);
}

.combo-item:last-child {
  border-right: 0;
}

.combo-item span {
  color: var(--muted);
  font-size: 12px;
}

.combo-item strong {
  font-size: 18px;
}

.sum-table {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.sum-column + .sum-column {
  border-left: 1px solid var(--line-soft);
}

.sum-row {
  min-height: 34px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid #edf1f6;
}

.sum-row:first-child {
  border-top: 0;
  background: #f7faff;
  color: var(--muted);
  font-weight: 850;
}

.sum-row span {
  display: grid;
  place-items: center;
  font-size: 12px;
}

.trend-overview {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}

.trend-overview > div {
  min-height: 94px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  border-right: 1px solid var(--line-soft);
}

.trend-overview > div:last-child {
  border-right: 0;
}

.trend-overview span {
  color: var(--muted);
  font-size: 13px;
}

.trend-overview strong {
  font-size: 18px;
}

.sequence-panel {
  padding: 12px;
}

.sequence-line {
  display: grid;
  grid-template-columns: 55px 1fr;
  align-items: start;
  gap: 8px;
  margin-bottom: 10px;
}

.sequence-line:last-child {
  margin-bottom: 0;
}

.sequence-line > strong {
  color: var(--muted);
  font-size: 13px;
  line-height: 28px;
}

.sequence-items {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.sequence-items b {
  min-width: 32px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: #eff4fa;
  color: #46617f;
  font-size: 12px;
}

.sequence-items b.hot {
  background: #fde9ed;
  color: #e82343;
}

.trend-table-section {
  overflow: hidden;
}

.trend-table-scroll {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scrollbar-color: #9cb6d8 #edf3fa;
}

.trend-table-scroll:focus-visible {
  outline: 2px solid rgba(23, 103, 200, 0.42);
  outline-offset: -2px;
}

.trend-table {
  min-width: 780px;
}

.trend-row {
  min-height: 32px;
  display: grid;
  grid-template-columns: 92px 70px repeat(8, minmax(66px, 1fr));
  border-top: 1px solid #e1e7ef;
  background: #fff;
}

.trend-row:nth-child(odd):not(.head) {
  background: #f5f7fa;
}

.trend-row.head {
  border-top: 0;
  background: #1767c8;
  color: #fff;
  font-weight: 900;
}

.trend-row span {
  min-width: 0;
  display: grid;
  place-items: center;
  padding: 3px 4px;
  font-size: 12px;
  text-align: center;
}

.trend-row.head span {
  min-height: 32px;
  font-size: 12px;
}

.trend-issue {
  color: #26364b;
  font-weight: 850;
}

.trend-result {
  color: #f00026;
  font-weight: 950;
}

.trend-marker {
  min-width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12);
}

.trend-marker.red {
  background: #ec0029;
}

.trend-marker.blue {
  background: #1499dc;
}

.omission-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.omission-grid-five {
  grid-template-columns: repeat(5, 1fr);
}

.omission-item {
  min-height: 78px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  border-right: 1px solid var(--line-soft);
}

.omission-item:last-child {
  border-right: 0;
}

.omission-item span {
  color: var(--muted);
  font-size: 12px;
}

.omission-item strong {
  color: #1b67b9;
  font-size: 15px;
  white-space: nowrap;
}

.omission-heat strong {
  font-size: 11px;
  line-height: 1.25;
  text-align: center;
}

footer {
  min-height: 86px;
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
  padding: 16px 4px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 12px;
}

footer strong {
  color: #35465e;
}

footer small {
  margin-left: auto;
}

.mobile-dock-nav {
  display: none;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 120;
  max-width: min(360px, calc(100% - 40px));
  padding: 12px 16px;
  border-radius: 6px;
  background: #17263c;
  color: #fff;
  box-shadow: var(--shadow);
  font-size: 14px;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

body.modal-open {
  overflow: hidden;
}

.group-modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 20px;
  background: rgba(7, 18, 39, 0.78);
}

.group-dialog {
  position: relative;
  width: min(480px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 26px;
  border: 1px solid rgba(242, 200, 75, 0.75);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0, rgba(16, 171, 196, 0.12), transparent 34%),
    linear-gradient(145deg, #fff, #f5f9ff);
  color: var(--ink);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.group-close-icon {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.group-dialog-head {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 0 34px;
  text-align: center;
}

.group-dialog-head > span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 1.2px;
}

.group-dialog-head h2,
.group-dialog-head p {
  margin: 0;
}

.group-dialog-head h2 {
  color: var(--navy);
  font-size: 26px;
}

.group-dialog-head p {
  color: var(--muted);
  font-size: 13px;
}

.group-qr-frame {
  position: relative;
  width: min(250px, 70vw);
  aspect-ratio: 1;
  overflow: hidden;
  margin: 18px auto 8px;
  border: 8px solid #fff;
  border-radius: 18px;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(23, 103, 200, 0.16),
    0 14px 30px rgba(8, 36, 93, 0.16);
}

.group-qr-frame img {
  position: absolute;
  top: -139%;
  left: 50%;
  width: 200%;
  max-width: none;
  transform: translateX(-50%);
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: default;
}

.group-save-hint {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.group-number-card {
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 10px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
}

.group-number-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.group-number-card strong {
  color: var(--navy);
  font-family: Consolas, monospace;
  font-size: 22px;
  letter-spacing: 0.5px;
}

.group-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.group-actions button,
.group-actions a {
  min-height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
}

.group-actions button {
  background: linear-gradient(135deg, var(--blue), #0a438f);
  color: #fff;
}

.group-actions a {
  background: linear-gradient(135deg, var(--red), #d9183a);
  color: #fff;
}

.group-guide {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.group-guide p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.group-guide strong {
  display: inline-block;
  margin-right: 6px;
  color: var(--blue);
}

.mi-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(7, 18, 39, 0.76);
}

.mi-dialog {
  width: min(560px, 100%);
  overflow: hidden;
  border: 2px solid #dbad45;
  border-radius: 8px;
  background: #172133;
  color: #fff;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
}

.mi-dialog-head {
  min-height: 82px;
  display: grid;
  grid-template-columns: 1fr 38px;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #3a475c;
}

.mi-dialog-head > div {
  display: grid;
  gap: 4px;
}

.mi-dialog-head span {
  color: #e1bd6e;
  font-size: 12px;
  font-weight: 800;
}

.mi-dialog-head strong {
  font-size: 18px;
}

.mi-dialog-head b {
  color: #f0c86f;
  font-family: Consolas, monospace;
}

.mi-close-icon {
  width: 36px;
  height: 36px;
  border: 1px solid #55647b;
  border-radius: 50%;
  background: #243149;
  color: #fff;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.mi-reveal {
  position: relative;
  height: 210px;
  margin: 16px;
  overflow: hidden;
  border: 1px solid #bfc9d7;
  border-radius: 6px;
  background: #fff;
}

.mi-result {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0;
  padding: 20px;
  color: var(--ink);
}

.mi-result-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.mi-result-numbers b {
  width: auto;
  min-width: 72px;
  height: auto;
  display: block;
  color: var(--red);
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-size: 72px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.mi-result-numbers b.sum {
  width: auto;
  min-width: 100px;
  height: auto;
  color: var(--red);
}

.mi-result-numbers i {
  width: 24px;
  color: #667085;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-size: 38px;
  font-style: normal;
  font-weight: 800;
  text-align: center;
}

#miCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
  transition: opacity 220ms ease;
}

#miCanvas.revealed {
  opacity: 0;
  pointer-events: none;
}

.mi-hint {
  margin: 0 16px;
  color: #c9d1dd;
  font-size: 13px;
  text-align: center;
}

.mi-sync {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 8px 16px 0;
  border-top: 1px solid #3a475c;
  border-bottom: 1px solid #3a475c;
  color: #c9d1dd;
  font-size: 13px;
}

.mi-sync strong {
  color: #f0c86f;
  font-family: Consolas, monospace;
  font-size: 20px;
}

.mi-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 14px 16px 16px;
}

.mi-actions button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
}

.mi-reset-button {
  background: #d2a745;
  color: #fff;
}

.mi-close-button {
  border-color: #55647b !important;
  background: #243149;
  color: #fff;
}

@media (max-width: 680px) {
  .app-shell {
    padding: 0 8px 74px;
  }

  .phone-header {
    min-height: 52px;
    margin-bottom: 8px;
    padding: 8px 10px;
  }

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

  .brand-lockup span {
    display: none;
  }

  .ad-reservation {
    margin: 0 14px 12px;
  }

  .blank-ad-top {
    height: 54px;
    background: #07152f;
  }

  .blank-ad-top.premium-ad-pearl {
    height: 80px;
    padding: 5px 8px;
    background:
      linear-gradient(118deg, rgba(255, 255, 255, 0.97), rgba(247, 250, 255, 0.98) 60%, rgba(233, 247, 253, 0.96)),
      var(--paper);
  }

  .premium-ad-copy {
    gap: 1px;
    padding: 0 1px 0 64px;
  }

  .premium-ad-qr {
    left: 8px;
    width: 58px;
    height: 58px;
    border-width: 1px;
    border-radius: 6px;
    box-shadow:
      0 0 0 1px rgba(23, 103, 200, 0.16),
      0 4px 12px rgba(8, 36, 93, 0.14);
  }

  .premium-ad-brand {
    display: none;
  }

  .premium-ad-headline {
    font-size: clamp(14px, 4.1vw, 17px);
    letter-spacing: 0;
  }

  .premium-ad-service {
    font-size: clamp(11px, 3.1vw, 13px);
  }

  .premium-ad-promise {
    font-size: clamp(11px, 2.8vw, 12px);
  }

  .premium-ad-join {
    right: 6px;
    bottom: 5px;
    padding: 4px 6px;
    font-size: 9px;
  }

  .current-draw {
    padding: 10px;
  }

  .classic-latest-line {
    height: 36px;
    font-size: 12px;
  }

  .classic-latest-line strong {
    font-size: 17px;
  }

  .classic-latest-line em {
    font-size: 12px;
  }

  .classic-countdown {
    height: 54px;
    gap: 5px;
    margin-top: 8px;
    font-size: 13px;
  }

  .classic-countdown strong {
    min-width: 40px;
    height: 40px;
    font-size: 29px;
  }

  .classic-countdown em {
    font-size: 12px;
  }

  .inline-refresh {
    width: 19px;
    padding: 0;
    font-size: 18px;
  }

  .classic-result-box {
    min-height: 118px;
    gap: 7px;
    padding: 9px;
  }

  .draw-formula {
    gap: 8px;
  }

  .formula-ball {
    width: 36px;
    height: 36px;
    border-radius: 7px;
    font-size: 18px;
  }

  .draw-formula > span {
    font-size: 15px;
  }

  .draw-result b {
    min-width: 38px;
    height: 26px;
    font-size: 13px;
  }

  .classic-stats-line {
    font-size: 12px;
  }

  .mi-mode-button {
    width: min(276px, calc(100% - 56px));
    height: 42px;
    margin: 14px auto;
    font-size: 14px;
  }

  .blank-ad-secondary {
    height: 64px;
    background: #07152f;
  }

  .tab-strip {
    margin-bottom: 10px;
  }

  .tab-strip button {
    height: 44px;
    font-size: 12px;
  }

  .tab-strip button span {
    margin-right: 3px;
    font-size: 13px;
  }

  .history-tools {
    grid-template-columns: minmax(0, 1fr) 126px 42px 42px;
    gap: 7px;
  }

  .history-tools input,
  .history-tools button {
    height: 42px;
  }

  .history-tools input {
    padding: 0 9px;
    font-size: 12px;
  }

  .history-tools input[type="date"] {
    font-size: 0;
  }

  .history-tools input[type="date"]::-webkit-datetime-edit {
    font-size: 14px;
  }

  .history-summary {
    font-size: 12px;
  }

  .history-table-head,
  .history-row {
    grid-template-columns: 1fr 0.9fr 1.38fr 0.82fr;
  }

  .history-table-head span,
  .history-row > span {
    padding: 6px 2px;
    font-size: 11px;
  }

  .history-row {
    min-height: 42px;
  }

  .history-type {
    gap: 4px;
  }

  .history-type .result-chip {
    min-width: 28px;
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .data-range-summary {
    padding: 0 3px;
    font-size: 12px;
  }

  .stats-dashboard {
    padding: 9px;
  }

  .stats-dashboard-head {
    min-height: 51px;
  }

  .stats-dashboard-head strong {
    font-size: 16px;
  }

  .stats-dashboard-head > b {
    padding: 5px 7px;
    font-size: 11px;
  }

  .result-stat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .result-stat {
    min-height: 91px;
    padding: 8px 12px;
  }

  .result-stat > strong {
    font-size: 25px;
  }

  .stats-lower-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .compact-combo-grid {
    grid-template-columns: 1fr;
  }

  .combo-stat,
  .combo-stat:nth-child(2n),
  .combo-stat:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid #e5ebf3;
  }

  .combo-stat:last-child {
    border-bottom: 0;
  }

  .heat-grid {
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    padding: 9px;
  }

  .heat-grid > div {
    min-height: 48px;
  }

  .omission-heat strong {
    font-size: 10px;
  }

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

  .shape-stat-grid > div:nth-child(2n) {
    border-right: 0;
  }

  .shape-stat-grid > div:nth-child(4n) {
    border-right: 0;
  }

  .shape-stat-grid > div:nth-last-child(-n + 4) {
    border-bottom: 1px solid #e5ebf3;
  }

  .shape-stat-grid > div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .metric-grid,
  .combo-grid,
  .omission-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .omission-grid-five .omission-item:last-child {
    grid-column: 1 / -1;
  }

  .metric-card:nth-child(2),
  .combo-item:nth-child(2),
  .omission-item:nth-child(2) {
    border-right: 0;
  }

  .metric-card:nth-child(-n + 2),
  .combo-item:nth-child(-n + 2),
  .omission-item:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line-soft);
  }

  .metric-card {
    min-height: 90px;
  }

  .trend-overview {
    grid-template-columns: 1fr 1fr;
  }

  .trend-overview > div:nth-child(2) {
    border-right: 0;
  }

  .trend-overview > div:last-child {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line-soft);
  }

  .trend-table {
    min-width: 760px;
  }

  .brand-feature-panel {
    min-height: 260px;
  }

  footer {
    min-height: 112px;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    text-align: center;
  }

  footer small {
    margin-left: 0;
  }

  .mobile-dock-nav {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: 8px;
    z-index: 60;
    height: 52px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    overflow: hidden;
    border: 1px solid #0b89a5;
    border-radius: 8px;
    background: #0ca9c4;
    box-shadow: 0 10px 28px rgba(12, 73, 119, 0.22);
  }

  .mobile-dock-nav button {
    border: 0;
    border-right: 1px solid rgba(0, 128, 154, 0.4);
    background: #0ca9c4;
    color: #fff;
    font-size: 12px;
    font-weight: 850;
  }

  .mobile-dock-nav button:last-child {
    border-right: 0;
  }

  .mobile-dock-nav button.active {
    background: linear-gradient(#3475bf, #134799);
  }

  .toast {
    right: 12px;
    bottom: 72px;
  }

  .mi-modal {
    padding: 12px;
  }

  .group-modal {
    padding: 10px;
  }

  .group-dialog {
    max-height: calc(100vh - 20px);
    padding: 20px 16px 18px;
    border-radius: 14px;
  }

  .group-close-icon {
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
  }

  .group-dialog-head h2 {
    font-size: 22px;
  }

  .group-qr-frame {
    width: min(220px, 64vw);
    margin-top: 14px;
    border-width: 6px;
    border-radius: 14px;
  }

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

  .group-guide {
    margin-top: 12px;
    padding-top: 12px;
  }

  .mi-dialog-head {
    grid-template-columns: 1fr 34px;
    gap: 9px;
  }

  .mi-dialog-head strong {
    font-size: 16px;
  }

  .mi-reveal {
    height: 190px;
    margin: 12px;
  }

  .mi-result {
    padding: 10px;
  }

  .mi-result-numbers b {
    width: auto;
    min-width: 44px;
    height: auto;
    font-size: 52px;
  }

  .mi-result-numbers {
    gap: 4px;
  }

  .mi-result-numbers b.sum {
    width: auto;
    min-width: 66px;
    height: auto;
  }

  .mi-result-numbers i {
    width: 16px;
    font-size: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
