:root {
  --bg: #eaf1ff;
  --page-bg: #eaf1ff;
  --panel: rgba(255, 255, 255, 0.76);
  --card: rgba(255, 255, 255, 0.72);
  --primary: #2f7bff;
  --primary-strong: #1f6bff;
  --accent: #62b7ff;
  --text: #0f1e3a;
  --muted: #4b6288;
  --line: rgba(47, 123, 255, 0.16);
  --success: #16a37a;
  --warning: #d97706;
  --danger: #e34b64;
  --shadow: 0 14px 32px rgba(37, 79, 152, 0.14);
  --soft-shadow: 0 8px 20px rgba(37, 79, 152, 0.09);
}

.lottery-shell {
  width: min(1208px, 100%);
  min-width: 0;
  margin: 0 auto;
  padding: 0 14px 24px;
}
.lottery-shell, .lottery-shell * { box-sizing: border-box; }
.app-main { min-height: 620px; min-width: 0; outline: 0; }

.lottery-navigation .ng-page-title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.lottery-navigation {
  position: sticky;
  top: max(8px, env(safe-area-inset-top, 0px));
  z-index: 12;
  margin: 0;
  padding: 3px;
  min-height: 48px;
  border: 1px solid var(--ng-shell-line, var(--line));
  border-radius: 18px;
  background: var(--ng-shell-nav-bg, rgba(247, 250, 255, 0.96));
  box-shadow: 0 4px 16px color-mix(in srgb, var(--ng-shell-text, #14223a) 6%, transparent);
  backdrop-filter: blur(12px);
}
.lottery-category-track {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 2px;
  scrollbar-width: none;
}
.lottery-category-track::-webkit-scrollbar { display: none; }
.lottery-category-item {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  border: 0;
  border-radius: 11px;
  color: var(--ng-shell-muted, var(--muted));
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.lottery-category-item .nav-icon {
  display: inline-grid;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  place-items: center;
}
.lottery-category-item .nav-icon img {
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
}
.lottery-category-item.active {
  color: var(--ng-shell-primary, var(--primary));
  background: color-mix(in srgb, var(--ng-shell-primary, var(--primary)) 12%, #fff);
}
@media (min-width: 721px) {
  .lottery-category-track {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    overflow: visible;
  }
  .lottery-category-item { width: 100%; }
}

.lottery-status {
  display: flex;
  align-items: center;
  margin: 10px 2px 0;
  color: var(--ng-shell-muted, var(--muted));
  font-size: 12px;
}
.source-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  gap: 7px;
  padding: 0;
  color: var(--ng-shell-muted, var(--muted));
  font-size: 12px;
  font-weight: 500;
}
.source-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warning);
}
.source-badge.ok i { background: var(--success); }
.source-badge.stale i { background: var(--warning); }

.lottery-page-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0;
}
.lottery-page-heading__title {
  margin: 0;
  color: var(--ng-shell-text, var(--text));
  font-size: 28px;
  font-weight: 700;
  line-height: 1.35;
}
.lottery-page-heading__description {
  margin: 6px 0 0;
  color: var(--ng-shell-muted, var(--muted));
  font-size: 13px;
  font-weight: 400;
}
.head-controls { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px; }
.lottery-refresh {
  min-width: 80px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--ng-shell-line, var(--line)) !important;
  color: var(--ng-shell-primary, var(--primary)) !important;
  background: var(--ng-shell-surface-strong, #fff) !important;
  box-shadow: none !important;
  cursor: pointer;
}
.lottery-refresh:disabled { opacity: .6; }

.button, .period-button, .segmented button {
  min-height: 38px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--card);
  color: var(--muted);
  font-weight: 800;
}
.button.primary, .period-button.active, .segmented button.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(110deg, var(--primary-strong), var(--accent));
  box-shadow: 0 8px 18px rgba(47, 123, 255, 0.22);
}
.button:focus-visible, .lottery-category-item:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid rgba(47, 123, 255, 0.24);
  outline-offset: 2px;
}

.panel, .draw-card, .stat-card {
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 20px;
  background: linear-gradient(180deg, var(--panel), rgba(247, 251, 255, 0.68));
  box-shadow: inset 0 1px rgba(255,255,255,.84), var(--shadow);
}
.panel { overflow: hidden; margin-bottom: 14px; }
.panel-head {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2 { margin: 0; font-size: 17px; }
.panel-head span { color: var(--muted); font-size: 12px; }
.panel-body { padding: 16px; }

.draw-card {
  padding: 18px 20px;
  border-top: 3px solid var(--primary);
}
.draw-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.draw-heading { font-size: 17px; font-weight: 900; }
.draw-actions { display: flex; gap: 8px; }
.sound-toggle.active, .scratch-toggle.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(110deg, var(--primary-strong), var(--accent));
}
.draw-issue {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-top: 14px;
  font-size: 17px;
  font-weight: 900;
}
.status-pill, .tag {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid rgba(22, 163, 122, 0.12);
  border-radius: 999px;
  background: rgba(22, 163, 122, 0.09);
  color: var(--success);
  font-size: 11px;
  font-weight: 900;
}
.draw-main {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(240px, 0.65fr);
  gap: 22px;
  padding-top: 18px;
}
.draw-scratch-zone {
  position: relative;
  width: fit-content;
  max-width: 100%;
  min-height: 90px;
  margin-inline: auto;
  padding-inline: 16px;
  overflow: hidden;
  border-radius: 15px;
}
.scratch-canvas {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  touch-action: none;
  cursor: crosshair;
}
.scratch-canvas.is-cleared { opacity: 0; pointer-events: none; }
.number-expression {
  display: flex;
  min-height: 90px;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.draw-ball, .sum-ball {
  display: grid;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid rgba(255,255,255,.78);
  border-radius: 50%;
  color: #fff;
  font-size: 22px;
  font-weight: 950;
  box-shadow: inset 0 2px 8px rgba(255,255,255,.34), 0 9px 18px rgba(31, 107, 255, 0.24);
}
.draw-ball.ball-a { background: #1767ee; }
.draw-ball.ball-b { background: #21a777; }
.draw-ball.ball-c { background: #ed7a35; }
.sum-ball { background: #d62d50; }
.operator { color: var(--muted); font-size: 21px; font-weight: 950; }
.result-strip {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 14px;
  margin-top: 3px;
}
.result-main {
  padding: 5px 16px;
  border-radius: 12px;
  background: rgba(22, 163, 122, 0.11);
  color: #138467;
  font-size: 25px;
  font-weight: 950;
}
.countdown { font-size: 18px; font-weight: 950; }
.countdown strong { font-variant-numeric: tabular-nums; }
.tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 12px; }
.tag { border-color: var(--line); background: rgba(47,123,255,.06); color: var(--muted); }
.meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.meta-box {
  min-width: 0;
  min-height: 70px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,.52);
}
.meta-box span { display: block; color: var(--muted); font-size: 11px; }
.meta-box strong {
  overflow: hidden;
  display: block;
  margin-top: 4px;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.keno-trace {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(47,123,255,.045);
}
.keno-trace > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.keno-trace strong { font-size: 12px; }
.keno-trace span, .keno-concealed { color: var(--muted); font-size: 10px; }
.keno-number-list { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 5px; margin-top: 8px; }
.keno-number-list i {
  display: grid;
  min-height: 25px;
  place-items: center;
  border: 1px solid rgba(47,123,255,.1);
  border-radius: 8px;
  background: rgba(47,123,255,.08);
  color: var(--primary-strong);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}
.keno-concealed {
  display: grid;
  min-height: 32px;
  margin-top: 8px;
  place-items: center;
  border-radius: 9px;
  background: rgba(47,123,255,.06);
}
.engine-panel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.engine-panel article {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}
.engine-panel span, .engine-panel small { color: var(--muted); font-size: 10px; }
.engine-panel strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.stat-card { display: grid; gap: 3px; min-height: 92px; padding: 14px; }
.stat-card span, .stat-card small { color: var(--muted); font-size: 12px; }
.stat-card strong { font-size: 23px; }

.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; min-width: 820px; border-collapse: collapse; }
th, td { padding: 11px 12px; border-bottom: 1px solid rgba(47, 123, 255, 0.1); text-align: left; white-space: nowrap; }
th { color: var(--muted); background: rgba(47,123,255,.04); font-size: 12px; }
td { font-size: 13px; }
.mini-balls { display: inline-flex; align-items: center; gap: 4px; }
.mini-ball {
  display: inline-grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  background: #eef4ff;
  color: var(--primary-strong);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}
.result-chip {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(47,123,255,.08);
  color: var(--primary-strong);
  font-weight: 900;
}
.empty-state { display: grid; min-height: 160px; place-content: center; padding: 46px 20px; color: var(--muted); text-align: center; }
.lottery-loading, .lottery-error { padding: 48px 20px; color: var(--muted); text-align: center; }

.recent-draw-panel .panel-head { min-height: 48px; padding: 9px 14px; }
.recent-draw-panel table { min-width: 0; table-layout: fixed; }
.recent-draw-panel :is(th, td) { padding: 8px 10px; }
.recent-draw-panel :is(th, td):nth-child(1) { width: 24%; }
.recent-draw-panel :is(th, td):nth-child(2) { width: 42%; }
.recent-draw-panel :is(th, td):nth-child(3) { width: 14%; }
.recent-draw-panel :is(th, td):nth-child(4) { width: 20%; }

.filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.field { display: grid; gap: 5px; min-width: 0; }
.field label { color: var(--muted); font-size: 11px; font-weight: 800; }
.field input, .field select {
  width: 100%;
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  background: rgba(255,255,255,.68);
  color: var(--text);
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 16px;
  color: var(--muted);
  font-size: 12px;
}
.history-more-filters { margin-top: 10px; border-top: 1px solid var(--line); }
.history-more-filters summary {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.history-more-filters summary::-webkit-details-marker { display: none; }
.history-more-filters summary::after { content: ">"; margin-left: auto; }
.history-more-filters summary span {
  padding: 2px 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  font-size: 10px;
}

.chart-shell { min-height: 360px; padding: 12px; }
#trendCanvas { display: block; width: 100%; height: 330px; }
.distribution-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.bar-list { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 54px minmax(0,1fr) 34px; align-items: center; gap: 9px; font-size: 12px; }
.bar-track { height: 9px; overflow: hidden; border-radius: 999px; background: rgba(47,123,255,.08); }
.bar-track i { display: block; width: var(--bar-width); height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary-strong), var(--accent)); }

.omission-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.omission-item {
  display: grid;
  min-height: 72px;
  place-items: center;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.55);
}
.omission-item span { color: var(--muted); font-size: 12px; }
.omission-item strong { font-size: 18px; }
.omission-item small { margin-left: 2px; font-size: 10px; font-weight: 700; }
.omission-item.hot { border-color: rgba(227,75,100,.19); background: rgba(227,75,100,.06); }
.omission-item.hot strong { color: var(--danger); }
.ball-groups { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }

.robot-prediction-page { display: grid; gap: 14px; }
.robot-lab-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(120deg, rgba(47,123,255,.1), rgba(255,255,255,.72));
}
.robot-lab-title { display: flex; align-items: center; gap: 9px; }
.robot-lab-title strong { font-size: 21px; }
.robot-lab-title span {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(47,123,255,.12);
  color: var(--primary-strong);
  font-size: 11px;
  font-weight: 900;
}
.robot-lab-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.robot-lab-stats { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.robot-lab-stats span {
  display: grid;
  min-width: 92px;
  padding: 7px 10px;
  border: 1px solid rgba(47,123,255,.1);
  border-radius: 11px;
  background: rgba(255,255,255,.7);
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}
.robot-lab-stats b { color: var(--text); font-size: 14px; }
.robot-category-tabs { overflow-x: auto; }
.robot-category-track { display: flex; gap: 6px; padding: 2px; }
.robot-category-tab {
  min-height: 38px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--muted);
  font-weight: 800;
}
.robot-category-tab.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(110deg, var(--primary-strong), var(--accent));
}
.robot-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.robot-section-head div { display: flex; align-items: center; gap: 9px; }
.robot-section-head strong { font-size: 18px; }
.robot-section-head span {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(47,123,255,.08);
  color: var(--primary-strong);
  font-size: 10px;
  font-weight: 800;
}
.robot-section-head small { color: var(--muted); }
.robot-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.robot-card {
  display: grid;
  grid-template-columns: 44px minmax(0,1fr) auto;
  grid-template-areas: "avatar identity pick" "record record record";
  gap: 9px;
  align-items: center;
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255,255,255,.76);
  color: inherit;
  font: inherit;
  text-align: left;
}
.robot-avatar {
  position: relative;
  grid-area: avatar;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, hsl(var(--robot-hue) 76% 68%), hsl(var(--robot-hue) 70% 48%));
  color: #fff;
  font-size: 17px;
  font-weight: 950;
}
.robot-avatar i {
  position: absolute;
  right: 0;
  bottom: 1px;
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #16a37a;
}
.robot-identity { grid-area: identity; display: grid; min-width: 0; }
.robot-identity > strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.robot-identity > span { color: var(--muted); font-size: 10px; }
.robot-pick { grid-area: pick; display: grid; min-width: 58px; justify-items: end; }
.robot-pick span { color: var(--muted); font-size: 9px; }
.robot-pick strong { color: var(--primary-strong); font-size: 18px; white-space: nowrap; }
.robot-record {
  grid-area: record;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-top: 7px;
  border-top: 1px solid rgba(47,123,255,.08);
  color: var(--muted);
  font-size: 9px;
}
.robot-record b { color: var(--text); }
.robot-pagination { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 4px 0 10px; }
.robot-pagination span { min-width: 100px; color: var(--muted); font-size: 12px; text-align: center; }

.robot-modal-layer {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  padding: 14px;
}
.robot-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15,30,58,.48);
  cursor: default;
}
.robot-modal {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(820px, 100%);
  max-height: min(88dvh, 820px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #f7f9fc;
}
.robot-modal-head {
  display: grid;
  grid-template-columns: 48px minmax(0,1fr) 44px;
  gap: 11px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.robot-modal-close {
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  font-size: 0;
}
.robot-modal-close::before, .robot-modal-close::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 14px;
  height: 2px;
  background: currentColor;
}
.robot-modal-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.robot-modal-close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.robot-modal-body { min-height: 0; overflow: auto; }
.robot-modal-stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; padding: 12px 14px 0; }
.robot-modal-stats span {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--muted);
  font-size: 10px;
}
.robot-modal-stats strong { color: var(--text); font-size: 16px; }
.robot-history-chart, .robot-history-table {
  margin: 12px 14px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.robot-history-table { margin-bottom: 14px; }
.robot-history-chart > div, .robot-history-table > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
#robotHistoryChart { display: block; width: 100%; height: 190px; }
.robot-rule-note {
  margin: 12px 14px 0;
  padding: 9px 11px;
  border-radius: 11px;
  background: rgba(47,123,255,.07);
  color: var(--muted);
  font-size: 11px;
}
.robot-draw-result { display: grid; gap: 5px; }
.robot-miss {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(227,75,100,.08);
  color: var(--danger);
  font-size: 11px;
  font-weight: 900;
}

.segmented { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.5); }
.segmented button { min-height: 31px; padding: 4px 10px; border-radius: 9px; font-size: 12px; }
.sequence { display: inline-flex; max-width: 320px; gap: 4px; overflow: hidden; }
.sequence i {
  min-width: 25px;
  padding: 2px 6px;
  border-radius: 7px;
  background: rgba(47,123,255,.07);
  color: var(--muted);
  font-style: normal;
}
.error-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid rgba(227,75,100,.15);
  border-radius: 12px;
  background: rgba(255,241,244,.82);
  color: #a22942;
  font-size: 13px;
}
.toast {
  position: fixed;
  right: 20px;
  bottom: calc(var(--ng-shell-nav-height, 78px) + 20px);
  z-index: 40;
  max-width: min(360px, calc(100vw - 40px));
  padding: 11px 15px;
  border-radius: 12px;
  background: rgba(15,30,58,.9);
  color: #fff;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: .22s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 980px) {
  .draw-main { grid-template-columns: minmax(0, 1fr); }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .omission-grid { grid-template-columns: repeat(5, minmax(0,1fr)); }
  .robot-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 720px) {
  .lottery-shell { padding-inline: 12px; }
  .lottery-page-heading__title { font-size: 24px; }
  .lottery-page-heading { flex-direction: column; align-items: flex-start; }
  .draw-card { padding: 14px 12px; }
  .number-expression { gap: 6px; }
  .draw-ball, .sum-ball { width: 46px; height: 46px; font-size: 18px; }
  .result-strip { flex-direction: column; align-items: center; gap: 6px; }
  .engine-panel { grid-template-columns: 1fr; }
  .keno-number-list { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .distribution-grid, .ball-groups { grid-template-columns: 1fr; }
  .omission-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .robot-lab-head { flex-direction: column; align-items: flex-start; }
  .robot-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .robot-card {
    grid-template-columns: 38px minmax(0,1fr);
    grid-template-areas: "avatar identity" "pick pick" "record record";
  }
  .robot-modal-stats { grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
  .summary-grid, .filters { grid-template-columns: 1fr; }
  .omission-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
