
.mask {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 12, 16, 0.66);
}

#result {
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: auto;
}

#result::before,
#result::after {
  content: "";
  flex: 1 0 0;
}

.rays-wrap {
  display: none;
  position: absolute;
  left: 50%;
  top: 46%;
  width: 280px;
  height: 280px;
  transform: translate(-50%, -58%);
  pointer-events: none;
}

.mask.is-win .rays-wrap {
  display: block;
}

.rays {
  width: 100%;
  height: 100%;
  background: repeating-conic-gradient(rgba(255, 214, 120, 0.55) 0 8deg, transparent 8deg 24deg);
  border-radius: 50%;
  animation: spin 12s linear infinite;
  mask-image: radial-gradient(circle, transparent 0 18%, #000 42%, transparent 72%);
}

.dialog {
  position: relative;
  z-index: 1;
  width: min(78vw, 300px);
  padding: 26px 20px 18px;
  border: 3px solid #ff9900;
  border-radius: 20px;
  background: linear-gradient(#fff9ec, #ffe7b8);
  color: #6b341c;
  text-align: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  animation: pop-in 0.35s cubic-bezier(0.2, 1.4, 0.4, 1);
}

.deal-card {
  width: min(86vw, 320px);
  padding: 14px 14px 16px;
  background: #fff;
  color: #0f1111;
  text-align: left;
}

.deal-from {
  font-size: 12px;
  color: #565959;
}

.deal-from strong {
  color: #0f1111;
}

.deal-art {
  display: flex;
  justify-content: center;
  margin-top: 8px;
  border-radius: 8px;
  background: #f4f4f4;
}

.deal-art img {
  width: 100%;
  height: 168px;
  object-fit: contain;
}

@media (max-height: 700px) {
  .deal-art img {
    height: 112px;
  }

  .deal-card {
    padding-top: 12px;
    padding-bottom: 12px;
  }
}

.deal-pay {
  margin-top: 10px;
  color: #0f1111;
  font-size: 14px;
}

.deal-pay strong {
  color: #b12704;
  font-size: 22px;
}

.deal-was {
  margin-top: 2px;
  color: #565959;
  font-size: 14px;
}

.dialog.deal-card h2 {
  margin-top: 6px;
  color: #0f1111;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.deal-off {
  margin-top: 4px;
  color: #b12704;
  font-size: 13px;
  font-weight: 700;
}

a.btn-solid {
  display: block;
  text-align: center;
  text-decoration: none;
}

a.btn-solid[aria-disabled='true'] {
  pointer-events: none;
  opacity: 0.55;
}

.result-icon {
  font-size: 64px;
  line-height: 1;
}

.dialog h2 {
  margin-top: 8px;
  color: #a56a32;
  font-size: 15px;
  font-weight: 600;
}

.result-name {
  margin-top: 4px;
  color: #c45500;
  font-size: 28px;
  font-weight: 800;
}

.result-desc {
  margin-top: 4px;
  color: #8a6244;
  font-size: 13px;
}

.dialog-actions {
  margin-top: 16px;
}

.btn-solid {
  width: 100%;
  padding: 12px 16px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(#ffb84d, #ff9900);
  color: #232f3e;
  font-weight: 700;
  box-shadow: 0 4px 0 #c45500;
}

.btn-solid:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #c45500;
}

.btn-line {
  width: 100%;
  margin-top: 8px;
  padding: 11px 16px;
  border: 1.5px solid #ff9900;
  border-radius: 999px;
  background: #fff;
  color: #c45500;
  font-weight: 700;
}

.btn-line:active {
  background: #fff6e8;
}

.btn-text {
  width: 100%;
  margin-top: 4px;
  padding: 8px 16px;
  border: 0;
  background: transparent;
  color: #565959;
  font-size: 14px;
  font-weight: 600;
}

.sheet-mask {
  align-items: end;
  padding: 0;
}

.sheet {
  display: flex;
  flex-direction: column;
  width: min(100%, 430px);
  max-height: min(72dvh, 640px);
  padding-bottom: env(safe-area-inset-bottom);
  border-radius: 18px 18px 0 0;
  background: #fffaf3;
  color: #5c3b32;
  animation: rise 0.28s ease;
}

.grabber {
  width: 36px;
  height: 4px;
  margin: 8px auto 10px;
  border-radius: 4px;
  background: #e4d3ba;
}

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

.sheet-head h2 {
  font-size: 17px;
}

.sheet-close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: #f4e6d0;
  color: #6b3a28;
  font-size: 20px;
  line-height: 1;
}

.sheet-body {
  overflow: auto;
  padding: 0 16px 24px;
  -webkit-overflow-scrolling: touch;
}

.sheet-copy,
.rules,
.summary,
.empty {
  font-size: 14px;
  line-height: 1.6;
}

.rules {
  margin: 0;
  padding-left: 18px;
}

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

.sheet h3 {
  margin: 16px 0 6px;
  color: #8a3b12;
  font-size: 14px;
}

.odds {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.odds td {
  padding: 7px 2px;
  border-bottom: 1px solid #f0e0c8;
}

.odds td:last-child {
  color: #c45500;
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.summary {
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff1d2;
  color: #8a3b12;
  font-size: 13px;
}

.empty {
  padding: 28px 0;
  color: #a4846c;
  text-align: center;
}

.record-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.record-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f0e0c8;
}

.record-list a {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 8px;
  align-items: center;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.record-list strong,
.record-list small {
  display: block;
}

.record-list small {
  color: #6b5346;
  font-size: 12px;
}

.record-list .is-muted {
  opacity: 0.55;
}

.record-icon {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 6px;
  background: #f3f3f3;
}

.record-list time {
  color: #a4846c;
  font-size: 12px;
}

.sheet .btn-solid {
  margin-top: 16px;
}

.toast {
  position: fixed;
  z-index: 40;
  left: 50%;
  top: 14%;
  transform: translateX(-50%);
  max-width: min(80vw, 320px);
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-size: 14px;
  text-align: center;
}

.confetti {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.confetti i {
  position: absolute;
  left: 50%;
  top: 42%;
  width: 8px;
  height: 12px;
  margin-left: -4px;
  background: var(--c);
  animation: confetti-fall 1s ease-out forwards;
  animation-delay: var(--delay);
}

.confetti i.round {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
    background: #fff7cf;
  }
  50% {
    opacity: 0.45;
    background: #ff9a3c;
    box-shadow: none;
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.06);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translate(-50%, -50%);
  }
  25% {
    transform: translate(calc(-50% - 4px), -50%);
  }
  50% {
    transform: translate(calc(-50% + 4px), -50%);
  }
  75% {
    transform: translate(calc(-50% - 2px), -50%);
  }
}

@keyframes wobble {
  40% {
    transform: rotate(-16deg);
  }
  100% {
    transform: rotate(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(1turn);
  }
}

@keyframes pop {
  40% {
    transform: scale(1.28);
  }
}

@keyframes pop-in {
  from {
    transform: scale(0.82);
    opacity: 0;
  }
}

@keyframes rise {
  from {
    transform: translateY(24px);
    opacity: 0;
  }
}

@keyframes confetti-fall {
  to {
    transform: translate(var(--x), var(--y)) rotate(var(--rot));
    opacity: 0;
  }
}

@media (min-width: 520px) {
  .phone {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 20px 60px rgba(0, 0, 0, 0.35);
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track,
  .pool,
  .lights i,
  .hub.is-idle,
  .rays,
  .hub.is-spinning::before {
    animation: none;
  }

  .pool-window {
    overflow-x: auto;
  }
}
