@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700;800&display=swap");

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  -webkit-text-size-adjust: 100% !important;
  text-size-adjust: 100% !important;
}

body {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Microsoft YaHei UI", sans-serif;
  background: #f5f5f5;
  color: #111;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
}

button,
input,
select {
  font: inherit;
  line-height: 1.2;
  -webkit-appearance: none;
  appearance: none;
}

button {
  white-space: nowrap;
}

.draw {
  font-family: "Microsoft YaHei", "Microsoft YaHei UI", "Noto Sans SC", "PingFang SC", sans-serif;
}

.page {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 12px;
  min-width: 0;
  width: 100%;
}


@media (min-width: 1100px) {
  .page {
    padding: 16px;
  }
}

.draw {
  width: 100%;
  max-width: 580px;
  min-width: 0;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid #9a9a9a;
  border-radius: 6px;
  padding: 2px 6px 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  font-feature-settings: "locl" 1;
  position: relative;
  overflow: hidden;
  align-self: center;
}

.live {
  align-self: stretch;
}



.draw-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  text-align: center;
}

.draw-title {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 4px;
  font-weight: 800;
  justify-content: center;
  white-space: nowrap;
  min-width: 0;
  width: 100%;
}

.draw-issue {
  font-size: clamp(11px, 2.8vw, 16px);
  color: #2d4b77;
  flex: 0 0 auto;
}

.draw-time {
  font-size: clamp(11px, 2.8vw, 16px);
  font-weight: 800;
  color: #2d4b77;
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: clip;
}

.live-toggle {
  font-size: 14px;
  font-weight: 800;
  color: #2f6fed;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}

.live-toggle:hover {
  color: #1a53d8;
}

.live {
  width: 100%;
  max-width: 1068px;
  min-width: 0;
  margin: 0 auto;
  background: #111;
  border: 2px solid #8c8c8c;
  border-radius: 6px;
  padding: 8px 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.live.is-hidden {
  display: none;
}

.live-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #fff;
  font-weight: 800;
}

.live-title {
  font-size: 16px;
}

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

.live-btn {
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  border: 2px solid #9a9a9a;
  background: #1b1b1b;
  color: #fff;
}

.live-btn.is-active {
  background: #2f6fed;
  border-color: #2f6fed;
  color: #fff;
}

.live-video {
  width: 100%;
  height: 380px;
  background: #000;
  border-radius: 4px;
}

.draw-balls {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
}

.draw-plus {
  font-size: 20px;
  font-weight: 900;
  color: #c51414;
  margin: 0;
}

.draw-ball {
  width: 64px;
  min-height: 60px;
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #fff;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.draw-ball.red {
  background: #d41616;
}

.draw-ball.blue {
  background: #1a53d8;
}

.draw-ball.green {
  background: #1b8c3e;
}

.draw-num {
  font-size: 24px;
  line-height: 1;
}

.draw-zodiac {
  font-size: 15px;
  line-height: 1;
  color: #ffe6e6;
}

.draw-empty {
  font-size: 14px;
  font-weight: 700;
  color: #777;
}

.draw.is-loading .draw-balls {
  opacity: 0.6;
}

.draw + .controls {
  margin-top: -6px;
}

.draw-status {
  margin-top: 4px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #c51414;
}

.draw-status.is-hidden {
  display: none;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #ffffff;
  border: 2px solid #9a9a9a;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

#filterControls,
#digitControls {
  align-content: flex-start;
}

.controls.secondary {
  margin-top: 6px;
}

.ctrl-btn {
  font-size: clamp(14px, 1.75vw, 16px);
  font-weight: 700;
  height: 38px;
  line-height: 1;
  padding: 0 12px;
  border-radius: 6px;
  border: 2px solid #9a9a9a;
  background: #f7f7f7;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  letter-spacing: 0;
  flex: 0 0 auto;
}

.ctrl-btn:hover {
  background: #ececec;
  transform: translateY(-1px);
}

.ctrl-btn.is-active {
  background: #2f6fed;
  border-color: #2f6fed;
  color: #ffffff;
}

.ctrl-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  background: #ececec;
  color: #777;
  transform: none;
}

.ctrl-btn:disabled:hover {
  background: #ececec;
  transform: none;
}

.ctrl-sep {
  width: 1px;
  height: 22px;
  background: #000;
  margin: 0 6px;
  opacity: 0.7;
}

.board {
  width: 100%;
  max-width: 1068px;
  min-width: 0;
  background: #dcdcdc;
  border: 2px solid #8c8c8c;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: start;
  overflow: hidden;
}

@media (min-width: 1100px) {
  .board {
    border-width: 3px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  }
}

.zodiac-checks {
  width: 100%;
  max-width: 1068px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.zodiac-check-block {
  background: #ffffff;
  border: 2px solid #9a9a9a;
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.zodiac-check-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.zodiac-check-title {
  font-size: 16px;
  font-weight: 800;
  color: #c51414;
}


#zodiacChecks .zodiac-check-buttons {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 6px;
}

#zodiacChecks .zodiac-check-btn {
  min-width: 0;
  padding: 6px 4px;
  font-size: 14px;
  position: relative;
  transition: transform 0.08s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

#zodiacChecks .zodiac-check-btn.is-tapped {
  transform: scale(0.94);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6), 0 0 0 2px rgba(197, 20, 20, 0.22);
  filter: brightness(1.08);
}

#zodiacChecks .zodiac-check-btn.is-tapped::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 8px;
  border: 2px solid rgba(197, 20, 20, 0.45);
  animation: zodiacTapPulse 0.2s ease-out;
  pointer-events: none;
}

#zodiacChecks .zodiac-check-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

#zodiacChecks .zodiac-check-cell {
  min-width: 0;
  border: 1px solid #b8b8b8;
  border-radius: 6px;
  overflow: hidden;
  background: #f8f8f8;
}

#zodiacChecks .zodiac-check-cell-name {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #444;
  padding: 3px 2px;
  background: #eeeeee;
  border-bottom: 1px solid #d0d0d0;
}

#zodiacChecks .zodiac-check-cell-body {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  font-size: 14px;
  font-weight: 800;
  color: #c51414;
}

#zodiacChecks .zodiac-check-cell-body.is-empty {
  color: #999;
}

#zodiacChecks .zodiac-check-block.is-flash {
  animation: zodiacBlockFlash 0.25s ease;
}

@keyframes zodiacTapPulse {
  0% {
    transform: scale(0.96);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.06);
    opacity: 0;
  }
}

@keyframes zodiacBlockFlash {
  0% {
    box-shadow: 0 0 0 rgba(197, 20, 20, 0), 0 3px 8px rgba(0, 0, 0, 0.1);
  }
  35% {
    box-shadow: 0 0 0 3px rgba(197, 20, 20, 0.2), 0 3px 8px rgba(0, 0, 0, 0.1);
  }
  100% {
    box-shadow: 0 0 0 rgba(197, 20, 20, 0), 0 3px 8px rgba(0, 0, 0, 0.1);
  }
}

.summary {
  width: 100%;
  max-width: 1068px;
  min-width: 0;
  background: #ffffff;
  border: 2px solid #9a9a9a;
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.history {
  width: 100%;
  max-width: 1068px;
  min-width: 0;
  background: #ffffff;
  border: 2px solid #9a9a9a;
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.duplicate-check {
  width: 100%;
  max-width: 1068px;
  min-width: 0;
  background: #ffffff;
  border: 2px solid #9a9a9a;
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 0;
}

.omission {
  width: 100%;
  max-width: 1068px;
  min-width: 0;
  background: #ffffff;
  border: 1px solid #e3e7ef;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 2px 10px rgba(20, 40, 80, 0.06);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.omission.is-hidden {
  display: none;
}

.omission-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.omission-title {
  font-size: 16px;
  font-weight: 800;
  color: #22304a;
}

.omission-source {
  font-size: 12px;
  font-weight: 700;
  color: #3a5a8a;
  background: #f0f4fa;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  padding: 2px 10px;
}

.omission-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.omission-group {
  background: #ffffff;
  border: 1px solid #e5e8ef;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(20, 40, 80, 0.07);
  min-width: 0;
  width: 100%;
}

.omission-group.number-group {
  grid-column: 1 / -1;
}

.omission-group-title {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px 9px 18px;
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #3d6cd6, #28499e);
}
.omission-group-title::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 15px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.75);
}

/* 号码遗漏：扁平彩色球 */
.om-balls {
  margin: 0 10px 12px;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
  gap: 10px;
  justify-items: center;
}
.om-ball {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.18);
}
.om-ball.wave-red { background: #e23a3a; }
.om-ball.wave-green { background: #2e9e54; }
.om-ball.wave-blue { background: #2f6fed; }
.om-ball.hot { box-shadow: 0 0 0 3px rgba(212, 22, 22, 0.45), 0 2px 4px rgba(0, 0, 0, 0.18); }
.om-ball.warm { box-shadow: 0 0 0 3px rgba(232, 161, 58, 0.5), 0 2px 4px rgba(0, 0, 0, 0.18); }
.om-ball-num { position: relative; z-index: 1; }
.om-ball-omit {
  position: absolute;
  right: -6px;
  bottom: -5px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #d7dbe3;
  color: #4a5568;
  font-size: 10px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  z-index: 2;
}
.om-ball-omit.hot { background: #d41616; color: #ffffff; border-color: #d41616; }
.om-ball-omit.warm { background: #e8a13a; color: #ffffff; border-color: #e8a13a; }

/* 简洁格子：横排「值 + 次数」，方形圆角，内容自适应不溢出 */
.om-grid {
  margin: 10px;
  padding: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.om-cell {
  border: 1px solid #eceef3;
  border-radius: 10px;
  background: #fafbfd;
  padding: 6px 8px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  white-space: nowrap;
}
.om-cell-num {
  font-weight: 800;
  font-size: 15px;
  color: #2b3a55;
  line-height: 1;
  white-space: nowrap;
}
.om-cell-num.wave-red { color: #e23a3a; }
.om-cell-num.wave-green { color: #2e9e54; }
.om-cell-num.wave-blue { color: #2f6fed; }
.om-cell-omit {
  font-size: 12px;
  font-weight: 800;
  color: #7b8aa3;
  white-space: nowrap;
}
.om-cell.hot { border-color: #d41616; background: #fff1f1; }
.om-cell.hot .om-cell-omit { color: #d41616; }
.om-cell.warm { border-color: #e8a13a; background: #fdf6e8; }
.om-cell.warm .om-cell-omit { color: #c7740f; }

.omission-empty {
  color: #999;
  font-size: 13px;
  padding: 10px;
}

/* 并排行 */
.om-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.om-row[data-cols="3"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.om-row[data-cols="4"] {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.om-row[data-cols="6"] {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.om-row[data-cols="13"] {
  grid-template-columns: repeat(13, minmax(0, 1fr));
}
.om-subgroup {
  background: #ffffff;
  border: 1px solid #e6e9ef;
  border-radius: 10px;
  overflow: hidden;
  min-width: 0;
}
.om-subgroup-title {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px 8px 16px;
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, #3d6cd6, #28499e);
}
.om-subgroup-title::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 13px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.75);
}
.om-subgroup .om-grid {
  margin: 10px;
  padding: 4px;
}

.dup-row {
  border: 1px solid #9a9a9a;
  min-height: 30px;
  padding: 4px 10px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  font-family: Consolas, "Courier New", monospace;
  letter-spacing: 0;
  border-radius: 0;
}

.dup-row + .dup-row {
  margin-top: -1px;
}

#dupTimes,
#dupNumbers,
#dupUnique {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

#dupUnique {
  color: #111;
}

.dup-label {
  color: #222;
  white-space: nowrap;
  flex: 0 0 auto;
}

.dup-value {
  color: #c51414;
  overflow-x: auto;
  white-space: nowrap;
}

.dup-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.dup-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dup-input {
  width: 100%;
  height: 34px;
  border: 1px solid #9a9a9a;
  border-radius: 4px;
  min-height: 34px;
  padding: 0 10px;
  font-size: 14px;
  background: #fff;
}

.dup-name {
  width: 95px;
  max-width: 95px;
  min-height: 34px;
  font-size: 14px;
  flex: 0 0 95px;
  height: 34px;
}

.dup-btn {
  width: 100%;
  min-height: 40px;
  border: 1px solid #7a7a7a;
  background: #f0f0f0;
  border-radius: 4px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

.dup-btn-inline {
  width: auto;
  min-width: 72px;
  min-height: 34px;
  padding: 0 14px;
  font-size: 15px;
}

.dup-list {
  border: 1px solid #9a9a9a;
  border-radius: 4px;
  padding: 8px;
  margin-top: 12px;
  display: none;
  flex-direction: column;
  gap: 10px;
}

.dup-list.has-items {
  display: flex;
}

.dup-entry {
  border: 1px solid #b7b7b7;
  border-radius: 4px;
  padding: 6px 8px;
  background: #fff;
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  gap: 8px;
}

.dup-edit-name {
  min-width: 0;
  height: 32px;
  font-size: 14px;
  font-weight: 700;
}

.dup-edit-nums {
  min-width: 0;
  height: 32px;
  font-size: 14px;
  font-weight: 600;
  color: #111;
}

.dup-edit-nums.is-hot {
  color: #c51414;
  font-weight: 800;
}

.history.is-hidden {
  display: none;
}

.duplicate-check.is-hidden {
  display: none;
}

.zodiac-checks.is-hidden {
  display: none;
}

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

.history-title {
  font-size: 18px;
  font-weight: 800;
  color: #111;
}

.history-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.history-label {
  font-weight: 700;
}

.history-select {
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid #9a9a9a;
  font-size: 14px;
}

.history-table {
  display: flex;
  flex-direction: column;
  border: 1px solid #dadada;
  border-radius: 6px;
  overflow: hidden;
}

.history-row {
  display: grid;
  grid-template-columns: 140px 1fr 1fr;
  align-items: center;
  justify-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid #e1e1e1;
  font-size: 14px;
}

.history-row:last-child {
  border-bottom: none;
}

.history-head {
  background: #f5f5f5;
  font-weight: 800;
  color: #444;
}

.history-expect {
  font-weight: 800;
  color: #c51414;
  text-align: center;
}

.history-time {
  color: #333;
  text-align: center;
  justify-self: center;
}

.history-balls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  justify-content: center;
}

.history-ball {
  width: 38px;
  min-height: 38px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #fff;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.history-ball.red {
  background: #d41616;
}

.history-ball.blue {
  background: #1a53d8;
}

.history-ball.green {
  background: #1b8c3e;
}

.history-num {
  font-size: 14px;
  line-height: 1;
}

.history-zodiac {
  font-size: 12px;
  line-height: 1;
}

.history-plus {
  font-size: 16px;
  font-weight: 900;
  color: #c51414;
}


.history-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.history-page {
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid #9a9a9a;
  background: #f7f7f7;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.history-page:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.history-page-info {
  font-size: 13px;
  font-weight: 700;
  color: #444;
}

.history-empty {
  padding: 12px;
  text-align: center;
  color: #777;
  font-weight: 700;
}

.summary.is-hidden {
  display: none;
}

.summary-title {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 6px;
}

.summary-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.summary-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0;
  font-size: 14px;
  font-weight: 700;
  color: #111;
}

.summary-line {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.summary-label {
  color: #111;
  flex: 0 0 auto;
}

.summary-values {
  letter-spacing: 0.5px;
  word-break: break-all;
  flex: 1 1 auto;
}

.calc-panel {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #d0d0d0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.calc-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.calc-row-all {
  flex-wrap: nowrap;
  justify-content: flex-start;
  overflow-x: auto;
}

.calc-label {
  font-size: 14px;
  font-weight: 700;
  color: #333;
}

.calc-input {
  width: 84px;
  padding: 4px 6px;
  border: 1px solid #9a9a9a;
  border-radius: 4px;
  font-size: 14px;
  text-align: center;
  background: #fff;
}

.calc-total {
  min-width: 84px;
  padding: 4px 6px;
  border: 1px solid #9a9a9a;
  border-radius: 4px;
  background: #f7f7f7;
  font-size: 14px;
  font-weight: 700;
  color: #111;
  text-align: center;
}

.calc-copy-btn {
  height: 28px;
  padding: 0 10px;
  border: 1px solid #2f6fed;
  border-radius: 4px;
  background: #ffffff;
  color: #2f6fed;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}

.calc-copy-btn:hover {
  background: #eef4ff;
}

.calc-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: #111;
}

.calc-item {
  padding: 4px 0;
  border-bottom: 1px dashed #d0d0d0;
}

.calc-item:last-child {
  border-bottom: none;
}


.item {
  display: flex;
  flex-direction: column;
  border-right: 2px solid #9a9a9a;
  background: #efefef;
  position: relative;
}

.item:nth-child(12) {
  border-right: none;
}

.cell {
  cursor: pointer;
  transition: filter 0.2s ease, opacity 0.2s ease;
  position: relative;
}

.cell.is-disabled {
  filter: grayscale(100%);
  opacity: 0.55;
}

.cell.is-disabled::after {
  content: "✕";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: 800;
  color: rgba(0, 0, 0, 0.65);
  pointer-events: none;
}

.left {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #ffd300;
  border-bottom: 2px solid #9a9a9a;
  min-height: 72px;
  gap: 4px;
}

.z-name {
  font-size: 22px;
  font-weight: 800;
  color: #c51414;
  line-height: 1.1;
}

.z-type {
  font-size: 14px;
  font-weight: 700;
  color: #1d1d1d;
  line-height: 1;
}

.nums {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: #e7e7e7;
}

.num {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  min-height: 96px;
  padding: 6px 0 8px;
  border-top: 2px solid #9a9a9a;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.num:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.item.has-five .num {
  min-height: 76.8px;
  font-size: 24px;
  padding: 6px 0 8px;
}

.item.has-five .num-element {
  font-size: 18px;
}

.num-value {
  line-height: 1;
  margin-bottom: 2px;
}

.num-element {
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
  margin-bottom: 2px;
}

.element-water {
  color: #5ac8ff;
}

.element-wood {
  color: #45c06f;
}

.element-fire {
  color: #ff6b6b;
}

.element-metal {
  color: #f2d25a;
}

.element-earth {
  color: #c7a277;
}

.red {
  background: #d41616;
}

.blue {
  background: #1a53d8;
}

.green {
  background: #1b8c3e;
}

.history-body.is-slide {
  animation: slideIn 0.35s ease-out;
}

body.is-android {
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
}

body.is-android .draw {
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
}

#uiScaleBadge {
  position: fixed;
  right: 8px;
  bottom: 8px;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.2;
  pointer-events: none;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .page {
    padding: 6px;
    gap: 6px;
  }

  .draw,
  .live,
  .controls,
  .board,
  .summary,
  .history,
  .omission {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .draw {
    border-radius: 5px;
    padding: 2px 4px 6px;
  }

  .draw-title {
    gap: 4px;
  }

  .draw-issue,
  .draw-time {
    font-size: 11px;
    font-weight: 800;
  }

  .live-toggle {
    font-size: 12px;
  }

  .draw-balls {
    gap: 4px;
  }

  .draw-ball {
    width: 44px;
    min-height: 48px;
    border-radius: 4px;
    gap: 2px;
  }

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

  .draw-num {
    font-size: 16px;
  }

  .draw-zodiac {
    font-size: 11px;
  }

  .controls {
    gap: 6px;
    padding: 6px 8px;
    border-width: 1px;
    border-radius: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .ctrl-btn {
    font-size: 13px;
    font-weight: 800;
    height: 30px;
    line-height: 30px;
    padding: 0 8px;
    border-width: 1px;
    border-radius: 8px;
    letter-spacing: 0.1px;
  }

  .ctrl-sep {
    height: 18px;
    margin: 0 4px;
  }

  .board {
    border-width: 2px;
  }

  .left {
    min-height: 50px;
    gap: 1px;
    border-bottom-width: 1px;
  }

  .z-name {
    font-size: 16px;
    line-height: 1;
  }

  .z-type {
    font-size: 10px;
  }

  .num {
    min-height: 56px;
    font-size: 16px;
    gap: 2px;
    padding: 3px 0 4px;
    border-top-width: 1px;
  }

  .item.has-five .num {
    min-height: 45px;
    font-size: 16px;
    padding: 3px 0 4px;
  }

  .num-element,
  .item.has-five .num-element {
    font-size: 12px;
    margin: 0;
  }

  .zodiac-check-block,
  .summary,
  .history,
  .omission {
    padding: 8px 10px;
  }

  .omission-body {
    grid-template-columns: 1fr;
  }

  #zodiacChecks .zodiac-check-buttons,
  #zodiacChecks .zodiac-check-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  #zodiacChecks .zodiac-check-cell-body {
    min-height: 30px;
    padding: 3px;
  }

  .history-row {
    grid-template-columns: 74px 110px minmax(0, 1fr);
    padding: 6px 6px;
    font-size: 12px;
  }

  .history-ball {
    width: 30px;
    min-height: 30px;
    border-radius: 4px;
  }

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

  .history-zodiac {
    font-size: 10px;
  }

}
