:root {
  color-scheme: light;
  --canvas: #e5220a;
  --canvas-deep: #b91505;
  --paper: #fff7e5;
  --panel: #ffffff;
  --ink: #4f160b;
  --muted: #7b4b35;
  --brand: #fa2100;
  --brand-dark: #d6341f;
  --gold: #ffe86d;
  --gold-deep: #f6c23e;
  --shadow: 0 12px 30px rgba(95, 12, 3, 0.24);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--canvas-deep);
  color: var(--ink);
  font-size: 14px;
  letter-spacing: 0;
  overflow-x: hidden;
  touch-action: manipulation;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  position: relative;
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: calc(22px + env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 230, 74, 0.28), transparent 34%),
    linear-gradient(180deg, #f23815 0%, var(--canvas) 46%, #c81807 100%);
  overflow: hidden;
}

.hero {
  position: relative;
  margin: 0;
}

.hero-image {
  display: block;
  width: 100%;
  height: auto;
}

.hero-price {
  position: absolute;
  top: 42.6%;
  left: 72.5%;
  color: #fff5a2;
  font-size: clamp(15px, 4.2vw, 18px);
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 3px rgba(94, 0, 0, 0.4);
  white-space: nowrap;
}

.action-panel {
  position: relative;
  z-index: 2;
  margin: -18px 10px 0;
  padding: 20px 18px 18px;
  background: var(--panel);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.scroll-news {
  height: 32px;
  overflow: hidden;
  color: #441307;
  font-size: 14px;
  line-height: 32px;
}

.winner-list {
  padding: 0;
  margin: 0;
  list-style: none;
  transition-property: transform;
  transition-duration: 280ms;
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

.winner-list li {
  display: grid;
  grid-template-columns: minmax(82px, 1fr) auto;
  min-height: 32px;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.winner-person {
  min-width: 0;
  text-align: left;
}

.winner-benefit {
  min-width: 0;
  justify-self: end;
  text-align: right;
}

.winner-list strong {
  display: inline;
  margin-left: 0;
  color: var(--brand);
  font-weight: 800;
}

.phone-field {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  min-height: 56px;
  margin-top: 12px;
  padding: 0 16px;
  background: #fff3dd;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(196, 79, 13, 0.16);
}

.phone-field span {
  color: #8b3b1f;
  font-weight: 700;
  white-space: nowrap;
}

.phone-field input {
  width: 100%;
  min-width: 0;
  height: 52px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #251006;
  font-size: 24px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.phone-field input::placeholder {
  color: rgba(123, 75, 53, 0.55);
  font-size: 16px;
  font-weight: 500;
}

.submit-button {
  position: relative;
  display: block;
  width: 88%;
  min-height: 58px;
  margin: 24px auto 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff3a1c 0%, #e41a00 100%);
  box-shadow: 0 14px 26px rgba(186, 24, 5, 0.42), inset 0 2px 0 rgba(255, 255, 255, 0.36);
  color: #fff;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 2px 4px rgba(118, 9, 0, 0.35);
  transform: translateZ(0);
  transition-property: transform, filter;
  transition-duration: 140ms;
  animation: payPulse 1.12s cubic-bezier(0.16, 1, 0.3, 1) infinite;
  will-change: transform;
}

.submit-button::before {
  position: absolute;
  inset: -9px -12px;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(circle, rgba(255, 232, 109, 0.72) 0%, rgba(255, 80, 0, 0.45) 46%, rgba(255, 80, 0, 0) 72%);
  content: "";
  opacity: 0.82;
  transform: scale(0.92);
  animation: payGlow 1.12s cubic-bezier(0.16, 1, 0.3, 1) infinite;
  will-change: transform, opacity;
}

.submit-button::after {
  position: absolute;
  inset: 0 auto 0 -46%;
  width: 40%;
  background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0.62) 48%, transparent 100%);
  content: "";
  opacity: 0;
  transform: skewX(-18deg) translateX(0);
  animation: paySweep 1.68s cubic-bezier(0.16, 1, 0.3, 1) infinite;
  will-change: transform, opacity;
}

.submit-button > span,
.submit-button {
  isolation: isolate;
}

.submit-button:active,
.dialog-buy-button:active,
.modal-button:active,
.dialog-status-button:active,
.float-button:active,
.draw-button:active,
.claim-button:active {
  transform: scale(0.96);
}

.submit-button:focus-visible,
.dialog-buy-button:focus-visible,
.modal-button:focus-visible,
.dialog-status-button:focus-visible,
.float-button:focus-visible,
.text-link:focus-visible,
.phone-field input:focus-visible,
.draw-button:focus-visible,
.claim-button:focus-visible,
.claim-phone-field input:focus-visible {
  outline: 3px solid rgba(255, 232, 109, 0.92);
  outline-offset: 3px;
}

.submit-button[disabled] {
  cursor: wait;
  filter: saturate(0.7);
  animation: none;
}

.submit-button[disabled]::before {
  opacity: 0.25;
  animation: none;
}

.submit-button[disabled]::after {
  animation: none;
}

.price-badge {
  position: absolute;
  top: -13px;
  right: -8px;
  z-index: 2;
  padding: 3px 9px;
  border-radius: 16px 16px 16px 0;
  background: linear-gradient(135deg, #ff7b00 0%, #ee0979 100%);
  box-shadow: 0 3px 8px rgba(238, 9, 121, 0.38);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
  white-space: nowrap;
  animation: badgeBeat 1.8s ease-in-out infinite;
}

.pay-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  color: #6b4a3a;
  font-size: 14px;
}

.pay-icon,
.pay-checked {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.pay-checked {
  margin-left: auto;
}

.privacy-check {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin: 13px 10px 0;
  color: #ffe6df;
  font-size: 12px;
  line-height: 1.6;
  white-space: nowrap;
}

.privacy-check input {
  width: 14px;
  height: 14px;
  margin: 0;
  flex: 0 0 auto;
}

.text-link {
  padding: 0;
  background: transparent;
  color: #fff36d;
  font-size: inherit;
  line-height: inherit;
  text-decoration: underline;
}

.rule-block {
  margin: 16px 10px 0;
  padding: 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px rgba(112, 16, 5, 0.18);
}

.rule-block h2 {
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(214, 52, 31, 0.32);
  color: var(--brand-dark);
  font-size: 17px;
  line-height: 1.2;
  text-align: center;
}

.rule-content,
.modal-content {
  color: #6c4736;
  font-size: 13px;
  line-height: 1.75;
  word-break: break-word;
}

.rule-content p,
.modal-content p {
  margin: 0 0 8px;
}

.copy-right {
  display: grid;
  gap: 6px;
  margin: 26px 14px 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.floating-actions {
  position: fixed;
  top: 80px;
  right: max(0px, calc((100vw - 430px) / 2));
  z-index: 5;
  display: grid;
  gap: 14px;
}

.float-button {
  display: grid;
  place-items: center;
  min-width: 38px;
  min-height: 58px;
  padding: 7px 6px;
  border-radius: 8px 0 0 8px;
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-deep) 100%);
  box-shadow: 0 4px 10px rgba(94, 26, 0, 0.25);
  color: #b43100;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.16;
  text-align: center;
}

.is-lottery .page-shell {
  min-height: 100vh;
  padding: 26px 14px calc(24px + env(safe-area-inset-bottom));
  background:
    linear-gradient(115deg, rgba(255, 232, 158, 0.08) 0 1px, transparent 1px 22px),
    linear-gradient(245deg, rgba(255, 232, 158, 0.06) 0 1px, transparent 1px 24px),
    linear-gradient(180deg, #8f160f 0%, #b82012 38%, #7f130c 100%);
}

.is-lottery .copy-right,
.is-lottery .privacy-check {
  display: none !important;
}

.is-lottery .floating-actions {
  top: 98px;
}

.is-lottery .float-button {
  min-width: 40px;
  min-height: 64px;
  background: linear-gradient(180deg, #f5d779 0%, #d7aa46 100%);
  box-shadow: 0 10px 22px rgba(54, 8, 5, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.42);
  color: #6f1b10;
}

.lottery-page {
  position: relative;
  z-index: 2;
}

.lottery-page[hidden] {
  display: none;
}

.lottery-hero {
  position: relative;
  min-height: 154px;
  padding: 16px 18px 0;
  color: rgba(255, 248, 220, 0.92);
  text-align: center;
}

.lottery-hero::before {
  position: absolute;
  top: 38px;
  left: 50%;
  width: 192px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 226, 137, 0.78), transparent);
  content: "";
  transform: translateX(-50%);
}

.lottery-hero::after {
  position: absolute;
  right: 20px;
  bottom: 28px;
  left: 20px;
  height: 44px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(58, 9, 6, 0.26), rgba(58, 9, 6, 0));
  content: "";
  pointer-events: none;
}

.lottery-kicker {
  position: relative;
  display: inline-grid;
  place-items: center;
  min-height: 30px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(52, 8, 5, 0.34);
  color: #f7db92;
  font-size: 13px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(247, 219, 146, 0.3), 0 8px 18px rgba(47, 8, 5, 0.22);
}

.lottery-hero h1 {
  position: relative;
  margin: 15px 0 7px;
  color: #fff3cb;
  font-size: 44px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.022em;
  text-shadow: 0 2px 0 rgba(101, 20, 13, 0.42), 0 14px 28px rgba(49, 7, 4, 0.36);
}

.lottery-hero p {
  position: relative;
  margin: 0;
  color: rgba(255, 238, 196, 0.84);
  font-size: 15px;
  font-weight: 700;
}

.lottery-board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: -10px 0 0;
  padding: 13px;
  border-radius: 12px;
  background: linear-gradient(180deg, #ecd084 0%, #c78b31 100%);
  box-shadow:
    0 18px 42px rgba(47, 8, 5, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    inset 0 -10px 22px rgba(99, 38, 5, 0.18);
}

.lottery-board::before {
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 244, 190, 0.72), rgba(117, 35, 12, 0.08));
  content: "";
}

.prize-cell,
.draw-button {
  min-height: 94px;
  border-radius: 8px;
}

.prize-cell {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 8px 6px;
  background:
    linear-gradient(180deg, #fff9e8 0%, #f8e4b3 100%);
  box-shadow:
    inset 0 0 0 1px rgba(115, 48, 10, 0.08),
    inset 0 -8px 18px rgba(118, 52, 14, 0.08),
    0 7px 16px rgba(68, 16, 4, 0.13);
  color: #6d1b0d;
  text-align: center;
  transform: translateZ(0);
  transition-property: transform, filter, box-shadow;
  transition-duration: 120ms;
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

.prize-cell span {
  display: grid;
  place-items: center;
  min-width: 46px;
  height: 34px;
  padding: 0 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, #8d2014 0%, #64140d 100%);
  color: #f8d98d;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 238, 186, 0.18), 0 5px 11px rgba(65, 13, 7, 0.16);
}

.prize-cell strong {
  color: #481107;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}

.prize-cell.is-hot {
  background: linear-gradient(180deg, #fff1c0 0%, #efd083 100%);
}

.prize-cell.is-hot span,
.prize-cash span {
  background: linear-gradient(180deg, #b32818 0%, #73170e 100%);
}

.draw-button {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 244, 190, 0.64) 0%, transparent 30%),
    linear-gradient(180deg, #9f2215 0%, #75160e 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 235, 168, 0.42),
    inset 0 -12px 22px rgba(45, 7, 4, 0.25),
    0 12px 24px rgba(62, 11, 6, 0.28);
  color: #fff1c1;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.05;
  text-shadow: 0 2px 8px rgba(32, 5, 3, 0.42);
  transition-property: transform, filter;
  transition-duration: 140ms;
}

.draw-button::before {
  position: absolute;
  inset: -28px;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(255, 229, 149, 0.7) 28deg, transparent 72deg, transparent 360deg);
  content: "";
  opacity: 0.35;
  animation: drawHalo 2.8s linear infinite;
}

.draw-button span {
  position: relative;
}

.draw-button[disabled] {
  filter: saturate(0.72);
}

.draw-button[disabled]::before {
  animation: none;
  opacity: 0.18;
}

.lottery-board.is-drawing .prize-cell {
  filter: saturate(0.86) brightness(0.94);
}

.lottery-board.is-drawing .prize-cell.is-rolling-active,
.prize-cell.is-final-prize {
  filter: saturate(1.12) brightness(1.18);
  transform: translateY(-4px) scale(1.045);
  box-shadow:
    0 0 0 2px rgba(255, 241, 180, 0.9),
    0 0 26px rgba(255, 218, 125, 0.62),
    0 14px 24px rgba(62, 11, 6, 0.22);
}

.prize-cell.is-final-prize {
  animation: prizeLand 680ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.lottery-chance {
  min-height: 24px;
  margin: 15px 0 16px;
  color: rgba(255, 237, 190, 0.88);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.my-prizes {
  margin: 0;
  padding: 17px 16px 16px;
  border-radius: 12px;
  background: #fff6df;
  box-shadow:
    0 16px 34px rgba(48, 8, 5, 0.22),
    inset 0 0 0 1px rgba(117, 45, 11, 0.07);
}

.my-prizes h2 {
  margin: 0 0 12px;
  color: #64170d;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.012em;
  text-align: center;
}

.prize-list {
  display: grid;
  gap: 10px;
}

.empty-prize {
  margin: 0;
  padding: 14px 10px;
  border-radius: 8px;
  background: #f7e7bd;
  color: #8b552c;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.prize-record {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 58px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f8e8bf;
  box-shadow: inset 0 0 0 1px rgba(110, 42, 10, 0.08);
}

.prize-record div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.prize-record strong {
  color: #4c1008;
  font-size: 15px;
  line-height: 1.2;
}

.prize-record span {
  color: #9b5b2b;
  font-size: 12px;
  line-height: 1.3;
}

.prize-record em {
  flex: 0 0 auto;
  min-width: 54px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #7a180f;
  color: #f8dc94;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: start center;
  padding: 84px 18px 24px;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.56);
}

.modal-card,
.pay-dialog,
.claim-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 368px);
  max-height: calc(100vh - 120px);
  overflow: auto;
  overscroll-behavior: contain;
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.modal-card h2 {
  margin: 0;
  padding: 15px 18px;
  color: #b34600;
  font-size: 21px;
  line-height: 1.2;
  text-align: center;
}

.modal-content {
  max-height: 55vh;
  overflow: auto;
  padding: 0 18px 16px;
}

.modal-button {
  display: block;
  width: calc(100% - 36px);
  min-height: 44px;
  margin: 0 18px 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffdb5e 0%, #f3a900 100%);
  color: #832b03;
  font-size: 17px;
  font-weight: 900;
  transition-property: transform;
  transition-duration: 140ms;
}

.pay-dialog {
  padding: 28px 22px 24px;
  text-align: center;
}

.claim-dialog {
  overflow: visible;
  padding: 32px 22px 22px;
  background:
    linear-gradient(180deg, #fff7e4 0%, #f7e6bd 100%);
  box-shadow: 0 24px 56px rgba(35, 5, 3, 0.34), inset 0 0 0 1px rgba(116, 45, 11, 0.08);
  text-align: center;
}

.claim-burst {
  position: absolute;
  top: -34px;
  left: 50%;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), transparent 46%),
    linear-gradient(180deg, #efd084 0%, #b77c2e 100%);
  box-shadow: 0 14px 28px rgba(78, 18, 6, 0.24), inset 0 0 0 1px rgba(255, 246, 207, 0.56);
  transform: translateX(-50%);
  animation: claimBurst 860ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.claim-burst::after {
  position: absolute;
  inset: 13px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #77180f;
  color: #f7db92;
  content: "奖";
  font-size: 24px;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 234, 174, 0.28);
}

.claim-eyebrow {
  position: relative;
  margin-top: 14px;
  color: #8d2014;
  font-size: 15px;
  font-weight: 900;
}

.claim-dialog h2 {
  position: relative;
  margin: 8px 0 8px;
  color: #4d1209;
  font-size: 26px;
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.012em;
}

.claim-dialog p {
  margin: 0 0 16px;
  color: #80522f;
  font-size: 14px;
  font-weight: 700;
}

.claim-phone-field {
  display: grid;
  gap: 8px;
  text-align: left;
}

.claim-phone-field span {
  color: #6a2b18;
  font-size: 13px;
  font-weight: 900;
}

.claim-phone-field input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: #fff9e8;
  box-shadow: inset 0 0 0 1px rgba(116, 45, 11, 0.14), 0 6px 14px rgba(77, 20, 7, 0.06);
  color: #321008;
  font-size: 21px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  outline: 0;
}

.claim-phone-field input::placeholder {
  color: rgba(123, 75, 53, 0.56);
  font-size: 14px;
  font-weight: 600;
}

.claim-button {
  width: 100%;
  min-height: 50px;
  margin-top: 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, #8f2014 0%, #64140d 100%);
  box-shadow: 0 12px 22px rgba(78, 18, 6, 0.28), inset 0 1px 0 rgba(255, 235, 174, 0.24);
  color: #fff0c0;
  font-size: 18px;
  font-weight: 900;
  transition-property: transform;
  transition-duration: 140ms;
}

.dialog-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: transparent;
  color: #9f897d;
  font-size: 30px;
  line-height: 30px;
}

.dialog-title {
  color: #d42614;
  font-size: 28px;
  font-weight: 900;
}

.dialog-subtitle {
  margin-top: 4px;
  color: #4f160b;
  font-size: 18px;
  font-weight: 800;
}

.dialog-subtitle strong {
  color: #d42614;
}

.buy-money {
  margin-top: 18px;
  color: #d42614;
  font-size: 34px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.old-money {
  margin-top: 2px;
  color: #8f827c;
  font-size: 14px;
  text-decoration: line-through;
}

.dialog-buy-button,
.dialog-status-button {
  display: block;
  width: 100%;
  min-height: 48px;
  margin-top: 18px;
  border-radius: 999px;
  transition-property: transform;
  transition-duration: 140ms;
}

.dialog-buy-button {
  position: relative;
  background: linear-gradient(180deg, #ff3d1a 0%, #db1904 100%);
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}

.dialog-buy-button small {
  position: absolute;
  top: -10px;
  right: 18px;
  padding: 2px 9px;
  border-radius: 999px;
  background: #ffe86d;
  color: #ad2500;
  font-size: 12px;
}

.dialog-status-button {
  background: #fff4df;
  color: #9a4b29;
  box-shadow: inset 0 0 0 1px rgba(154, 75, 41, 0.22);
  font-size: 16px;
  font-weight: 800;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(34px + env(safe-area-inset-bottom));
  z-index: 40;
  max-width: min(330px, calc(100vw - 32px));
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(32, 16, 10, 0.9);
  color: #fff;
  font-size: 14px;
  line-height: 1.35;
  text-align: center;
  transform: translateX(-50%);
}

.loading {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.18);
}

.loading[hidden],
.toast[hidden] {
  display: none;
}

.loading-box {
  min-width: 88px;
  padding: 14px 18px;
  border-radius: 8px;
  background: rgba(24, 14, 10, 0.9);
  color: #fff;
  font-weight: 700;
  text-align: center;
}

@keyframes payPulse {
  0% {
    transform: translateY(0) scale(1);
  }

  38% {
    transform: translateY(-3px) scale(1.105);
  }

  62% {
    transform: translateY(0) scale(0.985);
  }

  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes payGlow {
  0% {
    opacity: 0.24;
    transform: scale(0.88);
  }

  38% {
    opacity: 0.9;
    transform: scale(1.16);
  }

  100% {
    opacity: 0.08;
    transform: scale(1.34);
  }
}

@keyframes paySweep {
  0%,
  28% {
    opacity: 0;
    transform: skewX(-18deg) translateX(0);
  }

  46% {
    opacity: 0.92;
  }

  72%,
  100% {
    opacity: 0;
    transform: skewX(-18deg) translateX(360%);
  }
}

@keyframes badgeBeat {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.04);
  }
}

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

@keyframes prizeLand {
  0% {
    transform: translateY(-4px) scale(1.045);
  }

  42% {
    transform: translateY(-7px) scale(1.075);
  }

  100% {
    transform: translateY(-4px) scale(1.045);
  }
}

@keyframes claimBurst {
  0% {
    opacity: 0;
    transform: translateX(-50%) scale(0.62);
  }

  62% {
    opacity: 1;
    transform: translateX(-50%) scale(1.08);
  }

  100% {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .submit-button,
  .submit-button::before,
  .submit-button::after,
  .price-badge,
  .draw-button::before,
  .prize-cell.is-final-prize,
  .claim-burst {
    animation: none;
  }

  .winner-list,
  .submit-button,
  .dialog-buy-button,
  .dialog-status-button,
  .modal-button,
  .float-button,
  .draw-button,
  .claim-button {
    transition-duration: 1ms;
  }
}

@media (max-width: 360px) {
  .submit-button {
    width: 90%;
    font-size: 26px;
  }

  .price-badge {
    right: -14px;
    font-size: 11px;
  }

  .phone-field {
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 8px 12px;
  }

  .phone-field input {
    height: 40px;
    font-size: 23px;
  }

  .lottery-hero h1 {
    font-size: 38px;
  }

  .lottery-board {
    gap: 7px;
    padding: 10px;
  }

  .prize-cell,
  .draw-button {
    min-height: 84px;
  }

  .prize-cell strong {
    font-size: 12px;
  }
}
