:root {
  color-scheme: light;
  --bg: #fbf8ff;
  --paper: #fffefe;
  --text: #28204f;
  --muted: #8074a9;
  --line: #e7c789;
  --primary: #6e38c9;
  --primary-strong: #522592;
  --primary-deep: #292154;
  --gold: #d9a94f;
  --gold-soft: #fff5d9;
  --jade: #7f73b5;
  --blue: #6967dc;
  --red: #c4367d;
  --back: #5f63d8;
  --card-radius: 24px;
  --shadow: 0 22px 54px rgba(91, 54, 168, .18);
  --soft-shadow: 0 12px 32px rgba(55, 44, 101, .1);
  --paper-bg:
    radial-gradient(circle at 86% 0%, rgba(142, 112, 205, .17), transparent 28%),
    radial-gradient(circle at 8% 16%, rgba(217, 169, 79, .12), transparent 20%),
    linear-gradient(180deg, #fffafe 0%, #fbf8ff 46%, #f6f1fb 100%);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 86% -2%, rgba(119, 92, 180, .14), transparent 22%),
    radial-gradient(circle at 12% 0%, rgba(217, 169, 79, .08), transparent 26%),
    radial-gradient(ellipse at 92% 4%, rgba(109, 54, 200, .08) 0 9%, transparent 10%),
    linear-gradient(135deg, rgba(109, 54, 200, .035) 1px, transparent 1px),
    var(--paper-bg);
  background-size: auto, auto, 34px 34px, auto;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body {
  -webkit-font-smoothing: antialiased;
  padding: 0 0 env(safe-area-inset-bottom);
}

body.modal-open {
  overflow: hidden;
}

button, input, select {
  font: inherit;
}

.chrome-top {
  position: sticky;
  top: 0;
  z-index: 20;
  padding-top: env(safe-area-inset-top);
  background: rgba(255, 251, 255, .86);
  border-bottom: 1px solid rgba(231, 199, 137, .48);
  backdrop-filter: blur(18px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 920px);
  margin: 0 auto;
  padding: 14px 16px 12px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 26px;
  line-height: 1;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: 0;
}

.brand span {
  font-style: italic;
}

.brand i {
  display: block;
  width: 1px;
  height: 26px;
  background: linear-gradient(180deg, transparent, rgba(123, 114, 162, .5), transparent);
}

.brand strong {
  color: var(--primary-deep);
  font-size: 21px;
}

.subtitle {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(231, 199, 137, .66);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff, #fbf8ff);
  color: var(--primary);
  font-size: 20px;
  font-weight: 700;
}

.plus-btn {
  color: #fff8dc;
  background: linear-gradient(145deg, #5a31a9, #d9a94f);
  font-size: 24px;
  line-height: 1;
}

.account-btn {
  display: none;
  max-width: 116px;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid rgba(231, 199, 137, .62);
  border-radius: 14px;
  background: #fff;
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content {
  width: min(100%, 920px);
  margin: 0 auto;
  padding: 14px 18px 28px;
}

.web-pc .topbar,
.web-pc .tabs,
.web-pc .content {
  width: min(100%, 1180px);
}

.web-pc .content {
  padding-left: 22px;
  padding-right: 22px;
}

.page { display: none; }
.page.active { display: block; }

.page-title {
  margin: 16px 0 18px;
  padding: 0 2px;
}

.page-title h1 {
  margin-bottom: 0;
  color: var(--primary-deep);
  font-size: 32px;
  font-weight: 900;
}

.page-title .eyebrow {
  color: var(--primary);
  opacity: 1;
}

.hero {
  position: relative;
  display: flex;
  min-height: 226px;
  padding: 42px 26px 28px;
  border: 1px solid rgba(231, 199, 137, .68);
  border-radius: 24px;
  color: #fffaf2;
  background:
    radial-gradient(circle at 51% 14%, rgba(255, 255, 255, .95) 0 18px, transparent 19px),
    radial-gradient(circle at 79% 31%, rgba(255, 255, 255, .26), transparent 11%),
    radial-gradient(circle at 17% 88%, rgba(255, 255, 255, .2), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, .14), transparent 36%),
    linear-gradient(135deg, #513297, #7d62bd 52%, #b8a4dc);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero h1 {
  max-width: 420px;
  font-size: clamp(42px, 9vw, 66px);
  font-weight: 900;
  text-shadow: 0 2px 0 rgba(38, 33, 77, .24), 0 12px 26px rgba(38, 33, 77, .3);
}

.pick-hero {
  position: relative;
  min-height: 204px;
  margin-top: 12px;
  padding: 34px 24px;
  overflow: hidden;
  border: 1px solid rgba(231, 199, 137, .68);
  border-radius: 24px;
  color: #fffaf2;
  background:
    radial-gradient(circle at 50% 8%, rgba(255, 255, 255, .85) 0 20px, transparent 21px),
    radial-gradient(circle at 88% 68%, rgba(217, 169, 79, .34), transparent 24%),
    linear-gradient(135deg, #5d3aa5, #8e74c7 54%, #d7c5f0);
  box-shadow: var(--shadow);
}

.pick-hero::after {
  content: "";
  position: absolute;
  right: -42px;
  bottom: -70px;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  border: 1px solid rgba(255, 248, 220, .2);
  box-shadow: inset 0 0 0 24px rgba(255, 248, 220, .06);
}

.pick-hero > div {
  position: relative;
  z-index: 1;
  max-width: 620px;
}

.pick-hero h1 {
  max-width: 620px;
  font-size: clamp(32px, 7vw, 58px);
  text-shadow: 0 2px 0 rgba(38, 33, 77, .22), 0 12px 26px rgba(38, 33, 77, .26);
}

.pick-hero p:last-child {
  margin: 0;
  color: rgba(255, 250, 242, .92);
  font-weight: 800;
}

.quick-dock {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.quick-entry {
  display: grid;
  gap: 4px;
  min-height: 96px;
  padding: 17px 12px;
  border: 1px solid rgba(231, 199, 137, .66);
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(142, 112, 205, .12), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(255, 253, 255, .94));
  color: var(--text);
  text-align: center;
  box-shadow: var(--soft-shadow);
}

.quick-entry strong {
  color: var(--primary-deep);
  font-size: 20px;
}

.quick-entry small {
  color: var(--muted);
  font-size: 12px;
}

.home-grid {
  display: grid;
  gap: 14px;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -40px -52px auto;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background:
    linear-gradient(180deg, transparent 42%, rgba(231, 199, 137, .42) 43% 45%, transparent 46%),
    radial-gradient(circle, rgba(255, 255, 255, .16), transparent 70%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, .6) 0 7px, transparent 8px),
    radial-gradient(circle at 38% 15%, rgba(255, 255, 255, .5) 0 10px, transparent 11px),
    radial-gradient(circle at 48% 12%, rgba(255, 255, 255, .92) 0 15px, transparent 16px),
    radial-gradient(circle at 58% 15%, rgba(255, 255, 255, .5) 0 10px, transparent 11px),
    linear-gradient(180deg, transparent 58%, rgba(52, 42, 112, .2) 59%, transparent 75%),
    radial-gradient(ellipse at 46% 96%, rgba(48, 35, 111, .34), transparent 44%),
    radial-gradient(ellipse at 22% 106%, rgba(90, 64, 159, .42), transparent 38%),
    radial-gradient(ellipse at 84% 104%, rgba(84, 61, 150, .38), transparent 36%),
    linear-gradient(110deg, transparent 0 34%, rgba(255, 255, 255, .12) 45%, transparent 58% 100%);
  opacity: .9;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 7px;
  font-size: 12px;
  opacity: .78;
  font-weight: 800;
  letter-spacing: 0;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  margin-bottom: 8px;
  font-size: 28px;
  line-height: 1.12;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 17px;
  line-height: 1.25;
}

h3 {
  margin-bottom: 8px;
  font-size: 15px;
}

.panel, .card {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(231, 199, 137, .58);
  border-radius: var(--card-radius);
  background:
    radial-gradient(circle at 100% 100%, rgba(142, 112, 205, .08), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(255, 253, 255, .9));
  box-shadow: var(--soft-shadow);
}

.section-head {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.overview-panel {
  border-color: rgba(231, 199, 137, .62);
}

.recommend-panel {
  border-color: rgba(188, 172, 220, .52);
}

.section-head span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.prediction-card {
  margin-top: 12px;
  padding: 22px;
  border: 1px solid rgba(231, 199, 137, .72);
  border-radius: 24px;
  background:
    radial-gradient(circle at 100% 100%, rgba(142, 112, 205, .12), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(255, 253, 255, .94));
  box-shadow: 0 18px 38px rgba(55, 44, 101, .1);
}

.prediction-card .row strong {
  color: var(--primary-deep);
  font-size: 26px;
}

.prediction-card .row span {
  color: var(--primary-deep);
  font-size: 28px;
  font-weight: 900;
}

.prediction-zones {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-top: 14px;
}

.prediction-zones small,
.draw-card-zones small {
  display: block;
  color: var(--primary-deep);
  font-weight: 800;
}

.combo-card,
.candidate-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(231, 199, 137, .48);
  border-radius: 20px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 10px 26px rgba(55, 44, 101, .09);
}

.combo-meta,
.candidate-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.combo-meta span,
.candidate-head span {
  padding: 8px 11px;
  border-radius: 12px;
  color: var(--primary);
  background: #f1e9ff;
  font-weight: 900;
  white-space: nowrap;
}

.combo-meta strong,
.candidate-head strong {
  min-width: 0;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.combo-meta em,
.candidate-head em {
  color: var(--primary);
  font-style: normal;
  font-size: 20px;
  font-weight: 900;
}

.combo-numbers,
.candidate-number-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.combo-numbers .balls,
.candidate-number-row .balls {
  margin: 0;
}

.plus-mark {
  color: var(--primary-deep);
  font-weight: 900;
}

.stack {
  display: grid;
  gap: 12px;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

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

.balls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.ball {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
  font-weight: 900;
  font-size: 17px;
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, .44), inset 0 -4px 8px rgba(52, 20, 65, .18), 0 9px 16px rgba(55, 44, 101, .18);
}

.front { background: radial-gradient(circle at 35% 24%, #ffd5e9, #c4367d 54%, #82154d); }
.back { background: radial-gradient(circle at 35% 24%, #d8d8ff, #6464db 58%, #303080); }
.hit { outline: 3px solid #facc15; outline-offset: 1px; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 8px 0;
}

.tag {
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(188, 172, 220, .56);
  background: linear-gradient(180deg, #fff, #f6f1ff);
  color: var(--primary);
  font-size: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.field {
  display: grid;
  gap: 5px;
}

.field label {
  color: var(--muted);
  font-size: 12px;
}

.field input, .field select {
  min-width: 0;
  width: 100%;
  height: 42px;
  padding: 0 11px;
  border: 1px solid rgba(188, 172, 220, .58);
  border-radius: 14px;
  background: rgba(255, 255, 255, .88);
  color: var(--text);
}

.field input:focus, .field select:focus {
  outline: 3px solid rgba(109, 54, 200, .16);
  border-color: rgba(109, 54, 200, .48);
}

.range-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.range-control input {
  text-align: center;
}

.range-control span {
  color: var(--primary);
  font-weight: 900;
}

.check-line {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  color: var(--text);
  font-size: 13px;
}

.check-line input {
  width: 18px;
  height: 18px;
}

.wide { grid-column: 1 / -1; }

.primary, .ghost {
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 16px;
  font-weight: 800;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.primary {
  border: 1px solid rgba(231, 199, 137, .64);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .12), transparent 38%),
    linear-gradient(135deg, #5a31a9, #7b4ccc 62%, #4b268f);
  color: #fffaf2;
  box-shadow: 0 12px 26px rgba(79, 35, 143, .2);
}

.primary:active { background: var(--primary-strong); }

.ghost {
  border: 1px solid rgba(231, 199, 137, .7);
  background: linear-gradient(180deg, #fff, #fbf8ff);
  color: var(--primary);
}

.primary:hover, .ghost:hover, .account-btn:hover, .icon-btn:hover, .tool-card:hover {
  transform: translateY(-1px);
}

.full {
  width: 100%;
  margin-top: 12px;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  width: min(100%, 920px);
  margin: 0 auto;
  padding: 0 12px 12px;
}

.tab {
  display: grid;
  place-items: center;
  gap: 2px;
  min-width: 0;
  min-height: 42px;
  padding: 0 8px;
  border: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, .42);
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.tab-icon {
  display: none;
  font-size: 16px;
  line-height: 1;
  font-weight: 900;
}

.tab.active {
  background: linear-gradient(180deg, #fff8df, #f2eaff);
  color: var(--primary);
  box-shadow: inset 0 0 0 1px rgba(231, 199, 137, .62), 0 8px 18px rgba(91, 54, 168, .08);
}

[data-home-icon] svg,
.icon-action svg {
  display: block;
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-pills {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-pills span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 999px;
  color: #fffaf2;
  background: rgba(255, 255, 255, .13);
  font-size: 13px;
  font-weight: 800;
}

.hero-pills svg {
  font-size: 16px;
}

.home-overview-meta {
  display: none;
}

.icon-action {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(188, 172, 220, .52);
  border-radius: 12px;
  color: var(--primary);
  background: rgba(255, 255, 255, .92);
  font-size: 19px;
}

.icon-action.saved,
.icon-action.copied {
  color: #d9a94f;
  border-color: rgba(217, 169, 79, .7);
  background: #fff8df;
}

.bottom-tabs {
  display: none;
}

.web-pc .bottom-tabs,
.web-pc .quick-switch {
  display: none;
}

.web-pc .chrome-top .tabs {
  display: grid;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  z-index: 140;
  max-width: min(86vw, 420px);
  padding: 11px 14px;
  border: 1px solid rgba(255, 232, 163, .46);
  border-radius: 999px;
  color: #fffaf2;
  background: rgba(38, 33, 77, .92);
  box-shadow: 0 14px 32px rgba(38, 33, 77, .24);
  transform: translateX(-50%);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.toast[hidden] {
  display: none;
}

.quick-switch {
  position: fixed;
  right: 16px;
  bottom: calc(92px + env(safe-area-inset-bottom));
  z-index: 42;
  display: none;
}

.quick-switch-main {
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255, 232, 163, .5);
  border-radius: 50%;
  color: #fffaf2;
  background: linear-gradient(145deg, #5a31a9, #d9a94f);
  box-shadow: 0 16px 32px rgba(55, 44, 101, .22);
  font-weight: 900;
}

.quick-switch-menu {
  position: absolute;
  right: 0;
  bottom: 62px;
  display: grid;
  gap: 8px;
  width: 82px;
  padding: 9px;
  border: 1px solid rgba(243, 215, 172, .86);
  border-radius: 18px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 16px 36px rgba(55, 44, 101, .18);
}

.quick-switch-menu button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  color: var(--primary-deep);
  background: #fbf8ff;
  font-weight: 800;
}

.quick-action-popover {
  position: fixed;
  top: calc(68px + env(safe-area-inset-top));
  right: max(14px, calc((100vw - 920px) / 2 + 14px));
  z-index: 80;
  display: grid;
  gap: 8px;
  width: min(290px, calc(100vw - 28px));
  padding: 10px;
  border: 1px solid rgba(243, 215, 172, .86);
  border-radius: 20px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 18px 44px rgba(55, 44, 101, .18);
}

.quick-action-popover[hidden] {
  display: none;
}

.quick-action-item {
  display: grid;
  gap: 4px;
  min-height: 64px;
  padding: 12px;
  border: 1px solid rgba(243, 215, 172, .78);
  border-radius: 16px;
  color: var(--text);
  background:
    radial-gradient(circle at 100% 0%, rgba(142, 112, 205, .14), transparent 34%),
    linear-gradient(180deg, #fff, #fbf8ff);
  text-align: left;
}

.quick-action-item strong {
  color: var(--primary-deep);
  font-size: 15px;
}

.quick-action-item small {
  color: var(--muted);
  font-size: 12px;
}

.scan-dialog {
  width: min(100%, 620px);
  padding: 0;
}

.scan-dialog .ticket-scan-card {
  margin: 0;
  border: 0;
  border-radius: 8px;
}

.draw-mobile-head,
.draw-latest-shell {
  display: none;
}

.draw-detail-dialog {
  width: min(100%, 640px);
  padding: 0;
  overflow: hidden;
}

.trend-mobile-head,
.pick-mobile-head {
  display: none;
}

.compact-head {
  margin-bottom: 12px;
}

.detail-table {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.draw-feature-card,
.draw-row-card {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid rgba(231, 199, 137, .58);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(255, 253, 255, .95));
  box-shadow: var(--soft-shadow);
  cursor: pointer;
}

.draw-feature-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(231, 199, 137, .7);
  background:
    radial-gradient(circle at 92% 22%, rgba(142, 112, 205, .18), transparent 30%),
    linear-gradient(145deg, #fbf5ff, #fffdf7 48%, #f4ecff);
}

.draw-feature-card::after {
  content: "";
  position: absolute;
  right: -44px;
  bottom: -54px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(142, 112, 205, .14);
  pointer-events: none;
}

.draw-card-main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.draw-card-main strong,
.draw-card-main span {
  display: block;
}

.draw-card-main strong {
  color: var(--primary-deep);
  font-size: 20px;
}

.draw-card-main span {
  margin-top: 5px;
  color: var(--muted);
}

.draw-card-zones {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-top: 14px;
}

.prize-row {
  padding: 10px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #f8f3ff);
}

.metric-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.metric-card {
  margin-top: 0;
}

.number-trend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
  gap: 8px;
}

.number-trend-item {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 10px 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #fbf8ff);
}

.number-trend-item .ball {
  margin-bottom: 2px;
}

.number-trend-item small {
  color: var(--muted);
  font-size: 11px;
}

.trend-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(243, 215, 172, .75);
  border-radius: 18px;
  background: #fff;
}

.trend-table {
  width: 100%;
  min-width: 690px;
  border-collapse: collapse;
  font-size: 13px;
}

.trend-table th,
.trend-table td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.trend-table th {
  color: var(--primary);
  background: #f6f1ff;
}

.trend-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.trend-subnav {
  position: sticky;
  top: 104px;
  z-index: 12;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 12px;
  padding: 8px;
  border: 1px solid rgba(231, 199, 137, .58);
  border-radius: 18px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(14px);
}

.trend-subnav button {
  min-height: 36px;
  border: 0;
  border-radius: 14px;
  color: var(--primary);
  background: linear-gradient(180deg, #fff, #f2eaff);
  font-weight: 800;
}

.anchor-target {
  scroll-margin-top: 152px;
}

.trend-matrix-card {
  scroll-margin-top: 130px;
}

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

.matrix-open-actions .primary,
.matrix-open-actions .ghost {
  margin-top: 0;
}

.matrix-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
}

.matrix-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(38, 33, 77, .48);
  backdrop-filter: blur(8px);
}

.matrix-dialog {
  position: absolute;
  inset: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: min(1180px, calc(100vw - 20px));
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(231, 199, 137, .76);
  border-radius: 24px;
  background:
    radial-gradient(circle at 100% 0%, rgba(142, 112, 205, .16), transparent 32%),
    linear-gradient(180deg, #fff, #fbf8ff);
  box-shadow: 0 26px 70px rgba(38, 33, 77, .28);
}

.matrix-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(231, 199, 137, .58);
}

.matrix-dialog-head h2,
.matrix-dialog-head .eyebrow {
  margin: 0;
}

.matrix-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(231, 199, 137, .58);
}

.segmented {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbf8ff;
}

.segmented button {
  min-height: 36px;
  border: 0;
  border-radius: 12px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
}

.segmented button.active {
  color: #fffaf2;
  background: linear-gradient(135deg, #5a31a9, #8e74c7);
}

.zoom-actions {
  display: flex;
  gap: 8px;
}

.zoom-actions .ghost {
  min-height: 36px;
  margin: 0;
  padding: 0 11px;
}

.matrix-stage {
  min-height: 0;
  overflow: auto;
  padding: 12px;
}

.matrix-zoom-wrap {
  width: max-content;
  zoom: var(--matrix-scale);
}

.matrix-zoom-wrap .trend-scroll {
  overflow: visible;
}

.trend-matrix-card details {
  margin-top: 10px;
  border: 1px solid rgba(231, 199, 137, .58);
  border-radius: 18px;
  overflow: hidden;
  background: #fbf8ff;
}

.trend-matrix-card summary {
  padding: 13px 14px;
  color: var(--primary-deep);
  cursor: pointer;
  font-weight: 900;
}

.trend-matrix-card details[open] summary {
  border-bottom: 1px solid rgba(231, 199, 137, .58);
  background: #f6f1ff;
}

.matrix-table {
  min-width: 1060px;
  font-size: 12px;
}

.matrix-table th,
.matrix-table td {
  min-width: 29px;
  padding: 5px 4px;
  text-align: center;
}

.matrix-table th:first-child,
.matrix-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 58px;
  background: #f6f1ff;
  text-align: left;
}

.matrix-hit {
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
}

.matrix-hit.front { background: var(--red); }
.matrix-hit.back { background: var(--back); }

.matrix-empty {
  color: transparent;
}

.performance-grid {
  display: grid;
  gap: 12px;
}

.performance-card {
  margin-top: 0;
}

.guide-hero {
  margin-top: 14px;
  padding: 20px;
  border-radius: 22px;
  color: #fffaf2;
  background:
    linear-gradient(135deg, rgba(70, 40, 132, .98), rgba(112, 80, 180, .9) 55%, rgba(217, 199, 239, .9));
  box-shadow: var(--shadow);
}

.guide-hero h1 {
  margin: 0;
  font-size: 26px;
}

.guide-hero p {
  max-width: 560px;
  margin: 10px 0 0;
  color: rgba(255, 255, 255, .88);
  line-height: 1.7;
}

.guide-card {
  display: grid;
  gap: 10px;
}

.guide-list {
  display: grid;
  gap: 8px;
}

.guide-list p {
  margin: 0;
  padding: 10px 12px;
  border-radius: 16px;
  background: #f8f3ff;
  color: var(--text);
  line-height: 1.65;
}

.performance-row {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.task-row {
  display: grid;
  gap: 9px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbf8ff;
}

.saved-check-card {
  margin: 12px 0;
  border-color: rgba(231, 199, 137, .62);
  background: linear-gradient(135deg, #fff, #f8f3ff);
}

.mini-bars {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.mini-bars span {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--primary-deep);
  background: #f8f3ff;
  font-size: 12px;
  font-weight: 700;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--primary);
  background: #f2eaff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill.pending {
  color: #7b6c45;
  background: #fff8df;
}

.status-pill.lost {
  color: #475569;
  border-color: #e2e8f0;
  background: #f8fafc;
}

.status-pill.won {
  color: var(--primary-deep);
  border-color: rgba(231, 199, 137, .8);
  background: linear-gradient(180deg, #fff8df, #f2eaff);
}

.saved-number-form {
  margin-bottom: 4px;
}

.ticket-scan-card {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(231, 199, 137, .62);
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(142, 112, 205, .16), transparent 32%),
    linear-gradient(180deg, #fff, #fbf8ff);
}

.scan-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: stretch;
}

.upload-btn {
  display: inline-grid;
  place-items: center;
  min-height: 44px;
  cursor: pointer;
}

.scanner-box {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border: 1px solid rgba(109, 54, 200, .22);
  border-radius: 18px;
  background: #211a42;
}

.scanner-box video {
  display: block;
  width: 100%;
  height: min(58vh, 360px);
  object-fit: cover;
}

.scanner-frame {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(66vw, 240px);
  height: min(66vw, 240px);
  border: 3px solid rgba(231, 199, 137, .96);
  border-radius: 18px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, .36);
  transform: translate(-50%, -50%);
}

.field textarea {
  min-width: 0;
  width: 100%;
  padding: 10px 11px;
  border: 1px solid rgba(188, 172, 220, .58);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  resize: vertical;
}

.field textarea:focus {
  outline: 3px solid rgba(109, 54, 200, .16);
  border-color: rgba(109, 54, 200, .48);
}

.ticket-result {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(231, 199, 137, .58);
  border-radius: 18px;
  background: rgba(255, 255, 255, .74);
}

.ticket-draw,
.ticket-check-list,
.ticket-check-item {
  display: grid;
  gap: 8px;
}

.ticket-draw {
  padding: 10px;
  border: 1px solid rgba(231, 199, 137, .48);
  border-radius: 16px;
  background: #f8f3ff;
}

.ticket-draw > span {
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.ticket-check-item {
  padding: 10px;
  border: 1px solid rgba(243, 215, 172, .68);
  border-radius: 16px;
  background: rgba(255, 255, 255, .9);
}

.saved-filter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: end;
  margin: 12px 0;
}

.saved-filter .ghost {
  min-height: 42px;
}

.saved-number-row {
  display: grid;
  gap: 6px;
}

.draw-favorite-row {
  display: grid;
  gap: 8px;
}

.saved-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.saved-actions .ghost {
  min-height: 36px;
  padding: 0 12px;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.account-settings-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(231, 199, 137, .7);
  background:
    radial-gradient(circle at 100% 0%, rgba(142, 112, 205, .18), transparent 34%),
    radial-gradient(ellipse at 0% 100%, rgba(217, 169, 79, .12), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(251, 248, 255, .96));
}

.account-settings-card::after {
  content: "";
  position: absolute;
  top: -52px;
  right: -42px;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: rgba(217, 169, 79, .16);
  pointer-events: none;
}

.account-settings-head {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.account-avatar {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: #fff8df;
  background:
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, .72), transparent 22%),
    linear-gradient(145deg, #b58ff0, #6e38c9 58%, #3b236d);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 10px 20px rgba(55, 44, 101, .16);
  font-size: 22px;
  font-weight: 900;
}

.account-info {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.account-info strong {
  overflow: hidden;
  color: var(--primary-deep);
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-info small {
  color: var(--muted);
  font-size: 12px;
}

.settings-actions {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
}

.setting-tile {
  min-height: 74px;
  padding: 12px;
  border: 1px solid rgba(231, 199, 137, .64);
  border-radius: 18px;
  color: var(--text);
  background:
    radial-gradient(circle at 100% 0%, rgba(142, 112, 205, .12), transparent 36%),
    linear-gradient(180deg, #fff, #fbf8ff);
  text-align: left;
  box-shadow: 0 8px 18px rgba(55, 44, 101, .07);
}

.setting-tile span,
.setting-tile strong {
  display: block;
}

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

.setting-tile strong {
  margin-top: 7px;
  color: var(--primary-deep);
  font-size: 15px;
}

.setting-tile.danger {
  border-color: rgba(196, 54, 125, .24);
  background:
    radial-gradient(circle at 100% 0%, rgba(196, 54, 125, .11), transparent 36%),
    linear-gradient(135deg, #fff, #fff0f7);
}

.setting-tile.danger strong {
  color: #a32969;
}

.auth-screen {
  display: grid;
  gap: 14px;
}

.auth-visual,
.mine-landing {
  position: relative;
  min-height: 188px;
  padding: 22px 154px 22px 20px;
  border: 1px solid rgba(231, 199, 137, .68);
  border-radius: 24px;
  overflow: hidden;
  color: var(--primary-deep);
  background:
    radial-gradient(circle at 76% 23%, rgba(255, 255, 255, .7) 0 26px, transparent 27px),
    radial-gradient(ellipse at 76% 110%, rgba(112, 80, 180, .2), transparent 44%),
    linear-gradient(135deg, rgba(255, 255, 255, .94), rgba(246, 241, 255, .88) 58%, rgba(232, 221, 252, .82));
  box-shadow: var(--shadow);
}

.mine-landing::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 52% 100%, rgba(91, 54, 168, .16), transparent 42%),
    linear-gradient(115deg, transparent 0 38%, rgba(255, 255, 255, .36) 48%, transparent 62% 100%);
  pointer-events: none;
}

.auth-visual img,
.mine-landing img {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 18px;
  filter: drop-shadow(0 14px 20px rgba(55, 44, 101, .2));
}

.auth-visual h1,
.mine-landing h1 {
  max-width: 380px;
}

.mine-landing h1 {
  position: relative;
  z-index: 1;
  max-width: 300px;
  font-size: 28px;
  line-height: 1.16;
}

.auth-visual p,
.mine-landing p {
  position: relative;
  z-index: 1;
  max-width: 420px;
  margin-bottom: 0;
}

.auth-card {
  margin-top: 0;
}

.auth-modal[hidden] {
  display: none;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(38, 33, 77, .48);
  backdrop-filter: blur(12px);
}

.auth-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(100%, 800px);
  max-height: min(720px, calc(100vh - 36px));
  overflow: auto;
  border: 1px solid rgba(231, 199, 137, .58);
  border-radius: 24px;
  background:
    radial-gradient(circle at 100% 0%, rgba(142, 112, 205, .12), transparent 34%),
    linear-gradient(180deg, #fff, #fbf8ff);
  box-shadow: 0 28px 80px rgba(38, 33, 77, .34);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  color: var(--primary);
  font-size: 24px;
  font-weight: 800;
}

.auth-dialog-hero {
  position: relative;
  min-height: 188px;
  padding: 24px 132px 22px 20px;
  color: #fffaf2;
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, .72) 0 24px, transparent 25px),
    radial-gradient(ellipse at 75% 110%, rgba(217, 169, 79, .26), transparent 42%),
    linear-gradient(135deg, #4f3294, #7658b8 58%, #b9a7dd);
  overflow: hidden;
}

.auth-dialog-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 42% 106%, rgba(38, 33, 77, .22), transparent 42%),
    linear-gradient(115deg, transparent 0 38%, rgba(255, 255, 255, .14) 48%, transparent 60% 100%);
}

.auth-dialog-hero img {
  position: absolute;
  right: -8px;
  bottom: -14px;
  width: 144px;
  height: 144px;
  object-fit: cover;
  border-radius: 18px;
  filter: drop-shadow(0 14px 20px rgba(38, 33, 77, .28));
}

.auth-dialog-hero h1,
.auth-dialog-hero p {
  position: relative;
  z-index: 1;
}

.auth-dialog-form {
  padding: 18px;
}

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

.auth-entry-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.tool-card {
  min-height: 82px;
  padding: 13px;
  border: 1px solid rgba(231, 199, 137, .58);
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0%, rgba(142, 112, 205, .15), transparent 34%),
    linear-gradient(180deg, #fff, #fbf8ff);
  color: var(--text);
  text-align: left;
}

.tool-card strong,
.tool-card small {
  display: block;
}

.tool-card strong {
  font-size: 15px;
}

.tool-card small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.text-link {
  border: 0;
  background: transparent;
  color: var(--primary);
  font-weight: 800;
}

.profile-card {
  padding: 0;
}

.profile-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  cursor: pointer;
  list-style: none;
}

.profile-summary::-webkit-details-marker {
  display: none;
}

.profile-summary strong,
.profile-summary small {
  display: block;
}

.profile-summary strong {
  color: var(--text);
  font-size: 18px;
}

.profile-summary small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.summary-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.toggle-label {
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.chevron {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--primary);
  background: #f2eaff;
  transition: transform .18s ease;
}

.profile-card[open] .chevron {
  transform: rotate(180deg);
}

.profile-body {
  padding: 0 16px;
}

.profile-card > .tags,
.profile-card > .full {
  margin-left: 16px;
  margin-right: 16px;
}

.profile-card > .full {
  width: calc(100% - 32px);
  margin-bottom: 16px;
}

.spirit-hero {
  position: relative;
  min-height: 208px;
  padding: 28px 22px;
  border: 1px solid rgba(231, 199, 137, .68);
  border-radius: 24px;
  overflow: hidden;
  color: #fff8dc;
  text-align: center;
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 255, 255, .18), transparent 24%),
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, .46) 0 28px, transparent 29px),
    radial-gradient(ellipse at 50% 106%, rgba(38, 33, 77, .26), transparent 44%),
    linear-gradient(145deg, #4f3294 0%, #7658b8 55%, #c6b5e7 100%);
  box-shadow: var(--shadow);
}

.spirit-hero::before,
.spirit-hero::after {
  content: "";
  position: absolute;
  width: 168px;
  height: 168px;
  border: 1px solid rgba(255, 248, 220, .18);
  border-radius: 50%;
  top: 20px;
  left: calc(50% - 84px);
}

.spirit-hero::after {
  width: 236px;
  height: 236px;
  top: -14px;
  left: calc(50% - 118px);
}

.spirit-hero h1 {
  position: relative;
  z-index: 1;
  margin: 36px 0 8px;
  font-size: 46px;
  color: #fff8dc;
  text-shadow: 0 2px 0 rgba(38, 33, 77, .22), 0 10px 24px rgba(38, 33, 77, .3);
}

.spirit-hero p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(255, 248, 220, .9);
  font-weight: 800;
}

.moon-ring {
  position: absolute;
  z-index: 1;
  top: 22px;
  left: 50%;
  width: 52px;
  height: 52px;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--primary-deep);
  background: linear-gradient(145deg, #fffdf3, #e4c26a);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .45), 0 10px 24px rgba(38, 33, 77, .22);
}

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

.fortune-tile {
  min-height: 116px;
  border: 1px solid rgba(231, 199, 137, .58);
  border-radius: 22px;
  background:
    radial-gradient(circle at 18% 18%, rgba(142, 112, 205, .16), transparent 28%),
    linear-gradient(145deg, rgba(255, 255, 255, .96), rgba(251, 248, 255, .92));
  color: var(--primary-deep);
  box-shadow: 0 12px 28px rgba(55, 44, 101, .1);
  text-align: left;
  padding: 14px;
}

.fortune-tile strong,
.fortune-tile small {
  display: block;
}

.fortune-tile strong {
  margin-top: 8px;
  font-size: 20px;
}

.fortune-tile small {
  margin-top: 5px;
  color: #7c5c98;
}

.tile-icon,
.combo-orb {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: #fff7d6;
  background: radial-gradient(circle at 30% 25%, #f8e7b1, #7e22ce 58%, #4c1d72);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .28), 0 8px 18px rgba(88, 28, 135, .22);
  font-weight: 900;
}

.word-panel {
  background:
    radial-gradient(circle at 100% 0%, rgba(197, 168, 214, .22), transparent 32%),
    rgba(255, 255, 255, .96);
}

.lucky-number-card {
  margin-top: 14px;
  padding: 18px 12px;
  border: 1px solid rgba(197, 168, 214, .48);
  border-radius: 22px;
  background:
    radial-gradient(ellipse at 50% 84%, rgba(245, 218, 147, .35), transparent 42%),
    rgba(255, 255, 255, .9);
  box-shadow: 0 14px 30px rgba(88, 28, 135, .1);
  text-align: center;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 14px;
  color: #4c1d72;
  font-size: 22px;
  font-weight: 900;
}

.section-title::before,
.section-title::after {
  content: "";
  width: 42px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #d6b56d);
}

.section-title::after {
  background: linear-gradient(90deg, #d6b56d, transparent);
}

.crystal-balls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 12px 0;
}

.crystal {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  color: #fff;
  background:
    radial-gradient(circle at 32% 20%, rgba(255, 255, 255, .9), transparent 16%),
    radial-gradient(circle at 50% 60%, #a78bfa, #6d28d9 72%);
  border: 2px solid #d6b56d;
  box-shadow: inset 0 0 10px rgba(255, 255, 255, .38), 0 12px 16px rgba(88, 28, 135, .18);
  font-size: 22px;
  font-weight: 900;
}

.crystal.back {
  background:
    radial-gradient(circle at 32% 20%, rgba(255, 255, 255, .92), transparent 16%),
    radial-gradient(circle at 50% 60%, #d8d8ff, #4f63d9 76%);
}

.lucky-combos {
  background: rgba(255, 255, 255, .86);
}

.combo-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(197, 168, 214, .35);
  border-radius: 18px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 8px 20px rgba(88, 28, 135, .08);
}

.combo-row + .combo-row {
  margin-top: 10px;
}

.combo-main strong,
.combo-main small {
  display: block;
}

.combo-main strong {
  color: #4c1d72;
  font-size: 18px;
}

.combo-main small {
  margin-top: 4px;
  color: #7c5c98;
}

.mini-balls {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-left: 66px;
}

.mini-balls span {
  display: grid;
  place-items: center;
  min-width: 31px;
  height: 31px;
  border: 1px solid #d8b4fe;
  border-radius: 50%;
  color: #4c1d72;
  background: #faf5ff;
  font-weight: 800;
}

.mini-balls .mini-back {
  border-color: #b8b8ff;
  color: #303080;
  background: #f0f0ff;
}

.empty {
  padding: 14px;
  color: var(--muted);
  text-align: center;
}

@media (min-width: 680px) {
  .content { padding-top: 22px; }
  .home-grid {
    grid-template-columns: minmax(260px, .82fr) minmax(0, 1.18fr);
    align-items: start;
  }
  .form-grid { grid-template-columns: repeat(3, 1fr); }
  .auth-screen {
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
    align-items: stretch;
  }
  .auth-dialog {
    grid-template-columns: minmax(0, .95fr) minmax(340px, 1fr);
  }
  .auth-dialog-hero {
    min-height: 360px;
    padding: 36px 210px 30px 28px;
  }
  .auth-dialog-hero img {
    width: 220px;
    height: 220px;
  }
  .auth-visual {
    min-height: 360px;
    padding: 36px 210px 30px 28px;
  }
  .auth-visual img {
    width: 220px;
    height: 220px;
  }
  .tool-grid { grid-template-columns: repeat(4, 1fr); }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .performance-grid { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 34px; }
  .hero {
    min-height: 220px;
    padding-right: 210px;
  }
  .combo-row {
    grid-template-columns: 58px minmax(0, 1fr) auto;
  }
  .mini-balls {
    grid-column: auto;
    padding-left: 0;
    justify-content: flex-end;
  }
}

.web-pc .home-grid {
  grid-template-columns: minmax(340px, .86fr) minmax(0, 1.14fr);
  align-items: start;
}

.web-pc .form-grid {
  grid-template-columns: repeat(3, 1fr);
}

.web-pc .tool-grid {
  grid-template-columns: repeat(4, 1fr);
}

.web-pc .metric-grid,
.web-pc .performance-grid {
  grid-template-columns: 1fr 1fr;
}

.web-pc h1 {
  font-size: 34px;
}

.web-pc .hero {
  min-height: 246px;
  padding-right: 250px;
}

@media (max-width: 679px) {
  .page[data-page="history"] {
    padding-top: 28px;
  }

  .page[data-page="history"] > .page-title,
  .page[data-page="history"] > .compact-head,
  .page[data-page="history"] > .panel {
    display: none;
  }

  .draw-mobile-head {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) 58px;
    gap: 10px;
    align-items: start;
    margin: 4px 10px 24px;
  }

  .draw-mobile-head h1 {
    margin: 0;
    color: #33235f;
    font-size: 38px;
    line-height: 1.08;
    letter-spacing: 0;
  }

  .draw-mobile-head p {
    display: flex;
    gap: 14px;
    align-items: center;
    margin: 13px 0 0;
    color: #74669d;
    font-size: 21px;
    font-weight: 800;
  }

  .draw-mobile-head p span {
    color: #6e5c99;
    font-size: 17px;
  }

  .draw-nav-btn {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border: 0;
    border-radius: 20px;
    color: #5a35a0;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 12px 26px rgba(75, 56, 126, .16);
  }

  .draw-nav-btn svg {
    width: 34px;
    height: 34px;
    stroke-width: 2.4;
  }

  .draw-latest-shell {
    display: block;
    margin: 0 10px 26px;
  }

  .draw-latest-empty {
    padding: 24px;
    border: 1px solid rgba(218, 184, 125, .7);
    border-radius: 28px;
    color: #74669d;
    background: rgba(255, 255, 255, .76);
    text-align: center;
  }

  .draw-latest-card {
    position: relative;
    min-height: 286px;
    padding: 28px 22px 22px;
    overflow: hidden;
    border: 1px solid rgba(226, 190, 125, .88);
    border-radius: 28px;
    background:
      radial-gradient(circle at 84% 21%, rgba(255, 255, 248, .9) 0 28px, transparent 29px),
      radial-gradient(ellipse at 49% 71%, rgba(255, 255, 255, .78), transparent 50%),
      radial-gradient(ellipse at 18% 94%, rgba(100, 71, 167, .18), transparent 42%),
      radial-gradient(ellipse at 86% 94%, rgba(100, 71, 167, .2), transparent 40%),
      linear-gradient(180deg, rgba(244, 232, 255, .94), rgba(255, 255, 255, .92) 58%, rgba(236, 228, 255, .9));
    box-shadow: 0 18px 36px rgba(73, 55, 118, .16);
  }

  .draw-latest-card::before,
  .draw-latest-card::after {
    content: "";
    position: absolute;
    pointer-events: none;
  }

  .draw-latest-card::before {
    inset: 0;
    background:
      radial-gradient(ellipse at 14% 77%, rgba(255,255,255,.42), transparent 22%),
      radial-gradient(ellipse at 27% 78%, rgba(255,255,255,.32), transparent 20%),
      radial-gradient(ellipse at 78% 23%, rgba(252, 244, 217, .78) 0 12%, transparent 13%),
      linear-gradient(145deg, transparent 0 58%, rgba(90, 64, 153, .1) 59% 60%, transparent 61%),
      radial-gradient(ellipse at 6% 36%, rgba(102, 78, 156, .16), transparent 23%),
      radial-gradient(ellipse at 103% 71%, rgba(91, 65, 154, .18), transparent 30%),
      linear-gradient(180deg, transparent 48%, rgba(110, 91, 160, .09) 49%, transparent 70%);
  }

  .draw-latest-card::after {
    right: 34px;
    top: 47px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #fff9e8;
    box-shadow: -22px 0 0 5px rgba(244, 232, 255, .94);
  }

  .draw-latest-title,
  .draw-detail-cta {
    position: relative;
    z-index: 2;
    width: max-content;
    max-width: 100%;
    margin: 0 auto;
    border: 2px solid rgba(235, 192, 91, .92);
    border-radius: 22px;
    color: #fff;
    background:
      linear-gradient(180deg, rgba(255,255,255,.18), transparent 45%),
      linear-gradient(90deg, #5b3297, #6e3baa 48%, #4b2a87);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.22), 0 8px 16px rgba(61, 39, 115, .24);
    text-shadow: 0 2px 3px rgba(39, 23, 87, .45);
  }

  .draw-latest-title {
    padding: 8px 34px;
    font-size: 29px;
    font-weight: 900;
  }

  .draw-latest-title span {
    color: #f5d982;
    font-size: 36px;
  }

  .draw-latest-date {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 18px;
    color: #6f609d;
    font-size: 23px;
    font-weight: 800;
  }

  .draw-latest-numbers {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 1px 82px;
    gap: 10px;
    align-items: center;
    margin: 34px 6px 26px;
  }

  .draw-latest-zone {
    display: grid;
    align-items: center;
    min-height: 54px;
  }

  .draw-latest-divider {
    width: 1px;
    height: 76px;
    background: linear-gradient(180deg, transparent, rgba(198, 154, 87, .7), transparent);
  }

  .page[data-page="history"] .draw-latest-card .balls,
  .page[data-page="history"] .draw-history-card .balls {
    justify-content: center;
    gap: 4px;
    margin: 0;
  }

  .page[data-page="history"] .draw-latest-card .ball {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  .draw-detail-cta {
    display: block;
    min-width: 230px;
    min-height: 50px;
    padding: 8px 28px;
    border-style: solid;
    font-size: 21px;
    font-weight: 900;
  }

  .page[data-page="history"] #historyList {
    gap: 16px;
    margin: 0 10px;
  }

  .draw-history-card {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr) 70px 20px;
    gap: 6px;
    align-items: center;
    min-height: 86px;
    padding: 17px 14px;
    border: 1px solid rgba(222, 213, 232, .84);
    border-radius: 22px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 12px 26px rgba(71, 55, 116, .11);
  }

  .draw-history-meta {
    display: grid;
    gap: 8px;
    padding-right: 10px;
    border-right: 1px solid rgba(214, 206, 225, .76);
  }

  .draw-history-meta strong {
    color: #30275b;
    font-size: 18px;
  }

  .draw-history-meta span {
    color: #7b6d9c;
    font-size: 13px;
  }

  .draw-history-zone {
    display: grid;
    place-items: center;
    min-width: 0;
  }

  .draw-history-card .ball {
    width: 27px;
    height: 27px;
    font-size: 13px;
  }

  .draw-history-card .back-zone {
    padding-left: 10px;
    border-left: 1px solid rgba(214, 206, 225, .76);
  }

  .draw-history-chevron {
    display: grid;
    place-items: center;
    color: #5d31a4;
  }

  .draw-history-chevron svg {
    width: 28px;
    height: 28px;
    stroke-width: 2.6;
  }

  .page[data-page="history"] #loadMoreHistory {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: calc(100% - 76px);
    min-height: 58px;
    margin: 28px auto 8px;
    border: 1px solid rgba(230, 185, 122, .8);
    border-radius: 999px;
    color: #5c4b89;
    background: rgba(255, 255, 255, .76);
    box-shadow: 0 8px 20px rgba(71, 55, 116, .08);
    font-size: 20px;
    font-weight: 900;
  }

  .draw-detail-dialog {
    align-self: end;
    width: 100%;
    max-height: 86vh;
    border-radius: 28px 28px 0 0;
    background: linear-gradient(180deg, #fff, #fbf7ff);
  }

  .draw-detail-panel {
    display: grid;
    gap: 14px;
    padding: 26px 18px 20px;
  }

  .draw-detail-panel header p {
    margin: 0;
    color: #352764;
    font-size: 22px;
    font-weight: 900;
  }

  .draw-detail-panel header strong {
    display: block;
    margin-top: 4px;
    color: #7a6b9f;
  }

  .draw-detail-number-card,
  .draw-detail-stats,
  .draw-prize-list {
    border: 1px solid rgba(222, 213, 232, .82);
    border-radius: 20px;
    background: rgba(255,255,255,.82);
  }

  .draw-detail-number-card {
    display: grid;
    gap: 12px;
    padding: 14px;
  }

  .draw-detail-number-card span {
    display: block;
    margin-bottom: 5px;
    color: #5e5289;
    font-weight: 900;
  }

  .draw-detail-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 12px;
  }

  .draw-detail-stats span {
    display: grid;
    gap: 3px;
    color: #897da5;
    font-size: 12px;
  }

  .draw-detail-stats b {
    color: #352764;
    font-size: 14px;
  }

  .draw-prize-list {
    max-height: 250px;
    overflow: auto;
    padding: 8px;
  }

  .draw-prize-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px 12px;
    padding: 10px 6px;
    border-bottom: 1px solid rgba(222, 213, 232, .72);
  }

  .draw-prize-row:last-child {
    border-bottom: 0;
  }

  .draw-prize-row strong {
    color: #352764;
  }

  .draw-prize-row span,
  .draw-prize-row em {
    color: #7a6b9f;
    font-style: normal;
  }

  .draw-detail-loading {
    padding: 32px 18px;
    color: #6f609d;
    text-align: center;
  }
}

@media (max-width: 679px) {
  body {
    padding-bottom: 0;
  }
  html, body {
    background:
      radial-gradient(ellipse at 90px 0, rgba(231, 199, 137, .08), transparent 28%),
      radial-gradient(ellipse at 85% 0, rgba(109, 54, 200, .08), transparent 24%),
      linear-gradient(135deg, rgba(109, 54, 200, .032) 1px, transparent 1px),
      linear-gradient(180deg, #fffafe 0%, #fbf8ff 48%, #f7f2fd 100%);
    background-size: auto, auto, 34px 34px, auto;
  }
  .chrome-top .tabs {
    display: none;
  }
  .quick-switch {
    display: none;
  }
  .topbar {
    padding: 16px 22px 14px;
  }
  .brand {
    gap: 7px;
    font-size: 20px;
  }
  .brand i {
    height: 22px;
  }
  .brand strong {
    font-size: 19px;
  }
  .subtitle {
    margin-top: 4px;
    font-size: 10px;
  }
  .icon-btn {
    width: 52px;
    height: 52px;
    border-radius: 15px;
    color: var(--primary);
    background: rgba(255, 255, 255, .86);
    box-shadow: 0 10px 24px rgba(55, 44, 101, .12);
  }
  .content {
    padding: 0 13px calc(82px + env(safe-area-inset-bottom));
  }
  .bottom-tabs {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(231, 199, 137, .66);
    border-radius: 28px 28px 0 0;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(18px);
    box-shadow: 0 -12px 30px rgba(55, 44, 101, .12);
  }
  .bottom-tabs .tab {
    min-height: 68px;
    padding: 6px 2px;
    border-radius: 18px;
    background: transparent;
    color: #8980aa;
    font-size: 13px;
    font-weight: 800;
  }
  .bottom-tabs .tab-icon {
    display: grid;
    place-items: center;
    font-size: 31px;
  }
  .bottom-tabs .tab-icon svg {
    width: 1em;
    height: 1em;
  }
  .bottom-tabs .tab.active {
    background: transparent;
    color: var(--primary);
    box-shadow: none;
  }
  .bottom-tabs .tab.active .tab-icon {
    color: var(--primary);
    filter: drop-shadow(0 2px 0 rgba(217, 169, 79, .65));
  }
  .bottom-tabs .tab.active::after {
    content: "";
    width: 28px;
    height: 4px;
    border-radius: 999px;
    background: var(--primary);
  }
  .page[data-page="home"] {
    padding-top: 0;
  }
  .page[data-page="home"] .hero {
    min-height: 178px;
    margin-top: 10px;
    padding: 34px 24px 22px;
    border-radius: 24px;
    background:
      radial-gradient(circle at 50% 12%, rgba(255, 255, 255, .94) 0 17px, transparent 18px),
      radial-gradient(circle at 36% 15%, rgba(255, 255, 255, .7) 0 10px, transparent 11px),
      radial-gradient(circle at 62% 17%, rgba(255, 255, 255, .55) 0 11px, transparent 12px),
      radial-gradient(circle at 80% 22%, rgba(217, 169, 79, .28), transparent 17%),
      linear-gradient(180deg, rgba(255,255,255,.16), transparent 38%),
      linear-gradient(135deg, #5b3a9f 0%, #795db5 48%, #b8a5da 100%);
    box-shadow: 0 18px 36px rgba(91, 54, 168, .24);
  }
  .page[data-page="home"] .hero::before {
    background:
      radial-gradient(ellipse at 20% 103%, rgba(48, 35, 111, .28), transparent 38%),
      radial-gradient(ellipse at 72% 103%, rgba(48, 35, 111, .24), transparent 42%),
      linear-gradient(180deg, transparent 58%, rgba(52, 42, 112, .2) 59%, transparent 76%),
      linear-gradient(115deg, transparent 0 36%, rgba(255,255,255,.12) 47%, transparent 61%);
  }
  .page[data-page="home"] .hero::after {
    right: -24px;
    bottom: 18px;
    width: 140px;
    height: 70px;
    border-radius: 0;
    background:
      linear-gradient(130deg, transparent 0 18%, rgba(231, 199, 137, .78) 19% 22%, transparent 23% 100%),
      linear-gradient(0deg, transparent 0 48%, rgba(255,255,255,.18) 49% 100%);
  }
  .page[data-page="home"] .hero h1 {
    max-width: none;
    margin: 8px 0 8px;
    color: #fffaf2;
    font-size: 38px;
    line-height: 1.04;
    white-space: nowrap;
  }
  .page[data-page="home"] .hero .eyebrow,
  .page[data-page="home"] .hero p {
    color: rgba(255,255,255,.94);
  }
  .hero-pills {
    gap: 7px;
    margin-top: 14px;
  }
  .hero-pills span {
    min-height: 28px;
    padding: 0 10px;
    font-size: 12px;
  }
  .hero-pills .hero-draw-issue {
    min-height: 30px;
    color: #fffaf2;
    font-size: 13px;
  }
  .hero-pills .hero-draw-balls {
    display: flex;
    flex: 1 1 100%;
    gap: 6px;
    justify-content: flex-start;
    min-height: 38px;
    padding: 0;
    border: 0;
    background: transparent;
  }
  .hero-draw-balls b {
    display: grid;
    place-items: center;
    width: 31px;
    height: 31px;
    border-radius: 50%;
    color: #fff;
    background: radial-gradient(circle at 35% 25%, #ffd5e9, #c4367d 58%, #82154d);
    box-shadow: 0 7px 14px rgba(59, 42, 110, .2);
    font-size: 13px;
    font-style: normal;
    font-weight: 900;
  }
  .hero-draw-balls b.back {
    background: radial-gradient(circle at 35% 25%, #d7d5ff, #6868dc 58%, #30309a);
  }
  .hero-draw-balls i {
    display: grid;
    place-items: center;
    color: #fffaf2;
    font-style: normal;
    font-weight: 900;
  }
  .home-overview-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 10px 3px -3px;
  }
  .home-overview-meta span {
    min-height: 26px;
    padding: 5px 9px;
    border: 1px solid rgba(188, 172, 220, .42);
    border-radius: 999px;
    color: #6d5fa0;
    background: rgba(255, 255, 255, .72);
    font-size: 11px;
  }
  .page[data-page="home"] .prediction-card {
    position: relative;
    margin-top: 18px;
    padding: 20px 20px 16px;
    overflow: hidden;
    border: 1px solid rgba(231, 199, 137, .84);
    border-radius: 24px;
    background:
      radial-gradient(ellipse at 50% 110%, rgba(142, 112, 205, .14), transparent 44%),
      linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(255, 253, 255, .94));
    box-shadow: 0 16px 34px rgba(55, 44, 101, .12);
  }
  .page[data-page="home"] .prediction-card::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 52px;
    pointer-events: none;
    background: radial-gradient(ellipse at 20% 100%, rgba(142,112,205,.18), transparent 45%),
      radial-gradient(ellipse at 82% 100%, rgba(142,112,205,.14), transparent 42%);
  }
  .prediction-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid rgba(231, 199, 137, .34);
    padding-bottom: 10px;
  }
  .prediction-head strong,
  .prediction-head em {
    color: var(--primary-deep);
    font-family: Georgia, "Microsoft YaHei", serif;
    font-size: 30px;
    font-style: normal;
    font-weight: 900;
  }
  .prediction-head em {
    font-size: 36px;
  }
  .home-latest-head {
    align-items: end;
  }
  .home-latest-head small {
    display: block;
    margin-top: 4px;
    color: #786ca1;
    font-size: 13px;
    font-weight: 800;
  }
  .home-latest-head em {
    font-size: 19px;
    white-space: nowrap;
  }
  .prediction-zones {
    position: relative;
    z-index: 1;
    grid-template-columns: minmax(0, 1fr) 1px auto;
    gap: 14px;
    margin-top: 16px;
  }
  .prediction-divider {
    width: 1px;
    height: 76px;
    background: linear-gradient(180deg, transparent, rgba(231,199,137,.86), transparent);
  }
  .prediction-zone-back {
    min-width: 84px;
  }
  .prediction-zones small {
    margin: 0 0 6px;
    color: var(--primary-deep);
    font-size: 15px;
  }
  .prediction-zones .balls {
    gap: 6px;
    margin: 0;
    flex-wrap: nowrap;
  }
  .prediction-zones .ball {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }
  .home-latest-zones {
    grid-template-columns: minmax(0, 1fr) 1px auto;
    margin-top: 17px;
  }
  .home-latest-zones .balls {
    gap: 8px;
  }
  .home-latest-meta {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    justify-content: center;
    margin-top: 14px;
  }
  .home-latest-meta span {
    padding: 5px 9px;
    border: 1px solid rgba(188, 172, 220, .44);
    border-radius: 999px;
    color: #65568d;
    background: rgba(255,255,255,.78);
    font-size: 12px;
    font-weight: 800;
  }
  .prediction-algo {
    position: relative;
    z-index: 1;
    margin: 14px 0 0;
    color: #4b3c7e;
    text-align: center;
    font-size: 16px;
    font-weight: 800;
  }
  .prediction-risk {
    position: relative;
    z-index: 1;
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 11px;
    text-align: center;
  }
  .quick-dock {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
  }
  .quick-entry {
    min-height: 80px;
    padding: 11px 6px 10px;
    border-color: rgba(231, 199, 137, .76);
    border-radius: 16px;
    background: rgba(255, 255, 255, .82);
    text-align: center;
  }
  .quick-icon {
    display: grid;
    place-items: center;
    margin: 0 auto 5px;
    color: var(--primary-deep);
    font-size: 31px;
  }
  .quick-entry strong {
    color: var(--primary-deep);
    font-size: 15px;
  }
  .quick-entry small {
    display: none;
  }
  .home-recommend-panel {
    margin-top: 20px;
    padding: 16px 12px 14px;
    border: 0;
    border-radius: 24px;
    background: rgba(255, 255, 255, .76);
    box-shadow: 0 14px 36px rgba(55, 44, 101, .1);
  }
  .home-recommend-panel .section-head {
    padding: 0 4px;
    margin-bottom: 14px;
  }
  .home-recommend-panel h2 {
    color: var(--primary-deep);
    font-family: Georgia, "Microsoft YaHei", serif;
    font-size: 25px;
    font-weight: 900;
  }
  .change-batch {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 0 6px;
    color: #75689d;
    font-size: 14px;
  }
  .change-batch [data-home-icon] {
    font-size: 20px;
  }
  .home-combo-card {
    gap: 9px;
    padding: 13px 10px;
    border-color: rgba(188, 172, 220, .28);
    border-radius: 16px;
    background: rgba(255,255,255,.84);
    box-shadow: 0 8px 22px rgba(55,44,101,.08);
  }
  .home-combo-card .combo-meta {
    grid-template-columns: auto minmax(76px, 1fr) auto;
    gap: 8px;
  }
  .home-combo-card .combo-meta span {
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 15px;
  }
  .home-combo-card .combo-meta strong {
    color: var(--primary-deep);
    font-size: 15px;
  }
  .home-combo-card .combo-meta em {
    color: #c4367d;
    font-size: 19px;
  }
  .home-combo-card .combo-numbers {
    display: flex;
    flex-wrap: nowrap;
    gap: 7px;
    align-items: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .home-combo-card .combo-numbers .balls {
    display: flex;
    flex-wrap: nowrap;
    gap: 5px;
    margin: 0;
    flex: 0 0 auto;
  }
  .home-combo-card .combo-numbers .ball {
    width: 31px;
    height: 31px;
    font-size: 13px;
  }
  .home-combo-card .plus-mark {
    color: var(--primary-deep);
    font-size: 15px;
  }
  .home-combo-card .icon-action {
    width: 30px;
    height: 30px;
    border: 0;
    background: transparent;
    font-size: 21px;
  }
  .matrix-dialog {
    inset: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
    width: 100vw;
    border-radius: 0;
  }
  .matrix-toolbar {
    grid-template-columns: 1fr;
  }
  .zoom-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
  .matrix-stage {
    padding: 10px;
  }
  .mine-landing {
    min-height: 174px;
    padding: 18px 124px 18px 18px;
  }
  .mine-landing h1 {
    max-width: 210px;
    font-size: 24px;
  }
  .mine-landing p {
    max-width: 214px;
    font-size: 14px;
    line-height: 1.5;
  }
  .mine-landing img {
    width: 128px;
    height: 128px;
  }
  .trend-subnav {
    top: 65px;
    margin-left: -2px;
    margin-right: -2px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .matrix-table {
    min-width: 860px;
  }
  .matrix-table th,
  .matrix-table td {
    min-width: 24px;
    padding: 5px 3px;
    font-size: 11px;
  }
  .saved-filter,
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
  .saved-filter .field,
  .form-grid .wide {
    grid-column: 1 / -1;
  }
  .toast {
    bottom: calc(86px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 679px) {
  html[data-active-page="trend"] .topbar {
    display: none;
  }

  .page[data-page="trend"] {
    padding: 24px 10px 0;
  }

  .page[data-page="trend"] > .page-title {
    display: none;
  }

  .trend-mobile-head {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    margin: 18px 2px 22px;
  }

  .trend-mobile-head h1 {
    margin: 0;
    color: #30265c;
    font-size: 30px;
    line-height: 1.1;
    font-weight: 900;
  }

  .trend-mobile-head p {
    margin: 7px 0 0;
    color: #74669d;
    font-size: 17px;
    font-weight: 800;
  }

  .trend-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 92px;
    height: 54px;
    border: 0;
    border-radius: 20px;
    color: #49317e;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 12px 26px rgba(75, 56, 126, .16);
    font-size: 16px;
    font-weight: 900;
  }

  .trend-filter-btn svg {
    width: 22px;
    height: 22px;
  }

  .page[data-page="trend"] .trend-control-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(116px, auto);
    gap: 10px;
    align-items: center;
    margin: 0 0 16px;
    padding: 13px 14px;
    border-color: rgba(231, 199, 137, .62);
    border-radius: 22px;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 12px 28px rgba(71, 55, 116, .1);
  }

  .page[data-page="trend"] .trend-control-panel .section-head {
    display: none;
  }

  .page[data-page="trend"] .trend-control-panel .form-grid {
    display: block;
  }

  .page[data-page="trend"] .trend-control-panel .field {
    display: grid;
    grid-template-columns: auto minmax(94px, 1fr);
    gap: 8px;
    align-items: center;
  }

  .page[data-page="trend"] .trend-control-panel label {
    margin: 0;
    color: #30265c;
    font-size: 16px;
    font-weight: 900;
  }

  .page[data-page="trend"] .trend-control-panel select {
    min-height: 42px;
    padding: 0 30px 0 12px;
    border-radius: 999px;
    color: #5a35a0;
    background-color: #fbf8ff;
    font-size: 15px;
    font-weight: 900;
  }

  .page[data-page="trend"] #loadTrend {
    width: 116px;
    min-height: 42px;
    margin: 0;
    border: 1px solid rgba(202, 154, 79, .74);
    border-radius: 999px;
    color: #49317e;
    background: rgba(255, 255, 255, .72);
    box-shadow: 0 8px 18px rgba(75, 56, 126, .1);
    font-size: 15px;
  }

  .page[data-page="trend"] #trendResult {
    gap: 14px;
  }

  .trend-overview-card {
    position: relative;
    min-height: 174px;
    overflow: hidden;
    padding: 21px 18px;
    border: 1px solid rgba(226, 190, 125, .88);
    border-radius: 24px;
    background:
      radial-gradient(circle at 73% 18%, rgba(255, 255, 248, .9) 0 18px, transparent 19px),
      radial-gradient(circle at 66% 18%, rgba(255, 255, 248, .65) 0 10px, transparent 11px),
      radial-gradient(circle at 81% 18%, rgba(255, 255, 248, .6) 0 10px, transparent 11px),
      radial-gradient(ellipse at 17% 96%, rgba(100, 71, 167, .24), transparent 36%),
      radial-gradient(ellipse at 96% 98%, rgba(100, 71, 167, .22), transparent 32%),
      linear-gradient(180deg, rgba(244, 232, 255, .94), rgba(255,255,255,.9) 54%, rgba(236,228,255,.9));
    box-shadow: 0 16px 32px rgba(73, 55, 118, .15);
  }

  .trend-overview-card::before {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 70px;
    background:
      radial-gradient(ellipse at 20% 100%, rgba(85, 61, 151, .28), transparent 42%),
      radial-gradient(ellipse at 56% 100%, rgba(85, 61, 151, .16), transparent 40%),
      radial-gradient(ellipse at 96% 100%, rgba(85, 61, 151, .25), transparent 38%);
    pointer-events: none;
  }

  .trend-overview-card h2 {
    position: relative;
    z-index: 1;
    margin: 0 0 22px;
    color: #33265f;
    font-family: Georgia, "Microsoft YaHei", serif;
    font-size: 25px;
    font-weight: 900;
  }

  .trend-overview-metrics {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .trend-overview-metrics div {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding-right: 10px;
    border-right: 1px solid rgba(198, 154, 87, .35);
    text-align: center;
  }

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

  .trend-overview-metrics span {
    color: #5d5189;
    font-size: 15px;
    font-weight: 800;
  }

  .trend-overview-metrics strong {
    color: #51328f;
    font-family: Georgia, "Microsoft YaHei", serif;
    font-size: 23px;
    line-height: 1.1;
    white-space: nowrap;
  }

  .trend-overview-metrics div:last-child strong {
    font-size: 19px;
  }

  .trend-overview-line {
    position: absolute;
    right: 12px;
    bottom: 18px;
    z-index: 0;
    width: 150px;
    height: 52px;
    opacity: .76;
    pointer-events: none;
  }

  .trend-overview-line::before {
    content: "";
    position: absolute;
    inset: 22px 0 auto;
    height: 2px;
    background: linear-gradient(135deg, transparent 0 6%, rgba(217,169,79,.9) 7% 14%, transparent 15% 24%, rgba(217,169,79,.9) 25% 35%, transparent 36% 45%, rgba(217,169,79,.9) 46% 56%, transparent 57% 66%, rgba(217,169,79,.9) 67% 78%, transparent 79%);
    transform: skewY(-26deg);
  }

  .trend-overview-line i {
    position: absolute;
    width: 9px;
    height: 9px;
    border: 2px solid rgba(217,169,79,.86);
    border-radius: 50%;
    background: #fff;
  }

  .trend-overview-line i:nth-child(1) { left: 12px; bottom: 3px; }
  .trend-overview-line i:nth-child(2) { left: 48px; bottom: 18px; }
  .trend-overview-line i:nth-child(3) { left: 82px; bottom: 11px; }
  .trend-overview-line i:nth-child(4) { left: 116px; bottom: 30px; }
  .trend-overview-line i:nth-child(5) { right: 8px; bottom: 44px; }

  .trend-top-grid,
  .trend-dist-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .trend-top-card,
  .trend-dist-card,
  .trend-preview-card,
  .trend-frontback-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(226, 190, 125, .78);
    border-radius: 18px;
    background:
      radial-gradient(ellipse at 100% 100%, rgba(142,112,205,.12), transparent 38%),
      linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,253,255,.88));
    box-shadow: 0 12px 28px rgba(71, 55, 116, .09);
  }

  .trend-top-card {
    min-height: 176px;
    padding: 14px 12px;
  }

  .trend-top-card::after,
  .trend-dist-card::after {
    content: "";
    position: absolute;
    right: 14px;
    top: 22px;
    width: 46px;
    height: 24px;
    border-top: 2px solid rgba(226, 190, 125, .25);
    border-radius: 50%;
    pointer-events: none;
  }

  .trend-top-card h2,
  .trend-dist-card h2,
  .trend-preview-head h2 {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 5px;
    align-items: center;
    margin: 0 0 12px;
    color: #30265c;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 0;
  }

  .trend-top-card h2 span {
    flex: 0 0 auto;
    width: 13px;
    height: 13px;
    border-radius: 50%;
  }

  .trend-top-card h2 {
    white-space: nowrap;
  }

  .trend-top-card.hot h2 span {
    background: radial-gradient(circle at 35% 25%, #ffd5e9, #c4367d 58%, #82154d);
  }

  .trend-top-card.cold h2 span {
    background: radial-gradient(circle at 35% 25%, #d8d8ff, #6464db 58%, #303080);
  }

  .trend-top-list {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 8px;
  }

  .trend-top-row {
    display: grid;
    grid-template-columns: 31px 1fr 1fr;
    gap: 6px;
    align-items: center;
    color: #30265c;
    font-size: 14px;
    font-weight: 800;
  }

  .trend-top-row .ball {
    width: 31px;
    height: 31px;
    font-size: 14px;
  }

  .trend-dist-card {
    min-height: 170px;
    padding: 14px 12px;
  }

  .trend-dist-card h2 span {
    color: #6d50b8;
    font-size: 17px;
  }

  .trend-dist-list {
    display: grid;
    gap: 12px;
  }

  .trend-dist-row {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 44px;
    gap: 8px;
    align-items: center;
    color: #30265c;
    font-size: 14px;
  }

  .trend-dist-row strong,
  .trend-dist-row b {
    font-weight: 800;
  }

  .trend-dist-row i {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(76, 57, 126, .1);
  }

  .trend-dist-row em {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #6b38c9, #8c6bd0);
  }

  .trend-preview-card {
    display: block;
    padding: 14px 10px 10px;
    cursor: pointer;
  }

  .trend-frontback-card {
    padding: 14px 10px 12px;
  }

  .trend-preview-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 0 8px 8px;
  }

  .trend-preview-head h2 {
    margin: 0;
  }

  .trend-preview-head small {
    color: #74669d;
    font-size: 13px;
  }

  .trend-frontback-actions {
    display: flex;
    gap: 6px;
  }

  .trend-frontback-actions button {
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid rgba(217,169,79,.68);
    border-radius: 999px;
    color: #5a36a4;
    background: rgba(255,255,255,.76);
    font-size: 12px;
    font-weight: 900;
  }

  .trend-area-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .trend-area-panel {
    min-width: 0;
    padding: 10px;
    border: 1px solid rgba(214,206,225,.7);
    border-radius: 15px;
    background: rgba(255,255,255,.82);
  }

  .trend-area-head {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-bottom: 9px;
    color: #74669d;
    font-size: 11px;
    font-weight: 800;
  }

  .trend-area-head strong {
    flex-basis: 100%;
    color: #30265c;
    font-size: 15px;
    font-weight: 900;
  }

  .trend-area-list {
    display: grid;
    gap: 8px;
  }

  .trend-area-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 6px;
    align-items: center;
  }

  .trend-area-row > span {
    color: #30265c;
    font-size: 12px;
    font-weight: 900;
  }

  .trend-area-row .balls {
    flex-wrap: nowrap;
    gap: 3px;
    margin: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .trend-area-row .ball {
    width: 24px;
    height: 24px;
    font-size: 11px;
  }

  .trend-frontback-tip {
    margin: 10px 4px 0;
    color: #74669d;
    text-align: center;
    font-size: 12px;
    font-weight: 800;
  }

  .trend-legend {
    display: flex;
    gap: 10px;
    color: #74669d;
    font-size: 12px;
    font-weight: 800;
  }

  .trend-legend span {
    display: inline-flex;
    gap: 4px;
    align-items: center;
  }

  .trend-legend i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #b8adcd;
  }

  .trend-legend i.hit {
    background: #7b38ca;
  }

  .trend-preview-scroll {
    overflow-x: auto;
    border: 1px solid rgba(214, 206, 225, .82);
    border-radius: 14px;
    background: rgba(255,255,255,.82);
  }

  .trend-preview-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    border-collapse: collapse;
    color: #30265c;
    font-size: 11px;
  }

  .trend-preview-table th,
  .trend-preview-table td {
    width: 14px;
    height: 29px;
    border: 1px solid rgba(214, 206, 225, .62);
    text-align: center;
  }

  .trend-preview-table th:first-child,
  .trend-preview-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    width: 52px;
    background: #fff;
    font-weight: 900;
  }

  .matrix-preview-hit {
    display: inline-grid;
    place-items: center;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    color: transparent;
    background: radial-gradient(circle at 35% 25%, #ffd5e9, #c4367d 58%, #82154d);
    box-shadow: 0 2px 4px rgba(130,21,77,.18);
  }

  .matrix-preview-empty {
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #aaa0be;
  }

  html[data-active-page="pick"] .topbar {
    display: none;
  }

  .page[data-page="pick"] {
    padding: 18px 10px 0;
  }

  .page[data-page="pick"] > .page-title {
    display: none;
  }

  .pick-mobile-head {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) 56px;
    gap: 12px;
    align-items: center;
    margin: 18px 2px 18px;
  }

  .pick-mobile-head h1 {
    margin: 0;
    color: #30265c;
    font-size: 31px;
    line-height: 1.08;
    font-weight: 900;
  }

  .pick-mobile-head p {
    margin: 8px 0 0;
    color: #6b55b6;
    font-size: 17px;
    font-weight: 900;
  }

  .pick-refresh-btn {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border: 1px solid rgba(214, 168, 87, .8);
    border-radius: 17px;
    color: #5b35a3;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 12px 26px rgba(75, 56, 126, .16);
  }

  .pick-refresh-btn svg {
    width: 29px;
    height: 29px;
  }

  .page[data-page="pick"] .pick-hero {
    min-height: 166px;
    margin: 0 0 18px;
    padding: 78px 18px 18px;
    border-radius: 22px;
    border-color: rgba(231, 199, 137, .78);
    background:
      radial-gradient(circle at 50% 20%, rgba(255,255,255,.96) 0 20px, transparent 21px),
      radial-gradient(circle at 31% 24%, rgba(255,255,255,.76) 0 13px, transparent 14px),
      radial-gradient(circle at 62% 24%, rgba(255,255,255,.7) 0 14px, transparent 15px),
      radial-gradient(circle at 82% 22%, rgba(255,255,255,.62) 0 11px, transparent 12px),
      radial-gradient(ellipse at 22% 96%, rgba(49, 40, 103, .4), transparent 38%),
      radial-gradient(ellipse at 80% 96%, rgba(49, 40, 103, .36), transparent 38%),
      linear-gradient(180deg, rgba(255,255,255,.12), transparent 46%),
      linear-gradient(135deg, #5b3a9f 0%, #8870c8 54%, #d7c9ef 100%);
    text-align: center;
    box-shadow: 0 18px 34px rgba(83, 57, 143, .22);
  }

  .page[data-page="pick"] .pick-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
      radial-gradient(ellipse at 4% 100%, rgba(58, 45, 116, .55), transparent 33%),
      radial-gradient(ellipse at 96% 100%, rgba(58, 45, 116, .52), transparent 33%),
      linear-gradient(105deg, transparent 0 28%, rgba(255,255,255,.13) 40%, transparent 56%),
      repeating-radial-gradient(circle at 50% 23%, rgba(255,255,255,.18) 0 1px, transparent 2px 18px);
  }

  .page[data-page="pick"] .pick-hero::after {
    right: auto;
    left: 50%;
    top: 18px;
    bottom: auto;
    width: 154px;
    height: 50px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    transform: translateX(-50%);
    background:
      linear-gradient(90deg, transparent 0 18%, rgba(255,255,255,.84) 19% 21%, transparent 22% 32%, rgba(255,255,255,.92) 33% 36%, transparent 37% 48%, rgba(255,255,255,.96) 49% 53%, transparent 54% 66%, rgba(255,255,255,.82) 67% 70%, transparent 71% 100%);
  }

  .pick-hero-sky {
    position: absolute;
    inset: 0;
    pointer-events: none;
  }

  .pick-hero-sky i {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,.85);
    box-shadow: 0 0 18px rgba(255,255,255,.85);
  }

  .pick-hero-sky i:nth-child(1) { left: 18%; top: 29%; }
  .pick-hero-sky i:nth-child(2) { left: 33%; top: 21%; }
  .pick-hero-sky i:nth-child(3) { left: 70%; top: 25%; }
  .pick-hero-sky i:nth-child(4) { left: 82%; top: 36%; }
  .pick-hero-sky i:nth-child(5) { left: 16%; top: 56%; }
  .pick-hero-sky i:nth-child(6) { left: 88%; top: 57%; }

  .page[data-page="pick"] .pick-hero > div:not(.pick-hero-sky) {
    max-width: none;
  }

  .page[data-page="pick"] .pick-hero .eyebrow {
    display: none;
  }

  .page[data-page="pick"] .pick-hero h1 {
    margin: 0 0 10px;
    color: #30265c;
    font-family: Georgia, "Microsoft YaHei", serif;
    font-size: 34px;
    line-height: 1.04;
    font-weight: 900;
    text-shadow: 0 2px 0 rgba(255,255,255,.5), 0 10px 24px rgba(46,37,93,.18);
  }

  .page[data-page="pick"] .pick-hero p:last-child {
    color: #4d3f82;
    font-size: 14px;
    font-weight: 900;
  }

  .page[data-page="pick"] .pick-control-panel {
    margin-top: 0;
    padding: 17px 13px 16px;
    border-radius: 22px;
    border-color: rgba(217, 169, 79, .86);
    background:
      radial-gradient(ellipse at 88% 96%, rgba(142,112,205,.09), transparent 42%),
      linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,253,255,.88));
    box-shadow: 0 16px 34px rgba(71,55,116,.13);
  }

  .page[data-page="pick"] .pick-control-panel .section-head {
    display: none;
  }

  .page[data-page="pick"] .pick-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 8px;
  }

  .page[data-page="pick"] .pick-form-grid .field {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 5px;
    align-items: center;
    min-width: 0;
  }

  .page[data-page="pick"] .pick-form-grid label {
    margin: 0;
    color: #30265c;
    font-size: 14px;
    line-height: 1.15;
    font-weight: 900;
  }

  .page[data-page="pick"] .pick-form-grid input,
  .page[data-page="pick"] .pick-form-grid select {
    width: 100%;
    min-height: 45px;
    padding: 0 10px;
    border-radius: 15px;
    border-color: rgba(214, 206, 225, .72);
    color: #50318e;
    background-color: rgba(255,255,255,.8);
    box-shadow: inset 0 2px 8px rgba(54, 43, 100, .06), 0 8px 18px rgba(54,43,100,.07);
    font-size: 14px;
    font-weight: 800;
  }

  .page[data-page="pick"] .pick-form-grid select {
    padding-right: 24px;
  }

  .page[data-page="pick"] .pick-form-grid input::placeholder {
    color: #a79aca;
  }

  .range-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 3px;
    align-items: center;
    min-height: 45px;
    padding: 0 5px;
    border: 1px solid rgba(214, 206, 225, .72);
    border-radius: 15px;
    background: rgba(255,255,255,.8);
    box-shadow: inset 0 2px 8px rgba(54, 43, 100, .06), 0 8px 18px rgba(54,43,100,.07);
  }

  .page[data-page="pick"] .range-control input {
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    font-size: 14px;
    text-align: center;
  }

  .range-control span {
    color: #6d50b8;
    font-weight: 900;
  }

  .pick-action-row {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: 12px;
    margin-top: 18px;
  }

  .page[data-page="pick"] #runAnalysis {
    min-height: 54px;
    border-radius: 999px;
    color: #fff6df;
    background:
      radial-gradient(ellipse at 88% 50%, rgba(255,255,255,.2), transparent 30%),
      linear-gradient(135deg, #4b2b93, #7356bd);
    box-shadow: inset 0 0 0 2px rgba(226,190,125,.42), 0 12px 24px rgba(75,43,147,.22);
    font-family: Georgia, "Microsoft YaHei", serif;
    font-size: 19px;
    font-weight: 900;
  }

  .page[data-page="pick"] #resetPickConditions {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    border-radius: 999px;
    border-color: rgba(199, 158, 88, .72);
    color: #5b35a3;
    background: rgba(255,255,255,.7);
    font-size: 16px;
    font-weight: 900;
  }

  .page[data-page="pick"] #resetPickConditions svg {
    width: 22px;
    height: 22px;
  }

  .page[data-page="pick"] .quick-pick-panel,
  .page[data-page="pick"] #quickPickResult {
    display: none;
  }

  .pick-result-panel {
    margin-top: 22px;
  }

  .pick-result-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px 7px;
  }

  .pick-result-head h2 {
    margin: 0;
    color: #30265c;
    font-size: 26px;
    font-weight: 900;
  }

  .pick-result-head span {
    color: #7d6ea1;
    font-size: 13px;
    font-weight: 800;
  }

  .page[data-page="pick"] .pick-candidate-card {
    margin-top: 14px;
    padding: 15px 12px;
    border-radius: 16px;
    border-color: rgba(214, 206, 225, .62);
    background: rgba(255,255,255,.88);
    box-shadow: 0 10px 24px rgba(55,44,101,.1);
  }

  .page[data-page="pick"] .pick-candidate-head {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: 7px;
  }

  .page[data-page="pick"] .pick-candidate-head span {
    padding: 8px 9px;
    border-radius: 10px;
    color: #5b35c9;
    background: #eee6ff;
    font-size: 16px;
  }

  .page[data-page="pick"] .pick-candidate-head > div {
    min-width: 0;
  }

  .page[data-page="pick"] .pick-candidate-head strong {
    display: block;
    color: #30265c;
    font-size: 16px;
  }

  .page[data-page="pick"] .pick-candidate-head small {
    display: block;
    max-width: 150px;
    margin-top: 3px;
    overflow: hidden;
    color: #8a7aa9;
    font-size: 12px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .page[data-page="pick"] .pick-candidate-head em {
    color: #4d3292;
    font-size: 20px;
  }

  .pick-save-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 72px;
    min-height: 40px;
    padding: 0 8px;
    border-color: rgba(214, 206, 225, .72);
    border-radius: 12px;
    color: #5b35a3;
    background: rgba(255,255,255,.72);
    font-size: 15px;
    font-weight: 900;
  }

  .pick-save-btn svg {
    width: 18px;
    height: 18px;
  }

  .pick-number-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 1px auto;
    gap: 12px;
    align-items: center;
    margin-top: 6px;
  }

  .pick-number-row .balls {
    flex-wrap: nowrap;
    gap: 8px;
    margin: 0;
  }

  .pick-number-row .ball {
    width: 37px;
    height: 37px;
    font-size: 16px;
  }

  .pick-number-divider {
    height: 42px;
    background: linear-gradient(180deg, transparent, rgba(199,158,88,.7), transparent);
  }

  .pick-copy-btn {
    justify-self: start;
    min-height: 30px;
    padding: 0;
    border: 0;
    color: #8a7aa9;
    background: transparent;
    font-size: 12px;
  }

  .pick-empty {
    margin-top: 12px;
    border-radius: 16px;
  }

  .pick-disclaimer {
    padding: 0 12px 8px;
    font-size: 12px;
  }

  html[data-active-page="mine"] .topbar {
    display: none;
  }

  .page[data-page="mine"] {
    padding: 18px 10px 0;
  }

  .page[data-page="mine"] > .page-title {
    display: none;
  }

  .page[data-page="mine"] #luckyRoot {
    gap: 14px;
  }

  .mine-mobile-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 58px;
    gap: 12px;
    align-items: center;
    min-height: 64px;
  }

  .mine-mobile-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }

  .mine-mobile-brand strong {
    color: #6d37d0;
    font-size: 24px;
    font-style: italic;
    font-weight: 1000;
  }

  .mine-mobile-brand i {
    width: 1px;
    height: 28px;
    background: rgba(139, 123, 170, .45);
  }

  .mine-mobile-brand span {
    min-width: 0;
    color: #30265c;
    font-size: 22px;
    font-weight: 900;
    white-space: nowrap;
  }

  .mine-setting-btn {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border: 0;
    border-radius: 17px;
    color: #5b35a3;
    background: rgba(255,255,255,.92);
    box-shadow: 0 12px 26px rgba(75,56,126,.16);
  }

  .mine-setting-btn svg {
    width: 29px;
    height: 29px;
  }

  .mine-mobile-title {
    position: relative;
    min-height: 132px;
    padding: 10px 8px 0;
    overflow: hidden;
  }

  .mine-mobile-title h1 {
    margin: 0 0 9px;
    color: #30265c;
    font-family: Georgia, "Microsoft YaHei", serif;
    font-size: 48px;
    line-height: 1.05;
    font-weight: 900;
  }

  .mine-mobile-title p {
    margin: 0;
    color: #7a6aa0;
    font-size: 18px;
    font-weight: 800;
  }

  .mine-moonline {
    position: absolute;
    left: 48%;
    right: 18px;
    bottom: 8px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
  }

  .mine-moonline i {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #fff, #eadff4 60%, transparent 62%);
    box-shadow: 0 5px 12px rgba(75,56,126,.12);
  }

  .mine-user-card {
    position: relative;
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    min-height: 168px;
    overflow: hidden;
    padding: 22px 18px 46px;
    border: 1px solid rgba(217,169,79,.82);
    border-radius: 24px;
    background:
      radial-gradient(ellipse at 80% 96%, rgba(103,83,162,.2), transparent 42%),
      radial-gradient(ellipse at 20% 100%, rgba(103,83,162,.16), transparent 38%),
      linear-gradient(180deg, rgba(255,255,255,.95), rgba(247,243,255,.86));
    box-shadow: 0 16px 34px rgba(71,55,116,.13);
  }

  .mine-user-card::before {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 74px;
    background:
      radial-gradient(ellipse at 18% 100%, rgba(102,77,166,.26), transparent 48%),
      radial-gradient(ellipse at 68% 100%, rgba(102,77,166,.14), transparent 48%),
      linear-gradient(110deg, transparent 0 40%, rgba(255,255,255,.28) 52%, transparent 65%);
    pointer-events: none;
  }

  .mine-user-avatar {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    border: 2px solid rgba(217,169,79,.8);
    border-radius: 50%;
    color: #fff8df;
    background:
      radial-gradient(circle at 50% 34%, rgba(154,141,190,.78) 0 20px, transparent 21px),
      radial-gradient(ellipse at 50% 76%, rgba(154,141,190,.78) 0 36px, transparent 37px),
      rgba(255,255,255,.72);
    box-shadow: 0 10px 24px rgba(71,55,116,.13);
    font-size: 34px;
    font-weight: 900;
  }

  .mine-user-main {
    position: relative;
    z-index: 1;
    min-width: 0;
  }

  .mine-user-main h2 {
    margin: 0 0 9px;
    color: #30265c;
    font-size: 27px;
    font-weight: 900;
  }

  .mine-user-main p {
    margin: 0;
    color: #65598b;
    font-size: 15px;
    line-height: 1.45;
    font-weight: 800;
  }

  .mine-user-actions {
    position: relative;
    z-index: 1;
    grid-column: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .mine-user-actions button {
    min-height: 48px;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 900;
  }

  .mine-risk {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    min-height: 36px;
    margin: 0;
    padding: 8px 12px;
    color: #736692;
    background: rgba(255,255,255,.48);
    text-align: center;
    font-size: 13px;
    font-weight: 800;
  }

  .mine-settings-sheet {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: -4px;
    padding: 10px;
    border: 1px solid rgba(217,169,79,.62);
    border-radius: 20px;
    background: rgba(255,255,255,.88);
    box-shadow: 0 14px 30px rgba(71,55,116,.1);
  }

  .mine-settings-sheet[hidden] {
    display: none;
  }

  .page[data-page="mine"] #savedNumbersPanel,
  .page[data-page="mine"] #mineToolsPanel {
    margin-top: 18px;
    padding: 17px 14px;
    border-radius: 22px;
    border-color: rgba(217,169,79,.76);
    background:
      radial-gradient(ellipse at 94% 98%, rgba(142,112,205,.08), transparent 42%),
      linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,253,255,.9));
    box-shadow: 0 14px 30px rgba(71,55,116,.11);
  }

  .page[data-page="mine"] #savedNumbersPanel > .section-head:first-child h2,
  .page[data-page="mine"] .mine-saved-list-head h2 {
    color: #30265c;
    font-family: Georgia, "Microsoft YaHei", serif;
    font-size: 28px;
    font-weight: 900;
  }

  .page[data-page="mine"] #savedNumbersPanel > .section-head:first-child span {
    color: #8a7aa9;
  }

  .page[data-page="mine"] .saved-number-form {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .page[data-page="mine"] .saved-number-form .field {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
  }

  .page[data-page="mine"] .saved-number-form label,
  .page[data-page="mine"] .saved-filter label {
    margin: 0;
    color: #30265c;
    font-size: 15px;
    font-weight: 900;
  }

  .page[data-page="mine"] .saved-number-form input,
  .page[data-page="mine"] .saved-filter input,
  .page[data-page="mine"] .saved-filter select {
    min-height: 46px;
    border-radius: 14px;
    color: #50318e;
    background: rgba(255,255,255,.82);
    box-shadow: inset 0 2px 8px rgba(54,43,100,.05), 0 7px 16px rgba(54,43,100,.06);
    font-size: 15px;
    font-weight: 800;
  }

  .page[data-page="mine"] #saveManualNumber {
    min-height: 58px;
    margin-top: 16px;
    border-radius: 999px;
    color: #fff6df;
    background:
      radial-gradient(ellipse at 92% 50%, rgba(255,255,255,.16), transparent 30%),
      linear-gradient(135deg, #4b2b93, #7356bd);
    box-shadow: inset 0 0 0 2px rgba(226,190,125,.42), 0 12px 24px rgba(75,43,147,.22);
    font-family: Georgia, "Microsoft YaHei", serif;
    font-size: 22px;
    font-weight: 900;
  }

  .mine-saved-list-head {
    margin-top: 24px;
  }

  .page[data-page="mine"] .saved-filter {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: end;
  }

  .page[data-page="mine"] .saved-filter .field:nth-child(2),
  .page[data-page="mine"] .saved-filter .field:nth-child(3),
  .page[data-page="mine"] #checkSavedNumbers {
    display: none;
  }

  .page[data-page="mine"] .saved-filter .ghost {
    min-height: 46px;
    padding: 0 14px;
    border-radius: 13px;
    font-weight: 900;
  }

  .page[data-page="mine"] #savedStatsSummary .saved-check-card,
  .page[data-page="mine"] #savedCheckSummary .saved-check-card {
    margin-top: 12px;
    border-radius: 16px;
  }

  .mine-saved-row {
    margin-top: 12px;
    border: 1px solid rgba(214,206,225,.52);
    border-radius: 14px;
    background: rgba(255,255,255,.86);
    box-shadow: 0 8px 20px rgba(55,44,101,.08);
  }

  .mine-saved-row summary {
    display: grid;
    grid-template-columns: 78px minmax(70px, .7fr) minmax(0, 1.4fr) auto 18px;
    gap: 8px;
    align-items: center;
    padding: 11px 9px;
    list-style: none;
    cursor: pointer;
  }

  .mine-saved-row summary::-webkit-details-marker {
    display: none;
  }

  .mine-saved-issue strong,
  .mine-saved-issue span,
  .mine-saved-source {
    display: block;
  }

  .mine-saved-issue strong {
    color: #30265c;
    font-size: 17px;
    font-weight: 900;
  }

  .mine-saved-issue span,
  .mine-saved-source {
    color: #8a7aa9;
    font-size: 12px;
    font-weight: 800;
  }

  .mine-saved-numbers {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .mine-saved-numbers .balls {
    flex-wrap: nowrap;
    gap: 4px;
    margin: 0;
  }

  .mine-saved-numbers .ball {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .mine-saved-row .status-pill {
    white-space: nowrap;
  }

  .mine-saved-detail {
    padding: 0 10px 12px;
  }

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

  .mine-tool-card {
    display: grid;
    place-items: center;
    min-height: 96px;
    padding: 12px 6px;
    border: 1px solid rgba(217,169,79,.64);
    border-radius: 16px;
    color: #30265c;
    background: rgba(255,255,255,.82);
    box-shadow: 0 10px 22px rgba(71,55,116,.09);
    text-align: center;
  }

  .mine-tool-card span {
    display: grid;
    place-items: center;
    color: #6b50a6;
    font-size: 31px;
  }

  .mine-tool-card svg {
    width: 1em;
    height: 1em;
  }

  .mine-tool-card strong {
    margin-top: 6px;
    font-size: 16px;
    font-weight: 900;
  }

  .mine-tool-card small {
    margin-top: 3px;
    color: #8a7aa9;
    font-size: 11px;
    line-height: 1.25;
  }

  .mine-mobile-profile {
    margin-top: 0;
  }
}

@media (max-width: 380px) {
  .quick-dock {
    grid-template-columns: 1fr 1fr;
  }
  .hero {
    padding-right: 110px;
  }
  .hero h1 {
    font-size: 36px;
  }
  .tab {
    padding: 0 4px;
    font-size: 12px;
  }
  .account-btn {
    max-width: 88px;
    padding: 0 9px;
  }
  .auth-actions,
  .tool-grid {
    grid-template-columns: 1fr;
  }
  .auth-dialog {
    width: min(100%, 360px);
  }
  .auth-dialog-hero {
    padding-right: 118px;
  }
  .auth-dialog-hero img {
    width: 126px;
    height: 126px;
  }
  .auth-visual,
  .mine-landing {
    padding-right: 112px;
  }
  .auth-visual img,
  .mine-landing img {
    width: 116px;
    height: 116px;
  }
  .lucky-actions {
    grid-template-columns: 1fr;
  }
  .crystal {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }
  .saved-filter {
    grid-template-columns: 1fr 1fr;
  }
  .settings-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }
  .scan-actions {
    grid-template-columns: 1fr;
  }
  .setting-tile {
    min-height: 66px;
    padding: 10px 8px;
  }
  .setting-tile strong {
    font-size: 13px;
  }
  .saved-filter .field {
    grid-column: 1 / -1;
  }
}
