:root {
  --bg-top: #fdf4e7;
  --bg-bottom: #f5f8ff;
  --surface: rgba(255, 255, 255, 0.84);
  --surface-strong: rgba(255, 255, 255, 0.95);
  --surface-soft: rgba(245, 248, 255, 0.88);
  --ink: #142238;
  --muted: #607088;
  --border: rgba(18, 44, 89, 0.1);
  --border-strong: rgba(18, 44, 89, 0.16);
  --brand: #0c66c3;
  --brand-deep: #163b78;
  --hero-start: #0c66c3;
  --hero-end: #163b78;
  --ball-front-start: #0c66c3;
  --ball-front-end: #163b78;
  --ball-back-start: #f3b000;
  --ball-back-end: #163b78;
  --shadow-lg: 0 28px 72px rgba(19, 37, 69, 0.16);
  --shadow-md: 0 18px 42px rgba(19, 37, 69, 0.12);
  --radius-2xl: 34px;
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --content-width: 1240px;
  --heading-font: "Bahnschrift SemiCondensed", "DIN Alternate", "Segoe UI", sans-serif;
  --body-font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--body-font);
  background:
    radial-gradient(circle at 10% 12%, rgba(12, 102, 195, 0.14), transparent 28%),
    radial-gradient(circle at 84% 10%, rgba(243, 176, 0, 0.18), transparent 24%),
    radial-gradient(circle at 84% 88%, rgba(226, 90, 67, 0.12), transparent 20%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 52%, #fffdf8 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border-radius: 999px;
  filter: blur(18px);
}

body::before {
  width: 320px;
  height: 320px;
  left: -80px;
  bottom: 10%;
  background: radial-gradient(circle, rgba(12, 102, 195, 0.14), rgba(12, 102, 195, 0));
  animation: floatAura 16s ease-in-out infinite;
}

body::after {
  width: 260px;
  height: 260px;
  right: -70px;
  top: 12%;
  background: radial-gradient(circle, rgba(243, 176, 0, 0.18), rgba(243, 176, 0, 0));
  animation: floatAura 18s ease-in-out infinite reverse;
}

@keyframes floatAura {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(18px, -14px, 0);
  }
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

.hidden {
  display: none !important;
}

.page {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 32px), var(--content-width));
  margin: 0 auto;
  padding: 26px 0 60px;
}

.ambient {
  position: fixed;
  z-index: 0;
  border-radius: 999px;
  filter: blur(20px);
  pointer-events: none;
}

.ambient-a {
  width: 280px;
  height: 280px;
  left: -120px;
  top: 8%;
  background: radial-gradient(circle, rgba(12, 102, 195, 0.16), rgba(12, 102, 195, 0));
  animation: floatAura 20s ease-in-out infinite;
}

.ambient-b {
  width: 220px;
  height: 220px;
  right: -90px;
  bottom: 16%;
  background: radial-gradient(circle, rgba(243, 176, 0, 0.16), rgba(243, 176, 0, 0));
  animation: floatAura 22s ease-in-out infinite reverse;
}

.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-2xl);
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 34px;
  color: #fff;
  background:
    linear-gradient(135deg, var(--hero-start), var(--hero-end)),
    linear-gradient(150deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0));
  box-shadow: 0 30px 88px rgba(10, 27, 65, 0.28);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.hero::before {
  width: 320px;
  height: 320px;
  right: -60px;
  top: -160px;
  background: radial-gradient(circle, rgba(255, 214, 93, 0.42), rgba(255, 214, 93, 0));
}

.hero::after {
  width: 260px;
  height: 260px;
  left: 56%;
  bottom: -150px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0));
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.9fr);
  gap: 26px;
  align-items: end;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
}

.hero h1 {
  margin: 18px 0 14px;
  max-width: 12ch;
  font-family: var(--heading-font);
  font-size: clamp(38px, 5vw, 62px);
  line-height: 0.96;
  letter-spacing: 0.01em;
}

.hero p {
  margin: 0;
  max-width: 760px;
  font-size: 16px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.88);
}

.hero-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  transition: transform 180ms ease, background 180ms ease;
}

.hero-nav a:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.18);
}

.hero-side {
  display: grid;
  gap: 14px;
}

.hero-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.hero-card {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
}

.hero-card-accent {
  background:
    linear-gradient(135deg, rgba(255, 214, 93, 0.2), rgba(255, 255, 255, 0.12));
}

.hero-card span {
  display: block;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.74);
  margin-bottom: 10px;
}

.hero-card strong {
  display: block;
  font-family: var(--heading-font);
  font-size: 28px;
  line-height: 1.08;
}

.hero-card em {
  display: block;
  margin-top: 8px;
  font-style: normal;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  line-height: 1.5;
}

.stack {
  display: grid;
  gap: 20px;
  margin-top: 22px;
}

.panel {
  position: relative;
  border-radius: var(--radius-xl);
  padding: 26px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
}

.panel-priority {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(246, 249, 255, 0.92));
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 18px;
}

.panel-head h2 {
  margin: 0;
  font-family: var(--heading-font);
  font-size: 30px;
  line-height: 1.02;
  letter-spacing: 0.01em;
}

.panel-head p {
  margin: 8px 0 0;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.8;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(15, 51, 99, 0.08);
  background: linear-gradient(135deg, rgba(12, 102, 195, 0.1), rgba(243, 176, 0, 0.12));
  color: #12345d;
  font-size: 13px;
  font-weight: 700;
}

.tab-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.game-tab {
  flex: 1 1 220px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.game-tab:hover {
  transform: translateY(-1px);
  border-color: rgba(12, 102, 195, 0.28);
}

.game-tab.is-active {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  background: linear-gradient(135deg, var(--hero-start), var(--hero-end));
  box-shadow: 0 16px 34px rgba(12, 102, 195, 0.22);
}

.game-tab strong {
  font-size: 18px;
  font-family: var(--heading-font);
}

.game-tab span {
  font-size: 13px;
  opacity: 0.82;
}

.banner {
  padding: 14px 18px;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
}

.banner.is-success {
  border-color: rgba(31, 122, 85, 0.22);
  background: rgba(31, 122, 85, 0.08);
  color: #185e42;
}

.banner.is-warn {
  border-color: rgba(243, 176, 0, 0.22);
  background: rgba(243, 176, 0, 0.1);
  color: #92530a;
}

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

.generator-layout-single {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}

.form-card,
.result-card,
.assistant-card,
.info-card,
.summary-grid > div,
.latest-draw-card,
.overview-card,
.source-list li {
  border-radius: 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.form-card,
.result-card,
.assistant-card,
.info-card,
.summary-grid > div,
.latest-draw-card {
  padding: 22px;
  background: var(--surface-strong);
}

.form-card-primary {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 249, 255, 0.94));
}

.result-card-spotlight {
  background:
    linear-gradient(180deg, rgba(15, 47, 95, 0.98), rgba(22, 59, 120, 0.96));
  color: #fff;
  border-color: rgba(255, 255, 255, 0.08);
}

.assistant-card {
  background:
    linear-gradient(180deg, rgba(255, 249, 238, 0.98), rgba(255, 255, 255, 0.96));
}

.card-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #143760;
  background: linear-gradient(135deg, rgba(12, 102, 195, 0.08), rgba(243, 176, 0, 0.14));
}

.assistant-card h3,
.latest-draw-card h3 {
  margin: 16px 0 0;
  font-family: var(--heading-font);
  font-size: 28px;
  line-height: 1.05;
  color: #143760;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #17365f;
}

input,
select {
  width: 100%;
  margin-top: 8px;
  min-height: 52px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(18, 44, 89, 0.14);
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

input:focus,
select:focus {
  border-color: rgba(12, 102, 195, 0.45);
  box-shadow: 0 0 0 4px rgba(12, 102, 195, 0.12);
}

.full-field {
  margin-top: 12px;
}

.quick-seeds {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.seed-chip {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(12, 102, 195, 0.08);
  color: #17406d;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
}

.seed-chip:hover {
  transform: translateY(-1px);
  background: rgba(12, 102, 195, 0.14);
}

.button-row,
.action-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button-row {
  margin-top: 18px;
}

.action-stack {
  margin-top: 18px;
  flex-direction: column;
}

.generate-button,
.ghost-button,
.inline-button,
.primary-link,
.secondary-link,
.tertiary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, opacity 180ms ease;
}

.generate-button:hover,
.ghost-button:hover,
.inline-button:hover,
.primary-link:hover,
.secondary-link:hover,
.tertiary-button:hover {
  transform: translateY(-1px);
}

.generate-button {
  color: #fff;
  background: linear-gradient(135deg, var(--hero-start), var(--hero-end));
  box-shadow: 0 16px 34px rgba(12, 102, 195, 0.22);
}

.generate-button:disabled,
.ghost-button:disabled,
.inline-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.ghost-button,
.inline-button,
.secondary-link,
.tertiary-button {
  color: #183f6d;
  background: rgba(12, 102, 195, 0.08);
}

.primary-link {
  color: #163056;
  background: linear-gradient(135deg, #ffd45d, #ffefb0);
  box-shadow: 0 16px 34px rgba(243, 176, 0, 0.22);
}

.tertiary-button {
  background: rgba(243, 176, 0, 0.12);
}

.tips-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.tips-list div {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(12, 102, 195, 0.05);
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

.result-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #163056;
  background: rgba(255, 255, 255, 0.86);
}

.result-mini {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
}

.status {
  margin-top: 16px;
  min-height: 74px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  line-height: 1.7;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.status[data-state="success"] {
  background: rgba(31, 122, 85, 0.18);
}

.status[data-state="warn"] {
  background: rgba(243, 176, 0, 0.18);
}

.status[data-state="loading"] {
  background: rgba(255, 255, 255, 0.12);
}

.ball-panel,
.latest-ball-grid {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.ball-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ball {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  color: #fff;
  font-family: var(--heading-font);
  font-size: 18px;
  letter-spacing: 0.04em;
  box-shadow: 0 12px 24px rgba(8, 18, 34, 0.16);
  animation: riseIn 420ms ease both;
}

@keyframes riseIn {
  from {
    transform: translateY(10px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.ball.front {
  background: linear-gradient(135deg, var(--ball-front-start), var(--ball-front-end));
}

.ball.back {
  background: linear-gradient(135deg, var(--ball-back-start), var(--ball-back-end));
}

.static-row .ball {
  animation: none;
}

.dim {
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.result-meta,
.mini-data {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.result-meta div,
.mini-data div {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.result-meta span,
.mini-data span {
  display: block;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 8px;
}

.mini-data span {
  color: #6b7890;
}

.result-meta strong,
.mini-data strong {
  display: block;
  font-family: var(--heading-font);
  font-size: 16px;
  line-height: 1.35;
  word-break: break-word;
}

.result-note,
.compact-text,
.footer-note,
.info-list,
.table-wrap,
.source-list {
  color: var(--muted);
  line-height: 1.75;
}

.result-note {
  margin-top: 18px;
}

.snapshot-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(260px, 0.7fr);
  gap: 16px;
}

.snapshot-main {
  display: grid;
  gap: 16px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.summary-grid > div {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 249, 255, 0.94));
}

.summary-grid span,
.overview-card span {
  display: block;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.summary-grid strong {
  display: block;
  font-family: var(--heading-font);
  font-size: 28px;
  color: #143760;
}

.summary-grid em {
  display: block;
  margin-top: 8px;
  font-style: normal;
  color: var(--muted);
}

.latest-draw-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 255, 0.92));
}

.draw-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
}

.draw-meta {
  color: var(--muted);
  font-size: 14px;
}

.snapshot-side {
  display: grid;
  gap: 16px;
}

.info-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 250, 241, 0.95));
}

.info-list {
  margin: 14px 0 0;
  padding-left: 18px;
}

.info-list li + li {
  margin-top: 8px;
}

.compact-text {
  margin: 14px 0 0;
}

.history-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.history-toolbar input {
  flex: 1 1 320px;
  margin-top: 0;
}

.history-pagination {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.pagination-meta,
.pagination-actions,
.pagination-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.pagination-size {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.pagination-size select,
.pagination-jump input {
  width: auto;
  min-width: 72px;
  min-height: 40px;
  margin-top: 0;
}

.page-number-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-number {
  min-width: 40px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.page-number.is-active {
  background: linear-gradient(135deg, var(--hero-start), var(--hero-end));
  color: #fff;
  border-color: transparent;
}

.query-card {
  padding: 22px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.94));
  box-shadow: var(--shadow-md);
}

.winning-query-form {
  display: grid;
  gap: 16px;
}

.winning-query-inputs {
  display: grid;
  gap: 16px;
}

.winning-number-block {
  display: grid;
  gap: 12px;
}

.winning-number-groups {
  display: grid;
  gap: 14px;
}

.number-input-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.number-input {
  width: 52px;
  min-width: 52px;
  text-align: center;
  padding: 0;
  font-weight: 700;
}

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

.winning-query-message {
  min-height: 56px;
  margin-top: 0;
}

.winning-query-results {
  display: grid;
  gap: 12px;
}

.winning-result-item {
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
}

.winning-result-item.is-winning {
  border-color: rgba(198, 40, 40, 0.28);
  background: rgba(198, 40, 40, 0.08);
}

.winning-result-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.winning-result-head strong {
  font-family: var(--heading-font);
  font-size: 22px;
  color: #143760;
}

.winning-result-head span {
  font-weight: 700;
  color: #185e42;
}

.winning-result-item.is-winning .winning-result-head strong {
  font-weight: 800;
  color: #b42318;
}

.winning-result-item.is-winning .winning-result-head span {
  font-weight: 800;
  color: #b42318;
}

.winning-result-meta {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.winning-result-item.is-winning .winning-result-meta {
  color: #b42318;
  font-weight: 700;
}

.table-wrap {
  overflow: auto;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.74);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
  background: transparent;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #17365f;
  background: linear-gradient(180deg, #f7fbff, #edf4ff);
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(18, 44, 89, 0.08);
}

tbody tr:hover {
  background: rgba(12, 102, 195, 0.04);
}

tbody a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 700;
}

.mono {
  font-family: "Consolas", "SFMono-Regular", monospace;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.overview-card {
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 255, 0.92));
}

.overview-card strong {
  display: block;
  font-family: var(--heading-font);
  font-size: 21px;
  line-height: 1.18;
  color: #143760;
}

.overview-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.source-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.source-list li {
  padding: 18px 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 255, 0.92));
}

.source-list a {
  color: #163f6d;
  text-decoration: none;
  font-weight: 700;
}

.footer-note {
  margin: 8px 2px 0;
  text-align: center;
}

.detail-page {
  max-width: 980px;
}

.detail-shell {
  display: grid;
  gap: 18px;
}

.detail-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}

.detail-head h1 {
  margin: 14px 0 10px;
  font-family: var(--heading-font);
  font-size: clamp(34px, 5vw, 48px);
  line-height: 1.02;
}

.detail-eyebrow {
  background: rgba(12, 102, 195, 0.1);
  color: #123b66;
}

.detail-summary {
  margin: 0;
}

.detail-panel {
  padding: 24px;
}

.detail-ball-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.detail-dim {
  color: var(--muted);
}

.detail-note {
  color: var(--muted);
  line-height: 1.8;
  font-size: 15px;
}

@media (max-width: 1180px) {
  .hero-grid,
  .generator-layout,
  .snapshot-layout,
  .overview-grid,
  .detail-ball-grid {
    grid-template-columns: 1fr;
  }

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

  .hero h1 {
    max-width: none;
  }
}

@media (max-width: 760px) {
  .page {
    width: min(calc(100% - 20px), var(--content-width));
    padding: 16px 0 40px;
  }

  .hero,
  .panel {
    padding: 20px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .summary-grid,
  .result-meta,
  .mini-data,
  .hero-stat-grid,
  .winning-meta-grid {
    grid-template-columns: 1fr;
  }

  .tab-strip .game-tab {
    flex-basis: 100%;
  }

  .hero-nav,
  .button-row {
    width: 100%;
  }

  .hero-nav a,
  .generate-button,
  .ghost-button,
  .inline-button,
  .primary-link,
  .secondary-link,
  .tertiary-button {
    width: 100%;
  }

  .ball {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}
