:root {
  --green: #14952b;
  --green-deep: #126923;
  --green-light: #eaf8ec;
  --orange: #ff6500;
  --blue: #159fe8;
  --blue-light: #e9f7ff;
  --red: #ef3f48;
  --yellow: #ffef6a;
  --ink: #30343a;
  --muted: #7b838d;
  --line: #d8e2e8;
  --panel: #ffffff;
  --page: #f2f5f7;
  --shadow: 0 8px 26px rgba(17, 33, 45, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #000;
}

body {
  min-height: 100vh;
  margin: 0;
  background: #000;
  color: var(--ink);
  font-family:
    "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Avenir, Helvetica,
    Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
select {
  font: inherit;
}

button {
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#app {
  position: relative;
  width: min(100%, 720px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--page);
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.65);
}

.nav {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 50%;
  width: min(100%, 720px);
  transform: translateX(-50%);
  background: #fff;
  box-shadow: 0 2px 9px rgba(0, 0, 0, 0.17);
}

.nav-spacer {
  height: 142px;
}

.header {
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  align-items: center;
  height: 38px;
  color: #fff;
  background: linear-gradient(90deg, #14952b, #29b93e 52%, #14952b);
}

.header-title {
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 2px;
}

.header-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 6px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.header-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: #fff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3.4;
}

.kind {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: start;
  padding: 6px 2px 5px;
  background: #fff;
}

.kind button {
  min-width: 0;
  padding: 0 0 2px;
  border: 0;
  background: transparent;
  color: #50545a;
  font-size: 12px;
  line-height: 20px;
  cursor: pointer;
  white-space: nowrap;
}

.kind button img {
  display: block;
  width: 45px;
  height: 45px;
  margin: 0 auto 1px;
  object-fit: contain;
}

.kind button.active {
  color: var(--orange);
  font-weight: 700;
}

.kind button.active span {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.select {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  border-top: 1px solid #e6e8eb;
  background: #f7fbfd;
}

.select label {
  min-width: 0;
  border-right: 1px solid #d8dee4;
}

.select label:last-child {
  border-right: 0;
}

.select select {
  width: 100%;
  height: 29px;
  padding: 2px 5px;
  border: 0;
  outline: none;
  background: #fff;
  color: #333;
  text-align: center;
  text-align-last: center;
  font-size: 13px;
}

.select select:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(21, 159, 232, 0.35);
}

.main {
  min-height: calc(100vh - 190px);
  outline: 0;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px 18px;
  color: #8b949d;
  background: #fff;
  border-top: 1px solid #e7ebef;
  font-size: 11px;
}

.loading-panel,
.empty-panel,
.error-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 300px;
  padding: 30px 24px;
  background: #fff;
  color: var(--muted);
}

.error-panel {
  flex-direction: column;
  color: #b24a4a;
  text-align: center;
}

.error-panel strong {
  color: #d43c45;
}

.retry-button {
  padding: 7px 22px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--green);
  cursor: pointer;
}

.loading-dot {
  width: 26px;
  height: 26px;
  border: 3px solid #dcefe0;
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.notice-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 13px;
  color: #806d1d;
  background: #fff7c9;
  border-bottom: 1px solid #ecde91;
  font-size: 12px;
}

.notice-bar button {
  border: 0;
  background: transparent;
  color: #6d5b0c;
  text-decoration: underline;
  cursor: pointer;
}

/* History */

.history-view {
  background: #fff;
}

.history-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 13px;
  color: #68727c;
  background: #f8fbfc;
  border-bottom: 1px solid #dce8ef;
  font-size: 12px;
}

.history-summary strong {
  color: var(--green-deep);
  font-size: 14px;
}

.history-list {
  background: #fff;
}

.history-item {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  align-items: center;
  min-height: 68px;
  padding: 8px 8px;
  border-bottom: 1px solid #91d9fb;
}

.history-item:nth-child(odd) {
  background: #fbfeff;
}

.history-meta {
  padding-left: 7px;
  color: #8a8f95;
  font-size: 13px;
  line-height: 20px;
}

.history-meta strong {
  display: block;
  margin-top: 3px;
  color: #383e44;
  font-size: 16px;
  letter-spacing: 0.6px;
}

.history-balls {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(36px, 1fr));
  gap: 5px;
  align-items: center;
}

.history-balls::after {
  position: absolute;
  top: 50%;
  left: calc(6 / 7 * 100% - 4px);
  color: #626b73;
  content: "+";
  font-size: 20px;
  font-weight: 500;
  transform: translate(-50%, -50%);
}

.number-cell {
  min-width: 0;
  text-align: center;
}

.number-ball {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  margin: 0 auto;
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 50%;
  color: #fff;
  box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

.number-caption {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: #555d65;
  font-size: 11px;
  line-height: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.number-cell:last-child .number-caption {
  color: #bd4a4a;
  font-weight: 700;
}

.tone-red {
  background: #e6383f;
}

.tone-blue {
  background: #279ce4;
}

.tone-green {
  background: #1ba93b;
}

.tone-gold {
  background: #b98b21;
}

.tone-brown {
  background: #8a613e;
}

.tone-slate {
  background: #617c94;
}

/* Shared range and attribute controls */

.range-tabs,
.attribute-tabs,
.position-tabs {
  display: grid;
  gap: 2px;
  background: #fff;
}

.range-tabs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 6px 8px;
}

.attribute-tabs {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  padding: 4px 6px;
}

.attribute-tabs button,
.range-tabs button,
.position-tabs button,
.filter-chip {
  min-height: 31px;
  border: 0;
  color: #fff;
  cursor: pointer;
}

.attribute-tabs button:nth-child(n + 1),
.range-tabs button {
  background: #f45f61;
}

.attribute-tabs button.active,
.position-tabs button.active {
  background: #fff;
  color: #ef5d00;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px #f2b890;
}

.position-tabs {
  grid-template-columns: 1.2fr repeat(3, minmax(0, 1fr));
  padding: 0 6px 4px;
}

.position-tabs button {
  background: #51b91e;
}

.position-select {
  width: 100%;
  min-height: 31px;
  border: 1px solid #dddddd;
  background: #fff;
  text-align: center;
  text-align-last: center;
}

/* Trend */

.trend-view {
  min-height: 500px;
  background: #fff;
}

.trend-view .attribute-tabs {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  padding-top: 5px;
}

.trend-view .attribute-tabs button {
  background: #f95e5f;
}

.trend-view .attribute-tabs button.active {
  background: #fff;
  color: #ff6500;
}

.trend-toolbar {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 5px;
  padding: 6px;
}

.trend-toolbar select,
.stat-toolbar select {
  height: 33px;
  border: 1px solid #dbdfe4;
  background: #fff;
  text-align: center;
  text-align-last: center;
}

.trend-shell {
  overflow-x: hidden;
  border-top: 1px solid #ad3131;
}

.trend-inner {
  width: 100%;
  min-width: 0;
  padding-bottom: 8px;
  background: #fff;
}

.trend-axis {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  min-height: 38px;
  border-top: 1px solid #b60909;
}

.trend-axis-label {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  font-size: 12px;
}

.trend-axis-values {
  position: relative;
  display: grid;
  align-items: center;
  color: #4d5964;
  font-size: 12px;
  text-align: center;
}

.trend-axis-values span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trend-body {
  position: relative;
}

.trend-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  height: 42px;
}

.trend-row:nth-child(odd) .trend-plot-area {
  background: #fff;
}

.trend-row:nth-child(even) .trend-plot-area {
  background: #e7f9ff;
}

.trend-row-meta {
  display: grid;
  place-content: center;
  color: #3f4851;
  font-size: 11px;
  line-height: 15px;
  text-align: center;
}

.trend-row-meta strong {
  color: #29313a;
  font-size: 12px;
}

.trend-plot-area {
  position: relative;
  border-left: 1px solid #d7e2e8;
}

.trend-row-ball {
  position: absolute;
  z-index: 2;
  top: 50%;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  color: #fff;
  box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
  font-size: 11px;
  font-weight: 700;
  transform: translate(-50%, -50%);
}

.trend-lines {
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  left: 86px;
  right: 0;
  width: calc(100% - 86px);
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.trend-lines polyline {
  fill: none;
  stroke: rgba(73, 99, 190, 0.48);
  stroke-width: 0.7;
  vector-effect: non-scaling-stroke;
}

/* Draw statistics */

.stats-view {
  background: #fff;
}

.stats-view .attribute-tabs {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  padding: 5px 6px;
}

.stats-view .attribute-tabs button {
  background: #51c01b;
}

.stats-view .attribute-tabs button.active {
  background: #fff;
  color: #ff6500;
}

.stat-toolbar {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 5px;
  padding: 6px;
}

.stat-sort {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 6px 20px 9px;
}

.stat-sort button {
  height: 30px;
  border: 1px solid #cbd0d5;
  background: linear-gradient(#fff, #eceff2);
  cursor: pointer;
}

.stat-sort button.active {
  border-color: #55aa21;
  color: #fff;
  background: #55aa21;
}

.stats-panel {
  margin: 0 8px 12px;
  padding: 2px;
  border: 2px solid #ec922b;
}

.stat-line {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  min-height: 58px;
  border-bottom: 1px solid #f5c16a;
}

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

.stat-key {
  padding: 7px 8px;
  border-right: 1px solid #f5c16a;
  text-align: center;
}

.stat-key .number-ball {
  width: 29px;
  height: 29px;
  font-size: 12px;
}

.stat-category {
  display: inline-block;
  min-width: 44px;
  padding: 4px 6px;
  border-radius: 4px;
  color: #fff;
  background: var(--green);
  font-size: 12px;
  font-weight: 600;
}

.stat-rate {
  margin-top: 4px;
  color: #5f6973;
  font-size: 12px;
}

.stat-detail {
  display: grid;
  align-content: center;
  gap: 6px;
  min-width: 0;
  padding: 7px 10px;
}

.stat-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.stat-bar {
  position: relative;
  flex: 1;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #f1f4f1;
}

.stat-bar > span {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #b7f28b, #15c915);
}

.stat-detail strong {
  flex: 0 0 auto;
  color: #262d34;
  font-size: 12px;
}

.latest-issue {
  overflow: hidden;
  color: #606a74;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Omission */

.omission-view {
  background: #fff;
}

.omission-view .attribute-tabs {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  padding: 5px 6px;
}

.omission-view .attribute-tabs button {
  background: #ffaf55;
}

.omission-view .attribute-tabs button.active {
  background: #fff;
  color: #ff6500;
}

.omission-panel {
  margin: 0 8px 14px;
  border: 2px solid #ff9a24;
}

.omission-help {
  padding: 9px;
  color: #626c75;
  font-size: 12px;
  text-align: center;
}

.omission-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.omission-table th,
.omission-table td {
  height: 44px;
  padding: 5px 4px;
  border: 1px solid #ffd77d;
  text-align: center;
  font-size: 12px;
  font-weight: 400;
}

.omission-table thead th {
  color: #3d4349;
  background: #fffaf0;
  font-weight: 600;
  cursor: pointer;
}

.omission-table tbody th {
  font-weight: 500;
}

.omission-table .number-ball {
  width: 28px;
  height: 28px;
  font-size: 12px;
}

.sort-arrow {
  display: inline-block;
  margin-left: 3px;
  color: #ff6b45;
  font-size: 10px;
}

/* Calendar */

.calendar-view {
  background:
    linear-gradient(rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.94)),
    repeating-linear-gradient(
      135deg,
      #f9f9f9,
      #f9f9f9 8px,
      #f1f1f1 8px,
      #f1f1f1 16px
    );
}

.calendar-banner {
  padding: 9px 12px;
  color: #b94c00;
  background: #fff32e;
  border-bottom: 2px solid #ffd84f;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
  font-weight: 700;
}

.calendar-summary {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  color: #59636c;
  background: rgba(255, 255, 255, 0.82);
  font-size: 12px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  margin: 0 8px;
  padding: 1px;
  background: #d9e0e5;
}

.calendar-weekday,
.calendar-day {
  min-height: 62px;
  background: #fff;
}

.calendar-weekday {
  display: grid;
  place-items: center;
  min-height: 31px;
  color: #49545e;
  background: #eef7fc;
  font-size: 12px;
  font-weight: 600;
}

.calendar-day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 5px;
  border: 0;
  color: #3f4851;
  text-align: left;
  cursor: default;
}

.calendar-day.empty {
  background: #f5f7f8;
}

.calendar-day .day-number {
  font-size: 13px;
  font-weight: 700;
}

.calendar-day .draw-count {
  align-self: center;
  margin-top: 7px;
  color: #b9c0c6;
  font-size: 10px;
}

.calendar-day.has-draw {
  color: #075a9b;
  background: #98e5ff;
  cursor: pointer;
}

.calendar-day.has-draw .draw-count {
  color: #075a9b;
  font-weight: 600;
}

.calendar-day.selected {
  outline: 3px solid #ff6a00;
  outline-offset: -3px;
}

.calendar-day.today .day-number {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin: -2px 0 0 -3px;
  border-radius: 50%;
  color: #fff;
  background: #ed3e43;
}

.calendar-detail {
  margin: 12px 8px 20px;
  padding: 10px;
  border: 1px solid #d6e1e8;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.calendar-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e3e8ec;
  font-size: 13px;
}

.calendar-detail-head strong {
  color: var(--green-deep);
}

.calendar-detail-balls {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  padding-top: 10px;
}

.calendar-detail-balls .number-caption {
  display: none;
}

/* Zodiac */

.zodiac-view {
  background: #fff;
}

.zodiac-panel {
  padding: 8px;
  background: #fffb76;
  border-bottom: 1px solid #efd746;
}

.filter-line {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  margin-bottom: 6px;
}

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

.filter-label {
  flex: 0 0 42px;
  color: #59614f;
  font-size: 12px;
  text-align: right;
}

.filter-chips {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.filter-chip {
  min-width: 40px;
  min-height: 27px;
  padding: 2px 8px;
  border: 1px solid #d9d6a5;
  border-radius: 3px;
  color: #42453f;
  background: rgba(255, 255, 255, 0.78);
}

.filter-chip.active {
  border-color: #e74c3c;
  color: #fff;
  background: #e74c3c;
}

.filter-chip.clear {
  color: #fff;
  background: #14952b;
}

.zodiac-record {
  padding: 6px 9px 7px;
  border-bottom: 1px solid #e3e7ea;
}

.zodiac-record-date {
  margin-bottom: 3px;
  color: #717983;
  font-size: 11px;
  text-align: left;
}

.zodiac-balls {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr)) 28px minmax(0, 1fr);
  gap: 3px;
  align-items: center;
}

.special-divider {
  color: #555e66;
  font-size: 12px;
  font-weight: 600;
}

.zodiac-ball {
  display: grid;
  grid-template-rows: minmax(28px, 1fr) 25px;
  min-height: 56px;
  overflow: hidden;
  border: 1px solid #7b7b7b;
  border-radius: 2px;
  color: #333;
  background: #fff;
  line-height: 1;
}

.zodiac-ball .z-number {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
}

.zodiac-ball .z-name {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 25px;
  border-top: 1px solid #c7c7c7;
  color: #222;
  background: #fff;
  font-size: 17px;
  font-weight: 500;
}

.zodiac-ball.dimmed {
  opacity: 0.23;
}

.zodiac-ball.matched {
  outline: 3px solid #ffd13d;
  outline-offset: -3px;
}

.zodiac-empty {
  padding: 70px 20px;
  color: #7f888f;
  text-align: center;
}

/* Expert page */

.expert-view {
  min-height: 620px;
  padding: 0 0 24px;
  background: #f6f8f9;
}

.expert-hero {
  padding: 28px 18px 18px;
  color: #fff;
  background: linear-gradient(145deg, #0b6222, #15952d 58%, #34b843);
  text-align: center;
}

.expert-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 10px;
  border-radius: 50%;
  color: #138126;
  background: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  font-size: 28px;
  font-weight: 800;
}

.expert-hero h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 1px;
}

.expert-hero p {
  margin: 7px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
}

.expert-route-list {
  display: grid;
  gap: 8px;
  padding: 15px;
}

.expert-route {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid #15952d;
  border-radius: 4px;
  color: #fff;
  background: linear-gradient(#2caf3c, #118724);
  box-shadow: 0 2px 5px rgba(20, 149, 43, 0.18);
  text-decoration: none;
}

.expert-route-index {
  color: #a6efaa;
  font-size: 13px;
  font-weight: 700;
}

.expert-route-text {
  font-size: 14px;
  font-weight: 600;
}

.expert-route-arrow {
  font-size: 18px;
}

.expert-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 15px;
}

.expert-card {
  padding: 14px;
  border: 1px solid #e0e5e8;
  border-radius: 8px;
  background: #fff;
  text-align: center;
  box-shadow: 0 3px 12px rgba(20, 38, 50, 0.06);
}

.expert-card strong {
  display: block;
  color: #1a7c2a;
}

.expert-card p {
  margin: 6px 0 11px;
  color: #7b838b;
  font-size: 11px;
}

.expert-card a {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  color: #fff;
  background: #15952d;
  font-size: 12px;
  text-decoration: none;
}

.expert-note {
  margin: 14px 15px 0;
  padding: 10px 12px;
  border-left: 3px solid #f0a32e;
  color: #746857;
  background: #fff8eb;
  font-size: 11px;
  line-height: 1.75;
}

@media (max-width: 560px) {
  .nav-spacer {
    height: 139px;
  }

  .kind button {
    font-size: 11px;
  }

  .kind button img {
    width: 40px;
    height: 40px;
  }

  .history-item {
    grid-template-columns: 91px minmax(0, 1fr);
    padding-inline: 5px;
  }

  .history-balls {
    gap: 2px;
  }

  .number-ball {
    width: 31px;
    height: 31px;
    font-size: 13px;
  }

  .number-caption {
    font-size: 10px;
  }

  .history-meta {
    padding-left: 2px;
    font-size: 11px;
  }

  .history-meta strong {
    font-size: 14px;
  }

  .stat-line {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .calendar-day {
    min-height: 53px;
    padding: 3px;
  }

  .calendar-day .draw-count {
    margin-top: 4px;
    font-size: 9px;
  }

  .zodiac-ball {
    grid-template-rows: minmax(25px, 1fr) 23px;
    min-height: 50px;
  }

  .zodiac-ball .z-number {
    font-size: 15px;
  }

  .zodiac-ball .z-name {
    min-height: 23px;
    font-size: 15px;
  }
}

@media (max-width: 390px) {
  .kind button img {
    width: 35px;
    height: 35px;
  }

  .kind button {
    font-size: 10px;
  }

  .history-item {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .number-ball {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .number-caption {
    font-size: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 2026 visual refresh */

:root {
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --card-shadow: 0 8px 24px rgba(22, 49, 66, 0.08);
  --card-shadow-strong: 0 14px 34px rgba(20, 58, 79, 0.13);
}

html {
  background:
    radial-gradient(circle at 50% -20%, #2d5568 0, #152c38 34%, #091118 82%),
    #091118;
}

body {
  overflow-x: hidden;
  background: transparent;
}

#app {
  width: min(100%, 760px);
  background:
    radial-gradient(circle at 100% 0, rgba(232, 250, 238, 0.9), transparent 28%),
    linear-gradient(180deg, #f7fafb 0%, #eef3f6 100%);
  box-shadow: 0 0 65px rgba(0, 0, 0, 0.68);
}

.nav {
  width: min(100%, 760px);
  overflow: hidden;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 30px rgba(10, 48, 31, 0.18);
  backdrop-filter: blur(16px);
}

.header {
  height: calc(44px + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  grid-template-columns: 44px 1fr 44px;
  background:
    radial-gradient(circle at 15% 0, rgba(255, 255, 255, 0.18), transparent 30%),
    linear-gradient(105deg, #117d27 0%, #1cac37 48%, #0e7c23 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.header-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 3px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.16);
}

.header-icon {
  width: 44px;
  height: 44px;
  padding: 9px;
  border-radius: 12px;
  transition:
    background 160ms ease,
    transform 160ms ease;
}

.header-icon:active {
  background: rgba(255, 255, 255, 0.14);
  transform: scale(0.94);
}

.kind {
  gap: 4px;
  padding: 7px 7px 6px;
  background: linear-gradient(180deg, #ffffff, #f8fbfc);
}

.kind button {
  position: relative;
  min-height: 64px;
  padding: 4px 1px 5px;
  border-radius: 13px;
  color: #5d6872;
  font-size: 11.5px;
  font-weight: 500;
  transition:
    color 160ms ease,
    background 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.kind button::after {
  position: absolute;
  right: 28%;
  bottom: 1px;
  left: 28%;
  height: 2px;
  border-radius: 99px;
  background: transparent;
  content: "";
}

.kind button img {
  width: 41px;
  height: 41px;
  margin-bottom: 1px;
  filter: drop-shadow(0 3px 4px rgba(19, 78, 43, 0.11));
}

.kind button.active {
  color: #e75b00;
  background: linear-gradient(180deg, #fff8f1, #fff);
  box-shadow:
    inset 0 0 0 1px rgba(255, 141, 56, 0.22),
    0 4px 12px rgba(255, 114, 22, 0.1);
  transform: translateY(-1px);
}

.kind button.active::after {
  background: linear-gradient(90deg, #ff9b31, #ff5b00);
}

.kind button.active img {
  filter: drop-shadow(0 4px 6px rgba(255, 105, 14, 0.19));
}

.select {
  gap: 6px;
  padding: 6px 8px 8px;
  border-top: 0;
  background: linear-gradient(180deg, #f8fbfc, #ffffff);
}

.select label {
  border: 0;
}

.select select {
  height: 34px;
  padding: 3px 8px;
  border: 1px solid #dce5e9;
  border-radius: var(--radius-sm);
  color: #33414b;
  background: linear-gradient(180deg, #ffffff, #f5f8f9);
  box-shadow:
    0 1px 0 #fff,
    inset 0 0 0 1px rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 600;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.select select:focus {
  border-color: #66b87a;
  box-shadow: 0 0 0 3px rgba(20, 149, 43, 0.12);
}

.nav-spacer {
  min-height: 0;
}

.main {
  padding: 10px 10px 28px;
}

.footer {
  padding: 13px 16px calc(18px + env(safe-area-inset-bottom));
  color: #8d98a0;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  font-size: 10.5px;
}

.history-view,
.trend-view,
.stats-view,
.omission-view,
.calendar-view,
.zodiac-view,
.expert-view {
  overflow: hidden;
  border: 1px solid rgba(211, 222, 228, 0.9);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--card-shadow);
}

.history-summary {
  min-height: 43px;
  padding: 10px 14px;
  color: #63717a;
  background:
    linear-gradient(90deg, rgba(222, 248, 229, 0.9), rgba(245, 251, 247, 0.92));
  border-bottom: 1px solid #dce9e0;
  font-size: 11.5px;
}

.history-summary strong {
  color: #13762a;
  font-size: 13px;
}

.history-list {
  padding: 8px;
  background: linear-gradient(180deg, #f7fafb, #fff);
}

.history-item {
  min-height: 74px;
  margin-bottom: 8px;
  padding: 9px 8px;
  border: 1px solid #dfe9ed;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #ffffff, #fbfdfe);
  box-shadow: 0 4px 12px rgba(28, 65, 82, 0.045);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.history-item:last-child {
  margin-bottom: 0;
}

.history-item:nth-child(odd) {
  background: linear-gradient(180deg, #ffffff, #f8fcfd);
}

.history-meta {
  padding-left: 4px;
  color: #8a969f;
  font-size: 12px;
}

.history-meta strong {
  margin-top: 5px;
  color: #24313a;
  font-size: 16px;
  font-weight: 750;
}

.history-balls {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
}

.history-balls::after {
  left: calc(6 / 7 * 100% - 2px);
  color: #87939b;
  font-size: 18px;
}

.number-ball {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background-image:
    radial-gradient(circle at 31% 23%, rgba(255, 255, 255, 0.55), transparent 22%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.16), transparent 55%);
  box-shadow:
    0 4px 8px rgba(25, 53, 69, 0.18),
    inset 0 -2px 4px rgba(0, 0, 0, 0.11);
  font-size: 14px;
  font-weight: 750;
  letter-spacing: 0.2px;
}

.number-cell:last-child .number-ball {
  box-shadow:
    0 0 0 2px #ffd66b,
    0 5px 11px rgba(151, 95, 0, 0.2),
    inset 0 -2px 4px rgba(0, 0, 0, 0.1);
}

.number-caption {
  margin-top: 3px;
  color: #6a7680;
  font-size: 10.5px;
  line-height: 14px;
}

.loading-panel,
.empty-panel,
.error-panel {
  min-height: 360px;
  border: 1px solid #dfe8ec;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(12px);
}

.retry-button {
  min-height: 36px;
  padding: 7px 24px;
  box-shadow: 0 5px 13px rgba(20, 149, 43, 0.2);
}

.notice-bar {
  margin-bottom: 8px;
  border: 1px solid #eadc9a;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(151, 119, 21, 0.06);
}

.attribute-tabs,
.range-tabs,
.position-tabs {
  gap: 5px;
  padding: 6px;
  background: #fff;
}

.attribute-tabs button,
.range-tabs button,
.position-tabs button,
.filter-chip {
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    filter 150ms ease;
}

.attribute-tabs button {
  min-height: 34px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 3px 7px rgba(34, 71, 46, 0.08);
}

.attribute-tabs button:active,
.range-tabs button:active,
.position-tabs button:active,
.filter-chip:active {
  transform: scale(0.97);
}

.trend-view .attribute-tabs button {
  background: linear-gradient(180deg, #ff797a, #ef585a);
}

.trend-view .attribute-tabs button.active {
  background: linear-gradient(180deg, #fffaf5, #fff);
  text-decoration: none;
  box-shadow:
    inset 0 0 0 1px #f3b48d,
    0 3px 9px rgba(190, 79, 36, 0.1);
}

.stats-view .attribute-tabs button {
  background: linear-gradient(180deg, #69c940, #46a91c);
}

.stats-view .attribute-tabs button.active {
  background: linear-gradient(180deg, #fffaf5, #fff);
  box-shadow:
    inset 0 0 0 1px #d7b367,
    0 3px 9px rgba(154, 118, 29, 0.1);
}

.omission-view .attribute-tabs button {
  background: linear-gradient(180deg, #ffbd6c, #f79835);
}

.omission-view .attribute-tabs button.active {
  background: linear-gradient(180deg, #fffaf5, #fff);
  box-shadow:
    inset 0 0 0 1px #e8b06e,
    0 3px 9px rgba(161, 98, 25, 0.1);
}

.trend-toolbar,
.stat-toolbar {
  gap: 7px;
  padding: 8px 10px 3px;
  background: #fff;
}

.trend-toolbar select,
.stat-toolbar select {
  height: 36px;
  border: 1px solid #dce5e9;
  border-radius: var(--radius-sm);
  color: #34434d;
  background: linear-gradient(180deg, #fff, #f7fafb);
  box-shadow: 0 2px 7px rgba(24, 59, 76, 0.05);
  font-size: 12px;
  font-weight: 600;
}

.trend-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid #e2eaee;
  border-radius: var(--radius-sm);
  color: #6d7881;
  background: #f7fafb;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.trend-shell {
  position: relative;
  margin: 0 7px 8px;
  overflow-x: hidden;
  border: 1px solid #e1e8ec;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.trend-inner {
  width: 100%;
  min-width: 0;
}

.trend-axis {
  position: sticky;
  z-index: 4;
  top: 0;
  min-height: 39px;
  border-top: 0;
  border-bottom: 1px solid #e0d2d2;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.trend-axis-label,
.trend-axis-values {
  color: #5c6972;
  font-size: 11px;
  font-weight: 600;
}

.trend-row-meta {
  color: #697680;
  font-size: 10.5px;
}

.trend-row-meta strong {
  color: #263640;
  font-size: 12px;
}

.trend-row-ball {
  width: 29px;
  height: 29px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow:
    0 4px 8px rgba(26, 52, 76, 0.2),
    inset 0 -2px 3px rgba(0, 0, 0, 0.1);
  font-size: 11px;
}

.trend-lines polyline {
  stroke: rgba(77, 105, 188, 0.44);
}

.stat-sort {
  gap: 10px;
  padding: 7px 12px 10px;
}

.stat-sort button {
  min-height: 34px;
  border: 1px solid #d8e2e6;
  border-radius: var(--radius-sm);
  color: #5c6870;
  background: linear-gradient(180deg, #fff, #f4f7f8);
  box-shadow: 0 2px 6px rgba(20, 52, 65, 0.04);
  font-size: 11.5px;
  font-weight: 600;
}

.stat-sort button.active {
  border-color: #4cab24;
  color: #fff;
  background: linear-gradient(180deg, #69c83f, #3f9e1c);
  box-shadow: 0 5px 12px rgba(49, 142, 24, 0.2);
}

.stats-panel {
  margin: 0 9px 11px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #e6e0ce;
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: 0 5px 15px rgba(97, 74, 24, 0.055);
}

.stat-line {
  grid-template-columns: 118px minmax(0, 1fr);
  min-height: 63px;
  border-bottom: 1px solid #f0e5d3;
  background: #fff;
}

.stat-line:nth-child(even) {
  background: #fcfdf9;
}

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

.stat-key {
  padding: 8px 7px;
  border-right: 1px solid #f0e5d3;
  background: linear-gradient(90deg, #fffcf6, #fff);
}

.stat-category {
  min-width: 46px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  box-shadow: 0 3px 6px rgba(27, 72, 40, 0.12);
  font-size: 11.5px;
}

.stat-rate {
  margin-top: 5px;
  color: #7b858d;
  font-size: 11px;
}

.stat-detail {
  gap: 7px;
  padding: 8px 11px;
}

.stat-bar {
  height: 12px;
  border: 1px solid #e6eee8;
  background: #eef3ef;
  box-shadow: inset 0 1px 2px rgba(38, 72, 49, 0.05);
}

.stat-bar > span {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.22), transparent 45%),
    linear-gradient(90deg, #a6ee79, #15bf23);
  box-shadow: 0 2px 5px rgba(20, 177, 43, 0.18);
}

.stat-detail strong {
  min-width: 32px;
  color: #26333b;
  font-size: 11.5px;
}

.latest-issue {
  color: #707b83;
  font-size: 10.5px;
}

.omission-panel {
  margin: 0 9px 11px;
  overflow: hidden;
  border: 1px solid #ead9bc;
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: 0 5px 15px rgba(102, 75, 24, 0.055);
}

.omission-help {
  padding: 10px;
  color: #8a7862;
  background: #fffaf1;
  border-bottom: 1px solid #f2e3cb;
  font-size: 11px;
}

.omission-table {
  font-variant-numeric: tabular-nums;
}

.omission-table th,
.omission-table td {
  height: 47px;
  padding: 5px 3px;
  border: 0;
  border-bottom: 1px solid #f1e4cf;
  font-size: 11.5px;
}

.omission-table thead th {
  position: sticky;
  z-index: 2;
  top: 0;
  color: #5e5244;
  background: #fff8ed;
  font-size: 11px;
}

.omission-table tbody tr:nth-child(even) {
  background: #fffdf9;
}

.omission-table tbody tr:last-child th,
.omission-table tbody tr:last-child td {
  border-bottom: 0;
}

.omission-table .number-ball {
  width: 29px;
  height: 29px;
  font-size: 11px;
}

.sort-arrow {
  color: #ee6a24;
  font-size: 9px;
}

.calendar-banner {
  padding: 11px 14px;
  color: #91651b;
  background:
    linear-gradient(90deg, #fff4a8, #fffbe0 50%, #fff3a5);
  border-bottom: 1px solid #eadc89;
  font-size: 11.5px;
  letter-spacing: 0.1px;
}

.calendar-summary {
  padding: 11px 14px 7px;
  color: #64717a;
  background: #fff;
  font-size: 11.5px;
}

.calendar-summary strong {
  color: #137c2b;
  font-size: 14px;
}

.calendar-grid {
  gap: 5px;
  margin: 0 9px;
  padding: 0;
  background: transparent;
}

.calendar-weekday,
.calendar-day {
  border-radius: 9px;
}

.calendar-weekday {
  min-height: 32px;
  color: #5e6b74;
  background: #f0f6f8;
  font-size: 11px;
}

.calendar-day {
  min-height: 66px;
  border: 1px solid #e5ecef;
  background: #fbfdfe;
  box-shadow: 0 2px 5px rgba(24, 54, 67, 0.025);
  transition:
    transform 150ms ease,
    box-shadow 150ms ease;
}

.calendar-day.empty {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.calendar-day .day-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  min-height: 22px;
  color: #4c5b64;
  font-size: 12px;
  font-weight: 700;
}

.calendar-day .draw-count {
  align-self: stretch;
  margin-top: 3px;
  color: #a8b1b7;
  font-size: 9.5px;
  text-align: center;
}

.calendar-day.has-draw {
  border-color: #8fdcf4;
  color: #075d8a;
  background:
    radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.7), transparent 35%),
    linear-gradient(145deg, #d9f5ff, #8fdcf5);
  box-shadow: 0 4px 10px rgba(35, 147, 190, 0.12);
}

.calendar-day.has-draw .day-number {
  color: #075d8a;
}

.calendar-day.has-draw .draw-count {
  color: #0870a3;
  font-weight: 700;
}

.calendar-day.selected {
  border-color: #ff7d24;
  outline: 0;
  box-shadow:
    0 0 0 2px #ff8b3d,
    0 6px 13px rgba(222, 91, 17, 0.18);
}

.calendar-day.today:not(.has-draw) .day-number {
  color: #fff;
  background: #ef555b;
}

.calendar-detail {
  margin: 12px 9px;
  padding: 12px;
  border: 1px solid #dce7eb;
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at 100% 0, rgba(224, 250, 236, 0.9), transparent 38%),
    linear-gradient(180deg, #ffffff, #fbfdfc);
  box-shadow: 0 7px 19px rgba(24, 59, 74, 0.08);
}

.calendar-detail-head {
  padding-bottom: 10px;
  border-bottom-color: #e7edef;
  font-size: 12px;
}

.calendar-detail-balls {
  gap: 5px;
  padding-top: 12px;
}

.zodiac-panel {
  padding: 10px;
  background:
    radial-gradient(circle at 8% 0, rgba(255, 255, 255, 0.75), transparent 34%),
    linear-gradient(145deg, #fff68e, #fffbcf 58%, #fff15f);
  border-bottom: 1px solid #eadb69;
}

.filter-line {
  align-items: flex-start;
  gap: 7px;
  margin-bottom: 8px;
}

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

.filter-label {
  flex-basis: 38px;
  padding-top: 5px;
  color: #756a37;
  font-size: 11px;
  font-weight: 700;
}

.filter-chips {
  gap: 5px;
}

.filter-chip {
  min-width: 38px;
  min-height: 28px;
  padding: 3px 8px;
  border: 1px solid rgba(177, 161, 74, 0.28);
  border-radius: 999px;
  color: #55533d;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 2px 5px rgba(130, 111, 25, 0.05);
  font-size: 11px;
}

.filter-chip.active {
  border-color: #e34b41;
  color: #fff;
  background: linear-gradient(180deg, #f46358, #df3f37);
  box-shadow: 0 4px 9px rgba(196, 48, 39, 0.2);
}

.filter-chip.clear {
  border-color: #15952d;
  color: #fff;
  background: linear-gradient(180deg, #25aa3c, #108823);
}

.zodiac-record {
  margin: 7px;
  padding: 7px;
  border: 1px solid #e0e8ec;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(29, 61, 77, 0.045);
}

.zodiac-record-date {
  padding: 1px 2px 5px;
  color: #6e7a83;
  font-size: 10.5px;
  font-weight: 600;
}

.zodiac-balls {
  gap: 4px;
}

.zodiac-ball {
  overflow: hidden;
  min-height: 49px;
  border: 1px solid rgba(75, 91, 96, 0.42);
  border-radius: 7px;
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.08);
  transition:
    opacity 150ms ease,
    filter 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.zodiac-ball .z-number {
  font-size: 14px;
  font-weight: 750;
}

.zodiac-ball .z-name {
  font-size: 14px;
}

.zodiac-ball.dimmed {
  opacity: 0.2;
  filter: saturate(0.45);
}

.zodiac-ball.matched {
  z-index: 1;
  outline: 2px solid #142129;
  outline-offset: 1px;
  box-shadow:
    0 0 0 4px #ffd646,
    0 5px 12px rgba(77, 57, 0, 0.18);
  transform: translateY(-1px);
}

.special-divider {
  color: #3f4c54;
  font-weight: 700;
}

.expert-view {
  background:
    radial-gradient(circle at 100% 0, rgba(188, 242, 204, 0.7), transparent 30%),
    #f9fbfa;
}

.expert-hero {
  position: relative;
  padding: 34px 20px 24px;
  background:
    radial-gradient(circle at 15% 0, rgba(255, 255, 255, 0.17), transparent 35%),
    linear-gradient(145deg, #075a1d, #14942d 55%, #35b94a);
}

.expert-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 12px;
  color: #0d7f22;
  background: linear-gradient(145deg, #fff, #e8f8eb);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.8);
  font-size: 30px;
}

.expert-hero h1 {
  font-size: 23px;
  font-weight: 750;
  letter-spacing: 2px;
}

.expert-route-list {
  gap: 9px;
  padding: 16px;
}

.expert-route {
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid rgba(13, 117, 33, 0.25);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.09), transparent 45%),
    linear-gradient(180deg, #30ae42, #118526);
  box-shadow:
    0 5px 13px rgba(19, 126, 38, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition:
    transform 150ms ease,
    box-shadow 150ms ease;
}

.expert-cards {
  gap: 11px;
  padding: 0 16px;
}

.expert-card {
  padding: 17px 13px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 100% 0, rgba(209, 246, 217, 0.8), transparent 36%),
    #fff;
  box-shadow: 0 6px 18px rgba(24, 61, 40, 0.08);
}

.expert-card a {
  min-width: 74px;
  padding: 7px 18px;
  background: linear-gradient(180deg, #28aa3d, #118725);
  box-shadow: 0 4px 10px rgba(20, 139, 42, 0.18);
}

.expert-note {
  margin: 15px 16px 0;
  border: 1px solid #eedfbe;
  border-left: 4px solid #e6a331;
  border-radius: 5px 10px 10px 5px;
  background: #fff9ee;
}

@media (hover: hover) and (pointer: fine) {
  .kind button:hover {
    color: #16872c;
    background: #f5fbf7;
  }

  .kind button.active:hover {
    color: #e75b00;
  }

  .history-item:hover {
    border-color: #bcd8e3;
    box-shadow: 0 8px 20px rgba(24, 66, 84, 0.09);
    transform: translateY(-1px);
  }

  .attribute-tabs button:hover,
  .stat-sort button:hover,
  .filter-chip:hover {
    filter: brightness(1.035);
  }

  .calendar-day.has-draw:hover {
    box-shadow: 0 7px 15px rgba(35, 147, 190, 0.18);
    transform: translateY(-1px);
  }

  .expert-route:hover {
    box-shadow: 0 9px 20px rgba(19, 126, 38, 0.24);
    transform: translateY(-1px);
  }
}

@media (max-width: 620px) {
  .nav {
    border-radius: 0 0 15px 15px;
  }

  .header {
    height: calc(43px + env(safe-area-inset-top));
    grid-template-columns: 42px 1fr 42px;
  }

  .header-title {
    font-size: 16.5px;
    letter-spacing: 2.5px;
  }

  .header-icon {
    width: 42px;
    height: 43px;
    padding: 9px;
  }

  .kind {
    gap: 2px;
    padding: 6px 5px 5px;
  }

  .kind button {
    min-height: 59px;
    padding-top: 3px;
    font-size: 10.5px;
  }

  .kind button img {
    width: 38px;
    height: 38px;
  }

  .select {
    gap: 4px;
    padding: 5px 6px 7px;
  }

  .select select {
    height: 32px;
    padding: 2px 4px;
    font-size: 11px;
  }

  .main {
    padding: 8px 8px 24px;
  }

  .history-view,
  .trend-view,
  .stats-view,
  .omission-view,
  .calendar-view,
  .zodiac-view,
  .expert-view {
    border-radius: 15px;
  }

  .history-summary {
    min-height: 40px;
    padding: 9px 11px;
    font-size: 10.5px;
  }

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

  .history-list {
    padding: 6px;
  }

  .history-item {
    grid-template-columns: 79px minmax(0, 1fr);
    min-height: 68px;
    margin-bottom: 6px;
    padding: 7px 5px;
    border-radius: 12px;
  }

  .history-meta {
    padding-left: 2px;
    font-size: 10px;
    line-height: 17px;
  }

  .history-meta strong {
    margin-top: 3px;
    font-size: 13px;
  }

  .history-balls {
    gap: 1px;
  }

  .number-ball {
    width: 31px;
    height: 31px;
    font-size: 12px;
  }

  .number-caption {
    margin-top: 2px;
    font-size: 9px;
    line-height: 12px;
  }

  .attribute-tabs {
    gap: 4px;
    padding: 5px;
  }

  .attribute-tabs button {
    min-height: 32px;
    padding-inline: 1px;
    font-size: 10.5px;
  }

  .trend-toolbar,
  .stat-toolbar {
    gap: 5px;
    padding: 7px 7px 2px;
  }

  .trend-toolbar select,
  .stat-toolbar select {
    height: 34px;
    font-size: 11px;
  }

  .trend-hint {
    padding-inline: 5px;
    font-size: 10px;
  }

  .trend-shell {
    margin: 0 6px 7px;
    border-radius: 9px;
  }

  .trend-inner {
    width: 100%;
    min-width: 0;
  }

  .stat-sort {
    gap: 8px;
    padding: 6px 9px 8px;
  }

  .stat-sort button {
    min-height: 32px;
    font-size: 10.5px;
  }

  .stats-panel,
  .omission-panel {
    margin: 0 7px 8px;
    border-radius: 11px;
  }

  .stat-line {
    grid-template-columns: 96px minmax(0, 1fr);
    min-height: 58px;
  }

  .stat-key {
    padding: 7px 5px;
  }

  .stat-rate {
    font-size: 10px;
  }

  .stat-detail {
    gap: 6px;
    padding: 7px 8px;
  }

  .latest-issue {
    font-size: 9.5px;
  }

  .omission-table th,
  .omission-table td {
    height: 43px;
    font-size: 10.5px;
  }

  .omission-table thead th {
    font-size: 10px;
  }

  .omission-table .number-ball {
    width: 27px;
    height: 27px;
  }

  .calendar-grid {
    gap: 3px;
    margin: 0 7px;
  }

  .calendar-weekday {
    min-height: 29px;
    border-radius: 7px;
    font-size: 10px;
  }

  .calendar-day {
    min-height: 56px;
    padding: 3px;
    border-radius: 7px;
  }

  .calendar-day .day-number {
    min-width: 19px;
    min-height: 19px;
    font-size: 11px;
  }

  .calendar-day .draw-count {
    margin-top: 1px;
    font-size: 8.5px;
  }

  .calendar-detail {
    margin: 9px 7px;
    padding: 9px;
    border-radius: 11px;
  }

  .calendar-detail-head {
    gap: 5px;
    font-size: 10.5px;
  }

  .calendar-detail-balls {
    gap: 3px;
    padding-top: 9px;
  }

  .zodiac-panel {
    padding: 8px;
  }

  .filter-line {
    gap: 5px;
    margin-bottom: 6px;
  }

  .filter-label {
    flex-basis: 32px;
    padding-top: 5px;
    font-size: 10px;
  }

  .filter-chips {
    gap: 4px;
  }

  .filter-chip {
    min-width: 34px;
    min-height: 26px;
    padding: 2px 7px;
    font-size: 10px;
  }

  .zodiac-record {
    margin: 5px;
    padding: 5px;
    border-radius: 10px;
  }

  .zodiac-record-date {
    padding-bottom: 4px;
    font-size: 9.5px;
  }

  .zodiac-balls {
    grid-template-columns: repeat(6, minmax(0, 1fr)) 20px minmax(0, 1fr);
    gap: 3px;
  }

  .zodiac-ball {
    min-height: 43px;
    border-radius: 6px;
  }

  .zodiac-ball .z-number {
    font-size: 12px;
  }

  .zodiac-ball .z-name {
    font-size: 12px;
  }

  .special-divider {
    font-size: 10px;
  }

  .expert-hero {
    padding: 28px 18px 21px;
  }

  .expert-icon {
    width: 56px;
    height: 56px;
    font-size: 26px;
  }

  .expert-hero h1 {
    font-size: 20px;
  }

  .expert-route-list {
    gap: 7px;
    padding: 12px;
  }

  .expert-route {
    min-height: 45px;
    border-radius: 10px;
  }

  .expert-cards {
    gap: 8px;
    padding: 0 12px;
  }

  .expert-card {
    padding: 14px 9px;
  }

  .expert-note {
    margin: 12px 12px 0;
  }
}

@media (max-width: 380px) {
  .header-title {
    font-size: 15.5px;
    letter-spacing: 2px;
  }

  .kind {
    padding-inline: 3px;
  }

  .kind button {
    font-size: 9.5px;
  }

  .kind button img {
    width: 34px;
    height: 34px;
  }

  .select {
    padding-inline: 4px;
  }

  .select select {
    font-size: 10px;
  }

  .main {
    padding-inline: 6px;
  }

  .history-item {
    grid-template-columns: 72px minmax(0, 1fr);
    padding-inline: 3px;
  }

  .history-meta {
    font-size: 9px;
  }

  .history-meta strong {
    font-size: 12px;
  }

  .number-ball {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }

  .number-caption {
    font-size: 8px;
  }

  .attribute-tabs button {
    font-size: 9.5px;
  }

  .stat-line {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .stat-category {
    min-width: 40px;
    padding-inline: 5px;
    font-size: 10px;
  }

  .calendar-day {
    min-height: 51px;
  }

  .calendar-day .draw-count {
    font-size: 8px;
  }

  .zodiac-balls {
    grid-template-columns: repeat(6, minmax(0, 1fr)) 15px minmax(0, 1fr);
    gap: 2px;
  }

  .zodiac-ball {
    min-height: 39px;
  }

  .zodiac-ball .z-number {
    font-size: 11px;
  }

  .zodiac-ball .z-name {
    font-size: 11px;
  }

  .expert-cards {
    grid-template-columns: 1fr;
  }
}

/* 后台可配置内容 */
.header {
  background: linear-gradient(
    90deg,
    var(--green-deep, #126923),
    var(--green, #14952b) 52%,
    var(--green-deep, #126923)
  );
}

.site-announcement {
  margin: 10px 12px 0;
  padding: 10px 13px;
  border: 1px solid #b9dff2;
  border-radius: 9px;
  color: #17628c;
  background: #eaf7ff;
  font-size: 13px;
  line-height: 1.65;
}

.site-announcement-success {
  border-color: #bde8c6;
  color: #217339;
  background: #edf9f0;
}

.site-announcement-warning {
  border-color: #f0d49b;
  color: #8e5c0b;
  background: #fff8e7;
}

.site-ad-carousel {
  position: relative;
  overflow: hidden;
  margin: 10px 12px 0;
  border: 1px solid #dce7ed;
  border-radius: 10px;
  background: #eef4f7;
  box-shadow: 0 4px 14px rgba(25, 56, 72, 0.07);
}

.site-ad-slide {
  display: none;
  width: 100%;
  min-height: 92px;
  max-height: 180px;
  aspect-ratio: 4 / 1;
  color: inherit;
  text-decoration: none;
}

.site-ad-slide.active {
  display: block;
}

.site-ad-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-ad-dots {
  position: absolute;
  z-index: 2;
  right: 10px;
  bottom: 8px;
  display: flex;
  gap: 5px;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(8, 25, 34, 0.36);
  pointer-events: none;
}

.site-ad-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
}

.site-ad-dots span.active {
  background: #fff;
}

.managed-page-header {
  margin: 10px 12px 0;
  padding: 15px 16px 14px;
  border: 1px solid #e1e8ed;
  border-radius: 10px;
  background:
    radial-gradient(circle at 100% 0, rgba(20, 149, 43, 0.12), transparent 38%),
    #fff;
  box-shadow: 0 4px 16px rgba(30, 54, 68, 0.06);
}

.managed-page-header h1 {
  margin: 0;
  color: #27343c;
  font-size: 19px;
  line-height: 1.35;
}

.managed-page-header p {
  margin: 6px 0 0;
  color: #77838d;
  font-size: 12px;
  line-height: 1.65;
}

/* 走势与遗漏合并栏目 */
.analysis-view {
  margin-top: 8px;
}

.analysis-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 10px 12px 4px;
  padding: 5px;
  border: 1px solid #dde7e1;
  border-radius: 11px;
  background: #f3f8f5;
}

.analysis-switch button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  color: #567064;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.analysis-switch button.active {
  color: #fff;
  background: linear-gradient(135deg, #1a9d45, #11752f);
  box-shadow: 0 4px 12px rgba(17, 117, 47, 0.22);
}

/* 重复对比 */
.compare-view {
  margin-top: 8px;
}

.compare-mode-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 10px 12px 0;
  padding: 5px;
  border: 1px solid #dde7e1;
  border-radius: 11px;
  background: #f3f8f5;
}

.compare-mode-switch button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  color: #567064;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.compare-mode-switch button.active {
  color: #fff;
  background: linear-gradient(135deg, #1a9d45, #11752f);
  box-shadow: 0 4px 12px rgba(17, 117, 47, 0.22);
}

.compare-result-panel {
  margin: 10px 12px 0;
  padding: 14px;
  border: 1px solid #dce8e1;
  border-radius: 12px;
  background:
    radial-gradient(circle at 100% 0, rgba(20, 149, 43, 0.12), transparent 34%),
    #fff;
  box-shadow: 0 6px 20px rgba(27, 65, 44, 0.07);
}

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

.compare-result-head div {
  display: grid;
  gap: 4px;
}

.compare-result-head strong {
  color: #24352b;
  font-size: 16px;
}

.compare-result-head span {
  color: #7b8b82;
  font-size: 12px;
}

.compare-result-head b {
  flex: none;
  padding: 5px 10px;
  border-radius: 999px;
  color: #157b33;
  background: #e9f8ee;
  font-size: 13px;
}

.compare-result-values {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  min-height: 56px;
  margin-top: 12px;
  padding: 11px;
  border: 1px dashed #d6e4db;
  border-radius: 10px;
  color: #7c8a82;
  background: #fbfdfb;
  font-size: 13px;
}

.compare-common-ball {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.compare-zodiac {
  min-width: 42px;
  padding: 7px 10px;
  border: 1px solid #bfd8c8;
  border-radius: 8px;
  color: #1e7540;
  background: #f1faf4;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.compare-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 11px;
}

.compare-action {
  min-height: 36px;
  padding: 6px 13px;
  border: 1px solid #bfd8c8;
  border-radius: 8px;
  color: #267344;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.compare-action.primary {
  color: #fff;
  border-color: #16853d;
  background: #16853d;
}

.compare-group-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 12px;
}

.compare-input-card {
  padding: 12px;
  border: 1px solid #dfe8e2;
  border-radius: 10px;
  background: #fff;
}

.compare-input-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.compare-input-card strong {
  color: #506359;
  font-size: 13px;
}

.compare-remove-group {
  border: 0;
  color: #a75a5a;
  background: transparent;
  font-size: 12px;
  cursor: pointer;
}

.compare-remove-group:disabled {
  color: #b8c1bc;
  cursor: default;
}

.compare-group-input {
  display: block;
  width: 100%;
  min-height: 70px;
  padding: 10px 11px;
  border: 1px solid #cedbd3;
  border-radius: 8px;
  color: #34463c;
  background: #fbfdfb;
  font: inherit;
  font-size: 13px;
  line-height: 1.65;
  resize: vertical;
  outline: none;
}

.compare-group-input:focus {
  border-color: #33a45a;
  box-shadow: 0 0 0 3px rgba(51, 164, 90, 0.12);
}

/* 选码助手 */
.picker-view {
  margin-top: 8px;
}

.picker-result-panel {
  position: sticky;
  z-index: 30;
  top: calc(var(--nav-height, 142px) + 8px);
  margin: 10px 12px 0;
  padding: 8px;
  max-height: calc(100vh - var(--nav-height, 142px) - 18px);
  max-height: calc(100dvh - var(--nav-height, 142px) - 18px);
  overflow: auto;
  border: 1px solid #dce8e1;
  border-radius: 9px;
  background:
    radial-gradient(circle at 100% 0, rgba(20, 149, 43, 0.12), transparent 34%),
    #fff;
  box-shadow: 0 10px 28px rgba(27, 65, 44, 0.16);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.picker-result-panel.is-sticky-compact {
  padding: 8px;
  border-radius: 9px;
}

.picker-result-panel.is-sticky-compact .picker-result-head strong {
  font-size: 14px;
}

.picker-result-panel.is-sticky-compact .picker-result-head span {
  font-size: 11px;
}

.picker-result-panel.is-sticky-compact .picker-results {
  gap: 5px;
  min-height: 122px;
  max-height: 132px;
  margin-top: 8px;
  padding: 7px;
  overflow: auto;
}

.picker-result-panel.is-sticky-compact .picker-number {
  flex-basis: 26px;
  width: 26px;
  height: 26px;
  font-size: 10px;
}

.picker-result-panel.is-sticky-compact .picker-killed-row {
  margin-top: 7px;
  padding: 7px;
}

.picker-result-panel.is-sticky-compact .picker-actions {
  gap: 6px;
  margin-top: 8px;
}

.picker-result-panel.is-sticky-compact .picker-action {
  min-height: 31px;
  font-size: 12px;
}

.picker-result-panel.is-sticky-compact .picker-notebook-open {
  width: 28px;
  height: 28px;
}

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

.picker-result-head div {
  display: grid;
  gap: 4px;
}

.picker-result-head strong {
  color: #24352b;
  font-size: 14px;
}

.picker-result-head span {
  color: #7b8b82;
  font-size: 11px;
}

.picker-result-head b {
  flex: none;
  padding: 5px 10px;
  border-radius: 999px;
  color: #157b33;
  background: #e9f8ee;
  font-size: 13px;
}

.picker-result-head .picker-result-head-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 7px;
}

.picker-notebook-open {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  min-height: 30px;
  padding: 4px;
  border: 1px solid #b8d8c3;
  border-radius: 8px;
  color: #267344;
  background: #fff;
  cursor: pointer;
}

.picker-notebook-open svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.picker-results {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 5px;
  min-height: 122px;
  max-height: 132px;
  margin-top: 8px;
  padding: 7px;
  overflow: auto;
  border: 1px dashed #d6e4db;
  border-radius: 10px;
  background: #fbfdfb;
}

.picker-number {
  display: grid;
  place-items: center;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.12);
}

.picker-empty {
  grid-column: 1 / -1;
  align-self: center;
  color: #87958d;
  font-size: 13px;
  text-align: center;
}

.picker-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.picker-action {
  min-height: 31px;
  border: 1px solid #bfd8c8;
  border-radius: 8px;
  color: #267344;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.picker-action.primary {
  color: #fff;
  border-color: #16853d;
  background: #16853d;
}

.picker-action.active {
  color: #fff;
  border-color: #c45050;
  background: #c45050;
}

.picker-status {
  margin: 10px 0 0;
  color: #7d8a83;
  font-size: 12px;
  line-height: 1.55;
}

.picker-killed-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  padding: 7px;
  border: 1px solid #efc9c9;
  border-radius: 9px;
  background: #fff7f7;
}

.picker-killed-row strong {
  color: #b53e3e;
  font-size: 13px;
}

.picker-groups {
  display: grid;
  gap: 10px;
  margin: 12px;
}

.picker-group {
  padding: 12px;
  border: 1px solid #e1e9e4;
  border-radius: 10px;
  background: #fff;
}

.picker-group h2 {
  margin: 0 0 9px;
  color: #42554a;
  font-size: 13px;
  line-height: 1.4;
}

.picker-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.picker-chip-rows {
  display: grid;
  gap: 16px;
}

.picker-chip-row {
  display: flex;
  gap: 7px;
}

.picker-chip-row .picker-chip {
  flex: 1 1 0;
  min-width: 0;
}

.picker-chip {
  min-width: 48px;
  min-height: 34px;
  padding: 5px 10px;
  border: 1px solid #d5dfd8;
  border-radius: 7px;
  color: #52635a;
  background: #fafcfb;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.picker-chip.selected {
  color: #fff;
  border-color: #169443;
  background: #169443;
}

.zodiac-grid,
.tail-grid,
.sum-grid,
.sum-tail-grid,
.remainder-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: 38px;
  gap: 7px;
}

.zodiac-grid .picker-chip,
.tail-grid .picker-chip,
.sum-grid .picker-chip,
.sum-tail-grid .picker-chip,
.remainder-grid .picker-chip,
.palace-grid .picker-chip,
.head-parity-grid .picker-chip,
.special-zodiac-grid .picker-chip {
  width: 100%;
  height: 100%;
  min-width: 0;
  padding-right: 3px;
  padding-left: 3px;
}

.palace-grid,
.head-parity-grid,
.special-zodiac-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: 38px;
  gap: 7px;
}

.zodiac-grid .picker-chip,
.palace-grid .picker-chip {
  width: 100%;
  height: 100%;
  min-width: 0;
  padding-right: 3px;
  padding-left: 3px;
}

.picker-chip.excluded {
  color: #fff;
  border-color: #c95151;
  background: #c95151;
}

.picker-kill-backdrop {
  position: fixed;
  z-index: 220;
  inset: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 18px;
  background: rgba(11, 27, 18, 0.58);
  -webkit-overflow-scrolling: touch;
}

.picker-kill-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 820px);
  min-height: calc(100vh - 36px);
  margin: 0 auto;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.picker-kill-head {
  position: sticky;
  z-index: 1;
  top: 0;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 96px;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid #e2ebe5;
  background: rgba(255, 255, 255, 0.97);
}

.picker-kill-head strong {
  color: #26372d;
  font-size: 16px;
  text-align: center;
}

.picker-kill-head button {
  min-height: 34px;
  padding: 4px 8px;
  border: 1px solid #c8dbcD;
  border-radius: 7px;
  color: #267344;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.picker-kill-result {
  position: sticky;
  z-index: 1;
  top: 59px;
  max-height: 218px;
  overflow: auto;
  padding: 10px 14px;
  border-bottom: 1px solid #e2ebe5;
  background: #f7fbf8;
}

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

.picker-kill-result-head strong {
  color: #2f4638;
  font-size: 13px;
}

.picker-kill-result-head span {
  color: #16853d;
  font-size: 12px;
  font-weight: 700;
}

.picker-kill-result-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 28px;
}

.picker-kill-result-number {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.picker-kill-result-empty {
  align-self: center;
  color: #849188;
  font-size: 12px;
}

.picker-kill-content {
  display: grid;
  gap: 18px;
  padding: 16px;
}

.picker-kill-group h3 {
  margin: 0 0 10px;
  color: #4d5d54;
  font-size: 13px;
}

.picker-kill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.picker-kill-chips.number-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
}

.picker-kill-chip {
  min-width: 44px;
  min-height: 34px;
  padding: 5px 8px;
  border: 1px solid #d5dfd8;
  border-radius: 7px;
  color: #52635a;
  background: #fafcfb;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.picker-kill-chip.active {
  color: #fff;
  border-color: #c95151;
  background: #c95151;
}

.picker-notebook-backdrop {
  position: fixed;
  z-index: 230;
  inset: 0;
  padding: 18px;
  background: rgba(11, 27, 18, 0.58);
}

.picker-notebook-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(100%, 760px);
  height: calc(100vh - 36px);
  margin: 0 auto;
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.picker-notebook-head {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 78px;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid #e2ebe5;
  background: #fff;
}

.picker-notebook-head strong {
  color: #26372d;
  font-size: 16px;
  text-align: center;
}

.picker-notebook-head button,
.picker-notebook-footer button {
  min-height: 34px;
  padding: 4px 8px;
  border: 1px solid #c8dbcd;
  border-radius: 7px;
  color: #267344;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.picker-notebook-input {
  width: 100%;
  min-height: 0;
  padding: 16px;
  border: 0;
  outline: 0;
  color: #26352c;
  background: #fff;
  font: 14px/1.8 "Microsoft YaHei", "PingFang SC", sans-serif;
  resize: none;
}

.picker-notebook-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-top: 1px solid #e2ebe5;
  color: #849088;
  background: #f7faf8;
  font-size: 11px;
}

.special-zodiac-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: 38px;
  gap: 10px 7px;
}

.special-zodiac-grid::after {
  content: "";
  position: absolute;
  top: calc(50% - 1px);
  right: 0;
  left: 0;
  border-top: 1px solid #e9efeb;
  pointer-events: none;
}

.special-zodiac-grid .picker-chip {
  width: 100%;
  min-width: 0;
  padding-right: 4px;
  padding-left: 4px;
}

@media (max-width: 640px) {
  .picker-kill-backdrop {
    padding: 0;
  }

  .picker-kill-panel {
    min-height: 100vh;
    border-radius: 0;
  }

  .picker-notebook-backdrop {
    padding: 0;
  }

  .picker-notebook-panel {
    height: 100vh;
    border-radius: 0;
  }

  .picker-kill-chips.number-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .analysis-switch button {
    padding: 0 3px;
    font-size: 12px;
  }

  .compare-result-panel {
    margin: 8px 8px 0;
    padding: 12px;
  }

  .compare-group-list {
    grid-template-columns: 1fr;
    margin: 10px 8px;
  }

  .picker-result-panel {
    margin: 8px 8px 0;
    padding: 8px;
    border-radius: 9px;
  }

  .picker-results {
    gap: 5px;
    min-height: 122px;
    max-height: 132px;
    padding: 7px;
  }

  .picker-number {
    flex-basis: 26px;
    width: 26px;
    height: 26px;
    font-size: 10px;
  }

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

  .picker-groups {
    margin: 10px 8px;
  }

  .picker-group {
    padding: 10px;
  }

  .picker-chip {
    min-width: 44px;
    padding: 5px 8px;
  }

  .special-zodiac-grid .picker-chip {
    min-width: 0;
    padding: 5px 2px;
    font-size: 11px;
  }
}

/* 站点留言 */
.message-backdrop {
  position: fixed;
  z-index: 240;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 18px;
  background: rgba(8, 23, 14, 0.62);
}

.message-panel {
  width: min(100%, 520px);
  max-height: calc(100vh - 36px);
  overflow: auto;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}

.message-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid #e2ebe5;
}

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

.message-head strong {
  color: #26372d;
  font-size: 18px;
}

.message-head span {
  color: #7a8780;
  font-size: 12px;
}

.message-head button {
  width: 32px;
  height: 32px;
  flex: none;
  border: 1px solid #d8e2dc;
  border-radius: 8px;
  color: #5e6c64;
  background: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.message-form {
  display: grid;
  gap: 13px;
  padding: 16px;
}

.message-form label {
  display: grid;
  gap: 6px;
}

.message-form label > span {
  color: #4d5d54;
  font-size: 12px;
  font-weight: 700;
}

.message-form input,
.message-form textarea {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid #d7e1db;
  border-radius: 8px;
  outline: 0;
  color: #26352c;
  background: #fbfdfc;
  font: inherit;
}

.message-form input:focus,
.message-form textarea:focus {
  border-color: #43a662;
  box-shadow: 0 0 0 3px rgba(22, 133, 61, 0.12);
}

.message-form textarea {
  min-height: 150px;
  resize: vertical;
  line-height: 1.7;
}

.message-submit {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: #16853d;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.message-submit:disabled {
  cursor: wait;
  opacity: 0.65;
}

.message-feedback {
  margin: 0;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 12px;
}

.message-feedback.success {
  color: #15753a;
  background: #e9f8ee;
}

.message-feedback.error {
  color: #a93742;
  background: #fff0f1;
}

@media (max-width: 640px) {
  .message-backdrop {
    padding: 0;
  }

  .message-panel {
    width: 100%;
    min-height: 100vh;
    max-height: none;
    border-radius: 0;
  }
}

/* 开奖直播 */
.live-view {
  margin-top: 8px;
}

.live-grid {
  display: grid;
  gap: 12px;
  margin: 10px 12px;
}

.live-card {
  --live-accent: #167d38;
  padding: 13px 12px 12px;
  border: 1px solid #dfe7e2;
  border-left: 4px solid var(--live-accent);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(29, 61, 47, 0.07);
}

.live-card-green { --live-accent: #15983f; }
.live-card-red { --live-accent: #d83643; }
.live-card-orange { --live-accent: #e67e1a; }
.live-card-blue { --live-accent: #218bd8; }

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

.live-card-head strong {
  color: #263830;
  font-size: 16px;
  font-weight: 800;
}

.live-card-tools {
  display: flex;
  flex: none;
  align-items: center;
  gap: 7px;
}

.live-refresh {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 27px;
  padding: 2px 8px;
  border: 1px solid var(--live-accent);
  border-radius: 4px;
  color: var(--live-accent);
  background: #fff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.live-refresh:disabled {
  color: #8b9690;
  border-color: #cfd8d2;
  cursor: wait;
}

.live-countdown {
  flex: none;
  padding: 3px 7px;
  border: 1px solid #d73b3b;
  border-radius: 2px;
  color: #d3262f;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.live-result-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  color: #333;
  font-size: 15px;
  font-weight: 700;
}

.live-scratch-area {
  position: relative;
  overflow: hidden;
  min-height: 0;
  margin-top: 8px;
  border-radius: 7px;
}

.live-scratch-layer {
  position: absolute;
  z-index: 2;
  inset: 0;
  overflow: hidden;
  border: 1px solid #858788;
  border-radius: 6px;
  background: transparent !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  cursor: crosshair;
  touch-action: none;
  user-select: none;
  transition: opacity 180ms ease;
}

.live-scratch-area.is-revealed .live-scratch-layer {
  opacity: 0;
  pointer-events: none;
}

.live-scratch-canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: transparent !important;
}

.live-balls {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr)) 17px minmax(0, 1fr);
  gap: 4px;
  align-items: center;
  margin-top: 0;
}

.live-plus {
  color: #111;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.live-ball {
  display: grid;
  grid-template-rows: minmax(36px, 1fr) 24px;
  overflow: hidden;
  min-width: 0;
  border: 1px solid #777;
  border-radius: 5px;
  background: #fff;
  line-height: 1;
}

.live-ball-number {
  display: grid;
  place-items: center;
  min-height: 36px;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

.live-ball-caption {
  display: grid;
  place-items: center;
  min-height: 24px;
  padding: 1px 2px;
  border-top: 1px solid #ccc;
  color: #333;
  background: #fff;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.live-ball-pending .live-ball-number {
  color: #9aa29d;
  background: #eef1ef;
}

.live-ball-pending .live-ball-caption {
  color: #8b948e;
}

.live-next-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  color: #555;
  font-size: 12px;
  line-height: 1.55;
}

.live-next-row > span {
  min-width: 0;
  color: #333;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.live-next-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 9px;
}

.live-scratch-start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 1px 3px;
  border: 0;
  border-radius: 3px;
  color: var(--live-accent);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  cursor: pointer;
}

.live-scratch-start:hover,
.live-scratch-start:focus-visible {
  color: var(--live-accent);
  background: transparent;
  opacity: 0.74;
  outline: none;
}

.live-scratch-icon {
  width: 17px;
  height: 17px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.live-history-link {
  flex: none;
  padding: 0;
  border: 0;
  color: #cf2f32;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.live-card-empty {
  min-height: 78px;
  padding-top: 28px;
  color: #849088;
  font-size: 12px;
  text-align: center;
}

.live-error {
  margin: 10px 12px;
  padding: 9px 11px;
  border-radius: 8px;
  color: #9a4a4a;
  background: #fff0f0;
  font-size: 12px;
}

.live-updated {
  margin: 10px 12px 22px;
  color: #8b9690;
  font-size: 11px;
  text-align: right;
}

@media (max-width: 480px) {
  .live-grid {
    margin: 8px;
  }

  .live-card {
    padding: 10px 8px;
  }

  .live-card-head strong {
    font-size: 14px;
  }

  .live-countdown {
    font-size: 10px;
  }

  .live-card-tools {
    gap: 4px;
  }

  .live-refresh {
    min-height: 25px;
    padding: 2px 5px;
    font-size: 10px;
  }

  .live-result-title {
    font-size: 13px;
  }

  .live-scratch-area {
    min-height: 0;
  }

  .live-balls {
    grid-template-columns: repeat(6, minmax(0, 1fr)) 12px minmax(0, 1fr);
    gap: 2px;
  }

  .live-ball-number {
    min-height: 35px;
    font-size: 17px;
  }

  .live-ball-caption {
    min-height: 23px;
    font-size: 12px;
  }

  .live-plus {
    font-size: 18px;
  }

  .live-next-row {
    font-size: 10px;
  }

  .live-next-row > span {
    font-size: 12px;
    font-weight: 700;
  }

  .live-history-link {
    font-size: 11px;
  }

  .live-scratch-start {
    font-size: 11px;
  }

  .live-scratch-icon {
    width: 15px;
    height: 15px;
  }

  .site-ad-carousel {
    margin: 8px 8px 0;
  }

  .site-ad-slide {
    min-height: 80px;
    max-height: 150px;
    aspect-ratio: 3 / 1;
  }
}

/* Unified history and zodiac number captions */
.history-view,
.zodiac-view {
  --record-number-font-size: 17px;
  --record-caption-font-size: 15px;
}

.history-view .number-ball,
.zodiac-view .zodiac-ball .z-number {
  font-size: var(--record-number-font-size);
  font-weight: 800;
}

.history-view .number-caption,
.zodiac-view .zodiac-ball .z-name {
  font-size: var(--record-caption-font-size);
  font-weight: 700;
}

.history-view .number-caption {
  line-height: 18px;
}

@media (max-width: 620px) {
  .history-view,
  .zodiac-view {
    --record-number-font-size: 13px;
    --record-caption-font-size: 12px;
  }

  .history-view .number-caption {
    line-height: 15px;
  }
}

@media (max-width: 380px) {
  .history-view,
  .zodiac-view {
    --record-number-font-size: 12.5px;
    --record-caption-font-size: 11.5px;
  }

  .history-view .number-caption {
    line-height: 14px;
  }
}

/* Zodiac statistics record date */
.zodiac-view .zodiac-record-date {
  color: #4f5b64;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.4;
}

@media (max-width: 620px) {
  .zodiac-view .zodiac-record-date {
    font-size: 13.5px;
    font-weight: 800;
  }
}

@media (max-width: 380px) {
  .zodiac-view .zodiac-record-date {
    font-size: 12.5px;
    font-weight: 800;
  }
}

/* History record date */
.history-view .history-meta {
  color: #4f5b64;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.4;
}

.history-view .history-meta strong {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
}

@media (max-width: 620px) {
  .history-view .history-meta {
    font-size: 13.5px;
    font-weight: 800;
  }

  .history-view .history-meta strong {
    font-size: 14px;
    font-weight: 800;
  }
}

@media (max-width: 380px) {
  .history-view .history-meta {
    font-size: 12.5px;
    font-weight: 800;
  }

  .history-view .history-meta strong {
    font-size: 13px;
    font-weight: 800;
  }
}

/* Zodiac statistics filter buttons */
.zodiac-view .filter-chip {
  min-width: 44px;
  min-height: 32px;
  padding: 3px 10px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
}

@media (max-width: 620px) {
  .zodiac-view .filter-chip {
    min-width: 40px;
    min-height: 30px;
    padding: 3px 8px;
    font-size: 12.5px;
    font-weight: 700;
  }
}

@media (max-width: 380px) {
  .zodiac-view .filter-chip {
    min-width: 38px;
    min-height: 29px;
    padding: 3px 7px;
    font-size: 12px;
    font-weight: 700;
  }
}

/* Analysis data values */
.omission-view .omission-table tbody td {
  font-size: 14px;
  font-weight: 700;
}

.stats-view .stat-rate {
  font-size: 14px;
  font-weight: 700;
}

.stats-view .latest-issue {
  font-size: 13.5px;
  font-weight: 700;
}

@media (max-width: 620px) {
  .omission-view .omission-table tbody td {
    font-size: 12.5px;
    font-weight: 700;
  }

  .stats-view .stat-rate {
    font-size: 12.5px;
    font-weight: 700;
  }

  .stats-view .latest-issue {
    font-size: 12px;
    font-weight: 700;
  }
}

@media (max-width: 380px) {
  .omission-view .omission-table tbody td {
    font-size: 12px;
    font-weight: 700;
  }

  .stats-view .stat-rate {
    font-size: 12px;
    font-weight: 700;
  }

  .stats-view .latest-issue {
    font-size: 11.5px;
    font-weight: 700;
  }
}
