:root {
  --bg: #f6f1e8;
  --panel: #ffffff;
  --panel-soft: #fff8ef;
  --border: #eadbc8;
  --text: #241b17;
  --muted: #786b60;
  --accent: #d72f2f;
  --accent-2: #1d65a6;
  --accent-3: #0f7a68;
  --accent-4: #b86a12;
  --gold: #d89a28;
  --ink: #171717;
  --shadow: 0 20px 44px rgba(74, 37, 18, 0.11);
  --soft-shadow: 0 12px 26px rgba(74, 37, 18, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  line-height: 1.45;
  background:
    linear-gradient(135deg, rgba(215, 47, 47, 0.12), rgba(215, 47, 47, 0) 34%),
    linear-gradient(315deg, rgba(29, 101, 166, 0.12), rgba(29, 101, 166, 0) 40%),
    linear-gradient(180deg, #fff7eb 0%, #f3f6f8 48%, #eef7f2 100%);
  overflow-x: hidden;
}

::selection {
  background: rgba(216, 154, 40, 0.32);
  color: #171717;
}

a {
  color: inherit;
}

.scroll-progress {
  position: fixed;
  inset: 0 auto auto 0;
  width: var(--scroll, 0%);
  height: 4px;
  z-index: 80;
  background: linear-gradient(90deg, var(--accent), var(--gold), var(--accent-3), var(--accent-2));
  box-shadow: 0 0 18px rgba(216, 154, 40, 0.46);
  transition: width 0.08s linear;
}

.page-effects {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  mix-blend-mode: multiply;
}

.effect-thread {
  position: absolute;
  width: 170%;
  height: 1px;
  left: -35%;
  background: linear-gradient(90deg, transparent, rgba(216, 154, 40, 0.28), rgba(15, 122, 104, 0.18), transparent);
  transform: rotate(-13deg);
  animation: threadSweep 13s linear infinite;
}

.thread-a {
  top: 16%;
}

.thread-b {
  top: 54%;
  animation-duration: 18s;
  animation-direction: reverse;
  background: linear-gradient(90deg, transparent, rgba(29, 101, 166, 0.18), rgba(215, 47, 47, 0.2), transparent);
}

.thread-c {
  top: 82%;
  animation-duration: 22s;
}

.pointer-glow {
  position: fixed;
  width: 220px;
  height: 220px;
  left: var(--pointer-x, 50%);
  top: var(--pointer-y, 50%);
  transform: translate(-50%, -50%);
  background:
    repeating-linear-gradient(90deg, rgba(216, 154, 40, 0.08) 0 1px, transparent 1px 18px),
    repeating-linear-gradient(0deg, rgba(15, 122, 104, 0.06) 0 1px, transparent 1px 18px);
  mask-image: radial-gradient(circle, #000 0 36%, transparent 70%);
  opacity: 0.45;
  transition: left 0.16s ease, top 0.16s ease;
}

.wealth-decor {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.wealth-marquee-frame {
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(216, 154, 40, 0.48);
  border-radius: 14px;
  box-shadow:
    inset 0 0 0 2px rgba(215, 47, 47, 0.1),
    0 0 22px rgba(216, 154, 40, 0.12);
}

.marquee-lights {
  position: absolute;
  display: block;
  opacity: 0.86;
  filter: drop-shadow(0 0 5px rgba(255, 213, 110, 0.66));
}

.marquee-lights-top,
.marquee-lights-bottom {
  left: 10px;
  right: 10px;
  height: 9px;
  background:
    radial-gradient(circle, #ffe7a0 0 2px, #d89a28 2.5px 4px, transparent 4.5px)
    0 50% / 28px 9px repeat-x;
  animation: marqueeTravel 2.8s linear infinite;
}

.marquee-lights-top {
  top: -5px;
}

.marquee-lights-bottom {
  bottom: -5px;
  animation-direction: reverse;
}

.marquee-lights-left,
.marquee-lights-right {
  top: 10px;
  bottom: 10px;
  width: 9px;
  background:
    radial-gradient(circle, #ffe7a0 0 2px, #d89a28 2.5px 4px, transparent 4.5px)
    50% 0 / 9px 28px repeat-y;
  animation: marqueeTravelVertical 2.8s linear infinite;
}

.marquee-lights-left {
  left: -5px;
}

.marquee-lights-right {
  right: -5px;
  animation-direction: reverse;
}

.money-rain {
  position: absolute;
  top: -40px;
  display: flex;
  gap: 24px;
  color: #d89a28;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 900;
  text-shadow: 0 1px 0 #fff1b8, 0 0 9px rgba(216, 154, 40, 0.54);
  animation: moneyFall 9s linear infinite;
}

.money-rain span:nth-child(2n) {
  color: #bd1d1d;
  font-size: 16px;
}

.money-rain-a {
  left: 22%;
  animation-delay: -1.8s;
}

.money-rain-b {
  left: 56%;
  animation-delay: -5.6s;
  animation-duration: 11s;
}

.money-rain-c {
  left: 76%;
  animation-delay: -7.4s;
  animation-duration: 12s;
}

.ingot-snow {
  position: absolute;
  inset: -90px 0 auto;
  height: 90px;
  display: flex;
  justify-content: space-around;
  color: #8f5410;
  animation: ingotSnowFall 15s linear infinite;
}

.ingot-snow span {
  position: relative;
  width: 38px;
  height: 23px;
  border: 2px solid rgba(164, 99, 15, 0.7);
  border-radius: 55% 55% 46% 46%;
  background:
    radial-gradient(circle at 50% 24%, #fff1a8 0 18%, transparent 19%),
    linear-gradient(180deg, #ffe58b 0%, #d89a28 58%, #a8630f 100%);
  box-shadow:
    inset 0 -3px 0 rgba(128, 72, 8, 0.24),
    0 7px 12px rgba(216, 154, 40, 0.18);
  font-size: 11px;
  font-weight: 900;
  line-height: 18px;
  text-align: center;
  transform: rotate(var(--ingot-rotate, -8deg));
}

.ingot-snow span::before,
.ingot-snow span::after {
  content: "";
  position: absolute;
  top: -6px;
  width: 13px;
  height: 16px;
  border-radius: 50% 50% 42% 42%;
  background: linear-gradient(180deg, #ffed9d, #d89a28);
  border: 1px solid rgba(164, 99, 15, 0.58);
}

.ingot-snow span::before {
  left: 1px;
  transform: rotate(-25deg);
}

.ingot-snow span::after {
  right: 1px;
  transform: rotate(25deg);
}

.ingot-snow span:nth-child(2n) {
  --ingot-rotate: 10deg;
  width: 30px;
  height: 19px;
  font-size: 9px;
  opacity: 0.78;
}

.ingot-snow span:nth-child(3n) {
  --ingot-rotate: -18deg;
  width: 44px;
  height: 26px;
  opacity: 0.9;
}

.ingot-snow-a {
  animation-duration: 13s;
  animation-delay: -2s;
}

.ingot-snow-b {
  transform: translateX(34px);
  animation-name: ingotSnowFallWide;
  animation-duration: 18s;
  animation-delay: -8s;
}

.ingot-snow-c {
  transform: translateX(-42px);
  animation-duration: 22s;
  animation-delay: -13s;
}

.woodfish-blessing {
  position: absolute;
  top: 58px;
  width: 154px;
  height: 112px;
  color: #8e1515;
  opacity: 0.9;
  filter: drop-shadow(0 12px 14px rgba(74, 37, 18, 0.22));
}

.woodfish-left {
  left: 28px;
}

.woodfish-right {
  right: 28px;
}

.woodfish-right .woodfish-aura,
.woodfish-right .woodfish-mallet,
.woodfish-right .woodfish-body,
.woodfish-right .woodfish-note {
  animation-delay: -0.45s;
}

.woodfish-right .woodfish-ring-a {
  animation-delay: -0.45s;
}

.woodfish-right .woodfish-ring-b {
  animation-delay: -0.27s;
}

.woodfish-right .woodfish-body::after {
  content: "德";
}

.woodfish-aura {
  position: absolute;
  inset: 14px 14px 4px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 236, 154, 0.55), rgba(216, 154, 40, 0.16) 48%, transparent 72%),
    repeating-conic-gradient(from 16deg, rgba(216, 154, 40, 0.28) 0 8deg, transparent 8deg 24deg);
  animation: woodfishAura 4.8s linear infinite;
}

.woodfish-body {
  position: absolute;
  left: 30px;
  bottom: 18px;
  width: 88px;
  height: 50px;
  border: 3px solid #7b3f16;
  border-radius: 58% 46% 48% 52%;
  background:
    radial-gradient(circle at 68% 34%, #3f1f10 0 4px, transparent 5px),
    radial-gradient(circle at 32% 38%, rgba(255, 229, 142, 0.42), transparent 18%),
    linear-gradient(135deg, #c47a2c 0%, #8f4f1b 52%, #5d2c12 100%);
  box-shadow:
    inset 0 5px 0 rgba(255, 230, 143, 0.28),
    inset 0 -7px 0 rgba(58, 27, 10, 0.24);
  animation: woodfishBodyPulse 1.38s ease-in-out infinite;
}

.woodfish-body::before {
  content: "";
  position: absolute;
  left: 15px;
  bottom: 12px;
  width: 40px;
  height: 10px;
  border-radius: 50%;
  border-top: 3px solid rgba(62, 29, 12, 0.66);
}

.woodfish-body::after {
  content: "善";
  position: absolute;
  left: 35px;
  top: 11px;
  color: rgba(255, 233, 164, 0.86);
  font-size: 17px;
  font-weight: 900;
  text-shadow: 0 1px 0 rgba(70, 31, 11, 0.46);
}

.woodfish-mallet {
  position: absolute;
  left: 80px;
  top: 19px;
  width: 58px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #5d2c12, #b56b2d 62%, #f1bf62);
  transform-origin: 9px 50%;
  animation: woodfishTap 1.38s cubic-bezier(0.5, 0, 0.25, 1) infinite;
}

.woodfish-mallet::after {
  content: "";
  position: absolute;
  right: -9px;
  top: -8px;
  width: 20px;
  height: 24px;
  border: 2px solid #6b3515;
  border-radius: 45% 45% 50% 50%;
  background: linear-gradient(180deg, #d79642, #7f3f17);
}

.woodfish-ring {
  position: absolute;
  left: 66px;
  top: 37px;
  width: 28px;
  height: 28px;
  border: 2px solid rgba(216, 154, 40, 0.58);
  border-radius: 50%;
  opacity: 0;
  animation: woodfishRing 1.38s ease-out infinite;
}

.woodfish-ring-b {
  animation-delay: 0.18s;
}

.woodfish-note {
  position: absolute;
  min-width: 34px;
  padding: 1px 5px;
  border: 1px solid rgba(216, 154, 40, 0.52);
  border-radius: 999px;
  background: rgba(255, 247, 218, 0.78);
  color: #a35a0d;
  font-size: 11px;
  font-weight: 900;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(216, 154, 40, 0.14);
  animation: woodfishNoteFloat 3.8s ease-in-out infinite;
}

.woodfish-note-a {
  left: 8px;
  top: 12px;
}

.woodfish-note-b {
  right: 4px;
  bottom: 8px;
  animation-delay: -1.6s;
}

.wealth-guardian {
  position: absolute;
  top: 36%;
  width: 92px;
  height: 164px;
  color: #fff5cc;
  text-align: center;
  filter: drop-shadow(0 12px 12px rgba(74, 37, 18, 0.2));
  animation: guardianFloat 4.8s ease-in-out infinite;
}

.wealth-guardian-left {
  left: 6px;
}

.wealth-guardian-right {
  right: 6px;
  animation-delay: -2.2s;
}

.guardian-halo {
  position: absolute;
  top: 0;
  left: 22px;
  width: 48px;
  height: 48px;
  border: 2px solid rgba(255, 221, 118, 0.74);
  border-radius: 50%;
  color: #b91c1c;
  background: radial-gradient(circle, #fff4b2, #d89a28 68%, transparent 70%);
  font-size: 21px;
  font-weight: 900;
  line-height: 44px;
  box-shadow: 0 0 16px rgba(216, 154, 40, 0.42);
}

.guardian-hat {
  position: absolute;
  top: 17px;
  left: 13px;
  width: 66px;
  height: 22px;
  border: 2px solid #f3c24d;
  border-radius: 12px 12px 5px 5px;
  background: linear-gradient(180deg, #f5c94f, #bd1d1d 55%, #8e1515);
  color: #fff3b0;
  font-size: 11px;
  font-weight: 900;
  line-height: 18px;
  z-index: 2;
}

.guardian-face {
  position: absolute;
  top: 34px;
  left: 22px;
  width: 48px;
  height: 44px;
  border: 2px solid #bd7b40;
  border-radius: 45% 45% 48% 48%;
  background: #f3bf83;
  color: #7e1a18;
  font-size: 10px;
  font-weight: 900;
  line-height: 40px;
  z-index: 1;
}

.guardian-face::before,
.guardian-face::after {
  content: "";
  position: absolute;
  top: 16px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4b1f18;
}

.guardian-face::before {
  left: 10px;
}

.guardian-face::after {
  right: 10px;
}

.guardian-robe {
  position: absolute;
  top: 70px;
  left: 10px;
  width: 72px;
  height: 78px;
  border: 2px solid #f3c24d;
  border-radius: 28px 28px 10px 10px;
  background:
    linear-gradient(90deg, transparent 42%, rgba(255, 223, 109, 0.74) 43% 57%, transparent 58%),
    linear-gradient(180deg, #e73333, #941616);
}

.guardian-robe::after {
  content: "财";
  position: absolute;
  left: 25px;
  top: 22px;
  color: #ffe89a;
  font-size: 25px;
  font-weight: 900;
}

.guardian-ingot {
  position: absolute;
  right: -1px;
  bottom: 12px;
  width: 29px;
  height: 17px;
  border: 2px solid #bd7b14;
  border-radius: 50%;
  background: #ffe58b;
  color: #9b5b0d;
  font-size: 10px;
  font-weight: 900;
  line-height: 13px;
  transform: rotate(-12deg);
}

.guardian-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  color: #9b5b0d;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.wealth-child {
  position: absolute;
  left: 50%;
  bottom: 7px;
  width: 92px;
  height: 92px;
  color: #fff6c7;
  text-align: center;
  filter: drop-shadow(0 9px 10px rgba(74, 37, 18, 0.2));
  transform: translateX(-50%);
  animation: childBounce 3.8s ease-in-out infinite;
}

.child-head {
  position: absolute;
  top: 5px;
  left: 31px;
  width: 30px;
  height: 30px;
  border: 2px solid #bd7b40;
  border-radius: 50%;
  background: #f3bf83;
  color: #8e1515;
  font-size: 16px;
  font-weight: 900;
  line-height: 26px;
}

.child-body {
  position: absolute;
  left: 20px;
  top: 31px;
  width: 52px;
  height: 49px;
  border: 2px solid #f3c24d;
  border-radius: 22px 22px 8px 8px;
  background: linear-gradient(180deg, #e73333, #981717);
  color: #ffe89a;
  font-size: 23px;
  font-weight: 900;
  line-height: 44px;
}

.child-ingot {
  position: absolute;
  right: 2px;
  top: 48px;
  width: 27px;
  height: 16px;
  border: 2px solid #bd7b14;
  border-radius: 50%;
  background: #ffe58b;
  color: #9b5b0d;
  font-size: 10px;
  font-weight: 900;
  line-height: 12px;
  transform: rotate(10deg);
}

.wealth-child span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  color: #9b5b0d;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.wealth-basin {
  position: absolute;
  bottom: 8px;
  width: 122px;
  height: 90px;
  color: #fff7d1;
  text-align: center;
  filter: drop-shadow(0 12px 14px rgba(74, 37, 18, 0.2));
  animation: basinFloat 4.4s ease-in-out infinite;
}

.wealth-basin-left {
  left: 10px;
}

.wealth-basin-right {
  right: 10px;
  animation-delay: -1.9s;
}

.basin-glow {
  position: absolute;
  inset: 16px 22px 12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 244, 191, 0.68), rgba(216, 154, 40, 0.18) 60%, transparent 70%);
  filter: blur(2px);
}

.basin-bowl {
  position: absolute;
  left: 17px;
  right: 17px;
  bottom: 8px;
  height: 54px;
  border: 2px solid #8f4f11;
  border-top-width: 3px;
  border-radius: 8px 8px 28px 28px;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.62), transparent 14%),
    linear-gradient(180deg, #f0c65b 0%, #c57b11 58%, #8e4d0a 100%);
  box-shadow:
    inset 0 10px 0 rgba(255, 241, 171, 0.16),
    inset 0 -8px 0 rgba(83, 32, 6, 0.1);
}

.basin-bowl::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: -9px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(180deg, #fff0b3, #d89a28);
  border: 2px solid #8f4f11;
}

.basin-bowl::after {
  content: "聚";
  position: absolute;
  left: 0;
  right: 0;
  top: 12px;
  color: #fff1ba;
  font-size: 22px;
  font-weight: 900;
  text-shadow: 0 1px 0 rgba(74, 37, 18, 0.12);
}

.basin-ingot {
  position: absolute;
  width: 24px;
  height: 16px;
  border: 2px solid #bd7b14;
  border-radius: 50%;
  background: #ffe58b;
  color: #9b5b0d;
  font-size: 9px;
  font-weight: 900;
  line-height: 12px;
  box-shadow: 0 5px 9px rgba(216, 154, 40, 0.18);
}

.basin-ingot-a {
  left: 16px;
  top: 10px;
  transform: rotate(-16deg);
}

.basin-ingot-b {
  left: 38px;
  top: 2px;
  transform: rotate(8deg);
}

.basin-ingot-c {
  right: 38px;
  top: 4px;
  transform: rotate(-4deg);
}

.basin-ingot-d {
  right: 14px;
  top: 12px;
  transform: rotate(14deg);
}

.basin-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  color: #9b5b0d;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

@keyframes marqueeTravel {
  to {
    background-position: 28px 0;
  }
}

@keyframes marqueeTravelVertical {
  to {
    background-position: 0 28px;
  }
}

@keyframes moneyFall {
  0% {
    transform: translate3d(0, -60px, 0) rotate(-8deg);
    opacity: 0;
  }
  12% {
    opacity: 0.82;
  }
  50% {
    transform: translate3d(42px, 48vh, 0) rotate(14deg);
  }
  100% {
    transform: translate3d(-22px, 108vh, 0) rotate(-18deg);
    opacity: 0;
  }
}

@keyframes ingotSnowFall {
  0% {
    transform: translate3d(0, -110px, 0);
    opacity: 0;
  }
  10% {
    opacity: 0.86;
  }
  55% {
    transform: translate3d(24px, 58vh, 0);
  }
  100% {
    transform: translate3d(-18px, 112vh, 0);
    opacity: 0;
  }
}

@keyframes ingotSnowFallWide {
  0% {
    transform: translate3d(34px, -120px, 0);
    opacity: 0;
  }
  10% {
    opacity: 0.78;
  }
  55% {
    transform: translate3d(-28px, 62vh, 0);
  }
  100% {
    transform: translate3d(48px, 115vh, 0);
    opacity: 0;
  }
}

@keyframes guardianFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-8px) rotate(1deg);
  }
}

@keyframes childBounce {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-5px);
  }
}

@keyframes basinFloat {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-6px) rotate(1deg);
  }
}

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

@keyframes woodfishTap {
  0%,
  48%,
  100% {
    transform: rotate(-31deg) translateY(0);
  }
  58% {
    transform: rotate(15deg) translateY(4px);
  }
  68% {
    transform: rotate(-24deg) translateY(-1px);
  }
}

@keyframes woodfishBodyPulse {
  0%,
  52%,
  100% {
    transform: translateY(0) scale(1);
  }
  60% {
    transform: translateY(2px) scale(0.985, 1.035);
  }
}

@keyframes woodfishRing {
  0%,
  45% {
    transform: scale(0.3);
    opacity: 0;
  }
  58% {
    opacity: 0.72;
  }
  100% {
    transform: scale(2.25);
    opacity: 0;
  }
}

@keyframes woodfishNoteFloat {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.78;
  }
  50% {
    transform: translateY(-7px);
    opacity: 1;
  }
}

body.is-networking .scroll-progress {
  animation: progressPulse 0.86s ease-in-out infinite;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.topbar,
.content,
.footer {
  width: min(1280px, calc(100% - 32px));
  margin: 16px auto 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: sticky;
  top: 12px;
  z-index: 20;
  backdrop-filter: blur(10px);
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #111827, #374151);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0;
  flex: 0 0 auto;
}

.brand-copy {
  min-width: 0;
}

.brand-copy h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.1;
}

.brand-copy p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.content {
  flex: 1;
  display: grid;
  gap: 16px;
  padding-bottom: 24px;
}

.hero,
.band,
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: minmax(260px, 1.1fr) minmax(360px, 1fr);
  gap: 18px;
  padding: 20px;
  align-items: stretch;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  font-weight: 700;
}

.hero-copy h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
}

.hero-copy p {
  margin: 0;
  color: var(--muted);
}

.note {
  padding: 10px 12px;
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: #5f6976;
  font-size: 13px;
}

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

.stat-card {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 96px;
}

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

.stat-card .value {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0;
}

.stat-card .sub {
  font-size: 12px;
  color: var(--muted);
}

.band {
  padding: 16px 18px 18px;
}

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

.section-head h3 {
  margin: 0;
  font-size: 16px;
}

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

.grid {
  display: grid;
  gap: 16px;
}

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

.panel {
  padding: 16px 18px 18px;
}

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

.subhead {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
}

.bars {
  display: grid;
  gap: 8px;
}

.bar-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 10px;
}

.ball-pill {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  flex: 0 0 auto;
}

.ball-red {
  background: linear-gradient(180deg, #ef4444, #b91c1c);
}

.ball-blue {
  background: linear-gradient(180deg, #3b82f6, #1d4ed8);
}

.ball-teal {
  background: linear-gradient(180deg, #0f766e, #115e59);
}

.ball-amber {
  background: linear-gradient(180deg, #d97706, #92400e);
}

.track {
  height: 10px;
  border-radius: 999px;
  background: #edf2f7;
  overflow: hidden;
  border: 1px solid #dde5ec;
}

.fill {
  height: 100%;
  border-radius: inherit;
}

.fill-red {
  background: linear-gradient(90deg, #fca5a5, #ef4444);
}

.fill-blue {
  background: linear-gradient(90deg, #93c5fd, #3b82f6);
}

.fill-teal {
  background: linear-gradient(90deg, #5eead4, #0f766e);
}

.fill-amber {
  background: linear-gradient(90deg, #fdba74, #d97706);
}

.bar-score {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 12px;
}

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

.ball-row .ball-pill {
  width: 38px;
  height: 38px;
  font-size: 13px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.chip {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--panel-soft);
  border: 1px solid var(--border);
  font-size: 12px;
  color: #334155;
}

.predict-grid,
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

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

.field-span-2 {
  grid-column: span 2;
}

.control {
  width: 100%;
  height: 38px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #fff;
  padding: 0 12px;
  color: var(--text);
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.control:focus {
  border-color: #94a3b8;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

.button {
  height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
  position: relative;
  overflow: hidden;
}

.button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.button.is-busy {
  color: transparent;
  pointer-events: none;
}

.button.is-busy::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  inset: 0;
  margin: auto;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  color: #fff;
  animation: spin 0.72s linear infinite;
}

.button-ghost.is-busy::after,
.button:not(.button-accent):not(.button-ai):not(.button-draw).is-busy::after {
  color: var(--accent-3);
}

.ripple {
  position: absolute;
  width: 18px;
  height: 18px;
  left: var(--x);
  top: var(--y);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.62);
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
  animation: ripple 0.58s ease-out forwards;
}

.button-accent {
  background: linear-gradient(180deg, #ef4444, #dc2626);
  color: #fff;
  border-color: #dc2626;
}

.button-ghost {
  background: var(--panel-soft);
}

.candidate-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.candidate-loading {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.candidate-skeleton {
  height: 78px;
  border-radius: var(--radius);
  border: 1px solid rgba(216, 154, 40, 0.2);
  background:
    linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.82) 44%, transparent 62%),
    linear-gradient(90deg, rgba(255, 248, 237, 0.94), rgba(237, 248, 245, 0.82));
  background-size: 220% 100%, 100% 100%;
  animation: skeletonRun 1.1s ease-in-out infinite;
}

.candidate-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 104px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel-soft);
}

.candidate-item.is-fresh {
  animation-name: slideIn, candidateGlow;
  animation-duration: 0.48s, 1.15s;
  animation-timing-function: ease, ease-out;
}

.candidate-rank {
  display: grid;
  gap: 4px;
  justify-items: start;
}

.candidate-rank .rank {
  font-size: 12px;
  color: var(--muted);
}

.candidate-rank .score {
  font-size: 18px;
  font-weight: 800;
}

.candidate-balls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.candidate-meta {
  text-align: right;
  color: var(--muted);
  font-size: 12px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
  background: #fff;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid #e5ebf0;
  font-size: 13px;
}

.data-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
}

.data-table tbody tr:hover {
  background: #f8fafc;
}

.data-table .inline-balls {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 6px;
  min-width: max-content;
  white-space: nowrap;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 4px 18px;
  color: var(--muted);
  font-size: 12px;
}

.link {
  text-decoration: none;
  color: var(--accent-2);
  font-weight: 700;
}

.status-ok {
  color: var(--accent-3);
}

.status-warn {
  color: var(--accent-4);
}

.ambient-numbers {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
  color: rgba(120, 75, 36, 0.09);
  font-size: clamp(18px, 2vw, 34px);
  font-weight: 900;
  letter-spacing: 0;
  user-select: none;
}

.number-lane {
  position: absolute;
  left: -30%;
  width: 160%;
  white-space: nowrap;
  word-spacing: 24px;
  animation: numberDrift 38s linear infinite;
}

.lane-a {
  top: 9%;
}

.lane-b {
  top: 43%;
  animation-duration: 52s;
  animation-direction: reverse;
  color: rgba(29, 101, 166, 0.07);
}

.lane-c {
  top: 78%;
  animation-duration: 46s;
  color: rgba(15, 122, 104, 0.07);
}

.topbar {
  background: rgba(255, 252, 247, 0.9);
  background-image: url("/static/bg07.jpg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  border-color: rgba(216, 154, 40, 0.28);
  overflow: hidden;
}

.topbar::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--gold), var(--accent-2), var(--accent));
  background-size: 240% 100%;
  animation: lightSweep 5s linear infinite;
}

.brand-mark {
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.75), transparent 20%),
    linear-gradient(135deg, #d72f2f, #9f1d1d 48%, #2a1710);
  box-shadow: 0 10px 20px rgba(183, 42, 42, 0.24);
  animation: sealPulse 3.8s ease-in-out infinite;
}

.brand-copy h1 {
  font-size: 21px;
}

.brand-copy p {
  color: #7a4b16;
  font-weight: 700;
  min-height: 18px;
  transition: color 0.2s ease;
}

.toolbar .button,
.toolbar .control {
  box-shadow: 0 6px 16px rgba(76, 42, 18, 0.06);
}

.control {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(176, 137, 95, 0.38);
}

.button {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(176, 137, 95, 0.38);
}

.button-accent {
  background: linear-gradient(180deg, #f04747, #c81f1f);
  border-color: #bd1d1d;
  box-shadow: 0 12px 22px rgba(200, 31, 31, 0.2);
}

.button-ai {
  background: linear-gradient(135deg, #171717, #7a3b11 46%, #d89a28);
  border-color: rgba(216, 154, 40, 0.7);
  color: #fff;
  box-shadow: 0 14px 28px rgba(74, 37, 18, 0.2);
}

.button-draw {
  background: linear-gradient(180deg, #0f7a68, #095f51);
  border-color: #095f51;
  color: #fff;
  box-shadow: 0 14px 28px rgba(15, 122, 104, 0.18);
}

.button-ghost {
  background: #fff8ef;
}

.fortune-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(255, 247, 226, 0.94)),
    repeating-linear-gradient(90deg, rgba(216, 154, 40, 0.1) 0 1px, transparent 1px 38px);
  border: 1px solid rgba(216, 154, 40, 0.32);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
  overflow: hidden;
  position: relative;
}

.fortune-strip::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.7) 45%, transparent 62%);
  transform: translateX(-120%);
  animation: panelShine 7s ease-in-out infinite;
}

.fortune-strip > * {
  position: relative;
  z-index: 1;
}

.fortune-kicker {
  display: block;
  margin-bottom: 3px;
  color: #9a4f0c;
  font-size: 12px;
  font-weight: 800;
}

.fortune-strip strong {
  font-size: clamp(18px, 2.6vw, 28px);
  line-height: 1.15;
}

.fortune-meter {
  width: min(34vw, 340px);
  height: 12px;
  border-radius: 999px;
  background: rgba(215, 47, 47, 0.08);
  border: 1px solid rgba(216, 154, 40, 0.35);
  overflow: hidden;
  flex: 0 0 auto;
}

.fortune-meter span {
  display: block;
  width: 48%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d72f2f, #d89a28, #0f7a68);
  animation: meterRun 4.2s ease-in-out infinite;
}

.hero,
.band,
.panel {
  border-color: rgba(176, 137, 95, 0.28);
  box-shadow: var(--shadow);
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 322px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 247, 234, 0.9) 58%, rgba(237, 248, 245, 0.92)),
    repeating-linear-gradient(135deg, rgba(215, 47, 47, 0.06) 0 1px, transparent 1px 26px);
}

.hero::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--gold), var(--accent-3), var(--accent-2));
  background-size: 220% 100%;
  animation: lightSweep 6s linear infinite;
}

.hero::after {
  content: "08 16 24 33 05 11 27 03 18 29";
  position: absolute;
  right: -24px;
  bottom: 18px;
  color: rgba(36, 27, 23, 0.045);
  font-size: 64px;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
}

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

.eyebrow {
  background: #fff0d1;
  color: #8a4b06;
  border: 1px solid rgba(216, 154, 40, 0.36);
}

.hero-copy h2 {
  font-size: clamp(32px, 5vw, 58px);
  color: #1e1714;
  text-wrap: balance;
}

.hero-copy p {
  max-width: 680px;
}

.lucky-board {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: min(100%, 620px);
  padding: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(216, 154, 40, 0.32);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.lucky-label {
  display: block;
  color: #9a4f0c;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 4px;
}

.lucky-board strong {
  font-size: 16px;
  line-height: 1.25;
}

.mini-balls {
  display: flex;
  gap: 5px;
  flex: 0 0 auto;
}

.mini-balls span {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  background: linear-gradient(180deg, #e64040, #a91f1f);
  animation: floatPulse 3s ease-in-out infinite;
}

.mini-balls span:nth-child(even) {
  background: linear-gradient(180deg, #1d65a6, #174a7c);
  animation-delay: 0.4s;
}

.note {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(120, 107, 96, 0.2);
  color: #6a5b4d;
}

.stat-card {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.74);
  border-color: rgba(176, 137, 95, 0.28);
  animation: riseIn 0.52s ease both;
  animation-delay: var(--delay, 0ms);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--gold), var(--accent-3));
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(216, 154, 40, 0.5);
  box-shadow: 0 18px 32px rgba(74, 37, 18, 0.13);
}

.stat-card .value {
  color: #1d1713;
  font-variant-numeric: tabular-nums;
}

.band,
.panel {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
}

.latest-stage {
  min-height: 92px;
  display: flex;
  align-items: center;
  padding: 18px;
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(215, 47, 47, 0.08), rgba(216, 154, 40, 0.08), rgba(29, 101, 166, 0.08)),
    #fffaf4;
  border: 1px solid rgba(216, 154, 40, 0.24);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 12px 22px rgba(74, 37, 18, 0.06);
}

.latest-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.82), transparent);
  transform: translateX(-100%);
  animation: panelShine 5.8s ease-in-out infinite;
}

.latest-stage .ball-row {
  position: relative;
  z-index: 1;
}

.latest-detail {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid rgba(176, 137, 95, 0.24);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 252, 247, 0.98), rgba(255, 247, 234, 0.86)),
    repeating-linear-gradient(135deg, rgba(216, 154, 40, 0.04) 0 1px, transparent 1px 22px);
  box-shadow: 0 14px 28px rgba(74, 37, 18, 0.06);
}

.latest-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.latest-detail-title {
  color: #4d3c2a;
  font-size: 15px;
  font-weight: 900;
}

.latest-detail-sub,
.latest-detail-note {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.latest-detail-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  white-space: nowrap;
}

.latest-detail-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.latest-detail-grid > div {
  padding: 9px 10px;
  border: 1px solid rgba(216, 154, 40, 0.2);
  border-radius: var(--radius);
  background: #fff;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.latest-detail-grid > div:hover {
  transform: translateY(-2px);
  border-color: rgba(216, 154, 40, 0.5);
  box-shadow: 0 10px 18px rgba(74, 37, 18, 0.08);
}

.latest-detail-grid > div > span,
.latest-number-detail > div > span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
}

.latest-detail-grid strong {
  display: block;
  color: #2d211a;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.latest-number-detail {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.latest-number-detail > div {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.latest-number-detail .ball-row {
  min-width: 0;
}

.latest-prize-wrap {
  margin-top: 14px;
  overflow-x: auto;
}

.latest-prize-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: #fff;
}

.latest-prize-table th,
.latest-prize-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #eee4d7;
  text-align: left;
  font-size: 12px;
}

.latest-prize-table th {
  color: #6d4a23;
  background: #fff5e6;
}

.latest-empty {
  margin-top: 12px;
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
  background: #fff;
  border: 1px dashed rgba(120, 107, 96, 0.28);
}

.button-danger {
  color: #b91c1c;
  border-color: rgba(185, 28, 28, 0.28);
  background: #fff1f1;
}

.button-danger:hover {
  border-color: rgba(185, 28, 28, 0.58);
  box-shadow: 0 8px 18px rgba(185, 28, 28, 0.12);
}

.ball-pill {
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.35),
    0 10px 16px rgba(36, 27, 23, 0.14);
  animation: ballPop 0.46s cubic-bezier(0.17, 0.67, 0.35, 1.32) both, ballBreathe 3.8s ease-in-out infinite;
  animation-delay: var(--delay, 0ms), calc(var(--delay, 0ms) + 700ms);
}

.ball-red {
  background:
    radial-gradient(circle at 34% 25%, rgba(255, 255, 255, 0.85), transparent 18%),
    linear-gradient(180deg, #ff5555, #bd1d1d 70%);
}

.ball-blue {
  background:
    radial-gradient(circle at 34% 25%, rgba(255, 255, 255, 0.78), transparent 18%),
    linear-gradient(180deg, #4295e8, #174a7c 70%);
}

.bar-row {
  animation: riseIn 0.38s ease both;
  animation-delay: var(--delay, 0ms);
}

.track {
  background: #f4ece1;
  border-color: rgba(176, 137, 95, 0.26);
}

.fill {
  position: relative;
  overflow: hidden;
}

.fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: translateX(-100%);
  animation: fillShine 2.8s ease-in-out infinite;
}

.candidate-list {
  gap: 12px;
}

.candidate-export-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(176, 137, 95, 0.18);
  color: var(--muted);
  font-size: 12px;
}

.candidate-export-tools > span {
  margin-right: 2px;
}

.candidate-export-button {
  height: 30px;
  min-width: 48px;
  padding-inline: 9px;
  font-size: 11px;
  font-weight: 900;
}

.candidate-record-all-button {
  min-height: 30px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 900;
}

.candidate-export-button:not(:disabled):hover {
  color: #115e59;
  border-color: rgba(15, 122, 104, 0.42);
  background: #eef7f4;
}

.candidate-item {
  grid-template-columns: 54px minmax(260px, 1fr) minmax(180px, 0.45fr) auto;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.92), rgba(255, 248, 237, 0.92)),
    #fff;
  border-color: rgba(216, 154, 40, 0.28);
  box-shadow: var(--soft-shadow);
  animation: slideIn 0.48s ease both;
  animation-delay: var(--delay, 0ms);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.candidate-item::before {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 5px;
  background: linear-gradient(180deg, var(--accent), var(--gold), var(--accent-3));
}

.candidate-item:hover {
  transform: translateY(-2px);
  border-color: rgba(216, 154, 40, 0.56);
  box-shadow: 0 18px 34px rgba(74, 37, 18, 0.14);
}

.candidate-rank .rank {
  font-weight: 800;
  color: #9a4f0c;
}

.candidate-rank .score {
  color: #c81f1f;
  font-variant-numeric: tabular-nums;
}

.candidate-meta {
  color: #75665a;
  line-height: 1.45;
  min-width: 0;
}

.button-record {
  height: 32px;
  padding-inline: 11px;
  white-space: nowrap;
  color: #0f7a68;
  border-color: rgba(15, 122, 104, 0.3);
  background: #eef7f4;
}

.button-record:hover {
  border-color: rgba(15, 122, 104, 0.58);
  box-shadow: 0 8px 18px rgba(15, 122, 104, 0.14);
}

.prize-panel {
  overflow: hidden;
}

.manual-record-panel {
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid rgba(15, 122, 104, 0.2);
  border-radius: var(--radius);
  background: #f4fbf8;
}

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

.manual-record-head strong {
  display: block;
  color: #115e59;
  font-size: 13px;
}

.manual-record-head span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.manual-record-controls,
.manual-number-fields {
  display: grid;
  grid-template-columns: 1.2fr 0.6fr 0.7fr 0.6fr auto;
  gap: 10px;
  align-items: end;
}

.manual-number-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 10px;
}

.manual-picker-group {
  margin-top: 10px;
}

.manual-picker-title {
  margin-bottom: 6px;
  color: #3f5552;
  font-size: 12px;
  font-weight: 800;
}

.manual-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.manual-number {
  width: 34px;
  height: 30px;
  border: 1px solid rgba(176, 137, 95, 0.28);
  border-radius: 6px;
  background: #fff;
  color: #5f5146;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  transition: transform 0.12s ease, color 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

.manual-number:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 122, 104, 0.5);
}

.manual-number-front.is-selected {
  color: #fff;
  border-color: #bd1d1d;
  background: linear-gradient(180deg, #ff5555, #bd1d1d);
}

.manual-number-back.is-selected {
  color: #fff;
  border-color: #174a7c;
  background: linear-gradient(180deg, #4295e8, #174a7c);
}

.prize-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.prize-toolbar .control {
  min-width: 116px;
}

.prize-transfer-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding-left: 8px;
  border-left: 1px solid rgba(176, 137, 95, 0.22);
}

.prize-transfer-tools span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.prize-transfer-button {
  height: 30px;
  min-width: 46px;
  padding-inline: 8px;
  font-size: 11px;
  font-weight: 900;
}

.hidden-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.prize-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.prize-summary-item {
  padding: 7px 10px;
  border: 1px solid rgba(216, 154, 40, 0.28);
  border-radius: var(--radius);
  background: #fff8ef;
  color: #6d4a23;
  font-size: 12px;
  font-weight: 800;
}

.prize-table {
  min-width: 1040px;
}

.prize-table .inline-balls {
  min-width: 260px;
}

.prize-table td:last-child {
  width: 64px;
  white-space: nowrap;
}

.prize-table .button-delete-record {
  height: 30px;
  min-width: 46px;
  padding: 0 10px;
  border-radius: 6px;
  box-shadow: none;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.prize-table .button-delete-record:hover {
  box-shadow: 0 6px 12px rgba(185, 28, 28, 0.12);
}

.prize-amount {
  display: grid;
  gap: 2px;
  min-width: 124px;
}

.prize-amount strong {
  color: #9a4f0c;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.prize-amount span {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.prize-tier {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.prize-won {
  color: #9a4f0c;
  background: #fff0d1;
  border: 1px solid rgba(216, 154, 40, 0.4);
}

.prize-pending {
  color: #1d65a6;
  background: #edf5ff;
  border: 1px solid rgba(29, 101, 166, 0.25);
}

.prize-none {
  color: #786b60;
  background: #f4f1ed;
  border: 1px solid rgba(120, 107, 96, 0.2);
}

.history-machine-grid {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.history-machine-grid > .panel {
  min-width: 0;
}

.draw-panel {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(244, 249, 252, 0.92) 46%, rgba(232, 246, 242, 0.9)),
    repeating-linear-gradient(135deg, rgba(15, 122, 104, 0.04) 0 1px, transparent 1px 24px);
}

.draw-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-3), var(--gold), var(--accent), var(--accent-2), var(--accent-3));
  background-size: 240% 100%;
  animation: lightSweep 6.4s linear infinite;
}

.draw-panel > * {
  position: relative;
  z-index: 1;
}

.machine-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 10px;
  border: 1px solid rgba(15, 122, 104, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.segmented {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(78px, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(15, 122, 104, 0.24);
  border-radius: var(--radius);
  background: #eef7f4;
  flex: 0 0 auto;
}

.seg-button {
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #32544f;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.seg-button:hover {
  background: rgba(255, 255, 255, 0.78);
  transform: translateY(-1px);
}

.seg-button.is-active {
  background: linear-gradient(180deg, #169982, #0f7a68);
  color: #fff;
  box-shadow: 0 8px 18px rgba(15, 122, 104, 0.24);
}

.draw-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(360px, 1fr);
  gap: 14px;
  align-items: stretch;
}

.draw-playout {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
  min-width: 0;
}

.draw-status-card {
  position: relative;
  overflow: hidden;
  padding: 14px 16px;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(235, 246, 242, 0.82)),
    #fff;
  border: 1px solid rgba(15, 122, 104, 0.2);
  box-shadow: var(--soft-shadow);
}

.draw-status-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.64), transparent);
  transform: translateX(-120%);
  animation: panelShine 6.2s ease-in-out infinite;
}

.draw-status-card > * {
  position: relative;
  z-index: 1;
}

.draw-status-label {
  margin-bottom: 4px;
  color: #0f7a68;
  font-size: 12px;
  font-weight: 900;
}

#drawStatusCopy {
  font-size: 14px;
  color: #3f5552;
  line-height: 1.55;
}

.draw-track {
  display: grid;
  gap: 14px;
  padding: 14px;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.78)),
    repeating-linear-gradient(90deg, rgba(29, 101, 166, 0.06) 0 1px, transparent 1px 28px);
  border: 1px solid rgba(176, 137, 95, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.draw-zone {
  display: grid;
  gap: 10px;
}

.draw-zone-title {
  font-size: 13px;
  font-weight: 900;
  color: #4d3c2a;
}

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

.draw-slot {
  position: relative;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.94), transparent 18%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(225, 232, 240, 0.84));
  border: 1px solid rgba(118, 134, 153, 0.22);
  box-shadow:
    inset 0 2px 5px rgba(255, 255, 255, 0.82),
    0 10px 18px rgba(51, 65, 85, 0.08);
  overflow: hidden;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.draw-slot:hover {
  transform: translateY(-2px);
  border-color: rgba(216, 154, 40, 0.44);
  box-shadow:
    inset 0 2px 5px rgba(255, 255, 255, 0.82),
    0 14px 24px rgba(74, 37, 18, 0.12);
}

.draw-slot .slot-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #d7b56d, #9a4f0c);
  box-shadow: 0 0 0 6px rgba(154, 79, 12, 0.08);
}

.draw-slot.is-filled {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.draw-slot.is-filled::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1px solid rgba(216, 154, 40, 0.3);
  animation: slotPulse 1.6s ease-in-out 2;
}

.draw-ball {
  width: 100%;
  height: 100%;
  font-size: 15px;
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.36),
    0 14px 20px rgba(74, 37, 18, 0.18);
  animation: ballPop 0.48s cubic-bezier(0.17, 0.67, 0.35, 1.32) both, ballBreathe 3.6s ease-in-out infinite;
}

.draw-meta {
  min-height: 42px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(118, 134, 153, 0.16);
  font-size: 12px;
  color: #6a5f56;
  line-height: 1.45;
}

.draw-machine {
  position: relative;
  padding: 16px;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(43, 52, 63, 0.98), rgba(18, 24, 32, 0.99)),
    radial-gradient(circle at 50% 0%, rgba(83, 227, 194, 0.12), transparent 38%),
    #151d27;
  color: #fff;
  border: 1px solid rgba(148, 163, 184, 0.32);
  box-shadow:
    0 26px 46px rgba(15, 23, 42, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  overflow: hidden;
  isolation: isolate;
}

.draw-machine::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  pointer-events: none;
  z-index: 0;
}

.draw-machine::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 0;
  height: 6px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(90deg, transparent, rgba(83, 227, 194, 0.55), transparent);
  opacity: 0.78;
}

.machine-topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 2px 12px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.86);
}

.machine-pip {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #61f0cc, #0f7a68);
  box-shadow: 0 0 0 6px rgba(15, 122, 104, 0.18), 0 0 20px rgba(83, 227, 194, 0.42);
}

.draw-machine.is-shaking .machine-pip {
  animation: pipBlink 0.64s ease-in-out infinite;
}

.machine-mode {
  margin-left: auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
}

.machine-glass {
  position: relative;
  min-height: 382px;
  border-radius: var(--radius);
  border: 1px solid rgba(203, 213, 225, 0.34);
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.1), transparent 30% 72%, rgba(255, 255, 255, 0.08)),
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.22), transparent 30%),
    radial-gradient(circle at 76% 64%, rgba(83, 227, 194, 0.1), transparent 32%),
    linear-gradient(180deg, rgba(41, 52, 67, 0.92), rgba(20, 31, 43, 0.96));
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -22px 34px rgba(0, 0, 0, 0.18);
}

.machine-glass::before,
.machine-glass::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

.machine-glass::before {
  background:
    linear-gradient(106deg, transparent 0 22%, rgba(255, 255, 255, 0.24) 29%, transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 16%, transparent 78%, rgba(255, 255, 255, 0.08));
  mix-blend-mode: screen;
}

.machine-glass::after {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.16), transparent 20%, transparent 74%, rgba(0, 0, 0, 0.2)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04), transparent 15% 85%, rgba(255, 255, 255, 0.04));
}

.machine-chambers {
  position: absolute;
  inset: 20px 20px 62px;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(150px, 0.82fr);
  gap: 18px;
  align-items: end;
}

.machine-chamber {
  position: relative;
  min-height: 258px;
  padding: 46px 12px 14px;
  overflow: hidden;
  border-radius: 46% 46% 40% 40% / 42% 42% 48% 48%;
  background:
    radial-gradient(circle at 32% 18%, rgba(255, 255, 255, 0.42), transparent 18%),
    radial-gradient(circle at 50% 66%, rgba(255, 255, 255, 0.1), transparent 54%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.055));
  border: 1px solid rgba(226, 232, 240, 0.36);
  box-shadow:
    inset 0 2px 16px rgba(255, 255, 255, 0.18),
    inset 0 -18px 26px rgba(15, 23, 42, 0.22),
    0 18px 28px rgba(0, 0, 0, 0.2);
}

.machine-chamber-front {
  min-height: 286px;
}

.machine-chamber-back {
  min-height: 250px;
}

.machine-chamber::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 12px;
  height: 11px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.22);
  filter: blur(3px);
}

.machine-chamber-head {
  position: absolute;
  z-index: 4;
  top: 34px;
  left: 16%;
  right: 16%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(8, 16, 25, 0.64);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.9);
  font-size: 10px;
  font-weight: 900;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.12);
}

.machine-chamber-head span {
  min-width: 0;
  line-height: 1.15;
  white-space: nowrap;
}

.machine-chamber-head strong {
  flex: 0 0 auto;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.machine-cloud {
  position: absolute;
  inset: 56px 14px 20px;
  z-index: 2;
}

.pool-ball {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: var(--size);
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 9px;
  font-weight: 950;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.58);
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.48),
    inset -3px -5px 8px rgba(0, 0, 0, 0.18),
    0 calc(4px + var(--depth, 1) * 1px) 8px rgba(0, 0, 0, 0.2);
  transform: translate(-50%, -50%);
  animation: poolStir var(--speed) ease-in-out infinite;
  animation-delay: var(--delay);
  cursor: default;
  will-change: transform, opacity;
}

.pool-ball-front {
  background:
    radial-gradient(circle at 31% 22%, rgba(255, 255, 255, 0.94), transparent 17%),
    linear-gradient(180deg, #ff6b6b, #d92c2c 58%, #a81818);
}

.pool-ball-back {
  background:
    radial-gradient(circle at 31% 22%, rgba(255, 255, 255, 0.9), transparent 17%),
    linear-gradient(180deg, #62b3ff, #246bb0 60%, #153f73);
}

.pool-ball:hover {
  filter: brightness(1.12);
  z-index: 6;
}

.pool-ball.is-selected {
  z-index: 8;
  filter: brightness(1.18) saturate(1.12);
  box-shadow:
    0 0 0 5px rgba(216, 154, 40, 0.22),
    inset 0 2px 4px rgba(255, 255, 255, 0.42),
    0 14px 20px rgba(0, 0, 0, 0.26);
}

.pool-ball.is-extracted {
  pointer-events: none;
  animation: poolExtract 0.62s cubic-bezier(0.22, 0.9, 0.34, 1) forwards;
}

.machine-rotor {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 62%;
  width: 46%;
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0.36;
  pointer-events: none;
}

.machine-rotor::after {
  content: "";
  position: absolute;
  inset: 44%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.32);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.16);
}

.machine-rotor i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 42%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.12), rgba(83, 227, 194, 0.34));
  transform-origin: left center;
}

.machine-rotor i:nth-child(1) {
  transform: rotate(0deg);
}

.machine-rotor i:nth-child(2) {
  transform: rotate(120deg);
}

.machine-rotor i:nth-child(3) {
  transform: rotate(240deg);
}

.draw-machine.is-stir .machine-rotor {
  animation: rotorSpin 5.4s linear infinite;
}

.draw-machine.is-shaking.is-stir .machine-rotor {
  animation-duration: 0.72s;
}

.draw-machine.is-blow .machine-rotor {
  opacity: 0.16;
  animation: none;
}

.machine-stream {
  position: absolute;
  z-index: 1;
  inset: 24px 12px 48px;
  opacity: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(90deg, transparent 0 20px, rgba(83, 227, 194, 0.18) 20px 22px),
    repeating-linear-gradient(180deg, transparent 0 18px, rgba(255, 255, 255, 0.08) 18px 19px);
  mask-image: linear-gradient(180deg, transparent, #000 20%, #000 84%, transparent);
}

.draw-machine.is-blow .machine-stream {
  opacity: 0.85;
  animation: airFlow 1.05s linear infinite;
}

.machine-exit {
  position: absolute;
  z-index: 3;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.08)),
    rgba(15, 23, 42, 0.44);
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.18);
}

.machine-exit-front {
  left: 30%;
  right: 27%;
  bottom: 44px;
  transform: rotate(-5deg);
}

.machine-exit-back {
  left: 62%;
  right: 10%;
  bottom: 62px;
  transform: rotate(9deg);
}

.machine-sweep {
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(112deg, transparent 0 43%, rgba(255, 255, 255, 0.16) 50%, transparent 58%);
  transform: translateX(-120%);
  animation: machineSweep 7s ease-in-out infinite;
}

.machine-base {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 12px;
  padding-top: 14px;
}

.machine-base::before {
  content: "";
  height: 10px;
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.16) 0 10px, transparent 10px 20px),
    rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.machine-note {
  min-height: 54px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.11);
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  line-height: 1.5;
}

.machine-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.machine-controls .button {
  flex: 1 1 0;
}

.draw-machine.is-shaking {
  animation: machineShake 0.66s linear infinite;
}

.draw-machine.is-shaking .machine-sweep {
  animation-duration: 1.55s;
}

.draw-machine.is-shaking .pool-ball {
  animation-name: poolAgitate;
  animation-duration: 0.72s;
}

.draw-machine.is-blow .pool-ball {
  animation-name: poolBlow;
}

.draw-machine.is-shaking.is-blow .pool-ball {
  animation-name: poolJet;
  animation-duration: 0.62s;
}

.draw-machine.is-complete {
  box-shadow:
    0 0 0 1px rgba(15, 122, 104, 0.28),
    0 26px 48px rgba(15, 23, 42, 0.2);
}

.draw-machine.is-complete .machine-note {
  border-color: rgba(83, 227, 194, 0.28);
}

.ai-panel {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 247, 226, 0.88) 48%, rgba(237, 248, 245, 0.92)),
    repeating-linear-gradient(45deg, rgba(216, 154, 40, 0.08) 0 1px, transparent 1px 28px);
}

.ai-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #171717, var(--accent), var(--gold), var(--accent-3), #171717);
  background-size: 260% 100%;
  animation: lightSweep 6s linear infinite;
}

.ai-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.ai-orbit {
  width: 154px;
  height: 154px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  margin: 4px auto;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.96) 0 35%, rgba(255, 236, 191, 0.74) 36% 100%);
  border: 1px solid rgba(216, 154, 40, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 18px 36px rgba(74, 37, 18, 0.12);
}

.ai-orbit span {
  font-size: 36px;
  font-weight: 900;
  color: #c81f1f;
}

.ai-orbit i {
  position: absolute;
  inset: 14px;
  border: 1px dashed rgba(120, 75, 36, 0.28);
  border-radius: 50%;
  animation: orbitSpin 12s linear infinite;
}

.ai-orbit i:nth-child(3) {
  inset: 28px;
  animation-duration: 8s;
  animation-direction: reverse;
}

.ai-orbit i:nth-child(4) {
  inset: 44px;
  border-style: solid;
  animation-duration: 5s;
}

.ai-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.ai-controls .button {
  align-self: end;
}

.ai-controls .button-ai {
  grid-column: span 2;
}

.check-field {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid rgba(176, 137, 95, 0.38);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  color: #6d4a23;
  font-size: 12px;
  font-weight: 800;
}

.check-field input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-3);
  flex: 0 0 auto;
}

.check-field span {
  min-width: 0;
}

.geo-status {
  min-height: 18px;
  margin-top: 10px;
}

.coord-display {
  width: fit-content;
  max-width: 100%;
  margin-top: 10px;
  padding: 7px 10px;
  border: 1px solid rgba(15, 122, 104, 0.22);
  border-radius: var(--radius);
  background: rgba(15, 122, 104, 0.09);
  color: #115e59;
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.ai-summary {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(216, 154, 40, 0.28);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  min-height: 58px;
}

.ai-summary:empty {
  display: none;
}

.ai-summary-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #241b17;
}

.ai-summary-head span {
  color: #786b60;
  font-size: 12px;
}

.ai-summary p {
  margin: 0;
  color: #67584c;
  font-size: 13px;
}

.ai-thinking {
  display: grid;
  gap: 8px;
}

.ai-thinking strong {
  color: #241b17;
  font-size: 14px;
}

.thinking-line {
  position: relative;
  min-height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(216, 154, 40, 0.13);
}

.thinking-line::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 46%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--gold), var(--accent-3));
  animation: thinkingRun 1.24s ease-in-out infinite;
}

.ai-panel.is-thinking .ai-orbit {
  animation: aiPulse 1.4s ease-in-out infinite;
}

.ai-panel.is-thinking .ai-orbit i {
  border-color: rgba(215, 47, 47, 0.38);
  animation-duration: 4.6s;
}

.context-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.context-chips span {
  max-width: 100%;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(15, 122, 104, 0.1);
  border: 1px solid rgba(15, 122, 104, 0.2);
  color: #115e59;
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.ai-trend-chart {
  display: grid;
  gap: 10px;
  padding: 10px 0 2px;
  border-top: 1px solid rgba(216, 154, 40, 0.2);
  border-bottom: 1px solid rgba(15, 122, 104, 0.14);
}

.ai-trend-head,
.ai-trend-zone-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.ai-trend-head strong,
.ai-trend-zone-head strong {
  color: #241b17;
  font-size: 13px;
  white-space: nowrap;
}

.ai-trend-head span,
.ai-trend-zone-head span {
  min-width: 0;
  color: #7a6654;
  font-size: 11px;
  font-weight: 800;
  text-align: right;
  overflow-wrap: anywhere;
}

.ai-trend-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ai-trend-zone {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(176, 137, 95, 0.26);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 248, 232, 0.66));
}

.ai-trend-chips {
  display: grid;
  gap: 5px;
}

.ai-trend-chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.ai-trend-chip-row > span {
  min-width: 32px;
  color: #6d4a23;
  font-size: 11px;
  font-weight: 900;
}

.ai-trend-chip-row i {
  min-width: 24px;
  padding: 2px 6px;
  border: 1px solid rgba(216, 154, 40, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #2f241c;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  text-align: center;
}

.ai-trend-rows {
  display: grid;
  gap: 6px;
}

.ai-trend-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 38px;
  gap: 8px;
  align-items: center;
  min-height: 24px;
}

.ai-trend-number {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 22px;
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.18);
}

.ai-trend-number.is-front {
  background: linear-gradient(180deg, #ef4444, #b91c1c);
}

.ai-trend-number.is-back {
  background: linear-gradient(180deg, #3b82f6, #1d4ed8);
}

.ai-trend-track {
  display: block;
  height: 8px;
  min-width: 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(36, 27, 23, 0.08);
}

.ai-trend-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-3), var(--gold), var(--accent));
}

.ai-trend-score {
  color: #6f5c4d;
  font-size: 11px;
  font-weight: 900;
  text-align: right;
}

.ai-candidate-list {
  margin-top: 14px;
}

.ai-candidate-item {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.94), rgba(255, 242, 213, 0.9)),
    #fff;
}

.ai-candidate-item::before {
  background: linear-gradient(180deg, #171717, #d72f2f, #d89a28, #0f7a68);
}

.ai-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.ai-tags span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(216, 154, 40, 0.12);
  border: 1px solid rgba(216, 154, 40, 0.28);
  color: #7a4b16;
  font-size: 12px;
  font-weight: 800;
}

.chip {
  background: #fff8ef;
  border-color: rgba(216, 154, 40, 0.3);
  color: #6d4a23;
}

.data-table {
  background: #fffdfa;
}

.data-table th {
  background: #fff5e6;
  color: #6d4a23;
}

.data-table tbody tr {
  transition: background 0.16s ease;
}

.data-table tbody tr:hover {
  background: #fff8ef;
}

.footer {
  color: #76685d;
}

.link {
  color: #1d65a6;
}

.fortune-cat {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 156px;
  height: 156px;
  z-index: 70;
  cursor: grab;
  touch-action: none;
  user-select: none;
  filter: drop-shadow(0 18px 24px rgba(74, 37, 18, 0.18));
  transition: transform 0.18s ease, filter 0.18s ease;
}

.fortune-cat:focus-visible {
  outline: 3px solid rgba(216, 154, 40, 0.55);
  outline-offset: 6px;
  border-radius: 24px;
}

.fortune-cat.is-dragging {
  cursor: grabbing;
  transition: none;
  filter: drop-shadow(0 22px 30px rgba(15, 23, 42, 0.24));
}

.cat-shadow {
  position: absolute;
  left: 26px;
  right: 24px;
  bottom: 10px;
  height: 18px;
  border-radius: 50%;
  background: rgba(74, 37, 18, 0.18);
  filter: blur(2px);
  animation: catShadow 2.4s ease-in-out infinite;
}

.cat-body {
  position: absolute;
  left: 31px;
  bottom: 24px;
  width: 96px;
  height: 102px;
  border-radius: 46px 46px 38px 38px;
  background:
    radial-gradient(circle at 36% 22%, rgba(255, 255, 255, 0.92), transparent 13%),
    linear-gradient(180deg, #fff8ef 0%, #ffe0b1 68%, #e9a94d 100%);
  border: 2px solid #8f4f11;
  box-shadow: inset 0 -8px 0 rgba(184, 106, 18, 0.12);
  transform-origin: 50% 84%;
  animation: catBreathe 2.4s ease-in-out infinite;
}

.cat-head {
  position: absolute;
  left: 11px;
  top: -34px;
  width: 72px;
  height: 68px;
  border-radius: 47% 47% 44% 44%;
  background:
    radial-gradient(circle at 34% 22%, rgba(255, 255, 255, 0.9), transparent 14%),
    linear-gradient(180deg, #fff9ee, #f4b75d);
  border: 2px solid #8f4f11;
  cursor: pointer;
  transform-origin: 50% 78%;
  z-index: 3;
}

.cat-ear {
  position: absolute;
  top: -13px;
  width: 23px;
  height: 24px;
  border-radius: 6px 80% 6px 80%;
  background: #f3b35b;
  border: 2px solid #8f4f11;
  z-index: -1;
}

.ear-left {
  left: 5px;
  transform: rotate(-24deg);
}

.ear-right {
  right: 5px;
  transform: scaleX(-1) rotate(-24deg);
}

.cat-eye {
  position: absolute;
  top: 27px;
  width: 10px;
  height: 14px;
  border-radius: 48% 48% 54% 54%;
  background: #20130b;
  animation: catBlink 5.2s ease-in-out infinite;
}

.eye-left {
  left: 21px;
}

.eye-right {
  right: 21px;
}

.cat-eye::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 3px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
}

.cat-cheek {
  position: absolute;
  top: 42px;
  width: 11px;
  height: 6px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.38);
}

.cheek-left {
  left: 11px;
}

.cheek-right {
  right: 11px;
}

.cat-nose {
  position: absolute;
  left: 32px;
  top: 40px;
  width: 8px;
  height: 6px;
  border-radius: 50%;
  background: #d72f2f;
}

.cat-mouth {
  position: absolute;
  left: 28px;
  top: 48px;
  width: 16px;
  height: 7px;
  border-bottom: 2px solid #6d3210;
  border-radius: 0 0 999px 999px;
}

.cat-whisker {
  position: absolute;
  top: 39px;
  width: 21px;
  height: 1px;
  background: #6d3210;
}

.whisker-left {
  left: -5px;
  transform: rotate(8deg);
}

.whisker-right {
  right: -5px;
  transform: rotate(-8deg);
}

.cat-belly {
  position: absolute;
  left: 23px;
  bottom: 19px;
  width: 46px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #d72f2f, #a31b1b);
  color: #ffe9b0;
  border: 2px solid #8f4f11;
  font-size: 22px;
  font-weight: 900;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.22), 0 7px 10px rgba(125, 28, 28, 0.18);
}

.cat-collar {
  position: absolute;
  left: 14px;
  top: -3px;
  width: 68px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #8f4f11;
  background: linear-gradient(180deg, #ef4444, #a31b1b);
  color: #ffe9b0;
  display: grid;
  place-items: center;
  z-index: 4;
  font-size: 10px;
  font-weight: 900;
}

.cat-collar span {
  transform: translateY(3px);
}

.cat-tail {
  position: absolute;
  right: -21px;
  top: 27px;
  width: 43px;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f2aa45, #fff0c8);
  border: 2px solid #8f4f11;
  transform-origin: 5px 50%;
  animation: tailWave 1.8s ease-in-out infinite;
}

.cat-paw,
.cat-foot {
  position: absolute;
  border: 2px solid #8f4f11;
  background: #fff2d7;
}

.cat-paw {
  top: 39px;
  width: 20px;
  height: 31px;
  border-radius: 999px;
}

.paw-left {
  left: 10px;
  animation: beckon 1.1s ease-in-out infinite;
}

.paw-right {
  right: 10px;
  animation: pawBounce 1.6s ease-in-out infinite;
}

.cat-foot {
  bottom: -5px;
  width: 26px;
  height: 18px;
  border-radius: 999px;
}

.foot-left {
  left: 15px;
}

.foot-right {
  right: 15px;
}

.cat-coin {
  position: absolute;
  right: 17px;
  top: 28px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 33% 24%, #fff4bf, #d89a28 68%, #9a4f0c);
  color: #7a2e08;
  border: 2px solid #8f4f11;
  font-weight: 900;
  animation: coinFlip 2.8s ease-in-out infinite;
}

.cat-sparkles i {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: #d89a28;
  transform: rotate(45deg);
  animation: sparklePop 1.8s ease-in-out infinite;
}

.cat-sparkles i:nth-child(1) {
  left: 18px;
  top: 20px;
}

.cat-sparkles i:nth-child(2) {
  right: 24px;
  top: 9px;
  animation-delay: 0.42s;
}

.cat-sparkles i:nth-child(3) {
  left: 14px;
  bottom: 42px;
  animation-delay: 0.84s;
}

.cat-butterfly {
  position: absolute;
  left: -12px;
  top: 18px;
  width: 28px;
  height: 24px;
  opacity: 0;
}

.cat-butterfly span {
  position: absolute;
  top: 4px;
  width: 14px;
  height: 18px;
  border-radius: 80% 20% 80% 20%;
  background: linear-gradient(135deg, #d72f2f, #d89a28);
  animation: wingBeat 0.38s ease-in-out infinite;
}

.cat-butterfly span:first-child {
  left: 0;
  transform-origin: right center;
}

.cat-butterfly span:last-child {
  right: 0;
  transform: scaleX(-1);
  transform-origin: left center;
}

.cat-actions {
  position: absolute;
  left: 50%;
  bottom: -4px;
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(216, 154, 40, 0.3);
  transform: translateX(-50%) translateY(8px);
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.fortune-cat:hover .cat-actions,
.fortune-cat:focus-within .cat-actions {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.cat-actions button {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: #fff8ef;
  color: #7a4b16;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.cat-actions button:hover {
  background: linear-gradient(180deg, #d89a28, #b86a12);
  color: #fff;
}

.fortune-cat.cat-run .cat-body {
  animation: catRun 0.48s ease-in-out infinite;
}

.fortune-cat.cat-run {
  animation: catDash 1.3s ease-in-out infinite;
}

.fortune-cat.cat-roll .cat-body {
  animation: catRoll 0.92s ease-in-out infinite;
}

.fortune-cat.cat-chase .cat-butterfly {
  opacity: 1;
  animation: butterflyPath 1.8s ease-in-out infinite;
}

.fortune-cat.cat-chase .cat-body {
  animation: catChase 0.72s ease-in-out infinite;
}

.fortune-cat.cat-play .cat-head {
  animation: catNod 0.62s ease-in-out infinite;
}

.fortune-cat.cat-play .cat-paw {
  animation-duration: 0.46s;
}

.fortune-cat.cat-pet .cat-head {
  animation: catPet 0.72s ease-in-out 2;
}

.fortune-cat.cat-pet .cat-sparkles i {
  background: #d72f2f;
  animation-duration: 0.72s;
}

@keyframes threadSweep {
  from {
    transform: translateX(-12%) rotate(-13deg);
  }
  to {
    transform: translateX(12%) rotate(-13deg);
  }
}

@keyframes progressPulse {
  50% {
    filter: brightness(1.28);
  }
}

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

@keyframes ripple {
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(9);
  }
}

@keyframes skeletonRun {
  from {
    background-position: 180% 0, 0 0;
  }
  to {
    background-position: -80% 0, 0 0;
  }
}

@keyframes candidateGlow {
  0% {
    box-shadow: 0 0 0 rgba(216, 154, 40, 0);
  }
  45% {
    box-shadow: 0 0 0 4px rgba(216, 154, 40, 0.22), 0 20px 36px rgba(74, 37, 18, 0.14);
  }
  100% {
    box-shadow: var(--soft-shadow);
  }
}

@keyframes thinkingRun {
  0% {
    transform: translateX(-105%);
  }
  55% {
    transform: translateX(85%);
  }
  100% {
    transform: translateX(220%);
  }
}

@keyframes aiPulse {
  50% {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 0 0 6px rgba(216, 154, 40, 0.12), 0 22px 40px rgba(74, 37, 18, 0.18);
  }
}

@keyframes catBreathe {
  50% {
    transform: translateY(-3px);
  }
}

@keyframes catShadow {
  50% {
    opacity: 0.62;
    transform: scaleX(0.86);
  }
}

@keyframes catBlink {
  0%,
  92%,
  100% {
    transform: scaleY(1);
  }
  95% {
    transform: scaleY(0.12);
  }
}

@keyframes tailWave {
  50% {
    transform: rotate(16deg);
  }
}

@keyframes beckon {
  50% {
    transform: translateY(-8px) rotate(-12deg);
  }
}

@keyframes pawBounce {
  50% {
    transform: translateY(4px);
  }
}

@keyframes coinFlip {
  50% {
    transform: translateY(-7px) rotateY(180deg);
  }
}

@keyframes sparklePop {
  50% {
    opacity: 0.3;
    transform: translateY(-9px) rotate(45deg) scale(1.35);
  }
}

@keyframes wingBeat {
  50% {
    transform: scaleX(0.45) rotate(8deg);
  }
}

@keyframes catDash {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(-18px);
  }
}

@keyframes catRun {
  0%,
  100% {
    transform: rotate(-4deg) translateY(0);
  }
  50% {
    transform: rotate(4deg) translateY(-7px);
  }
}

@keyframes catRoll {
  50% {
    transform: rotate(180deg) translateY(-7px);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes butterflyPath {
  0%,
  100% {
    transform: translate(0, 0);
  }
  35% {
    transform: translate(92px, -36px);
  }
  70% {
    transform: translate(36px, 16px);
  }
}

@keyframes catChase {
  50% {
    transform: translateX(-8px) rotate(-7deg);
  }
}

@keyframes catNod {
  50% {
    transform: rotate(9deg) translateY(3px);
  }
}

@keyframes catPet {
  50% {
    transform: translateY(6px) scaleY(0.95);
  }
}

@keyframes numberDrift {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(22%);
  }
}

@keyframes lightSweep {
  from {
    background-position: 0% 50%;
  }
  to {
    background-position: 240% 50%;
  }
}

@keyframes panelShine {
  0%,
  52% {
    transform: translateX(-120%);
  }
  78%,
  100% {
    transform: translateX(120%);
  }
}

@keyframes meterRun {
  0% {
    transform: translateX(-14%);
    width: 32%;
  }
  50% {
    transform: translateX(72%);
    width: 58%;
  }
  100% {
    transform: translateX(-14%);
    width: 32%;
  }
}

@keyframes sealPulse {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

@keyframes floatPulse {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

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

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

@keyframes ballPop {
  from {
    opacity: 0;
    transform: scale(0.62) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes ballBreathe {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-2px) scale(1.03);
  }
}

@keyframes fillShine {
  0%,
  48% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@keyframes orbitSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes machineFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
  }
  25% {
    transform: translate3d(18px, -16px, 0) rotate(16deg) scale(1.04);
  }
  50% {
    transform: translate3d(-12px, 18px, 0) rotate(-12deg) scale(0.96);
  }
  75% {
    transform: translate3d(16px, 10px, 0) rotate(22deg) scale(1.02);
  }
}

@keyframes machineSweep {
  0%,
  48% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(120%);
  }
}

@keyframes machineShake {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  20% {
    transform: translate3d(-2px, 1px, 0) rotate(-0.4deg);
  }
  40% {
    transform: translate3d(2px, -1px, 0) rotate(0.4deg);
  }
  60% {
    transform: translate3d(-1px, -1px, 0) rotate(-0.25deg);
  }
  80% {
    transform: translate3d(1px, 2px, 0) rotate(0.25deg);
  }
}

@keyframes pipBlink {
  0%,
  100% {
    filter: brightness(1);
    transform: scale(1);
  }
  50% {
    filter: brightness(1.5);
    transform: scale(1.18);
  }
}

@keyframes slotPulse {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.78);
  }
  45% {
    opacity: 1;
    transform: scale(1.08);
  }
}

@keyframes poolStir {
  0%,
  100% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  25% {
    transform: translate(calc(-50% + 5px), calc(-50% - 4px)) rotate(12deg);
  }
  52% {
    transform: translate(calc(-50% - 5px), calc(-50% + 4px)) rotate(-10deg);
  }
  76% {
    transform: translate(calc(-50% + 4px), calc(-50% + 5px)) rotate(14deg);
  }
}

@keyframes poolBlow {
  0%,
  100% {
    transform: translate(calc(-50% - 3px), calc(-50% + 5px)) rotate(-7deg);
  }
  45% {
    transform: translate(calc(-50% + 4px), calc(-50% - 8px)) rotate(11deg);
  }
  70% {
    transform: translate(calc(-50% - 4px), calc(-50% - 3px)) rotate(-12deg);
  }
}

@keyframes poolAgitate {
  0%,
  100% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  20% {
    transform: translate(calc(-50% + 10px), calc(-50% - 8px)) rotate(18deg);
  }
  40% {
    transform: translate(calc(-50% - 9px), calc(-50% + 9px)) rotate(-18deg);
  }
  60% {
    transform: translate(calc(-50% + 8px), calc(-50% + 10px)) rotate(20deg);
  }
  80% {
    transform: translate(calc(-50% - 10px), calc(-50% - 6px)) rotate(-16deg);
  }
}

@keyframes poolJet {
  0%,
  100% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  32% {
    transform: translate(calc(-50% + 7px), calc(-50% - 16px)) rotate(16deg);
  }
  66% {
    transform: translate(calc(-50% - 7px), calc(-50% + 10px)) rotate(-16deg);
  }
}

@keyframes poolExtract {
  from {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }
  to {
    opacity: 0;
    transform: translate(calc(-50% + 70px), calc(-50% - 88px)) scale(0.34) rotate(120deg);
  }
}

@keyframes rotorSpin {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes airFlow {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 44px -52px, 0 -38px;
  }
}

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

@media (max-width: 1120px) {
  .woodfish-blessing {
    top: 94px;
    zoom: 0.74;
    opacity: 0.68;
  }

  .wealth-guardian {
    zoom: 0.78;
  }

  .wealth-basin {
    zoom: 0.82;
  }

  .hero,
  .grid-2 {
    grid-template-columns: 1fr;
  }

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

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

  .candidate-meta {
    grid-column: 2;
    text-align: left;
  }

  .button-record {
    grid-column: 2;
    justify-self: start;
  }

  .ai-layout {
    grid-template-columns: 1fr;
  }

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

  .ai-controls .button {
    grid-column: span 2;
  }

  .draw-layout {
    grid-template-columns: 1fr;
  }

  .machine-glass {
    min-height: 338px;
  }
}

@media (max-width: 760px) {
  .wealth-marquee-frame {
    inset: 5px;
    border-radius: 10px;
  }

  .woodfish-blessing {
    display: none;
  }

  .wealth-guardian {
    display: none;
  }

  .wealth-child {
    zoom: 0.78;
  }

  .wealth-basin {
    bottom: 5px;
    zoom: 0.66;
  }

  .wealth-basin-left {
    left: 2px;
  }

  .wealth-basin-right {
    right: 2px;
  }

  .money-rain {
    gap: 14px;
    font-size: 16px;
  }

  .ingot-snow {
    justify-content: space-between;
    padding-inline: 8px;
  }

  .ingot-snow span {
    width: 28px;
    height: 18px;
    font-size: 8px;
  }

  .ingot-snow span:nth-child(n + 6) {
    display: none;
  }

  .topbar,
  .content,
  .footer {
    width: min(100% - 16px, 1280px);
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }

  .toolbar .control,
  .toolbar .button {
    min-width: 0;
    width: 100%;
    padding-inline: 8px;
  }

  .fortune-strip,
  .lucky-board {
    align-items: stretch;
    flex-direction: column;
  }

  .fortune-meter {
    width: 100%;
  }

  .latest-detail-head {
    display: grid;
  }

  .latest-detail-links {
    justify-content: flex-start;
  }

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

  .latest-number-detail > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .hero {
    min-height: auto;
  }

  .hero::after {
    font-size: 38px;
    right: -120px;
  }

  .hero-stats,
  .predict-grid,
  .form-grid,
  .subgrid {
    grid-template-columns: 1fr;
  }

  .field-span-2 {
    grid-column: span 1;
  }

  .candidate-item {
    grid-template-columns: 1fr;
  }

  .candidate-export-tools {
    justify-content: flex-start;
  }

  .candidate-meta {
    grid-column: auto;
    text-align: left;
  }

  .button-record {
    grid-column: auto;
    justify-self: start;
  }

  .ai-controls {
    grid-template-columns: 1fr;
  }

  .ai-controls .button {
    grid-column: auto;
  }

  .ai-orbit {
    width: 118px;
    height: 118px;
  }

  .fortune-cat {
    width: 118px;
    height: 118px;
    right: 10px;
    bottom: 12px;
    transform: scale(0.78);
    transform-origin: right bottom;
  }

  .fortune-cat.is-dragging {
    transform: scale(0.78);
  }

  .ai-summary-head {
    display: grid;
  }

  .ai-trend-head,
  .ai-trend-zone-head {
    display: grid;
    gap: 4px;
  }

  .ai-trend-head span,
  .ai-trend-zone-head span {
    text-align: left;
  }

  .ai-trend-grid {
    grid-template-columns: 1fr;
  }

  .prize-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .prize-toolbar .control,
  .prize-toolbar .button {
    width: 100%;
  }

  .prize-transfer-tools {
    width: 100%;
    padding-left: 0;
    border-left: 0;
  }

  .prize-transfer-tools span {
    width: 100%;
  }

  .manual-record-head {
    align-items: stretch;
    flex-direction: column;
  }

  .manual-record-controls,
  .manual-number-fields {
    grid-template-columns: 1fr;
  }

  .draw-panel {
    padding-inline: 14px;
  }

  .machine-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .segmented {
    width: 100%;
  }

  .machine-glass {
    min-height: 318px;
  }

  .machine-chambers {
    inset: 14px 10px 52px;
    grid-template-columns: minmax(0, 1.22fr) minmax(102px, 0.78fr);
    gap: 8px;
  }

  .machine-chamber {
    min-height: 236px;
    padding-inline: 6px;
  }

  .machine-chamber-back {
    min-height: 210px;
  }

  .machine-chamber-head {
    top: 22px;
    left: 14px;
    right: 14px;
    padding: 5px 7px;
    font-size: 9px;
  }

  .machine-chamber-front .machine-chamber-head {
    left: 18px;
    right: 18px;
  }

  .machine-chamber-back .machine-chamber-head {
    left: 10px;
    right: 10px;
  }

  .machine-cloud {
    inset: 50px 5px 12px;
  }

  .pool-ball {
    width: max(22px, calc(var(--size) - 6px));
    height: max(22px, calc(var(--size) - 6px));
    font-size: 9px;
  }

  .slot-row {
    gap: 8px;
  }

  .draw-slot {
    width: 48px;
    height: 48px;
  }

  .machine-controls {
    display: grid;
    grid-template-columns: 1fr;
  }
}
