* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  min-height: var(--web-visual-viewport-height, 100dvh);
}

[v-cloak] {
  display: none;
}

.mobile-shell,
.auth-shell {
  margin: 0 auto;
  overflow-x: hidden;
}

.loading-shell {
  min-height: var(--web-visual-viewport-height, 100dvh);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.loading-card {
  min-width: 240px;
  border-radius: 24px;
  padding: 22px 28px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  text-align: center;
  box-shadow: 0 18px 48px rgba(37, 61, 128, 0.18);
}

.draw-card,
.panel,
.auth-card {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 28px;
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px rgba(37, 61, 128, 0.22);
}

.draw-card {
  padding: 26px;
}

.landing-page {
  display: grid;
  gap: 22px;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  overflow-x: hidden;
}

.landing-hero {
  position: relative;
  display: grid;
  gap: 28px;
  justify-items: center;
  padding: 30px 24px 22px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 24px 60px rgba(37, 61, 128, 0.22);
  backdrop-filter: blur(14px);
  text-align: center;
}

.landing-hero__badge {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.landing-copy {
  display: grid;
  gap: 10px;
  justify-items: center;
  color: #f8fbff;
}

.landing-copy__eyebrow {
  font-size: 15px;
  letter-spacing: 0.08em;
  opacity: 0.88;
}

.landing-copy__title {
  margin: 0;
  font-size: clamp(42px, 10vw, 68px);
  line-height: 1;
}

.landing-copy__text {
  margin: 0;
  max-width: 320px;
  font-size: 15px;
  line-height: 1.7;
  color: rgba(248, 251, 255, 0.9);
}

.landing-wheel {
  position: relative;
  width: min(82vw, 340px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.landing-wheel__image {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 16px 30px rgba(32, 53, 118, 0.24));
}

.landing-wheel__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 12px rgba(255, 255, 255, 0.03);
}

.landing-wheel__ring--outer {
  animation: slowSpin 18s linear infinite;
}

.landing-wheel__ring--middle {
  inset: 11%;
  border-style: dashed;
  animation: reverseSpin 14s linear infinite;
}

.landing-wheel__ring--inner {
  inset: 23%;
  border-color: rgba(255, 224, 125, 0.42);
  box-shadow:
    0 0 34px rgba(255, 224, 125, 0.16),
    inset 0 0 0 8px rgba(255, 255, 255, 0.04);
}

.landing-wheel__core {
  position: relative;
  z-index: 2;
  width: 39%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  gap: 2px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.95), rgba(214, 226, 255, 0.82)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(210, 223, 255, 0.88));
  color: #3156b8;
  box-shadow: 0 18px 36px rgba(32, 55, 125, 0.22);
}

.landing-wheel__core span {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.landing-wheel__core strong {
  font-size: 44px;
  line-height: 1;
}

.landing-wheel__chip {
  position: absolute;
  z-index: 2;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.95);
  color: #3557b4;
  font-size: 24px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(26, 43, 93, 0.18);
}

.landing-wheel__chip--a {
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
}

.landing-wheel__chip--b {
  right: 10%;
  top: 46%;
  transform: translateY(-50%);
}

.landing-wheel__chip--c {
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
}

.landing-wheel__chip--d {
  left: 10%;
  top: 46%;
  transform: translateY(-50%);
}

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

.landing-dots__dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.34);
  cursor: pointer;
}

.landing-dots__dot--active {
  width: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
}

.landing-hero--image {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  max-height: none;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  line-height: 0;
}

.landing-hero-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  line-height: 0;
}

.landing-hero-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  background: transparent;
  max-width: 100%;
}

.image-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: grid;
  place-items: center;
  padding: 18px;
}

.image-preview-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(10, 16, 31, 0.72);
}

.image-preview-modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  max-height: 92dvh;
  overflow: auto;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.image-preview-modal__panel img {
  display: block;
  width: 100%;
  height: auto;
}

.image-preview-modal__close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #22304d;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.room-list-modal {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 148;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: min(100vw, 430px);
  padding: 0;
  transform: translateX(-50%);
  overflow: hidden;
}

.room-list-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(11, 15, 28, 0.58);
}

.room-list-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: min(599px, calc(var(--web-visual-viewport-height, 100dvh) - 18px));
  overflow: hidden;
  border-radius: 20px 20px 0 0;
  animation: roomSheetIn 0.22s ease-out;
}

@keyframes roomSheetIn {
  from {
    transform: translateY(26px);
    opacity: 0.8;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.room-list-panel__head {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-weight: 900;
}

.room-list-panel__head button {
  position: absolute;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 30px;
  line-height: 1;
}

.room-list-panel__body {
  display: grid;
  min-height: 0;
  flex: 1 1 auto;
  align-content: end;
  overflow-x: hidden;
  overflow-y: auto;
}

.room-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  width: 100%;
  min-height: 0;
  height: 132px;
  overflow: hidden;
  border: 1px solid #f0ca38;
  color: #3c3218;
  text-align: left;
}

.room-card img,
.room-card__fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.room-card__fallback {
  display: grid;
  place-items: center;
  font-size: 36px;
  font-weight: 1000;
  letter-spacing: 0.08em;
}

.room-card::after {
  content: "";
  position: absolute;
  inset: 0;
}

.room-card__content {
  position: relative;
  grid-column: 2;
  display: grid;
  justify-items: start;
  min-width: 132px;
  padding: 0 68px 0 8px;
}

.room-card__content em {
  font-size: 13px;
  font-style: normal;
}

.room-card__content strong {
  font-size: 30px;
}

.room-card i {
  position: absolute;
  z-index: 2;
  right: 12px;
  bottom: 27px;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  font-style: normal;
  font-size: 24px;
  font-weight: 1000;
}

@media (max-width: 380px) {
  .room-list-modal {
    width: 100vw;
  }

  .room-list-panel {
    width: 100%;
    height: min(599px, calc(var(--web-visual-viewport-height, 100dvh) - 14px));
  }

  .room-list-panel__head {
    min-height: 60px;
    padding: 12px 48px 8px;
    font-size: 17px;
  }

  .room-list-panel__body {
    height: calc(100% - 60px);
    grid-auto-rows: 118px;
    gap: 10px;
    padding: 10px 10px 16px;
  }

  .room-card {
    height: 118px;
  }

  .room-card__content {
    min-width: 110px;
    padding-right: 54px;
  }

  .room-card__content em {
    font-size: 11px;
  }

  .room-card__content strong {
    font-size: 23px;
  }

  .room-card i {
    right: 8px;
    bottom: 22px;
    width: 44px;
    height: 44px;
    font-size: 20px;
  }
}

.room-card--disabled {
  filter: grayscale(0.25);
  opacity: 0.72;
}

.room-list-panel__feedback {
  z-index: 6;
  flex: 0 0 auto;
  margin: 10px 12px 0;
  padding: 11px 12px;
  border: 1px solid #ffc7c7;
  border-radius: 7px;
  background: #fff4f4;
  color: #c62f3b;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
  box-shadow: 0 8px 22px rgba(142, 32, 45, 0.16);
}

.room-list-panel__empty {
  padding: 28px 12px;
  color: #78839a;
  text-align: center;
}

.home-announcement-modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: 22px;
}

.home-announcement-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(20, 24, 36, 0.62);
}

.home-announcement-modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 338px);
  display: grid;
  gap: 14px;
  padding: 24px 20px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fffdf5, #ffffff);
  color: #25314c;
  box-shadow: 0 20px 60px rgba(19, 28, 52, 0.28);
  text-align: center;
}

.home-announcement-modal__panel strong {
  font-size: 19px;
  font-weight: 900;
}

.home-announcement-modal__panel p {
  margin: 0;
  color: #5f6980;
  font-size: 14px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
}

.home-announcement-modal__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: #f2f4f8;
  color: #5d6678;
  font-size: 20px;
  cursor: pointer;
}

.home-announcement-modal__confirm {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffd43a, #f0ad00);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}

.notice-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f6f9ff;
  box-shadow: 0 14px 30px rgba(34, 55, 116, 0.12);
}

.notice-strip__label {
  flex: 0 0 auto;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #3458b6;
  font-size: 12px;
  font-weight: 800;
}

.notice-strip__marquee {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.notice-strip__text {
  display: inline-block;
  min-width: 100%;
  padding-left: 100%;
  font-size: 14px;
  line-height: 1.6;
  animation: noticeMarquee 12s linear infinite;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.quick-card {
  border: 0;
  border-radius: 24px;
  padding: 18px 12px;
  display: grid;
  gap: 10px;
  justify-items: center;
  background: rgba(255, 255, 255, 0.9);
  color: #2b4a97;
  box-shadow: 0 14px 28px rgba(31, 49, 105, 0.1);
  cursor: pointer;
}

.quick-card__icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #4e8cff, #2f5fd8);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
}

.quick-card__label {
  font-size: 14px;
  font-weight: 700;
}

.game-section {
  display: grid;
  gap: 14px;
}

.game-section__head {
  display: flex;
  justify-content: space-between;
  align-items: end;
}

.game-section__eyebrow {
  display: block;
  color: rgba(248, 251, 255, 0.86);
  font-size: 13px;
}

.game-section__title {
  margin: 4px 0 0;
  color: #fff;
  font-size: 24px;
}

.game-entry {
  width: 100%;
  border: 0;
  border-radius: 28px;
  padding: 22px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(232, 239, 255, 0.88));
  color: #234695;
  box-shadow: 0 18px 38px rgba(32, 53, 118, 0.14);
  cursor: pointer;
  text-align: left;
}

.game-entry__badge {
  flex: 0 0 auto;
  padding: 8px 10px;
  border-radius: 12px;
  background: #ff5959;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.game-entry__content {
  flex: 1 1 auto;
  display: grid;
  gap: 6px;
}

.game-entry__label {
  font-size: 30px;
  font-weight: 800;
}

.game-entry__hint {
  font-size: 14px;
  color: #677ca8;
}

.game-entry__arrow {
  flex: 0 0 auto;
  color: #4c6fcb;
  font-size: 14px;
  font-weight: 700;
}

.draw-card--animating {
  animation: cardPulse 0.9s ease-in-out infinite;
}

.draw-card__top {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.draw-headline {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  color: #f8fbff;
  font-size: 18px;
}

.draw-headline__brand,
.draw-headline__accent {
  font-weight: 700;
}

.draw-headline__accent {
  color: #ffe07d;
}

.draw-toolbar {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.time-block {
  display: grid;
  gap: 6px;
  color: #eff4ff;
}

.time-block__label {
  font-size: 13px;
  opacity: 0.88;
}

.time-block__value {
  font-size: 20px;
  font-weight: 700;
}

.countdown {
  display: flex;
  align-items: center;
  gap: 8px;
}

.countdown__item {
  min-width: 60px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.95);
  color: #3557b4;
  font-size: 32px;
  font-weight: 700;
  text-align: center;
}

.countdown__split {
  color: #fff;
  font-size: 24px;
  font-weight: 700;
}

.draw-card__bottom {
  display: grid;
  gap: 20px;
  margin-top: 26px;
}

.result-meta {
  display: grid;
  gap: 8px;
  justify-items: center;
  color: #fff;
}

.result-meta__value {
  font-size: 54px;
  font-weight: 800;
  letter-spacing: 2px;
}

.result-meta__label {
  font-size: 18px;
  opacity: 0.92;
}

.result-row {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.number-box {
  width: 76px;
  height: 104px;
  border-radius: 18px;
  border: 2px solid #f6c744;
  background: #2d3341;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 56px;
  line-height: 1;
}

.number-box--sum {
  width: 98px;
}

.number-box--result {
  background: #ff3b3f;
}

.number-box--pending {
  padding: 0;
}

.operator {
  color: #fff;
  font-size: 44px;
  font-weight: 400;
}

.operator--sum {
  color: rgba(255, 255, 255, 0.9);
}

.result-tags {
  display: flex;
  gap: 10px;
  align-items: center;
}

.result-tag {
  min-width: 68px;
  padding: 10px 16px;
  border-radius: 16px;
  background: rgba(255, 238, 238, 0.92);
  color: #ef4747;
  text-align: center;
  font-size: 30px;
  font-weight: 700;
}

.result-tag--accent {
  background: rgba(233, 241, 255, 0.96);
  color: #1b58d9;
}

.mobile-shell.mobile-shell--draw {
  height: var(--web-visual-viewport-height, 100dvh);
  max-height: var(--web-visual-viewport-height, 100dvh);
  min-height: 0;
  overflow: hidden;
}

.mobile-shell--draw .draw-page {
  position: relative;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #eef1fb;
  border: 0;
  border-radius: 0;
  backdrop-filter: none;
  box-shadow: none;
  padding: 0;
  overflow: hidden;
}

.draw-page__header {
  flex: 0 0 56px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: #fff;
  color: #222b43;
}

.draw-page__back,
.draw-page__header-space {
  width: 44px;
  height: 44px;
}

.draw-page__back {
  border: 0;
  background: transparent;
  color: #4d5877;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.draw-page__title {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
}

.draw-page__board {
  flex: 0 0 auto;
  padding: 7px 14px 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 35%),
    linear-gradient(135deg, #6f8cf3 0%, #5e7fea 100%);
  position: relative;
  overflow: hidden;
}

.draw-page__board::before,
.draw-page__board::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.draw-page__board::before {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08) 25%, transparent 25%) 0 0 / 48px 48px,
    linear-gradient(315deg, rgba(255, 255, 255, 0.06) 25%, transparent 25%) 0 0 / 48px 48px;
  opacity: 0.55;
}

.draw-page__board::after {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(43, 63, 157, 0.16));
}

.draw-page__board-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  color: #fff;
}

.draw-page__expect {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.draw-page__timer {
  display: grid;
  gap: 4px;
  justify-items: end;
}

.draw-page__timer-info {
  display: grid;
  gap: 2px;
  justify-items: end;
  font-size: 12px;
}

.draw-page__timer-info strong {
  font-size: 16px;
}

.draw-page__timer-slots {
  display: flex;
  gap: 4px;
}

.draw-page__timer-slot {
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.95);
  color: #5362a2;
  font-size: 15px;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(101, 117, 182, 0.16);
}

.draw-page__result-panel {
  position: relative;
  z-index: 1;
  margin-top: 4px;
  padding: 7px 10px;
  border-radius: 12px;
  background: rgba(108, 134, 241, 0.44);
  display: grid;
  grid-template-columns: minmax(82px, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.draw-page__result-meta {
  display: grid;
  gap: 4px;
  margin: 0;
  color: #fff;
}

.draw-page__result-meta strong {
  font-size: 15px;
}

.draw-page__result-meta span {
  color: #ffeb59;
  font-size: 13px;
  font-weight: 700;
}

.draw-page__result-row {
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 5px;
}

.draw-page .number-box {
  width: 38px;
  height: 48px;
  border-radius: 8px;
  border-width: 2px;
  font-size: 25px;
}

.draw-page .number-box--sum {
  width: 44px;
}

.draw-page .operator {
  font-size: 23px;
}

.draw-page .digit-reel {
  width: 20px;
  height: 44px;
}

.draw-page .digit-reel__digit {
  height: 44px;
  font-size: 25px;
}

.draw-page .result-tags {
  display: none;
}

.draw-page__user-strip {
  position: relative;
  z-index: 1;
  margin: 6px -14px 0;
  padding: 6px 14px 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(86, 112, 210, 0.95);
}

.draw-page__user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.draw-page__user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e1b84e;
  color: #4561b2;
  font-size: 22px;
  font-weight: 700;
  overflow: hidden;
}

.draw-page__user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.draw-page__user-meta {
  display: grid;
  gap: 2px;
  color: #fff;
}

.draw-page__user-meta strong {
  font-size: 16px;
}

.draw-page__user-meta span {
  color: #f7f4ff;
  font-size: 13px;
  font-weight: 700;
}

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

.draw-page__user-actions button,
.draw-page__tools button,
.draw-page__composer button {
  border: 0;
  cursor: pointer;
}

.draw-page__user-actions button {
  min-width: 44px;
  padding: 7px 8px;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #dfe7ff);
  color: #536091;
  font-size: 13px;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(111, 132, 210, 0.22);
}

.draw-page__chat {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 10px 14px 8px;
}

.draw-message {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.draw-message--system {
  display: grid;
  justify-items: end;
}

.draw-message--self {
  justify-content: flex-end;
}

.draw-message__avatar {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(77, 90, 136, 0.16);
  overflow: hidden;
}

.draw-message__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.draw-message__content {
  display: grid;
  gap: 6px;
}

.draw-message--self .draw-message__content {
  justify-items: end;
}

.draw-message__head,
.draw-message__system-head {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #566382;
  font-size: 13px;
}

.draw-message--self .draw-message__head {
  justify-content: flex-end;
}

.draw-message__bubble {
  max-width: 292px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff;
  color: #52607f;
  line-height: 1.6;
  box-shadow: 0 8px 20px rgba(60, 73, 119, 0.08);
}

.draw-message__bubble--system {
  max-width: 320px;
}

.draw-message__system-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.draw-message__system-avatar {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #7ac6ff, #ffd07d);
  color: #ffffff;
  font-size: 18px;
  box-shadow: 0 6px 14px rgba(77, 90, 136, 0.16);
  overflow: hidden;
}

.draw-message__system-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.draw-message__system-accent {
  color: #4dcb2e;
  font-weight: 700;
}

.draw-message__system-loss {
  color: #ef5350;
  font-weight: 700;
}

.draw-page__tools {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  padding: 7px 10px 8px;
  position: relative;
  bottom: auto;
  z-index: 4;
  background: linear-gradient(180deg, rgba(238, 241, 251, 0), rgba(238, 241, 251, 0.96) 22%);
}

.draw-page__tools button {
  height: 36px;
  border-radius: 999px;
  background: #fff;
  color: #49587b;
  font-size: 14px;
  box-shadow: inset 0 0 0 1px rgba(164, 176, 212, 0.35);
}

.draw-page__composer {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) 74px 42px;
  gap: 8px;
  padding: 0 10px 10px;
  align-items: center;
  position: relative;
  bottom: auto;
  z-index: 5;
  background: #eef1fb;
}

.draw-page__composer-label {
  height: 46px;
  border-radius: 8px 8px 0 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #e9f0ff, #cfdcff);
  color: #5771c6;
  font-size: 14px;
  text-align: center;
}

.draw-page__composer input {
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  background: #fff;
  color: #445271;
  font-size: 15px;
}

.draw-page__composer-input {
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  background: #fff;
  color: #445271;
  font-size: 15px;
  text-align: left;
}

.draw-page__composer input:disabled {
  color: #9aa5bf;
  background: #f4f6fb;
}

.draw-page__composer-input:disabled {
  color: #9aa5bf;
  background: #f4f6fb;
}

.draw-page__composer button {
  height: 44px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
}

.draw-page__composer button:not(.draw-page__composer-more):not(.draw-page__composer-input) {
  background: #1cc857;
  color: #fff;
}

.draw-page__composer button:disabled {
  background: #b5c2da !important;
  color: #eef3fb;
  cursor: not-allowed;
}

.draw-page__composer-more {
  background: #ff5f7a;
  color: #fff;
  font-size: 20px !important;
}

.draw-page__status {
  display: none;
  margin: 0;
  padding: 0 14px 2px;
  color: #5b6784;
  font-size: 13px;
}

.draw-page__status--error {
  color: #de5252;
}

.draw-toast {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 112px;
  z-index: 30;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(35, 48, 76, 0.92);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 12px 26px rgba(37, 49, 80, 0.2);
  pointer-events: none;
}

.draw-toast--error {
  background: rgba(239, 70, 82, 0.95);
}

.draw-info-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: stretch center;
}

.draw-info-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.34);
}

.draw-info-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  max-height: var(--web-visual-viewport-height, 100dvh);
  overflow: hidden;
  background: #fff;
  color: #263856;
  box-shadow: 0 18px 48px rgba(22, 33, 70, 0.22);
}

.draw-info-panel--trend {
  align-self: stretch;
  display: flex;
  flex-direction: column;
}

.draw-info-panel__top {
  flex: 0 0 auto;
  height: 56px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  border-bottom: 1px solid #eef2fb;
  background: #fff;
}

.draw-info-panel__top button,
.draw-info-panel__close {
  border: 0;
  background: transparent;
  color: #6d7894;
  cursor: pointer;
}

.draw-info-panel__top button {
  height: 56px;
  font-size: 30px;
}

.draw-info-panel__top strong {
  text-align: center;
  color: #101827;
  font-size: 18px;
}

.trend-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

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

.trend-table th,
.trend-table td {
  border: 1px solid #e9edf5;
  padding: 9px 8px;
  text-align: center;
  white-space: nowrap;
}

.trend-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7f9ff;
  color: #52617f;
  font-weight: 700;
}

.trend-red {
  color: #ff2020;
  font-weight: 700;
}

.trend-green {
  color: #00a83a;
  font-weight: 700;
}

.draw-info-panel--rules {
  align-self: center;
  width: min(calc(100% - 16px), 436px);
  max-height: calc(var(--web-visual-viewport-height, 100dvh) - 24px);
  padding: 22px 26px;
  overflow-y: auto;
}

.draw-info-panel__close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 36px;
  height: 36px;
  font-size: 26px;
}

.rules-content {
  padding-right: 22px;
  color: #31405f;
  line-height: 1.95;
  font-size: 14px;
}

.rules-content p {
  margin: 0 0 8px;
}

.wallet-modal-card--quick-bet {
  width: min(100%, 430px);
  height: min(86dvh, 620px);
  max-height: 86dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 18px 14px 0;
}

.wallet-modal-card--quick-bet .wallet-modal-card__top {
  flex: 0 0 auto;
}

.quick-bet-tabs {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.quick-bet-tabs__item {
  height: 42px;
  border-radius: 12px;
  background: #f5f7fd;
  color: #536486;
  font-size: 15px;
  font-weight: 700;
}

.quick-bet-tabs__item--active {
  background: linear-gradient(135deg, #ffc337, #ff9f1b);
  color: #ffffff;
}

.quick-bet-grid {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: start;
  margin: 14px -4px 0;
  padding: 0 4px 12px;
}

.quick-bet-option {
  min-height: 64px;
  border-radius: 14px;
  border: 1px solid #ffd470;
  background: #fffaf0;
  color: #556480;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 10px 8px;
}

.quick-bet-option span {
  font-size: 18px;
  font-weight: 700;
}

.quick-bet-option small {
  color: #f1a800;
  font-size: 16px;
}

.quick-bet-option--selected {
  background: linear-gradient(145deg, #fff0c4, #ffe09e);
  box-shadow: inset 0 0 0 1px rgba(255, 172, 35, 0.45);
}

.quick-bet-selected-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wallet-modal-card--quick-bet .wallet-modal-card__section {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 12px;
}

.quick-bet-selected-pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff3d1;
  color: #9f6b08;
  font-size: 13px;
  font-weight: 700;
}

.quick-bet-amount-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 10px;
}

.quick-bet-amount-row__clear {
  border-radius: 12px;
  background: #edf2fb;
  color: #5f7093;
  font-weight: 700;
}

.quick-bet-amount-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-bet-amount-presets button {
  min-width: 62px;
  height: 40px;
  border-radius: 12px;
  background: #edf2fb;
  color: #536486;
  font-weight: 700;
}

.quick-bet-footer {
  flex: 0 0 auto;
  display: grid;
  gap: 10px;
  margin: 0 -14px;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-top: 1px solid #eef1f7;
}

.quick-bet-footer__summary {
  color: #4f5f82;
  font-size: 16px;
}

.quick-bet-error {
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff0f0;
  color: #e53d3d;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

.quick-bet-footer__summary strong {
  color: #ef3131;
}

.quick-bet-footer__actions {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
}

.quick-bet-footer__ghost,
.quick-bet-footer__primary {
  height: 46px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
}

.quick-bet-footer__ghost {
  background: #eff3fb;
  color: #617395;
}

.quick-bet-footer__primary {
  background: linear-gradient(135deg, #ffc842, #ffad22);
  color: #ffffff;
}

.quick-bet-footer__primary:disabled {
  background: #d9dfeb;
  color: #f8fbff;
}

.result-tag--pending {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.digit-reel {
  --digit-height: 42px;
  display: block;
  width: 28px;
  height: var(--digit-height);
  overflow: hidden;
}

.digit-reel--1 .digit-reel__track {
  animation-duration: 1.6s;
}

.digit-reel--2 .digit-reel__track {
  animation-duration: 2s;
}

.digit-reel__track {
  display: flex;
  flex-direction: column;
  animation: digitRoll 1.8s linear infinite;
  will-change: transform;
}

.digit-reel__digit {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--digit-height);
  color: #fff;
  font-size: 38px;
}

.panel {
  padding: 24px;
}

.panel__header {
  display: grid;
  gap: 6px;
  color: #f8fbff;
}

.panel__header h2 {
  margin: 0;
  font-size: 28px;
}

.stat-grid,
.support-list {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.stat-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.stat-card,
.support-item,
.profile-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 12px 28px rgba(34, 57, 120, 0.12);
}

.stat-card__label,
.profile-card__meta,
.support-item span,
.auth-tip,
.auth-api-tip {
  color: #63759b;
}

.stat-card__value {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  color: #244286;
}

.stat-card__value--up {
  color: #d23d3d;
}

.stat-card__value--down {
  color: #f08f29;
}

.panel--wallet {
  padding: 18px 16px 20px;
  background: rgba(236, 238, 255, 0.92);
}

.panel--profile {
  padding: 18px 16px 20px;
  background: rgba(236, 238, 255, 0.92);
}

.wallet-shell {
  display: grid;
  gap: 18px;
}

.wallet-shell--request {
  gap: 16px;
}

.wallet-shell__top {
  display: grid;
  gap: 14px;
}

.wallet-stats-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(219, 228, 246, 0.9);
  box-shadow: 0 10px 24px rgba(34, 57, 120, 0.08);
}

.wallet-stats-bar__item {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 16px 10px;
  background: rgba(255, 255, 255, 0.98);
  text-align: center;
}

.wallet-stats-bar__item span {
  color: #3e4d70;
  font-size: 13px;
}

.wallet-stats-bar__item strong {
  color: #ea9b11;
  font-size: 18px;
}

.wallet-stats-bar__value--up {
  color: #d86e1d !important;
}

.wallet-stats-bar__value--down {
  color: #4f74b9 !important;
}

.wallet-promo-banner {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 126px;
  gap: 12px;
  min-height: 176px;
  border-radius: 18px;
  padding: 20px 18px;
  background:
    radial-gradient(circle at top right, rgba(255, 221, 159, 0.36), transparent 34%),
    linear-gradient(135deg, #b31c17 0%, #c43520 42%, #9d1214 100%);
  box-shadow: 0 14px 30px rgba(125, 29, 30, 0.24);
  color: #fff8e8;
}

.wallet-promo-banner__content {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: start;
  gap: 10px;
}

.wallet-promo-banner__eyebrow {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 228, 165, 0.18);
  border: 1px solid rgba(255, 222, 161, 0.35);
  color: #ffe5a2;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.wallet-promo-banner__title {
  font-size: 28px;
  line-height: 1.15;
  color: #fff4cf;
}

.wallet-promo-banner__text {
  margin: 0;
  color: rgba(255, 244, 214, 0.9);
  line-height: 1.6;
  font-size: 13px;
}

.wallet-promo-banner__tips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wallet-promo-banner__tips span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(91, 10, 9, 0.24);
  border: 1px solid rgba(255, 235, 192, 0.22);
  color: #ffe39f;
  font-size: 12px;
}

.wallet-promo-banner__visual {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
}

.wallet-promo-banner__badge,
.wallet-promo-banner__coin {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 800;
  color: #fff8db;
}

.wallet-promo-banner__badge {
  width: 54px;
  height: 54px;
  border: 2px solid rgba(255, 228, 164, 0.75);
  background: rgba(122, 13, 14, 0.34);
  font-size: 16px;
}

.wallet-promo-banner__coin {
  width: 90px;
  height: 90px;
  background: radial-gradient(circle at 30% 30%, #ffedb1 0%, #f3b63f 52%, #b77214 100%);
  color: #8d2910;
  font-size: 30px;
  box-shadow: 0 10px 22px rgba(102, 20, 14, 0.35);
}

.wallet-promo-banner__visual img {
  position: absolute;
  inset: 12px 0 0 auto;
  width: 116px;
  height: 116px;
  object-fit: cover;
  opacity: 0.18;
  filter: saturate(1.2);
  pointer-events: none;
}

.wallet-shell--compact-banner {
  gap: 8px;
}

.wallet-promo-banner--image {
  display: block;
  min-height: 0;
  aspect-ratio: 670 / 275;
  padding: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.wallet-promo-banner__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wallet-user-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 2px 0;
}

.wallet-user-card__avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #d5bb72, #c9a95b);
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  overflow: hidden;
}

.wallet-user-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-avatar-upload {
  position: relative;
  display: inline-grid;
  place-items: center;
  margin-top: 8px;
  cursor: pointer;
}

.profile-avatar-upload input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.profile-avatar-upload span {
  padding: 6px 12px;
  border-radius: 999px;
  color: #3475eb;
  font-size: 12px;
  font-weight: 700;
}

.profile-feedback {
  margin-top: 6px;
  color: #22a05a;
  font-size: 12px;
  font-weight: 700;
}

.profile-feedback--error {
  color: #e54a4a;
}

.wallet-user-card__name {
  color: #31589f;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.wallet-balance-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 8px;
  background: linear-gradient(145deg, #2d8ef6, #2778e7);
  color: #fff;
  box-shadow: 0 12px 26px rgba(37, 101, 201, 0.18);
}

.wallet-balance-strip__label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
}

.wallet-balance-strip__label::before {
  content: "□";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  font-size: 10px;
}

.wallet-balance-strip__value {
  font-size: 28px;
}

.wallet-benefit-card,
.wallet-request-card,
.wallet-menu,
.wallet-records,
.wallet-record-item {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(34, 57, 120, 0.08);
}

.wallet-benefit-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 16px;
  position: relative;
  overflow: hidden;
}

.wallet-benefit-card::after {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -38px;
  height: 82px;
  border-radius: 50%;
  background: rgba(240, 244, 255, 0.95);
}

.wallet-request-card {
  display: grid;
  gap: 14px;
  padding: 18px 16px;
}

.wallet-shell--request .wallet-request-card {
  gap: 0;
  overflow: hidden;
  padding: 0;
}

.wallet-request-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.wallet-shell--request .wallet-request-switch {
  gap: 0;
  border-bottom: 1px solid #edf2fb;
}

.wallet-request-switch__tab {
  border: 0;
  border-bottom: 2px solid transparent;
  background: #f6f8ff;
  color: #6d7ea4;
  padding: 12px 10px;
  font-size: 18px;
  cursor: pointer;
}

.wallet-request-switch__tab--active {
  color: #e39d22;
  border-bottom-color: #e39d22;
  background: #fff8ea;
}

.wallet-shell--request .wallet-request-switch__tab {
  background: #fff;
  padding: 18px 10px 14px;
}

.wallet-shell--request .wallet-request-switch__tab--active {
  background: #fff;
}

.wallet-request-methods {
  display: grid;
  gap: 16px;
}

.wallet-shell--request .wallet-request-methods,
.wallet-shell--request .wallet-request-form-sheet,
.wallet-shell--request .wallet-request-field,
.wallet-shell--request .wallet-request-proof-preview {
  padding-left: 16px;
  padding-right: 16px;
}

.wallet-shell--request .wallet-request-methods {
  padding-top: 18px;
}

.wallet-shell--request .wallet-request-form-sheet,
.wallet-shell--request .wallet-request-field {
  padding-top: 16px;
}

.wallet-shell--request .wallet-request-submit {
  margin: 14px 16px 18px;
}

.wallet-request-methods__title {
  color: #2b3d67;
  font-size: 16px;
  font-weight: 700;
}

.wallet-request-methods__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.wallet-request-method {
  min-height: 54px;
  border: 1px solid #e3e9f5;
  border-radius: 18px;
  background: #fff;
  color: #526482;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 8px 6px;
  font-size: 14px;
  cursor: pointer;
}

.wallet-request-method--active {
  border-color: #f1b20f;
  color: #d09000;
  box-shadow: inset 0 0 0 1px rgba(241, 178, 15, 0.18);
}

.wallet-request-method__icon {
  font-size: 20px;
  line-height: 1;
}

.wallet-request-method__icon-img {
  width: 32px;
  height: 32px;
  display: block;
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

.wallet-request-method--active .wallet-request-method__icon-img {
  box-shadow: 0 8px 18px rgba(241, 178, 15, 0.18);
  transform: translateY(-1px);
}

.wallet-request-form-sheet {
  display: grid;
  gap: 20px;
  padding: 8px 0 2px;
}

.wallet-request-line {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.wallet-request-line--upload {
  align-items: start;
}

.wallet-request-line__label {
  color: #2d3e66;
  font-size: 15px;
  font-weight: 700;
}

.wallet-request-line input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #e2e8f6;
  padding: 12px 2px;
  font-size: 16px;
  color: #243866;
  background: transparent;
}

.wallet-request-field {
  display: grid;
  gap: 8px;
  color: #34518e;
  font-weight: 700;
}

.wallet-request-field input {
  border: 0;
  border-bottom: 1px solid #e2e8f6;
  padding: 12px 2px;
  font-size: 16px;
  color: #243866;
  background: transparent;
}

.wallet-request-upload {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 10px 0 4px;
}

.wallet-request-upload__input {
  display: none;
}

.wallet-request-upload__trigger {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px dashed #d6e0f2;
  background: #f7f9ff;
  color: #4b95ff;
  display: grid;
  place-items: center;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.wallet-request-upload--qr {
  align-items: flex-start;
}

.wallet-request-upload__trigger--large {
  width: 144px;
  height: 144px;
  border-radius: 0;
  font-size: 34px;
  color: #a8b2c7;
}

.wallet-request-upload__clear {
  border: 0;
  background: transparent;
  color: #8796ba;
  font-size: 14px;
  cursor: pointer;
}

.wallet-request-proof-preview {
  display: flex;
  justify-content: center;
}

.wallet-request-proof-preview img {
  width: 100%;
  max-width: 220px;
  border-radius: 16px;
  border: 1px solid #dbe5f5;
  object-fit: cover;
  background: #f8fbff;
}

.wallet-request-feedback {
  margin: 2px 16px 0;
  border-radius: 10px;
  padding: 10px 12px;
  background: #edf9f2;
  color: #15924f;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.wallet-request-feedback--error {
  background: #fff1ef;
  color: #e34938;
}

.wallet-request-submit {
  border: 0;
  border-radius: 10px;
  background: linear-gradient(145deg, #f4d57f, #eac35f);
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  padding: 14px 16px;
  cursor: pointer;
}

.wallet-request-submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

.wallet-request-history-link {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 14px 16px;
  background: #fff;
  color: #27458c;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(34, 57, 120, 0.08);
  cursor: pointer;
}

.wallet-benefit-card__item {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.wallet-benefit-card__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
}

.wallet-benefit-card__icon--diamond {
  background: linear-gradient(145deg, #ffcc4d, #f5a623);
}

.wallet-benefit-card__icon--gift {
  background: linear-gradient(145deg, #ffc84d, #f7a200);
}

.wallet-benefit-card__content {
  display: grid;
  gap: 5px;
}

.wallet-benefit-card__content strong {
  color: #2f4b87;
}

.wallet-benefit-card__content span {
  color: #f39b1d;
  font-size: 13px;
}

.wallet-shortcuts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 10px 8px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(34, 57, 120, 0.08);
}

.wallet-shortcuts__item {
  border: 0;
  background: transparent;
  display: grid;
  gap: 10px;
  justify-items: center;
  color: #455784;
  font-size: 13px;
  cursor: pointer;
}

.wallet-shortcuts__icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  color: #27395f;
  font-size: 18px;
  box-shadow: 0 6px 16px rgba(47, 72, 136, 0.16);
}

.wallet-menu {
  overflow: hidden;
}

.wallet-menu__item {
  width: 100%;
  border: 0;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  color: #233766;
  cursor: pointer;
}

.wallet-menu__item--link {
  text-decoration: none;
}

.wallet-menu__item + .wallet-menu__item {
  border-top: 1px solid #eef2fb;
}

.wallet-menu__main {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 700;
}

.wallet-menu__icon {
  width: 18px;
  color: #515f80;
  font-size: 14px;
}

.wallet-menu__side {
  color: #8a97b8;
  font-size: 14px;
}

.wallet-records {
  padding: 18px;
}

.wallet-records--compact {
  margin-top: 2px;
}

.profile-shell {
  display: grid;
  gap: 18px;
}

.profile-shell__top {
  display: grid;
  gap: 14px;
}

.profile-balance-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(145deg, #ffffff, #eff4ff);
  box-shadow: 0 12px 28px rgba(34, 57, 120, 0.08);
  color: #27458c;
}

.profile-balance-card span {
  color: #6d7ea4;
  font-size: 14px;
}

.profile-balance-card strong {
  font-size: 28px;
}

.profile-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.profile-overview__item {
  display: grid;
  gap: 6px;
  padding: 14px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 28px rgba(34, 57, 120, 0.08);
}

.profile-overview__item span {
  color: #6d7ea4;
  font-size: 12px;
}

.profile-overview__item strong {
  color: #27458c;
  font-size: 18px;
}

.wallet-records__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

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

.wallet-records__head h3 {
  margin: 0;
  font-size: 20px;
  color: #243866;
}

.wallet-record-list {
  display: grid;
  gap: 12px;
}

.wallet-request-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.wallet-request-filter__tab {
  border: 1px solid #dbe5f5;
  border-radius: 999px;
  background: #f7f9ff;
  color: #6c7aa0;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
}

.wallet-request-filter__tab--active {
  border-color: #f0bb57;
  background: #fff4da;
  color: #db8e0d;
}

.wallet-kpi-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.wallet-kpi {
  display: grid;
  gap: 6px;
  padding: 14px 12px;
  border-radius: 14px;
  background: #f5f8ff;
}

.wallet-kpi span {
  color: #6a7aa3;
  font-size: 12px;
}

.wallet-kpi strong {
  color: #27458c;
  font-size: 18px;
}

.wallet-kpi__value--up {
  color: #d23d3d !important;
}

.wallet-kpi__value--down {
  color: #f08f29 !important;
}

.wallet-record-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px;
}

.wallet-request-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 28px rgba(34, 57, 120, 0.08);
}

.wallet-record-item__meta,
.wallet-record-item__side,
.wallet-request-item__meta,
.wallet-request-item__side {
  display: grid;
  gap: 6px;
}

.wallet-record-item__meta strong,
.wallet-record-item__side strong,
.wallet-request-item__meta strong {
  color: #22355f;
}

.wallet-request-item__proof {
  color: #4b95ff;
  font-size: 13px;
  text-decoration: none;
}

.detail-shell--flat {
  background: #f1f3fb;
}

.detail-topbar--flat {
  border-bottom: 1px solid #eef2fb;
  background: #fff;
}

.detail-topbar--flat .detail-topbar__title span {
  display: none;
}

.balance-detail-page {
  display: grid;
  gap: 10px;
  background: #f1f3fb;
}

.balance-tabs {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  border-radius: 0 0 6px 6px;
  background: #fff;
}

.balance-tabs button {
  position: relative;
  height: 62px;
  border: 0;
  background: transparent;
  color: #343b4e;
  font-size: 16px;
  cursor: pointer;
}

.balance-tabs__item--active {
  color: #f0a000 !important;
  font-weight: 700;
}

.balance-tabs__item--active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 24px;
  height: 4px;
  border-radius: 999px;
  background: #f0b000;
  transform: translateX(-50%);
}

.balance-detail-list {
  display: grid;
  gap: 10px;
  padding: 0 7px 14px;
}

.balance-detail-card {
  display: grid;
  gap: 5px;
  padding: 11px 14px;
  border-radius: 6px;
  background: #fff;
  color: #101827;
}

.balance-detail-card__row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  font-size: 14px;
  line-height: 1.35;
}

.balance-detail-card__row span {
  color: #121827;
}

.balance-detail-card__row strong {
  min-width: 0;
  text-align: right;
  font-weight: 500;
  word-break: break-word;
}

.balance-detail-card__green {
  color: #00bd00 !important;
}

.balance-detail-card__red {
  color: #ff2020 !important;
}

.balance-detail-card__orange {
  color: #f0a000 !important;
}

.wallet-record-item__meta span,
.wallet-record-item__side span,
.wallet-request-item__meta span,
.wallet-request-item__side span,
.wallet-records__empty {
  color: #6d7ca2;
}

.wallet-record-item__side,
.wallet-request-item__side {
  text-align: right;
}

.wallet-record-item__amount--credit {
  color: #d23d3d;
}

.wallet-record-item__amount--debit {
  color: #f08f29;
}

.wallet-records__empty {
  padding: 20px 6px 6px;
}

.wallet-request-item__status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
}

.wallet-request-item__status--pending {
  background: #fff2d9;
  color: #d68b00;
}

.wallet-request-item__status--approved {
  background: #e7f7ea;
  color: #3d9b51;
}

.wallet-request-item__status--rejected {
  background: #ffe8e8;
  color: #df4f4f;
}

.wallet-modal-shell {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 14px 96px;
}

.wallet-modal-shell__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 31, 72, 0.42);
}

.wallet-modal-card {
  position: relative;
  width: min(100%, 480px);
  max-height: calc(var(--web-visual-viewport-height, 100dvh) - 120px);
  overflow: auto;
  border-radius: 22px;
  background: #fff;
  padding: 20px 18px;
  box-shadow: 0 18px 44px rgba(28, 49, 110, 0.18);
}

.wallet-modal-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.wallet-modal-card__top h3 {
  margin: 0;
  color: #243866;
  font-size: 24px;
}

.wallet-modal-card__close {
  border: 0;
  background: transparent;
  color: #9aa8c4;
  font-size: 28px;
  cursor: pointer;
}

.wallet-modal-card__section {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.wallet-modal-card__line,
.wallet-modal-card__invite-item {
  padding: 14px 16px;
  border-radius: 16px;
  background: #f5f8ff;
  color: #40527a;
  line-height: 1.6;
}

.wallet-modal-card__line strong {
  color: #243866;
}

.wallet-modal-card__section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.wallet-modal-card__invite-list {
  display: grid;
  gap: 10px;
}

.wallet-modal-card__invite-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.wallet-modal-card__invite-item div {
  display: grid;
  gap: 4px;
}

.wallet-modal-card__invite-item strong {
  color: #243866;
}

.wallet-modal-card__invite-item span,
.wallet-modal-card__empty {
  color: #6d7ea4;
}

.wallet-modal-card__empty {
  padding: 12px 4px;
}

.detail-page {
  min-height: var(--web-visual-viewport-height, 100dvh);
  background: linear-gradient(180deg, #edf1ff 0%, #f8faff 100%);
}

.detail-shell {
  width: min(100%, 420px);
  min-height: var(--web-visual-viewport-height, 100dvh);
  margin: 0 auto;
  padding: 0 16px 28px;
}

.detail-topbar {
  position: sticky;
  top: 0;
  z-index: 6;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 12px;
  padding: 16px 0 12px;
  background: linear-gradient(180deg, rgba(237, 241, 255, 0.98), rgba(237, 241, 255, 0.92));
  backdrop-filter: blur(12px);
}

.detail-topbar__title {
  text-align: center;
}

.detail-topbar__title strong {
  display: block;
  color: #243866;
  font-size: 18px;
}

.detail-topbar__title span {
  color: #8391b2;
  font-size: 12px;
}

.detail-topbar__button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: #27458c;
  font-size: 18px;
  box-shadow: 0 10px 24px rgba(34, 57, 120, 0.08);
  cursor: pointer;
}

.detail-content {
  display: grid;
  gap: 16px;
}

.detail-hero,
.detail-card {
  background: rgba(255, 255, 255, 0.97);
  border-radius: 22px;
  box-shadow: 0 12px 28px rgba(34, 57, 120, 0.08);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 22px 18px;
  color: #fff;
}

.detail-hero--wallet {
  background:
    radial-gradient(circle at top right, rgba(255, 227, 167, 0.34), transparent 34%),
    linear-gradient(135deg, #2b87ef 0%, #4aa4ff 100%);
}

.detail-hero--referral {
  background:
    radial-gradient(circle at top right, rgba(255, 224, 160, 0.28), transparent 34%),
    linear-gradient(135deg, #5868f2 0%, #7b7cff 100%);
}

.detail-hero__eyebrow {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.detail-hero__title {
  display: block;
  margin-top: 12px;
  font-size: 28px;
  line-height: 1.15;
}

.detail-hero__text {
  margin: 10px 0 0;
  max-width: 280px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.65;
  font-size: 14px;
}

.detail-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.detail-hero__chips span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 12px;
}

.detail-card {
  padding: 18px 16px;
}

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

.detail-card__head h2,
.detail-card__head h3 {
  margin: 0;
  color: #243866;
  font-size: 20px;
}

.detail-card__head span {
  color: #7e8daf;
  font-size: 13px;
}

.detail-user-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.detail-user-row__avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #d5bb72, #c9a95b);
  color: #fff;
  font-size: 24px;
  font-weight: 700;
}

.detail-user-row__meta {
  display: grid;
  gap: 4px;
}

.detail-user-row__meta strong {
  color: #243866;
  font-size: 20px;
}

.detail-user-row__meta span {
  color: #7f8db0;
  font-size: 13px;
}

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

.detail-kpi {
  display: grid;
  gap: 6px;
  padding: 14px 12px;
  border-radius: 16px;
  background: #f5f8ff;
}

.detail-kpi span {
  color: #6d7ea4;
  font-size: 12px;
}

.detail-kpi strong {
  color: #27458c;
  font-size: 18px;
}

.detail-kpi__value--up {
  color: #d23d3d !important;
}

.detail-kpi__value--down {
  color: #f08f29 !important;
}

.detail-list {
  display: grid;
  gap: 12px;
}

.detail-list__item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  background: #f7f9ff;
}

.detail-list__meta,
.detail-list__side {
  display: grid;
  gap: 6px;
}

.detail-list__meta strong,
.detail-list__side strong {
  color: #243866;
}

.detail-list__meta span,
.detail-list__side span,
.detail-empty {
  color: #6d7ea4;
  font-size: 13px;
  line-height: 1.6;
}

.detail-list__side {
  text-align: right;
}

.detail-list--bets {
  gap: 10px;
}

.detail-list__item--bet {
  align-items: flex-start;
}

.detail-list__item--bet .detail-list__side strong {
  max-width: 220px;
  word-break: break-word;
}

.detail-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef4ff;
  color: #4c6aa6;
  font-size: 12px;
}

.detail-referral-stack {
  display: grid;
  gap: 12px;
}

.detail-referral-line {
  padding: 14px 16px;
  border-radius: 16px;
  background: #f7f9ff;
  color: #40527a;
  line-height: 1.7;
}

.detail-referral-line strong {
  color: #243866;
}

.detail-empty {
  padding: 18px 2px 4px;
}

.detail-empty--notice {
  padding: 18px 16px;
  border-radius: 18px;
  background: rgba(99, 142, 255, 0.1);
  color: #39518f;
  text-align: left;
}

.referral-agent-page {
  background: #f4f6fb;
}

.agent-shell {
  width: min(100%, 430px);
  min-height: var(--web-visual-viewport-height, 100dvh);
  margin: 0 auto;
  color: #17213a;
  background: #f4f6fb;
}

.agent-topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) 78px;
  align-items: center;
  height: 58px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #eef0f5;
  backdrop-filter: blur(12px);
}

.agent-topbar strong {
  text-align: center;
  font-size: 20px;
  font-weight: 600;
}

.agent-topbar__button,
.agent-invite-button {
  border: 0;
  background: transparent;
  color: #273348;
  cursor: pointer;
}

.agent-topbar__button {
  justify-self: start;
  font-size: 34px;
  line-height: 1;
}

.agent-invite-button {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #9a6b00;
  font-size: 14px;
}

.agent-invite-button span {
  font-size: 24px;
  line-height: 1;
}

.agent-content {
  display: grid;
  gap: 10px;
  padding: 12px 0 28px;
}

.agent-summary-card,
.agent-tabs-card {
  background: #fff;
  border-radius: 4px;
}

.agent-summary-card__row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  min-height: 108px;
  border-top: 1px solid #202020;
}

.agent-summary-card__row:first-child {
  border-top: 0;
}

.agent-summary-card__row--top {
  grid-template-columns: 1fr 1.35fr 1.1fr;
}

.agent-summary-card article {
  display: grid;
  gap: 8px;
  min-height: 58px;
  align-content: center;
  justify-items: center;
  border-left: 1px solid #202020;
}

.agent-summary-card article:first-child {
  border-left: 0;
}

.agent-summary-card span {
  color: #1c2740;
  font-size: 15px;
}

.agent-summary-card strong {
  color: #1b2a44;
  font-size: 16px;
  font-weight: 500;
}

.agent-summary-card__money {
  color: #f00000 !important;
  font-size: 21px !important;
  white-space: nowrap;
}

.agent-summary-card button {
  justify-self: center;
  width: 104px;
  height: 42px;
  border: 0;
  border-radius: 7px;
  background: #0877ee;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.agent-text-green {
  color: #0aa45f !important;
}

.agent-text-red {
  color: #f00000 !important;
}

.agent-tabs-card {
  padding: 18px 10px 0;
}

.agent-level-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  gap: 4px;
  height: 42px;
}

.agent-level-tabs button,
.agent-level-tabs select {
  height: 38px;
  border: 0;
  background: transparent;
  color: #1e2c44;
  font-size: 16px;
  font-family: inherit;
}

.agent-level-tabs__item--active {
  color: #2456ff !important;
  border-bottom: 2px solid #2456ff !important;
}

.agent-level-tabs__date {
  width: 100%;
  min-width: 0;
  padding: 0 20px 0 6px;
  color: #17213a !important;
  text-align: center;
  text-align-last: center;
  cursor: pointer;
}

.agent-level-tabs__date:disabled {
  cursor: wait;
  opacity: 0.58;
}

.agent-downline-list {
  display: grid;
}

.agent-downline-card {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 80px;
  align-items: center;
  gap: 8px;
  min-height: 100px;
  border-top: 1px solid #333;
}

.agent-downline-card__profile {
  display: grid;
  justify-items: center;
  gap: 4px;
}

.agent-avatar {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(145deg, #d8c386, #c6a85f);
  color: #fff;
  font-size: 28px;
}

.agent-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.agent-downline-card__profile strong {
  max-width: 78px;
  color: #1c2740;
  font-size: 15px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-downline-card__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  text-align: center;
}

.agent-downline-card__metrics div {
  display: grid;
  gap: 6px;
}

.agent-downline-card__metrics span {
  color: #1d2a43;
  font-size: 13px;
  white-space: nowrap;
}

.agent-downline-card__metrics strong {
  color: #17213a;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.agent-order-button {
  width: 78px;
  height: 36px;
  border: 0;
  border-radius: 7px;
  background: #d2ba7a;
  color: #17213a;
  font-size: 15px;
}

@media (max-width: 360px) {
  .agent-downline-card {
    grid-template-columns: 70px minmax(0, 1fr);
    grid-template-areas:
      "profile metrics"
      "profile action";
    gap: 8px;
    min-height: 122px;
    padding: 10px 0;
  }

  .agent-downline-card__profile {
    grid-area: profile;
  }

  .agent-downline-card__metrics {
    grid-area: metrics;
    gap: 3px;
  }

  .agent-downline-card__metrics span,
  .agent-downline-card__metrics strong {
    font-size: 12px;
  }

  .agent-order-button {
    grid-area: action;
    justify-self: end;
    width: 84px;
  }
}

.agent-empty {
  padding: 28px 12px;
  color: #7a8499;
  text-align: center;
}

.agent-status {
  margin: 0 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #eef4ff;
  color: #244b93;
  font-size: 13px;
  text-align: center;
}

.agent-status--error {
  background: #ffecec;
  color: #d42c2c;
}

.agent-sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.agent-sheet__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.36);
}

.agent-sheet__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  max-height: 82vh;
  overflow-y: auto;
  border-radius: 10px 10px 0 0;
  background: #fff;
  padding: 28px 18px 18px;
}

.agent-sheet__panel h3 {
  margin: 0 0 24px;
  color: #20283a;
  font-size: 18px;
  font-weight: 500;
  text-align: center;
}

.agent-share-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 28px;
}

.agent-share-grid button {
  display: grid;
  justify-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: #2b2f39;
  font-size: 14px;
}

.agent-share-grid span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #2b2f39;
  font-size: 34px;
  font-weight: 600;
}

.agent-qr-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 16px 12px;
  border-radius: 14px;
  background: #f6f8fd;
}

.agent-qr-card img {
  width: 188px;
  height: 188px;
  border-radius: 12px;
  background: #fff;
}

.agent-qr-card strong {
  color: #17213a;
}

.agent-qr-card p {
  max-width: 100%;
  margin: 0;
  color: #667189;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  word-break: break-all;
}

.agent-sheet__cancel {
  display: block;
  width: 100%;
  height: 46px;
  margin-top: 26px;
  border: 0;
  background: transparent;
  color: #20283a;
  font-size: 18px;
}

.agent-sheet__panel--orders {
  padding-top: 22px;
}

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

.agent-order-more {
  width: 100%;
  min-height: 42px;
  border: 1px solid #d9dfeb;
  border-radius: 7px;
  color: #2f5b9d;
  background: #f4f7fc;
  font-size: 14px;
  cursor: pointer;
}

.agent-order-more:disabled {
  cursor: wait;
  opacity: 0.6;
}

.agent-empty--error {
  color: #d42c2c;
}

.agent-order-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  background: #f6f8fd;
}

.agent-order-card div:first-child,
.agent-order-card__money {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.agent-order-card strong {
  color: #17213a;
}

.agent-order-card span,
.agent-order-card p {
  margin: 0;
  color: #657189;
  font-size: 13px;
  line-height: 1.45;
}

.profile-card {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.profile-card__name {
  font-size: 30px;
  font-weight: 700;
  color: #23325f;
}

.profile-card__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.inline-link {
  color: #2a63de;
  font-weight: 600;
  text-decoration: none;
}

.inline-link--button {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.status-text {
  margin: 18px 8px 0;
  text-align: center;
  color: #edf3ff;
}

.status-text--error {
  color: #ffe4e4;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(16, 31, 72, 0.9);
  backdrop-filter: blur(18px);
}

.bottom-nav__item {
  border: 0;
  border-radius: 18px;
  padding: 12px 10px;
  color: rgba(255, 255, 255, 0.68);
  background: transparent;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.bottom-nav__item--active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.bottom-nav--light {
  background: #fff;
  border-top: 1px solid #eceef7;
  backdrop-filter: none;
}

.bottom-nav__item--light {
  color: #4a5570;
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 10px 6px;
}

.bottom-nav__item--light.bottom-nav__item--active {
  color: #e3a600;
  background: transparent;
}

.bottom-nav__icon {
  --nav-icon-color: #ffc363;
  --nav-icon-mask: none;
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  font-size: 0;
  line-height: 0;
}

.bottom-nav__icon::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: var(--nav-icon-color);
  -webkit-mask: var(--nav-icon-mask) center / contain no-repeat;
  mask: var(--nav-icon-mask) center / contain no-repeat;
}

.bottom-nav__icon--home {
  --nav-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath fill='%23000' d='M28 125.5 118.8 35a13 13 0 0 1 18.4 0L228 125.5a13 13 0 0 1-18.4 18.4l-4.6-4.6V212a18 18 0 0 1-18 18h-45v-65a14 14 0 0 0-14-14h-18a14 14 0 0 0-14 14v65H69a18 18 0 0 1-18-18v-72.7l-4.6 4.6A13 13 0 0 1 28 125.5Z'/%3E%3C/svg%3E");
}

.bottom-nav__icon--wallet {
  --nav-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath fill='%23000' d='M89 24c15 16 28 22 39 22s24-6 39-22c15-2 27 7 26 22-5 20-22 40-36 47H99C85 86 68 66 63 46 62 31 74 22 89 24Zm39 78c58 0 87 56 101 115 3 13-7 25-20 25H47c-13 0-23-12-20-25 14-59 43-115 101-115Z'/%3E%3C/svg%3E");
}

.bottom-nav__icon--cards {
  --nav-icon-color: #d89a18;
  --nav-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath fill='%23000' d='M62 22h104a18 18 0 0 1 18 18v144a18 18 0 0 1-18 18H62a18 18 0 0 1-18-18V40a18 18 0 0 1 18-18Zm52 41c-27 0-45 17-45 42s18 42 45 42c8 0 16-2 22-5v19h22V89h-22v31c-5 4-11 6-18 6-15 0-25-8-25-21s10-21 25-21c9 0 17 3 24 9l14-17c-11-9-25-13-42-13Z'/%3E%3Cpath fill='%23000' d='M94 202h100a18 18 0 0 0 18-18V63h-28v121a18 18 0 0 1-18 18H94Z' opacity='.55'/%3E%3C/svg%3E");
}

.bottom-nav__icon--wallet::after {
  content: "￥";
  position: absolute;
  left: 50%;
  top: 56%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  font-weight: 900;
}

.bottom-nav__icon--support {
  --nav-icon-color: #ff477d;
  --nav-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath fill='none' stroke='%23000' stroke-width='18' stroke-linecap='round' stroke-linejoin='round' d='M44 146v-28a84 84 0 0 1 168 0v28M55 116h11a14 14 0 0 1 14 14v44a14 14 0 0 1-14 14H55a22 22 0 0 1-22-22v-28a22 22 0 0 1 22-22Zm146 0h-11a14 14 0 0 0-14 14v44a14 14 0 0 0 14 14h11a22 22 0 0 0 22-22v-28a22 22 0 0 0-22-22Zm-25 64c0 30-18 48-49 48h-16'/%3E%3Cpath fill='none' stroke='%23000' stroke-width='22' stroke-linecap='round' d='M102 228h28'/%3E%3C/svg%3E");
}

.bottom-nav__icon--profile {
  --nav-icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath fill='none' stroke='%23000' stroke-width='18' stroke-linecap='round' d='M128 31a48 48 0 1 1 0 96 48 48 0 0 1 0-96Zm-91 196c0-51 40-83 91-83s91 32 91 83'/%3E%3C/svg%3E");
}

.bottom-nav__item--active .bottom-nav__icon {
  transform: translateY(-1px) scale(1.04);
}

.auth-page-body {
  min-height: var(--web-visual-viewport-height, 100dvh);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-page-body--light {
  background: #f7f7fb;
}

.auth-screen {
  width: min(100%, 520px);
  min-height: var(--web-visual-viewport-height, 100dvh);
  margin: 0 auto;
  padding: 22px 18px 120px;
  background: #fff;
}

.auth-screen__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.auth-screen__icon {
  border: 0;
  background: transparent;
  color: #2a2a2a;
  font-size: 34px;
  line-height: 1;
  padding: 4px 0;
  cursor: pointer;
}

.auth-screen__icon--dots {
  letter-spacing: 4px;
}

.auth-login-card {
  display: grid;
  gap: 22px;
  padding: 18px 14px 10px;
}

.auth-feedback--inline {
  min-height: 22px;
  margin-top: 0;
  color: #6a748d;
  text-align: left;
}

.auth-line-field {
  display: grid;
  gap: 14px;
  border-bottom: 1px solid #ececf3;
  padding-bottom: 18px;
}

.auth-line-field__label {
  color: #242c3d;
  font-size: 18px;
  font-weight: 500;
}

.auth-line-field__control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.auth-line-field__control input {
  width: 100%;
  border: 0;
  background: transparent;
  color: #20283a;
  font-size: 18px;
  padding: 6px 0;
}

.auth-code-btn {
  min-width: 120px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #3f9af9, #2979e8);
  font-size: 16px;
  padding: 12px 14px;
  cursor: pointer;
}

.auth-code-btn:disabled {
  opacity: 0.7;
  cursor: default;
}

.auth-submit-btn {
  min-height: 64px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #f7bf0d, #efaf00);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: inset 0 0 0 2px rgba(199, 140, 0, 0.22);
}

.auth-submit-btn:disabled {
  opacity: 0.75;
  cursor: wait;
}

.auth-help-text {
  margin: 0;
  text-align: right;
  color: #71788f;
  font-size: 16px;
}

.auth-help-link {
  border: 0;
  background: transparent;
  color: #2c74ea;
  font-size: 16px;
  cursor: pointer;
}

@media (min-width: 769px) {
  .auth-page-body--light {
    padding: 24px;
    background: linear-gradient(180deg, #f2f5fb, #e8eef9);
  }

  .auth-screen {
    min-height: auto;
    border-radius: 24px;
    box-shadow: 0 18px 48px rgba(25, 47, 92, 0.08);
  }

  .mobile-shell {
    width: min(100%, 1180px);
    padding: 28px 24px 110px;
  }
}

.auth-card {
  width: min(100%, 420px);
  margin: 0 auto;
  padding: 36px 28px 30px;
  text-align: center;
}

.auth-card__header {
  display: flex;
  justify-content: center;
}

.auth-card__headline {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.auth-card__eyebrow {
  color: #eef4ff;
  font-size: 16px;
  font-weight: 700;
}

.auth-card__title {
  margin: 0;
  color: #fff;
  font-size: clamp(34px, 9vw, 58px);
  line-height: 1.06;
}

.auth-tabs {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  justify-content: center;
}

.auth-tab {
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 20px;
  min-height: 64px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

.auth-tab--active {
  background: rgba(255, 255, 255, 0.94);
  color: #3255af;
}

.auth-feedback {
  min-height: 28px;
  margin-top: 16px;
  color: #eef5ff;
  text-align: center;
}

.auth-feedback--error {
  color: #ffe2e2;
}

.auth-form {
  display: grid;
  gap: 18px;
  margin-top: 10px;
}

.field {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.field__label {
  color: #f2f6ff;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
}

.field__input {
  width: 100%;
  border: 0;
  border-radius: 20px;
  min-height: 58px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.96);
  color: #1f315c;
  font-size: 17px;
  text-align: center;
}

.primary-btn {
  border: 0;
  border-radius: 22px;
  min-height: 62px;
  padding: 14px 16px;
  background: #2f61dc;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

@keyframes digitRoll {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(calc(var(--digit-height) * -10));
  }
}

@keyframes cardPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.015);
  }
}

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

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

@keyframes noticeMarquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

@media (max-width: 768px) {
  .mobile-shell {
    width: 100%;
    padding: 16px 14px 100px;
  }

  .auth-page-body--light {
    display: block;
  }

  .auth-screen {
    width: 100%;
    min-height: var(--web-visual-viewport-height, 100dvh);
    padding: 18px 18px 120px;
    border-radius: 0;
    box-shadow: none;
  }

  .auth-shell {
    width: 100%;
    min-height: var(--web-visual-viewport-height, 100dvh);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 14px 104px;
  }

  .auth-card {
    width: min(100%, 100%);
    padding: 30px 20px 24px;
    border-radius: 26px;
  }

  .auth-tab {
    min-height: 58px;
    font-size: 17px;
  }

  .field__input {
    min-height: 56px;
    font-size: 16px;
  }

  .auth-line-field__label {
    font-size: 16px;
  }

  .auth-line-field__control {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-code-btn {
    width: 100%;
    min-width: 0;
  }

  .primary-btn {
    min-height: 58px;
  }

  .landing-hero {
    padding: 26px 18px 20px;
  }

  .landing-hero__badge {
    top: 14px;
    right: 14px;
  }

  .landing-copy__title {
    font-size: clamp(34px, 11vw, 52px);
  }

  .landing-wheel {
    width: min(84vw, 300px);
  }

  .landing-wheel__chip {
    width: 46px;
    height: 46px;
    font-size: 22px;
  }

  .wallet-request-line {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .wallet-request-methods__grid {
    gap: 10px;
  }

  .wallet-request-method {
    min-height: 50px;
    font-size: 13px;
  }

  .wallet-request-upload__trigger--large {
    width: 128px;
    height: 128px;
  }

  .landing-wheel__core strong {
    font-size: 36px;
  }

  .notice-strip {
    align-items: flex-start;
  }

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

  .quick-card {
    border-radius: 20px;
    padding: 16px 10px;
  }

  .quick-card__label {
    font-size: 13px;
  }

  .game-entry {
    border-radius: 24px;
    padding: 18px 16px;
  }

  .game-entry__label {
    font-size: 26px;
  }

  .game-entry__arrow {
    font-size: 13px;
  }

  .wallet-user-card__name {
    font-size: 18px;
  }

  .wallet-balance-strip__value {
    font-size: 24px;
  }

  .wallet-benefit-card {
    grid-template-columns: 1fr;
  }

  .wallet-shortcuts {
    gap: 8px;
    padding-inline: 6px;
  }

  .wallet-shortcuts__item {
    font-size: 12px;
  }

  .wallet-shortcuts__icon {
    width: 38px;
    height: 38px;
  }

  .wallet-kpi-row {
    grid-template-columns: 1fr;
  }

  .profile-overview {
    grid-template-columns: 1fr;
  }

  .wallet-modal-card__invite-item {
    flex-direction: column;
  }

  .wallet-record-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .wallet-record-item__side {
    text-align: left;
  }

  .wallet-promo-banner {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .wallet-promo-banner__visual {
    justify-items: start;
    grid-auto-flow: column;
    justify-content: space-between;
  }

  .wallet-promo-banner__visual img {
    inset: auto 0 0 auto;
    width: 92px;
    height: 92px;
  }

  .detail-topbar {
    padding-top: 12px;
  }

  .detail-list__item {
    flex-direction: column;
  }

  .detail-list__side {
    text-align: left;
  }

  .draw-card {
    padding: 18px;
  }

  .result-meta__value {
    font-size: 42px;
  }

  .number-box {
    width: 58px;
    height: 84px;
    font-size: 42px;
  }

  .number-box--sum {
    width: 82px;
  }

  .operator {
    font-size: 32px;
  }

  .result-tag {
    min-width: 54px;
    font-size: 24px;
  }
}

/* Frontend mobile app frame: keep all user pages in one stable phone layout. */
#webApp {
  width: min(100%, 430px);
  height: var(--web-visual-viewport-height, 100dvh);
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

#webApp .mobile-shell {
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

#webApp .mobile-shell.mobile-shell--draw {
  width: 100%;
  height: 100%;
  max-height: 100%;
  padding: 0;
  overflow: hidden;
}

#webApp .bottom-nav {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  z-index: 80;
}

#webApp .bottom-nav__item {
  min-width: 0;
  padding: 7px 4px 6px;
  font-size: 13px;
}

#webApp .bottom-nav__icon {
  font-size: 21px;
}

#webApp .status-text {
  display: none;
}

#webApp .panel,
#webApp .draw-card {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
}

#webApp .panel {
  min-height: 100%;
  padding: 0 12px 12px;
  background: #eef1fb;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 56px;
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr) 62px;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.96);
  color: #151f36;
  box-shadow: 0 1px 0 rgba(218, 224, 238, 0.8);
}

.app-topbar--plain {
  margin: 0 -12px 12px;
}

.app-topbar__title {
  text-align: center;
  font-size: 19px;
  line-height: 1.2;
}

.app-topbar__pill,
.app-topbar__icon {
  border: 0;
  min-height: 34px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
}

.app-topbar__pill {
  background: #12c46c;
  color: #fff;
  font-size: 15px;
}

.app-topbar__icon {
  background: transparent;
  color: #111a2e;
  font-size: 13px;
}

.app-topbar__space {
  min-height: 34px;
}

#webApp .landing-page {
  min-height: 100%;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 0 12px 12px;
  background: #eef1fb;
}

#webApp .mobile-shell {
  padding: 0 0 96px;
  background: #eef1fb;
}

#webApp .landing-page .app-topbar {
  margin: 0 -12px;
}

#webApp .landing-hero {
  min-height: 210px;
  gap: 12px;
  justify-items: stretch;
  padding: 16px 16px 12px;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(222, 28, 21, 0.92), rgba(204, 38, 24, 0.94)),
    linear-gradient(135deg, #fff1c2, #f8c44f);
  box-shadow: none;
  text-align: left;
}

#webApp .landing-hero--image {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  max-height: none;
  min-height: 0;
  padding: 0;
  border-radius: 0;
  background: #fff;
  overflow: hidden;
  box-shadow: none;
}

#webApp .landing-hero__badge {
  top: 12px;
  right: 12px;
  background: #12c46c;
  color: #fff;
}

#webApp .landing-copy {
  justify-items: start;
  max-width: 250px;
  gap: 6px;
}

#webApp .landing-copy__eyebrow {
  font-size: 12px;
}

#webApp .landing-copy__title {
  font-size: 36px;
}

#webApp .landing-copy__text {
  max-width: 230px;
  font-size: 13px;
  line-height: 1.45;
}

#webApp .landing-wheel {
  position: absolute;
  right: 8px;
  bottom: 28px;
  width: 156px;
  opacity: 0.96;
}

#webApp .landing-wheel__ring {
  animation: none;
}

#webApp .landing-wheel__chip {
  width: 32px;
  height: 32px;
  font-size: 16px;
}

#webApp .landing-wheel__core strong {
  font-size: 30px;
}

#webApp .landing-dots {
  align-self: end;
  justify-content: center;
}

#webApp .notice-strip {
  border: 0;
  border-radius: 0;
  padding: 10px 12px;
  background: #fff;
  color: #5b6478;
  box-shadow: none;
}

#webApp .notice-strip__label {
  background: transparent;
  color: #f33a2f;
}

#webApp .quick-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

#webApp .quick-card {
  min-height: 72px;
  border: 0;
  border-radius: 8px;
  padding: 12px 8px;
  background: #fff;
  box-shadow: none;
}

#webApp .quick-card__icon {
  width: 34px;
  height: 34px;
  font-size: 15px;
}

#webApp .game-section {
  display: grid;
  gap: 10px;
}

#webApp .game-section__head {
  padding: 2px 2px 0;
}

#webApp .game-section__eyebrow {
  color: #8090ad;
}

#webApp .game-section__title {
  font-size: 20px;
  color: #1e2e50;
}

#webApp .game-entry {
  min-height: 92px;
  border: 0;
  border-radius: 8px;
  padding: 16px 14px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(50, 63, 100, 0.08);
}

#webApp .game-entry__label {
  font-size: 28px;
}

#webApp .panel--wallet,
#webApp .panel--profile {
  background: #eef1fb;
}

#webApp .wallet-stats-bar {
  box-shadow: none;
}

#webApp .wallet-stats-bar__item {
  padding: 12px 8px;
}

#webApp .wallet-promo-banner {
  min-height: 154px;
  grid-template-columns: minmax(0, 1fr) 86px;
  padding: 16px 14px;
}

#webApp .wallet-promo-banner__title {
  font-size: 25px;
}

#webApp .wallet-promo-banner__text {
  font-size: 12px;
}

#webApp .wallet-promo-banner__coin {
  width: 72px;
  height: 72px;
  font-size: 26px;
}

#webApp .wallet-promo-banner--image {
  display: block;
  grid-template-columns: none;
  min-height: 0;
  aspect-ratio: 670 / 275;
  padding: 0;
  background: #fff;
  box-shadow: none;
}

#webApp .wallet-promo-banner__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#webApp .wallet-request-card,
#webApp .wallet-benefit-card,
#webApp .wallet-menu,
#webApp .wallet-shortcuts,
#webApp .profile-balance-card,
#webApp .profile-overview__item,
#webApp .support-item {
  border-radius: 8px;
  box-shadow: none;
}

#webApp .wallet-request-card {
  padding: 0;
}

#webApp .wallet-request-methods,
#webApp .wallet-request-form-sheet,
#webApp .wallet-request-field,
#webApp .wallet-request-proof-preview {
  padding-inline: 14px;
}

#webApp .wallet-request-submit {
  margin: 14px;
  width: calc(100% - 28px);
}

#webApp .wallet-request-history-link {
  min-height: 42px;
  border-radius: 8px;
  background: #fff;
}

#webApp .support-list {
  gap: 10px;
  margin-top: 0;
}

#webApp .support-item {
  display: grid;
  gap: 6px;
  padding: 16px;
}

#webApp .profile-shell__top {
  gap: 10px;
}

#webApp .wallet-user-card__avatar {
  width: 52px;
  height: 52px;
}

#webApp .profile-balance-card {
  padding: 14px 16px;
}

#webApp .profile-balance-card strong {
  font-size: 24px;
}

#webApp .wallet-benefit-card {
  padding: 14px;
}

#webApp .wallet-shortcuts {
  padding: 12px 8px;
}

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

#webApp .wallet-menu__item {
  padding: 15px 14px;
}

#webApp .wallet-menu__side {
  max-width: 128px;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Home v3 is isolated from the old landing-* carousel to stop image stretch bugs. */
#webApp .home-v3 {
  width: min(100%, 430px);
  min-height: 100%;
  margin: 0 auto;
  display: grid;
  align-content: start;
  overflow-x: hidden;
}

#webApp .home-v3__topbar {
  display: grid;
  align-items: center;
  gap: 8px;
  padding: 0 4px;
}

#webApp .home-v3__brand,
#webApp .home-v3__link {
  border: 0;
  border-radius: 12px;
  background: #11c673;
  color: #fff;
  min-height: 40px;
  display: inline-grid;
  place-items: center;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(18, 164, 100, 0.22);
}

#webApp .home-v3__title {
  text-align: center;
  letter-spacing: 0.04em;
}

#webApp .home-v3__link {
  cursor: pointer;
  font-size: 14px;
}

#webApp .home-v3__banner {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  cursor: pointer;
}

#webApp .home-v3__banner--image {
  background-repeat: no-repeat;
  background-position: center center;
}

#webApp .home-v3__preload {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

#webApp .home-v3__banner--fallback {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 8px;
  text-align: left;
  color: #fff;
}

#webApp .home-v3__banner--fallback strong {
  line-height: 1;
}

#webApp .home-v3__banner--fallback em,
#webApp .home-v3__banner-kicker {
  font-style: normal;
  font-size: 14px;
  line-height: 1.5;
  opacity: 0.92;
}

#webApp .home-v3__notice {
  display: grid;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.86);
  overflow: hidden;
}

#webApp .home-v3__notice span {
  font-weight: 900;
}

#webApp .home-v3__notice div {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

#webApp .home-v3__notice strong {
  display: inline-block;
  min-width: 100%;
  font-size: 14px;
  animation: noticeMarquee 18s linear infinite;
}

#webApp .home-v3__quick {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

#webApp .home-v3__quick button,
#webApp .home-v3__game-card {
  border: 0;
  background: rgba(255, 255, 255, 0.92);
  color: #18306d;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(57, 80, 142, 0.08);
}

#webApp .home-v3__quick button {
  min-height: 92px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
}

#webApp .home-v3__quick span {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #4387ff, #2664df);
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}

#webApp .home-v3__quick strong {
  font-size: 14px;
}

#webApp .home-v3__account {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 10px 8px;
  color: #25385f;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

#webApp .home-v3__avatar {
  width: 43px;
  height: 43px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(164, 143, 84, 0.35);
  color: #fff;
  font-size: 25px;
  font-weight: 700;
}

#webApp .home-v3__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#webApp .home-v3__account-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

#webApp .home-v3__account-main strong {
  max-width: 138px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

#webApp .home-v3__account-main em {
  font-style: normal;
  line-height: 1.1;
  font-weight: 900;
}

#webApp .home-v3__account-actions {
  display: grid;
  gap: 6px;
}

#webApp .home-v3__account-actions button {
  border: 0;
  background: transparent;
  display: grid;
  justify-items: center;
  gap: 4px;
  cursor: pointer;
}

#webApp .home-v3__account-actions span {
  display: grid;
  place-items: center;
  font-size: 17px;
  line-height: 1;
  font-weight: 900;
}

#webApp .home-v3__account-actions strong {
  font-size: 12px;
  font-weight: 800;
}

#webApp .home-v3__game-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.62);
}

#webApp .home-v3__game-tab {
  position: relative;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: transparent;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

#webApp .home-v3__game-tab span {
  font-size: 16px;
  line-height: 1;
}

#webApp .home-v3__game-tab::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 22px;
  height: 4px;
  border-radius: 999px;
  background: transparent;
  transform: translateX(-50%);
}

#webApp .home-v3__game-tab--active::after {
  background: #f4bd05;
}

#webApp .home-v3__games {
  display: grid;
  gap: 10px;
}

#webApp .home-v3__section-title {
  display: grid;
  justify-items: center;
  gap: 3px;
  color: rgba(60, 66, 84, 0.7);
}

#webApp .home-v3__section-title span {
  font-size: 12px;
}

#webApp .home-v3__section-title strong {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  width: 100%;
  line-height: 1.2;
  font-weight: 900;
  text-align: center;
}

#webApp .home-v3__section-title strong::before,
#webApp .home-v3__section-title strong::after {
  content: "";
  height: 1px;
}

#webApp .home-v3__game-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#webApp .home-v3__game-card {
  position: relative;
  aspect-ratio: 1.64 / 1;
  padding: 12px 11px 10px;
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 7px;
  text-align: left;
  overflow: hidden;
  border: 1px solid rgba(32, 42, 74, 0.16);
}

#webApp .home-v3__hot {
  position: absolute;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 900;
  z-index: 2;
}

#webApp .home-v3__game-card div {
  display: grid;
  gap: 4px;
  position: relative;
  z-index: 2;
}

#webApp .home-v3__game-card strong {
  line-height: 1.15;
}

#webApp .home-v3__game-card em {
  font-style: normal;
  font-size: 12px;
}

#webApp .home-v3__enter {
  width: fit-content;
  min-width: 64px;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 900;
  font-size: 11px;
  position: relative;
  z-index: 2;
}

#webApp .home-v3__game-orb {
  position: absolute;
  right: -20px;
  bottom: -30px;
  width: 82px;
  height: 82px;
  border-radius: 50%;
}

#webApp .home-v3__empty-game {
  min-height: 92px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px dashed rgba(93, 96, 108, 0.28);
  color: rgba(56, 60, 78, 0.7);
  text-align: center;
}

#webApp .home-v3__empty-game strong {
  font-size: 16px;
  color: rgba(48, 54, 72, 0.78);
}

#webApp .home-v3__empty-game span {
  font-size: 12px;
}

#webApp .home-v3__game-card:nth-child(2n) .home-v3__game-orb {
  background:
    radial-gradient(circle at 36% 34%, rgba(255, 255, 255, 0.96) 0 18%, transparent 19%),
    radial-gradient(circle at 55% 52%, rgba(255, 255, 255, 0.55) 0 23%, transparent 24%),
    linear-gradient(135deg, #7aa3ff, #d6e5ff);
}

#webApp .home-v3__game-card:nth-child(3n) .home-v3__game-orb {
  background:
    radial-gradient(circle at 36% 34%, rgba(255, 255, 255, 0.96) 0 18%, transparent 19%),
    radial-gradient(circle at 55% 52%, rgba(255, 255, 255, 0.55) 0 23%, transparent 24%),
    linear-gradient(135deg, #d51f30, #ffffff 62%, #d51f30);
}

/* Auth mobile refresh: keep the login screen focused and remove extra navigation noise. */
body.auth-page-body--light {
  min-height: var(--web-visual-viewport-height, 100dvh);
  margin: 0;
  display: grid;
  place-items: start center;
}

body.auth-page-body--light #authApp {
  width: min(100%, 430px);
  min-height: var(--web-visual-viewport-height, 100dvh);
  display: grid;
  place-items: start center;
}

body.auth-page-body--light .auth-screen--mobile {
  position: relative;
  width: 100%;
  min-height: var(--web-visual-viewport-height, 100dvh);
  padding: 24px 26px 24px;
  display: grid;
  align-content: start;
  border-radius: 0;
  box-shadow: none;
}

body.auth-page-body--light .auth-screen__close {
  width: 30px;
  height: 30px;
  border: 0;
  padding: 0;
  background: transparent;
  color: #1c2536;
  font-size: 28px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
}

body.auth-page-body--light .auth-login-card {
  margin-top: clamp(58px, 16vh, 120px);
  display: grid;
  gap: 22px;
}

body.auth-page-body--light .auth-line-field {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0 0 15px;
  border-bottom: 1px solid #ebedf4;
}

body.auth-page-body--light .auth-line-field__label {
  color: #172033;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 600;
}

body.auth-page-body--light .auth-line-field__control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
}

body.auth-page-body--light .auth-line-field__control input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 6px 0;
  background: transparent;
  color: #182033;
  font-size: 16px;
  line-height: 1.4;
}

body.auth-page-body--light .auth-line-field__control input::placeholder {
  color: #7a8190;
}

body.auth-page-body--light .auth-code-btn {
  min-width: 100px;
  min-height: 42px;
  border: 0;
  border-radius: 9px;
  padding: 0 12px;
  background: linear-gradient(180deg, #439cf9, #2f7ee8);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(47, 126, 232, 0.18);
}

body.auth-page-body--light .auth-code-btn:disabled {
  opacity: 0.68;
  cursor: default;
}

body.auth-page-body--light .auth-submit-btn {
  min-height: 52px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffc313 0%, #f0ad00 100%);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(184, 126, 0, 0.16), 0 8px 16px rgba(240, 173, 0, 0.16);
}

body.auth-page-body--light .auth-submit-btn:disabled {
  opacity: 0.78;
  cursor: wait;
}

body.auth-page-body--light .auth-feedback--inline {
  min-height: 18px;
  margin: -6px 0 0;
  color: #6d7586;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

body.auth-page-body--light .auth-feedback--error {
  color: #e13d45;
}

@media (min-width: 769px) {
  body.auth-page-body--light {
    padding: 32px 0;
  }

  body.auth-page-body--light .auth-screen--mobile {
    min-height: min(680px, calc(var(--web-visual-viewport-height, 100dvh) - 64px));
    border-radius: 24px 24px 0 0;
    box-shadow: 0 20px 48px rgba(36, 57, 98, 0.08);
  }
}

@media (max-width: 360px) {
  body.auth-page-body--light .auth-screen--mobile {
    padding-inline: 20px;
  }

  body.auth-page-body--light .auth-line-field__control {
    grid-template-columns: minmax(0, 1fr) auto;
  }

body.auth-page-body--light .auth-code-btn {
    width: auto;
    min-width: 92px;
    padding-inline: 10px;
  }
}

.red-envelope-page .red-envelope-round__avatar img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  object-fit: cover;
}

.red-envelope-rules-modal-shell {
  align-items: flex-end;
  padding: 0;
}

.red-envelope-rules-modal {
  width: 100%;
  max-width: 430px;
  max-height: min(72dvh, 620px);
  padding: 22px 20px 28px;
  overflow-y: auto;
  border-radius: 0;
  color: #344c75;
  background: #ffffff;
  box-shadow: 0 -18px 48px rgba(12, 24, 45, .22);
}

.red-envelope-rules-modal > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: start;
  gap: 10px;
  margin-bottom: 8px;
}

.red-envelope-rules-modal > header strong {
  font-size: 18px;
  line-height: 1.45;
}

.red-envelope-rules-modal > header button {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  color: #aeb7c4;
  background: transparent;
  font-size: 34px;
  line-height: 1;
}

.red-envelope-rules-modal ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 24px;
}

.red-envelope-rules-modal li {
  padding-left: 2px;
  font-size: 15px;
  line-height: 1.75;
}

/* Nuxt UI inspired frontend refresh. */
:root {
  --ui-primary: #00dc82;
  --ui-primary-600: #00a76f;
  --ui-primary-soft: rgba(0, 220, 130, 0.12);
  --ui-info: #0284c7;
  --ui-danger: #f43f5e;
  --ui-warning: #f59e0b;
  --ui-bg: #f8fafc;
  --ui-bg-muted: #f1f5f9;
  --ui-bg-elevated: #ffffff;
  --ui-text: #0f172a;
  --ui-text-muted: #64748b;
  --ui-text-toned: #334155;
  --ui-border: #e2e8f0;
  --ui-border-strong: #cbd5e1;
  --ui-ring: rgba(0, 220, 130, 0.28);
  --ui-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --ui-shadow-md: 0 10px 30px rgba(15, 23, 42, 0.08);
  --ui-shadow-lg: 0 24px 70px rgba(15, 23, 42, 0.16);
  --ui-radius-sm: 10px;
  --ui-radius-md: 14px;
  --ui-radius-lg: 20px;
  --ui-radius-xl: 26px;
}

#webApp {
  background: var(--ui-bg);
  color: var(--ui-text);
  box-shadow: 0 0 0 1px var(--ui-border), var(--ui-shadow-lg);
}

#webApp .mobile-shell,
#webApp .panel,
#webApp .panel--wallet,
#webApp .panel--profile,
#webApp .landing-page {
  background: var(--ui-bg);
}

#webApp button,
#webApp input {
  font-family: inherit;
}

#webApp button {
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

#webApp button:active {
  transform: translateY(1px) scale(0.99);
}

#webApp button:focus-visible,
#webApp input:focus-visible {
  outline: 3px solid var(--ui-ring);
  outline-offset: 2px;
}

#webApp .app-topbar {
  min-height: 54px;
  background: rgba(248, 250, 252, 0.9);
  color: var(--ui-text);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: none;
  backdrop-filter: blur(18px);
}

#webApp .app-topbar__title,
#webApp .home-v3__title {
  color: var(--ui-text);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

#webApp .app-topbar__icon,
#webApp .app-topbar__pill {
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-sm);
  background: var(--ui-bg-elevated);
  color: var(--ui-text-toned);
  box-shadow: var(--ui-shadow-sm);
}

#webApp .home-v3 {
  background:
    radial-gradient(circle at 82% 2%, rgba(0, 220, 130, 0.18), transparent 28%),
    radial-gradient(circle at 12% 18%, rgba(2, 132, 199, 0.12), transparent 28%),
    var(--ui-bg);
  color: var(--ui-text);
}

#webApp .home-v3__topbar {
  height: 62px;
  grid-template-columns: 98px minmax(0, 1fr) 62px;
  padding-inline: 0;
}

#webApp .home-v3__brand {
  min-height: 38px;
  letter-spacing: -0.01em;
}

#webApp .home-v3__link {
  min-height: 38px;
  border: 1px solid var(--ui-border);
  border-radius: 999px;
  background: var(--ui-bg-elevated);
  color: var(--ui-text-toned);
  box-shadow: var(--ui-shadow-sm);
}

#webApp .home-v3__banner--image {
  background-color: var(--ui-bg-elevated);
  background-size: cover;
}

#webApp .home-v3__banner--fallback {
  padding: 22px;
  background:
    radial-gradient(circle at 82% 20%, rgba(255, 255, 255, 0.46), transparent 28%),
    radial-gradient(circle at 88% 78%, rgba(0, 220, 130, 0.55), transparent 32%),
    linear-gradient(135deg, #0f172a 0%, #1e293b 58%, #064e3b 100%);
}

#webApp .home-v3__notice,
#webApp .home-v3__account,
#webApp .home-v3__game-tabs,
#webApp .home-v3__game-card,
#webApp .wallet-request-card,
#webApp .wallet-stats-bar,
#webApp .wallet-promo-banner,
#webApp .wallet-request-history-link,
#webApp .wallet-benefit-card,
#webApp .wallet-shortcuts,
#webApp .wallet-menu,
#webApp .profile-balance-card,
#webApp .profile-overview__item,
#webApp .support-item {
  border: 1px solid var(--ui-border);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--ui-shadow-sm);
}

#webApp .home-v3__notice {
  height: 40px;
  border-radius: var(--ui-radius-md);
  grid-template-columns: 54px minmax(0, 1fr);
}

#webApp .home-v3__notice strong {
  color: var(--ui-text-muted);
}

#webApp .home-v3__account {
  min-height: 82px;
  border-radius: var(--ui-radius-lg);
  background:
    radial-gradient(circle at 92% 12%, rgba(0, 220, 130, 0.16), transparent 34%),
    var(--ui-bg-elevated);
}

#webApp .home-v3__avatar,
#webApp .wallet-user-card__avatar,
#webApp .draw-page__user-avatar {
  border: 1px solid var(--ui-border);
  background:
    linear-gradient(135deg, rgba(0, 220, 130, 0.18), rgba(2, 132, 199, 0.12)),
    var(--ui-bg-elevated);
  color: var(--ui-primary-600);
}

#webApp .home-v3__account-main strong {
  color: var(--ui-text);
  font-weight: 800;
}

#webApp .home-v3__account-main em {
  color: var(--ui-primary-600);
  font-size: 20px;
}

#webApp .home-v3__account-actions {
  grid-template-columns: repeat(2, 48px);
}

#webApp .home-v3__account-actions button {
  color: var(--ui-text-toned);
}

#webApp .home-v3__account-actions span {
  width: 34px;
  height: 32px;
  border: 0;
  border-radius: 12px;
  background: var(--ui-primary-soft);
  color: var(--ui-primary-600);
}

#webApp .home-v3__game-tabs {
  height: 50px;
  padding: 4px;
  border-radius: 999px;
  background: var(--ui-bg-muted);
}

#webApp .home-v3__game-tab::after {
  display: none;
}

#webApp .home-v3__game-grid {
  gap: 10px;
}

#webApp .home-v3__game-card {
  border-color: var(--ui-border);
  box-shadow: var(--ui-shadow-md);
}

#webApp .home-v3__game-card strong {
  letter-spacing: -0.02em;
}

#webApp .home-v3__hot {
  right: 12px;
  top: 12px;
  bottom: auto;
  border: 0;
  background: var(--ui-primary-soft);
  color: var(--ui-primary-600);
}

#webApp .home-v3__enter {
  background: #0f172a;
  color: #fff;
}

#webApp .bottom-nav {
  bottom: 8px;
  padding: 6px;
}

#webApp .bottom-nav__item {
  border-radius: 16px;
  font-weight: 750;
}

#webApp .bottom-nav__item--light.bottom-nav__item--active {
  box-shadow: var(--ui-shadow-md);
}

#webApp .bottom-nav__icon {
  color: currentColor;
  transform: scale(0.92);
}

#webApp .wallet-shell,
#webApp .profile-shell {
  gap: 14px;
}

#webApp .wallet-stats-bar {
  gap: 8px;
  padding: 8px;
  border-radius: var(--ui-radius-lg);
  background: var(--ui-bg-elevated);
}

#webApp .wallet-stats-bar__item {
  border-radius: var(--ui-radius-md);
  background: var(--ui-bg-muted);
}

#webApp .wallet-stats-bar__item span,
#webApp .profile-overview__item span,
#webApp .support-item span {
  color: var(--ui-text-muted);
}

#webApp .wallet-stats-bar__item strong,
#webApp .profile-balance-card strong,
#webApp .profile-overview__item strong {
  color: var(--ui-text);
}

#webApp .wallet-promo-banner {
  border-radius: var(--ui-radius-lg);
  background:
    radial-gradient(circle at 90% 14%, rgba(0, 220, 130, 0.22), transparent 30%),
    linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff;
}

#webApp .wallet-promo-banner--image {
  border-radius: var(--ui-radius-lg);
  overflow: hidden;
}

#webApp .wallet-request-card {
  overflow: hidden;
  border-radius: var(--ui-radius-lg);
}

#webApp .wallet-request-switch {
  padding: 6px;
  gap: 6px;
  border-bottom: 1px solid var(--ui-border);
  background: var(--ui-bg-muted);
}

#webApp .wallet-request-switch__tab {
  border: 0;
  border-radius: var(--ui-radius-md);
  background: transparent;
  color: var(--ui-text-muted);
  font-size: 15px;
  font-weight: 850;
}

#webApp .wallet-request-switch__tab--active,
#webApp .wallet-shell--request .wallet-request-switch__tab--active {
  background: var(--ui-bg-elevated);
  color: var(--ui-text);
  box-shadow: var(--ui-shadow-sm);
}

#webApp .wallet-request-field,
#webApp .wallet-request-line__label,
#webApp .wallet-request-methods__title {
  color: var(--ui-text-toned);
}

#webApp .wallet-request-field input,
#webApp .wallet-request-line input {
  border-bottom-color: var(--ui-border);
  color: var(--ui-text);
}

#webApp .wallet-request-method {
  border-color: var(--ui-border);
  border-radius: var(--ui-radius-md);
  background: var(--ui-bg-elevated);
  color: var(--ui-text-toned);
}

#webApp .wallet-request-method--active {
  border-color: var(--ui-primary);
  color: var(--ui-primary-600);
  background: var(--ui-primary-soft);
  box-shadow: 0 0 0 3px var(--ui-ring);
}

#webApp .wallet-request-upload__trigger,
#webApp .wallet-request-upload__trigger--large {
  border-color: var(--ui-border-strong);
  border-radius: var(--ui-radius-md);
  background: var(--ui-bg-muted);
  color: var(--ui-primary-600);
}

#webApp .wallet-request-feedback {
  border: 1px solid rgba(0, 167, 111, 0.22);
  background: var(--ui-primary-soft);
  color: var(--ui-primary-600);
}

#webApp .wallet-request-feedback--error {
  border-color: rgba(244, 63, 94, 0.24);
  background: rgba(244, 63, 94, 0.08);
  color: var(--ui-danger);
}

#webApp .wallet-request-submit,
#webApp .quick-bet-footer__primary,
#webApp .draw-page__composer button:not(.draw-page__composer-more):not(.draw-page__composer-input) {
  border-radius: var(--ui-radius-md);
  background: linear-gradient(180deg, var(--ui-primary), var(--ui-primary-600));
  color: #052e20;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(0, 167, 111, 0.22);
}

#webApp .wallet-request-history-link,
#webApp .profile-avatar-upload span {
  color: var(--ui-primary-600);
  background: var(--ui-primary-soft);
  box-shadow: none;
}

#webApp .support-list {
  padding-top: 2px;
}

#webApp .support-item {
  border-radius: var(--ui-radius-lg);
}

#webApp .support-item strong {
  color: var(--ui-text);
}

#webApp .wallet-user-card {
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-lg);
  padding: 18px 12px;
  background: var(--ui-bg-elevated);
  box-shadow: var(--ui-shadow-sm);
}

#webApp .wallet-user-card__name {
  color: var(--ui-text);
  font-weight: 850;
}

#webApp .profile-balance-card,
#webApp .wallet-benefit-card,
#webApp .wallet-shortcuts,
#webApp .wallet-menu,
#webApp .profile-overview__item {
  border-radius: var(--ui-radius-lg);
}

#webApp .wallet-shortcuts__icon,
#webApp .wallet-menu__icon,
#webApp .wallet-benefit-card__icon {
  background: var(--ui-primary-soft);
  color: var(--ui-primary-600);
}

#webApp .wallet-menu__item {
  border-bottom-color: var(--ui-border);
}

#webApp .wallet-menu__main,
#webApp .wallet-menu__side {
  color: var(--ui-text-toned);
}

.room-list-modal__backdrop,
.home-announcement-modal__backdrop,
.image-preview-modal__backdrop {
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(8px);
}

.room-list-panel {
  border: 1px solid rgba(226, 232, 240, 0.96);
  background: var(--ui-bg);
  box-shadow: var(--ui-shadow-lg);
}

.room-list-panel__head {
  color: var(--ui-text);
}

.room-list-panel__head button {
  background: var(--ui-bg-elevated);
  color: var(--ui-text-muted);
  border: 1px solid var(--ui-border);
}

.room-card {
  border-radius: var(--ui-radius-lg);
}

.room-card::after {
  background: linear-gradient(90deg, rgba(255,255,255,0.08), rgba(255,255,255,0.58) 42%, rgba(248,250,252,0.92));
}

.room-card__fallback {
  color: rgba(15, 23, 42, 0.08);
  background:
    radial-gradient(circle at 16% 80%, rgba(0, 220, 130, 0.14), transparent 34%),
    linear-gradient(135deg, #fff, #f8fafc);
}

.room-card__content em {
  color: var(--ui-primary-600);
}

.room-card__content strong {
  color: var(--ui-text);
}

.room-card i {
  background: #0f172a;
  color: #fff;
}

#webApp .draw-page__header,
#webApp .draw-page__board,
#webApp .draw-page__chat,
#webApp .draw-page__tools,
#webApp .draw-page__composer {
  border-color: var(--ui-border);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--ui-shadow-sm);
}

#webApp .draw-page__board {
  border-radius: var(--ui-radius-xl);
}

#webApp .draw-page__result-panel {
  border-color: var(--ui-border);
}

#webApp .draw-page .number-box {
  border-color: var(--ui-border);
}

#webApp .draw-page__tools button,
#webApp .draw-page__user-actions button,
#webApp .draw-page__composer-input {
  border: 1px solid var(--ui-border);
  background: var(--ui-bg-elevated);
  color: var(--ui-text-toned);
}

body.auth-page-body--light .auth-screen--mobile {
  background: var(--ui-bg-elevated);
}

body.auth-page-body--light .auth-code-btn,
body.auth-page-body--light .auth-submit-btn {
  background: linear-gradient(180deg, var(--ui-primary), var(--ui-primary-600));
  color: #052e20;
  box-shadow: 0 10px 24px rgba(0, 167, 111, 0.18);
}

/* Draw page readability pass: Nuxt UI style, high contrast, no pale-on-white text. */
#webApp .mobile-shell.mobile-shell--draw {
  background: var(--ui-bg);
}

#webApp .mobile-shell--draw .draw-page {
  background:
    radial-gradient(circle at 88% 2%, rgba(0, 220, 130, 0.14), transparent 28%),
    linear-gradient(180deg, var(--ui-bg), var(--ui-bg-muted));
  color: var(--ui-text);
}

#webApp .draw-page__header {
  flex-basis: 58px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--ui-border);
  color: var(--ui-text);
  box-shadow: none;
  backdrop-filter: blur(16px);
}

#webApp .draw-page__back {
  color: var(--ui-text-toned);
  font-size: 30px;
}

#webApp .draw-page__title {
  color: var(--ui-text);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

#webApp .draw-page__board {
  padding: 10px 12px 8px;
  display: grid;
  gap: 8px;
  background: transparent;
  overflow: visible;
}

#webApp .draw-page__board::before,
#webApp .draw-page__board::after {
  display: none;
}

#webApp .draw-page__board-top {
  position: relative;
  z-index: 1;
  min-height: 66px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-lg);
  background: rgba(255, 255, 255, 0.94);
  color: var(--ui-text);
  box-shadow: var(--ui-shadow-sm);
}

#webApp .draw-page__expect {
  color: var(--ui-text);
  font-size: 15px;
  font-weight: 900;
}

#webApp .draw-page__timer {
  gap: 7px;
}

#webApp .draw-page__timer-info {
  color: var(--ui-text-muted);
  font-size: 11px;
  font-weight: 750;
}

#webApp .draw-page__timer-info strong {
  color: var(--ui-text);
  font-size: 15px;
  font-weight: 900;
}

#webApp .draw-page__timer-slots {
  gap: 5px;
}

#webApp .draw-page__timer-slot {
  min-width: 30px;
  height: 30px;
  border: 1px solid var(--ui-border);
  border-radius: 10px;
  background: var(--ui-bg-elevated);
  color: var(--ui-primary-600);
  font-size: 14px;
  font-weight: 900;
  box-shadow: var(--ui-shadow-sm);
}

#webApp .draw-page__result-panel {
  margin: 0;
  grid-template-columns: minmax(82px, 0.74fr) minmax(0, 1.26fr);
  padding: 12px;
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-lg);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--ui-shadow-sm);
}

#webApp .draw-page__result-meta {
  color: var(--ui-text);
}

#webApp .draw-page__result-meta strong {
  color: var(--ui-text);
  font-size: 14px;
  font-weight: 900;
}

#webApp .draw-page__result-meta span {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
  font-size: 12px;
  font-weight: 900;
}

#webApp .draw-page__result-row {
  justify-content: flex-end;
  gap: 5px;
}

#webApp .draw-page .number-box {
  width: 36px;
  height: 44px;
  border: 1px solid var(--ui-border-strong);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #f8fafc);
  color: var(--ui-text);
  font-size: 24px;
  font-weight: 950;
  box-shadow: inset 0 -2px 0 rgba(15, 23, 42, 0.04), var(--ui-shadow-sm);
}

#webApp .draw-page .number-box--sum {
  width: 42px;
}

#webApp .draw-page .operator {
  color: var(--ui-text-muted);
  font-size: 20px;
  font-weight: 900;
}

#webApp .draw-page .digit-reel,
#webApp .draw-page .digit-reel__digit {
  height: 40px;
}

#webApp .draw-page .digit-reel {
  --digit-height: 40px;
}

#webApp .draw-page .digit-reel__digit {
  color: var(--ui-text);
  font-size: 23px;
}

#webApp .draw-page__user-strip {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-lg);
  background: #0f172a;
  color: #fff;
  box-shadow: var(--ui-shadow-md);
}

#webApp .draw-page__user-card {
  gap: 9px;
}

#webApp .draw-page__user-avatar {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(135deg, rgba(0, 220, 130, 0.22), rgba(14, 165, 233, 0.18));
  color: var(--ui-primary);
  box-shadow: none;
}

#webApp .draw-page__user-meta {
  color: #fff;
}

#webApp .draw-page__user-meta strong {
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}

#webApp .draw-page__user-meta span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 800;
}

#webApp .draw-page__user-actions {
  gap: 6px;
}

#webApp .draw-page__user-actions button {
  min-width: 42px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: none;
}

#webApp .draw-page__chat {
  margin: 0 12px;
  padding: 10px;
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-lg);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--ui-shadow-sm);
}

#webApp .draw-message__head,
#webApp .draw-message__system-head {
  color: var(--ui-text-muted);
  font-size: 12px;
}

#webApp .draw-message__bubble {
  max-width: 288px;
  border: 1px solid var(--ui-border);
  border-radius: 14px;
  background: var(--ui-bg-elevated);
  color: var(--ui-text-toned);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.55;
  box-shadow: var(--ui-shadow-sm);
}

#webApp .draw-message__bubble--system {
  border-color: rgba(0, 167, 111, 0.22);
  background: rgba(0, 220, 130, 0.1);
  color: #064e3b;
}

#webApp .draw-message__avatar,
#webApp .draw-message__system-avatar {
  box-shadow: var(--ui-shadow-sm);
}

#webApp .draw-page__tools {
  padding: 8px 12px;
  background: transparent;
}

#webApp .draw-page__tools button {
  height: 38px;
  border: 1px solid var(--ui-border);
  border-radius: 999px;
  background: var(--ui-bg-elevated);
  color: var(--ui-text-toned);
  font-size: 14px;
  font-weight: 850;
  box-shadow: var(--ui-shadow-sm);
}

#webApp .draw-page__composer {
  grid-template-columns: 66px minmax(0, 1fr) 78px 42px;
  gap: 8px;
  padding: 0 12px 10px;
  background: transparent;
}

#webApp .draw-page__composer-label,
#webApp .draw-page__composer-input,
#webApp .draw-page__composer button {
  height: 44px;
  border-radius: 12px;
}

#webApp .draw-page__composer-label {
  background: var(--ui-primary-soft);
  color: var(--ui-primary-600);
  font-size: 13px;
  font-weight: 900;
}

#webApp .draw-page__composer-input {
  border: 1px solid var(--ui-border);
  background: var(--ui-bg-elevated);
  color: var(--ui-text);
  font-weight: 850;
  box-shadow: var(--ui-shadow-sm);
}

#webApp .draw-page__composer-input:disabled {
  border-color: var(--ui-border);
  background: var(--ui-bg-muted);
  color: var(--ui-text-muted);
}

#webApp .draw-page__composer button:not(.draw-page__composer-more):not(.draw-page__composer-input) {
  border: 1px solid rgba(0, 167, 111, 0.18);
  background: linear-gradient(180deg, var(--ui-primary), var(--ui-primary-600));
  color: #052e20;
  font-size: 14px;
}

#webApp .draw-page__composer button:disabled {
  border-color: var(--ui-border) !important;
  background: #cbd5e1 !important;
  color: #475569 !important;
}

#webApp .draw-page__composer-more {
  border: 0;
  background: var(--ui-danger);
  color: #fff;
}

/* Macau28 room compact pass: keep chat as the primary visual area. */
#webApp .draw-card.draw-page .draw-page__header {
  flex-basis: 44px;
  min-height: 44px;
  padding: 0 10px;
}

#webApp .draw-card.draw-page .draw-page__back,
#webApp .draw-card.draw-page .draw-page__header-space {
  width: 36px;
  height: 36px;
}

#webApp .draw-card.draw-page .draw-page__title {
  font-size: 16px;
  font-weight: 900;
}

#webApp .draw-card.draw-page .draw-page__board {
  flex: 0 0 auto;
  padding: 6px 10px 5px;
  gap: 5px;
}

#webApp .draw-card.draw-page .draw-page__board-top {
  min-height: 46px;
  padding: 8px 10px;
  border-radius: 18px;
}

#webApp .draw-card.draw-page .draw-page__expect {
  font-size: 13px;
  line-height: 1.2;
}

#webApp .draw-card.draw-page .draw-page__timer {
  gap: 4px;
}

#webApp .draw-card.draw-page .draw-page__timer-info {
  font-size: 10px;
  line-height: 1.1;
}

#webApp .draw-card.draw-page .draw-page__timer-info strong {
  font-size: 13px;
}

#webApp .draw-card.draw-page .draw-page__timer-slot {
  min-width: 24px;
  height: 24px;
  padding: 0 5px;
  border-radius: 9px;
  font-size: 12px;
}

#webApp .draw-card.draw-page .draw-page__result-panel {
  grid-template-columns: minmax(76px, 0.72fr) minmax(0, 1.28fr);
  padding: 8px 10px;
  border-radius: 18px;
}

#webApp .draw-card.draw-page .draw-page__result-meta {
  gap: 3px;
}

#webApp .draw-card.draw-page .draw-page__result-meta strong {
  font-size: 13px;
}

#webApp .draw-card.draw-page .draw-page__result-meta span {
  padding: 3px 7px;
  font-size: 11px;
}

#webApp .draw-card.draw-page .draw-page__result-row {
  gap: 4px;
}

#webApp .draw-card.draw-page .number-box {
  width: 30px;
  height: 36px;
  border-radius: 11px;
  font-size: 20px;
}

#webApp .draw-card.draw-page .number-box--sum {
  width: 36px;
}

#webApp .draw-card.draw-page .operator {
  font-size: 16px;
}

#webApp .draw-card.draw-page .digit-reel,
#webApp .draw-card.draw-page .digit-reel__digit {
  height: 34px;
}

#webApp .draw-card.draw-page .digit-reel {
  --digit-height: 34px;
}

#webApp .draw-card.draw-page .digit-reel__digit {
  font-size: 20px;
}

#webApp .draw-card.draw-page .draw-page__user-strip {
  padding: 7px 9px;
  border-radius: 18px;
}

#webApp .draw-card.draw-page .draw-page__user-card {
  gap: 7px;
}

#webApp .draw-card.draw-page .draw-page__user-avatar {
  width: 34px;
  height: 34px;
}

#webApp .draw-card.draw-page .draw-page__user-meta strong {
  font-size: 13px;
}

#webApp .draw-card.draw-page .draw-page__user-meta span {
  font-size: 11px;
}

#webApp .draw-card.draw-page .draw-page__user-actions {
  gap: 5px;
}

#webApp .draw-card.draw-page .draw-page__user-actions button {
  min-width: 36px;
  padding: 6px 7px;
  border-radius: 11px;
  font-size: 12px;
}

#webApp .draw-card.draw-page .draw-page__chat {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0 10px;
  padding: 8px 8px 6px;
  gap: 8px;
  overscroll-behavior: contain;
}

#webApp .draw-card.draw-page .draw-message__avatar,
#webApp .draw-card.draw-page .draw-message__system-avatar {
  width: 34px;
  height: 34px;
}

#webApp .draw-card.draw-page .draw-message__bubble {
  max-width: min(282px, calc(100vw - 118px));
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
}

#webApp .draw-card.draw-page .draw-page__tools {
  flex: 0 0 auto;
  padding: 6px 10px;
}

#webApp .draw-card.draw-page .draw-page__tools button {
  height: 34px;
  font-size: 13px;
}

#webApp .draw-card.draw-page .draw-page__composer {
  flex: 0 0 auto;
  grid-template-columns: 62px minmax(0, 1fr) 70px 38px;
  gap: 6px;
  padding: 0 10px 8px;
}

#webApp .draw-card.draw-page .draw-page__composer-label,
#webApp .draw-card.draw-page .draw-page__composer-input,
#webApp .draw-card.draw-page .draw-page__composer button {
  height: 40px;
  border-radius: 12px;
  font-size: 13px;
}

/* Quick bet should rise from the bottom like a mobile room sheet, never overflow. */
#webApp .wallet-modal-shell--quick-bet {
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

#webApp .wallet-modal-shell--quick-bet .wallet-modal-shell__backdrop {
  background: rgba(15, 23, 42, 0.46);
}

#webApp .wallet-modal-shell--quick-bet .wallet-modal-card--quick-bet {
  width: min(100vw, 430px);
  height: min(68dvh, 540px);
  min-height: 430px;
  max-height: calc(var(--web-visual-viewport-height, 100dvh) - 96px);
  margin: 0 auto;
  border-radius: 22px 22px 0 0;
  padding: 20px 14px 0;
  position: relative;
  transform-origin: bottom center;
  animation: quickBetSheetIn 0.2s ease-out both;
}

#webApp .wallet-modal-shell--quick-bet .wallet-modal-card--quick-bet::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 46px;
  height: 5px;
  border-radius: 999px;
  background: rgba(83, 100, 134, 0.28);
  transform: translateX(-50%);
}

#webApp .wallet-modal-shell--quick-bet .wallet-modal-card__top h3 {
  font-size: 20px;
  line-height: 1.1;
}

#webApp .wallet-modal-shell--quick-bet .wallet-modal-card__close {
  width: 34px;
  height: 34px;
  line-height: 1;
}

#webApp .wallet-modal-shell--quick-bet .quick-bet-tabs {
  gap: 7px;
  margin-top: 12px;
}

#webApp .wallet-modal-shell--quick-bet .wallet-modal-card--mark-six .quick-bet-tabs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#webApp .wallet-modal-shell--quick-bet .quick-bet-tabs__item {
  height: 34px;
  border-radius: 12px;
  font-size: 13px;
}

#webApp .wallet-modal-shell--quick-bet .quick-bet-grid {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  margin: 10px -2px 0;
  padding: 0 8px 10px 2px;
  gap: 7px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: auto;
  scrollbar-color: rgba(97, 115, 149, 0.7) rgba(234, 239, 248, 0.9);
}

#webApp .wallet-modal-shell--quick-bet .quick-bet-option {
  min-height: 48px;
  border-radius: 13px;
  padding: 6px 6px;
}

#webApp .wallet-modal-shell--quick-bet .quick-bet-option span {
  font-size: 15px;
}

#webApp .wallet-modal-shell--quick-bet .quick-bet-option small {
  font-size: 13px;
}

#webApp .wallet-modal-shell--quick-bet .quick-bet-grid::-webkit-scrollbar,
#webApp .wallet-modal-shell--quick-bet .wallet-modal-card__section::-webkit-scrollbar {
  width: 8px;
}

#webApp .wallet-modal-shell--quick-bet .quick-bet-grid::-webkit-scrollbar-track,
#webApp .wallet-modal-shell--quick-bet .wallet-modal-card__section::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(234, 239, 248, 0.9);
}

#webApp .wallet-modal-shell--quick-bet .quick-bet-grid::-webkit-scrollbar-thumb,
#webApp .wallet-modal-shell--quick-bet .wallet-modal-card__section::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(97, 115, 149, 0.7);
}

#webApp .wallet-modal-shell--quick-bet .quick-bet-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  gap: 7px;
  padding: 8px 14px calc(8px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -14px 28px rgba(255, 255, 255, 0.92);
}

#webApp .wallet-modal-shell--quick-bet .quick-bet-footer__summary {
  font-size: 14px;
}

#webApp .wallet-modal-shell--quick-bet .quick-bet-footer__ghost,
#webApp .wallet-modal-shell--quick-bet .quick-bet-footer__primary {
  height: 38px;
  border-radius: 13px;
  font-size: 14px;
}

#webApp .wallet-modal-shell--quick-bet .wallet-modal-card__section {
  margin-top: 10px;
  scrollbar-width: auto;
  scrollbar-color: rgba(97, 115, 149, 0.7) rgba(234, 239, 248, 0.9);
}

#webApp .wallet-modal-shell--quick-bet .quick-bet-selected-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
}

#webApp .wallet-modal-shell--quick-bet .quick-bet-selected-pill {
  display: inline-grid;
  place-items: center;
  min-height: 50px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(245, 158, 11, 0.26);
  background: linear-gradient(180deg, #fff9e8, #ffe8ad);
  color: #8a5600;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  box-shadow: inset 0 -1px 0 rgba(180, 83, 9, 0.12), 0 6px 16px rgba(245, 158, 11, 0.12);
}

#webApp .wallet-modal-shell--quick-bet .quick-bet-option {
  display: grid;
  place-items: center;
  text-align: center;
  line-height: 1.1;
}

#webApp .wallet-modal-shell--quick-bet .quick-bet-option span,
#webApp .wallet-modal-shell--quick-bet .quick-bet-option small {
  display: block;
  width: 100%;
  text-align: center;
}

#webApp .wallet-modal-shell--quick-bet .wallet-form__field > span {
  font-weight: 900;
  color: #25324d;
}

#webApp .wallet-modal-shell--quick-bet .quick-bet-amount-row input {
  height: 40px;
  border-radius: 13px;
  font-size: 15px;
  font-weight: 800;
  text-align: center;
}

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

@media (max-height: 680px) {
  #webApp .wallet-modal-shell--quick-bet .wallet-modal-card--quick-bet {
    height: min(72dvh, 470px);
    min-height: 390px;
    max-height: calc(var(--web-visual-viewport-height, 100dvh) - 76px);
  }

  #webApp .wallet-modal-shell--quick-bet .quick-bet-option {
    min-height: 44px;
  }
}

@media (max-width: 420px) {
  #webApp .draw-page__result-panel {
    grid-template-columns: 1fr;
  }

  #webApp .draw-page__result-row {
    justify-content: flex-start;
  }

  #webApp .draw-page .number-box {
    width: 34px;
    height: 42px;
  }

  #webApp .draw-page__composer {
    grid-template-columns: 58px minmax(0, 1fr) 66px 38px;
  }
}

/* Final mobile proportions for the Niuniu chat and quick-packet sheet. */

.red-envelope-page .red-envelope-account__balance span,
.red-envelope-page .red-envelope-account__balance strong {
  line-height: 1.2;
}

.red-envelope-page .red-envelope-chat-room .red-envelope-round__banker strong {
  max-width: 150px;
  font-size: 13px;
}

.red-envelope-page .red-envelope-chat-room .red-envelope-chat-packet__icon::before {
  height: 22px;
  margin-top: -34px;
}

.red-envelope-page .red-envelope-chat-room .red-envelope-chat-packet small {
  right: 12px;
  left: 36px;
  min-height: 25px;
  padding-top: 5px;
}

.red-envelope-quick-modal-shell {
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.red-envelope-page .red-envelope-create-modal--quick {
  width: 100%;
  max-width: 430px;
  max-height: none;
  padding: 20px 16px 14px;
  overflow: visible;
  border: 0;
  border-radius: 0;
}

.red-envelope-page .red-envelope-create-modal--quick > header {
  margin: 0 0 18px;
}

.red-envelope-page .red-envelope-create-modal--quick > header strong {
  font-size: 21px;
}

.red-envelope-page .red-envelope-create-modal--quick > label:first-of-type > span {
  font-size: 15px;
}

.red-envelope-page .red-envelope-create-modal--quick .red-envelope-money-input {
  min-height: 56px;
}

.red-envelope-page .red-envelope-create-modal--quick .red-envelope-money-input input {
  font-size: 17px;
}

.red-envelope-page .red-envelope-create-modal--quick .red-envelope-quick-label {
  margin: 14px 0 10px;
  font-size: 14px;
}

.red-envelope-page .red-envelope-create-modal--quick .red-envelope-stake-presets {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.red-envelope-page .red-envelope-create-modal--quick .red-envelope-stake-presets button {
  min-width: 0;
  min-height: 44px;
  padding: 0 2px;
  font-size: 12px;
}

.red-envelope-page .red-envelope-create-modal--quick .red-envelope-quick-hidden-detail {
  display: none;
}

.red-envelope-quick-submit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 10px;
  align-items: center;
  margin: 18px -16px -14px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid #e6eaf1;
}

.red-envelope-quick-submit-row p {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 3px 5px;
  margin: 0;
  color: #536682;
  font-size: 12px;
}

.red-envelope-quick-submit-row p b,
.red-envelope-quick-submit-row p strong {
  color: #f22636;
}

.red-envelope-quick-submit-row p small {
  flex-basis: 100%;
  color: #7c8798;
  font-size: 10px;
}

.red-envelope-page .red-envelope-create-modal--quick .red-envelope-quick-submit-row .red-envelope-submit {
  min-height: 48px;
  margin: 0;
  border-radius: 24px;
  font-size: 14px;
}

@media (max-width: 360px) {

  .red-envelope-page .red-envelope-chat-room .red-envelope-chat-packet {
    width: min(100%, 252px);
  }

  .red-envelope-page .red-envelope-create-modal--quick .red-envelope-stake-presets {
    gap: 4px;
  }

  .red-envelope-page .red-envelope-create-modal--quick .red-envelope-stake-presets button {
    font-size: 11px;
  }
}

/* Unified red-envelope records under My. */
.redpacket-record-page {
  gap: 12px;
}

.redpacket-record-summary {
  padding: 16px;
  color: #fff;
  background: #98192d;
  border-bottom: 3px solid #ddb848;
}

.redpacket-record-summary .detail-user-row__avatar {
  color: #7c2b16;
  background: #efcb65;
}

.redpacket-record-summary .detail-user-row__meta strong,
.redpacket-record-summary .detail-user-row__meta span {
  color: #fff;
}

.redpacket-record-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.22);
}

.redpacket-record-kpis article {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  background: rgba(82, 8, 24, 0.34);
}

.redpacket-record-kpis span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
}

.redpacket-record-kpis strong {
  overflow: hidden;
  color: #fff;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.redpacket-date-filter {
  display: grid;
  gap: 10px;
  margin: 0 12px;
  padding: 12px;
  border: 1px solid #e5ddd6;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 5px 14px rgba(47, 32, 35, 0.05);
}

.redpacket-date-filter__presets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.redpacket-date-filter__presets button {
  min-width: 0;
  min-height: 32px;
  padding: 0 4px;
  border: 1px solid #e4d9d1;
  border-radius: 5px;
  color: #74676a;
  background: #faf8f5;
  font-size: 11px;
  font-weight: 750;
}

.redpacket-date-filter__presets button.is-active {
  border-color: #a9162f;
  color: #fff;
  background: #a9162f;
}

.redpacket-date-filter__range {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) 54px;
  align-items: end;
  gap: 6px;
}

.redpacket-date-filter__range label {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.redpacket-date-filter__range label span,
.redpacket-date-filter > p {
  color: #8b7d7f;
  font-size: 9px;
}

.redpacket-date-filter__range input {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 6px;
  border: 1px solid #ded5ce;
  border-radius: 5px;
  color: #453639;
  background: #fff;
  font-size: 11px;
}

.redpacket-date-filter__range i {
  align-self: end;
  padding-bottom: 11px;
  color: #9a8c8e;
  font-size: 9px;
  font-style: normal;
}

.redpacket-date-filter__range > button {
  height: 36px;
  border: 0;
  border-radius: 5px;
  color: #fff;
  background: #98192d;
  font-size: 11px;
  font-weight: 800;
}

.redpacket-date-filter button:disabled {
  opacity: 0.58;
}

.redpacket-date-filter > p {
  margin: 0;
  text-align: center;
}

.redpacket-record-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0 12px;
  border-bottom: 1px solid #e7e1db;
  background: #fff;
}

.redpacket-record-tabs button {
  min-height: 46px;
  border: 0;
  border-bottom: 3px solid transparent;
  color: #74696b;
  background: transparent;
  font-size: 13px;
  font-weight: 750;
}

.redpacket-record-tabs button.is-active {
  border-bottom-color: #b01931;
  color: #8f1025;
}

.redpacket-game-records {
  display: grid;
  gap: 10px;
  padding: 0 12px 18px;
}

.redpacket-game-record {
  min-width: 0;
  padding: 13px;
  border: 1px solid #e7e0da;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(47, 32, 35, 0.07);
}

.redpacket-game-record > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.redpacket-game-record > header > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.redpacket-game-record > header strong {
  color: #352629;
  font-size: 14px;
}

.redpacket-game-record > header span,
.redpacket-game-record > header b {
  color: #8a7d7f;
  font-size: 10px;
}

.redpacket-game-record > header b {
  flex: 0 0 auto;
  font-size: 13px;
}

.redpacket-game-record__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.redpacket-game-record__meta span {
  padding: 4px 6px;
  border: 1px solid #ebe4de;
  border-radius: 4px;
  color: #75696b;
  background: #faf8f6;
  font-size: 9px;
}

.redpacket-game-participants {
  display: grid;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid #eee8e3;
}

.redpacket-game-participants > div {
  min-width: 0;
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid #ece6e0;
  border-radius: 6px;
  background: #faf9f7;
}

.redpacket-game-participants > div.is-me {
  border-color: rgba(176, 25, 48, 0.3);
  background: #fff3f4;
}

.redpacket-game-participants > div > b {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #6f2d14;
  background: #e9c55c;
  font-size: 10px;
}

.redpacket-game-participants p,
.redpacket-game-participants em {
  min-width: 0;
  display: grid;
  gap: 2px;
  margin: 0;
  font-style: normal;
}

.redpacket-game-participants p strong,
.redpacket-game-participants p span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.redpacket-game-participants p strong {
  color: #3a2b2e;
  font-size: 11px;
}

.redpacket-game-participants p span,
.redpacket-game-participants em small {
  color: #837678;
  font-size: 9px;
}

.redpacket-game-participants em {
  justify-items: end;
  font-size: 11px;
  font-weight: 800;
  text-align: right;
}

.redpacket-game-record__reason {
  margin: 8px 0 0;
  color: #85777a;
  font-size: 10px;
}

.redpacket-benefit-records {
  margin: 0 12px 18px;
}

@media (max-width: 380px) {
  .redpacket-date-filter__range {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }

  .redpacket-date-filter__range > button {
    grid-column: 1 / -1;
  }

  .redpacket-game-participants > div {
    grid-template-columns: 25px minmax(0, 1fr);
  }

  .redpacket-game-participants em {
    grid-column: 2;
    justify-items: start;
    text-align: left;
  }
}

/* Red-envelope NiuNiu: mobile room and matching homepage card. */

#webApp .home-v3__red-envelope-art {
  position: absolute;
  right: 12px;
  bottom: -8px;
  z-index: 3;
  width: 66px;
  height: 82px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(127, 6, 25, 0.36);
  border-radius: 8px 8px 4px 4px;
  color: #8b1325;
  background: linear-gradient(145deg, #ef4054 0%, #b40e2b 72%);
  box-shadow: 0 10px 18px rgba(129, 8, 29, 0.22);
  transform: rotate(7deg);
}

#webApp .home-v3__red-envelope-art i {
  position: absolute;
  inset: 0 0 auto;
  height: 29px;
  border-radius: 7px 7px 50% 50%;
  background: #ff6570;
}

#webApp .home-v3__red-envelope-art b {
  position: relative;
  z-index: 2;
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #7b3111;
  background: linear-gradient(145deg, #fff1a9, #e7b52d);
  font-family: Arial, sans-serif;
  font-size: 16px;
  line-height: 1;
}

.red-envelope-page {
  min-width: 320px;
  min-height: var(--web-visual-viewport-height, 100dvh);
  margin: 0;
  color: #251a1b;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

.red-envelope-page *,
.red-envelope-page *::before,
.red-envelope-page *::after {
  box-sizing: border-box;
  letter-spacing: 0;
}

.red-envelope-page button,
.red-envelope-page input {
  font: inherit;
}

.red-envelope-page button {
  -webkit-tap-highlight-color: transparent;
}

#redEnvelopeApp {
  min-height: var(--web-visual-viewport-height, 100dvh);
}

.red-envelope-shell {
  position: relative;
  width: min(100%, 520px);
  min-height: var(--web-visual-viewport-height, 100dvh);
  margin: 0 auto;
  padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  overflow-x: clip;
  background:
    linear-gradient(180deg, rgba(255, 250, 231, 0.98) 0, rgba(249, 246, 239, 0.98) 248px, #f3f4f6 100%);
  box-shadow: 0 0 36px rgba(35, 22, 24, 0.14);
}

.red-envelope-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 60px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 8px;
  padding: max(8px, env(safe-area-inset-top, 0px)) 12px 8px;
  border-bottom: 1px solid rgba(67, 26, 31, 0.1);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.red-envelope-icon-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #392629;
  background: #f4f1ed;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.red-envelope-icon-button:disabled {
  opacity: 0.45;
}

.red-envelope-topbar__title {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 2px;
}

.red-envelope-topbar__title strong {
  max-width: 100%;
  overflow: hidden;
  color: #251a1b;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.red-envelope-topbar__title span {
  color: #897b7c;
  font-size: 11px;
  line-height: 1.2;
}

.red-envelope-account {
  position: relative;
  min-height: 104px;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  margin: 0;
  padding: 17px 18px 19px;
  overflow: hidden;
  color: #ffffff;
  background:
    linear-gradient(110deg, transparent 0 54%, rgba(255, 225, 151, 0.13) 54% 66%, transparent 66%),
    linear-gradient(135deg, #76101f 0%, #ac172d 56%, #6e0c1e 100%);
}

.red-envelope-account::after {
  content: "NIUNIU";
  position: absolute;
  right: 12px;
  bottom: -9px;
  color: rgba(255, 238, 185, 0.1);
  font-family: Georgia, serif;
  font-size: 42px;
  line-height: 1;
  font-weight: 700;
  pointer-events: none;
}

.red-envelope-account__avatar {
  position: relative;
  z-index: 1;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid rgba(255, 229, 166, 0.84);
  border-radius: 50%;
  color: #73101f;
  background: #fff2c7;
  font-size: 20px;
  font-weight: 800;
}

.red-envelope-account__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.red-envelope-account__identity,
.red-envelope-account__balance {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: grid;
  gap: 5px;
}

.red-envelope-account__identity span,
.red-envelope-account__balance span {
  color: rgba(255, 244, 214, 0.76);
  font-size: 11px;
  line-height: 1;
}

.red-envelope-account__identity strong {
  overflow: hidden;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.red-envelope-account__balance {
  justify-items: end;
  text-align: right;
}

.red-envelope-account__balance strong {
  color: #ffeaa7;
  font-family: Bahnschrift, "Arial Narrow", Arial, sans-serif;
  font-size: 21px;
  line-height: 1.1;
  font-weight: 800;
}

.red-envelope-tabs {
  position: sticky;
  top: 60px;
  z-index: 25;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  padding: 8px 12px;
  border-bottom: 1px solid #ebe3da;
  background: rgba(255, 252, 244, 0.95);
  backdrop-filter: blur(12px);
}

.red-envelope-tabs button {
  min-width: 0;
  min-height: 43px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #77696b;
  background: transparent;
  cursor: pointer;
}

.red-envelope-tabs button span {
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
}

.red-envelope-tabs button strong {
  font-size: 14px;
  font-weight: 750;
}

.red-envelope-tabs button.is-active {
  border-color: rgba(168, 19, 43, 0.16);
  color: #a8132b;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(82, 34, 39, 0.08);
}

.red-envelope-content {
  width: 100%;
  padding: 16px 12px 28px;
}

.red-envelope-section-head {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.red-envelope-section-head > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.red-envelope-section-head span {
  color: #8a7b7d;
  font-size: 11px;
}

.red-envelope-section-head strong {
  color: #2e2022;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 800;
}

.red-envelope-create-button {
  flex: 0 0 auto;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 14px;
  border: 1px solid #991429;
  border-radius: 7px;
  color: #ffffff;
  background: linear-gradient(135deg, #c9253e, #8e1025);
  box-shadow: 0 7px 15px rgba(143, 16, 37, 0.2);
  font-size: 13px;
  font-weight: 750;
}

.red-envelope-create-button:disabled {
  border-color: #c8bdbd;
  color: #847879;
  background: #ded7d5;
  box-shadow: none;
}

.red-envelope-round-list,
.red-envelope-history-list {
  display: grid;
  gap: 12px;
}

.red-envelope-round {
  position: relative;
  padding: 14px;
  overflow: hidden;
  border: 1px solid rgba(93, 53, 57, 0.12);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(65, 41, 43, 0.08);
}

.red-envelope-round::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #c89c39;
}

.red-envelope-round--grabbing::before {
  background: #b21631;
}

.red-envelope-round__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-left: 3px;
}

.red-envelope-round__banker {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.red-envelope-round__avatar {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #6b2512;
  background: linear-gradient(145deg, #fff0aa, #dca735);
  font-size: 14px;
  font-weight: 850;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.58);
}

.red-envelope-round__banker > div,
.red-envelope-round__status {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.red-envelope-round__banker strong {
  max-width: 150px;
  overflow: hidden;
  color: #302123;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.red-envelope-round__banker span,
.red-envelope-round__status span {
  color: #9a8d8e;
  font-size: 10px;
  font-style: normal;
}

.red-envelope-round__status {
  flex: 0 0 auto;
  justify-items: end;
  text-align: right;
}

.red-envelope-round__status strong {
  color: #a8132b;
  font-size: 12px;
}

.red-envelope-round__status span {
  color: #59484a;
  font-family: Bahnschrift, monospace;
  font-size: 16px;
  font-weight: 750;
}

.red-envelope-round__money {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 13px 0 12px;
  padding: 11px 0;
  border-top: 1px solid #eee8e2;
  border-bottom: 1px solid #eee8e2;
}

.red-envelope-round__money > div {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 0 6px;
  border-right: 1px solid #eee8e2;
  text-align: center;
}

.red-envelope-round__money > div:last-child {
  border-right: 0;
}

.red-envelope-round__money span {
  color: #8f8182;
  font-size: 10px;
}

.red-envelope-round__money strong {
  max-width: 100%;
  overflow: hidden;
  color: #332426;
  font-family: Bahnschrift, "Arial Narrow", Arial, sans-serif;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.red-envelope-seat-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.red-envelope-seat {
  min-width: 0;
  min-height: 70px;
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 3px 6px;
  padding: 8px 7px;
  border: 1px solid #eadfd6;
  border-radius: 6px;
  background: #fffaf2;
}

.red-envelope-seat > span {
  grid-row: 1 / 3;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #7b321c;
  background: #f0c862;
  font-size: 10px;
  font-weight: 800;
}

.red-envelope-seat strong,
.red-envelope-seat em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.red-envelope-seat strong {
  color: #483638;
  font-size: 10px;
}

.red-envelope-seat em {
  color: #a09394;
  font-size: 9px;
  font-style: normal;
}

.red-envelope-seat.is-me {
  border-color: rgba(169, 20, 43, 0.36);
  background: #fff4f4;
}

.red-envelope-seat.is-empty {
  border-style: dashed;
  background: #faf9f7;
}

.red-envelope-seat.is-empty > span {
  color: #998d8e;
  background: #e8e3df;
}

.red-envelope-my-packet {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  margin-top: 11px;
  padding: 10px 11px;
  border: 1px solid #ebd49c;
  border-radius: 6px;
  background: linear-gradient(90deg, #fff9e7, #fff3cd);
}

.red-envelope-my-packet span {
  color: #7b6a51;
  font-size: 11px;
}

.red-envelope-my-packet strong {
  color: #8f1025;
  font-size: 16px;
  font-weight: 850;
}

.red-envelope-my-packet b {
  color: #7d300f;
  font-size: 13px;
}

.red-envelope-round__actions {
  margin-top: 12px;
}

.red-envelope-primary-action,
.red-envelope-secondary-action,
.red-envelope-submit {
  width: 100%;
  min-height: 46px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 800;
}

.red-envelope-primary-action,
.red-envelope-submit {
  border: 1px solid #981329;
  color: #ffffff;
  background: linear-gradient(135deg, #d12a42, #941126);
  box-shadow: 0 7px 15px rgba(151, 17, 39, 0.18);
}

.red-envelope-secondary-action {
  border: 1px solid #d7c8bd;
  color: #604f50;
  background: #fffaf4;
}

.red-envelope-primary-action:disabled,
.red-envelope-secondary-action:disabled,
.red-envelope-submit:disabled {
  opacity: 0.56;
}

.red-envelope-waiting-note {
  min-height: 43px;
  display: grid;
  place-items: center;
  border: 1px solid #e7ddd5;
  border-radius: 7px;
  color: #7e7071;
  background: #faf8f5;
  font-size: 12px;
}

.red-envelope-grab-action {
  width: 100%;
  min-height: 74px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  padding: 9px 14px;
  border: 1px solid #861124;
  border-radius: 8px;
  color: #ffffff;
  background:
    linear-gradient(112deg, rgba(255, 228, 147, 0.14) 0 30%, transparent 30% 70%, rgba(255, 228, 147, 0.1) 70%),
    linear-gradient(135deg, #dc3048, #941126);
  box-shadow: 0 9px 18px rgba(133, 13, 34, 0.22);
}

.red-envelope-grab-action > span {
  grid-row: 1 / 3;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #792d0c;
  background: linear-gradient(145deg, #fff0aa, #dda72e);
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 800;
}

.red-envelope-grab-action strong {
  align-self: end;
  text-align: left;
  font-size: 17px;
}

.red-envelope-grab-action em {
  align-self: start;
  color: rgba(255, 244, 218, 0.78);
  text-align: left;
  font-size: 10px;
  font-style: normal;
}

.red-envelope-empty {
  min-height: 260px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  padding: 30px 18px;
  border: 1px dashed #d8cbc2;
  border-radius: 8px;
  color: #78696a;
  background: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.red-envelope-empty__icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #772b11;
  background: linear-gradient(145deg, #ffed9e, #dba530);
  font-family: Georgia, serif;
  font-size: 25px;
  font-weight: 800;
}

.red-envelope-empty strong {
  color: #3c2d2f;
  font-size: 14px;
}

.red-envelope-empty button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid #a7162e;
  border-radius: 7px;
  color: #a7162e;
  background: #ffffff;
  font-size: 12px;
  font-weight: 750;
}

.red-envelope-empty--compact {
  min-height: 180px;
}

.red-envelope-history-item {
  padding: 14px;
  border: 1px solid #e3dcd7;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 7px 18px rgba(65, 41, 43, 0.06);
}

.red-envelope-history-item__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.red-envelope-history-item__top > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.red-envelope-history-item__top strong {
  color: #332527;
  font-size: 14px;
}

.red-envelope-history-item__top span {
  color: #9a8d8e;
  font-size: 10px;
}

.red-envelope-history-item__top b {
  flex: 0 0 auto;
  font-size: 15px;
}

.red-envelope-history-item__top .is-win {
  color: #b0142d;
}

.red-envelope-history-item__top .is-loss {
  color: #147552;
}

.red-envelope-history-item__top .is-cancelled {
  color: #8c7d7e;
  font-size: 12px;
}

.red-envelope-history-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 11px;
}

.red-envelope-history-item__meta span {
  padding: 5px 8px;
  border-radius: 4px;
  color: #69595b;
  background: #f5f2ef;
  font-size: 10px;
}

.red-envelope-history-item__reason {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid #eee8e3;
  color: #8c7d7e;
  font-size: 10px;
  line-height: 1.6;
}

.red-envelope-rules {
  display: grid;
  gap: 10px;
}

.red-envelope-rule-hero {
  min-height: 108px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 18px;
  border-radius: 8px;
  color: #ffffff;
  background:
    linear-gradient(115deg, transparent 0 58%, rgba(255, 224, 141, 0.14) 58% 70%, transparent 70%),
    linear-gradient(135deg, #79101f, #b51c34);
}

.red-envelope-rule-hero span {
  color: #f0ca6b;
  font-size: 10px;
  font-weight: 750;
}

.red-envelope-rule-hero strong {
  font-size: 22px;
  font-weight: 850;
}

.red-envelope-rules article {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  padding: 14px;
  border: 1px solid #e5ddd6;
  border-radius: 8px;
  background: #ffffff;
}

.red-envelope-rules article > b {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #742b11;
  background: #ecc75c;
  font-size: 12px;
}

.red-envelope-rules article > div {
  min-width: 0;
}

.red-envelope-rules article strong {
  color: #37282a;
  font-size: 13px;
}

.red-envelope-rules article p {
  margin: 6px 0 0;
  color: #716365;
  font-size: 12px;
  line-height: 1.7;
}

.red-envelope-loading {
  min-height: calc(var(--web-visual-viewport-height, 100dvh) - 60px);
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 13px;
  color: #5f5052;
}

.red-envelope-loading span {
  width: 34px;
  height: 34px;
  border: 3px solid #e2d7d0;
  border-top-color: #a7162e;
  border-radius: 50%;
  animation: red-envelope-spin 0.8s linear infinite;
}

.red-envelope-loading strong {
  font-size: 13px;
}

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

.red-envelope-bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 35;
  width: min(100%, 520px);
  min-height: 68px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #dfd8d2;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 -8px 24px rgba(49, 31, 33, 0.08);
  transform: translateX(-50%);
}

.red-envelope-bottom-nav button {
  min-width: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 3px;
  padding: 3px;
  border: 0;
  color: #716365;
  background: transparent;
}

.red-envelope-bottom-nav button span {
  font-size: 21px;
  line-height: 1;
}

.red-envelope-bottom-nav button strong {
  font-size: 10px;
  font-weight: 700;
}

.red-envelope-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  align-items: end;
  justify-items: center;
  padding: 18px 12px max(18px, env(safe-area-inset-bottom, 0px));
  background: rgba(28, 17, 19, 0.58);
  backdrop-filter: blur(5px);
}

.red-envelope-create-modal {
  width: min(100%, 496px);
  max-height: calc(var(--web-visual-viewport-height, 100dvh) - 36px);
  padding: 18px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: 0 22px 60px rgba(36, 17, 21, 0.3);
}

.red-envelope-create-modal > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.red-envelope-create-modal > header > div {
  display: grid;
  gap: 3px;
}

.red-envelope-create-modal > header span {
  color: #ad7d21;
  font-size: 9px;
  font-weight: 800;
}

.red-envelope-create-modal > header strong {
  color: #2f2022;
  font-size: 19px;
  font-weight: 850;
}

.red-envelope-create-modal > header button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #665759;
  background: #eee9e4;
  font-size: 23px;
  line-height: 1;
}

.red-envelope-create-modal > label,
.red-envelope-seat-picker {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.red-envelope-create-modal > label > span,
.red-envelope-seat-picker > span {
  color: #665759;
  font-size: 12px;
  font-weight: 750;
}

.red-envelope-money-input {
  min-height: 48px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  border: 1px solid #d9cdc5;
  border-radius: 7px;
  background: #ffffff;
}

.red-envelope-money-input:focus-within {
  border-color: #b31b33;
  box-shadow: 0 0 0 3px rgba(179, 27, 51, 0.09);
}

.red-envelope-money-input b {
  color: #aa7a22;
  text-align: center;
  font-family: Georgia, serif;
  font-size: 17px;
}

.red-envelope-money-input input {
  min-width: 0;
  width: 100%;
  height: 46px;
  padding: 0 12px 0 0;
  border: 0;
  outline: 0;
  color: #342527;
  background: transparent;
  font-family: Bahnschrift, Arial, sans-serif;
  font-size: 17px;
  font-weight: 750;
}

.red-envelope-seat-picker > div {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.red-envelope-seat-picker button {
  min-width: 0;
  min-height: 40px;
  padding: 0 4px;
  border: 1px solid #ddd2ca;
  border-radius: 6px;
  color: #6b5c5e;
  background: #ffffff;
  font-size: 11px;
  font-weight: 700;
}

.red-envelope-seat-picker button.is-active {
  border-color: #a7162e;
  color: #a7162e;
  background: #fff0f1;
}

.red-envelope-deposit-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid #ead7a6;
  border-radius: 7px;
  background: #fff7dd;
}

.red-envelope-deposit-preview span {
  color: #756242;
  font-size: 11px;
}

.red-envelope-deposit-preview strong {
  grid-row: 1 / 3;
  grid-column: 2;
  align-self: center;
  color: #8e1025;
  font-family: Bahnschrift, Arial, sans-serif;
  font-size: 18px;
}

.red-envelope-deposit-preview em {
  color: #a18c62;
  font-size: 9px;
  font-style: normal;
}

.red-envelope-toast {
  position: fixed;
  left: 50%;
  bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  z-index: 100;
  max-width: min(calc(100% - 32px), 460px);
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  color: #ffffff;
  background: rgba(45, 35, 36, 0.94);
  box-shadow: 0 10px 24px rgba(28, 17, 19, 0.22);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  transform: translateX(-50%);
}

.red-envelope-toast.is-error {
  background: rgba(151, 17, 39, 0.96);
}

@media (max-width: 380px) {
  #webApp .home-v3__game-tab {
    gap: 3px !important;
    padding: 0 4px !important;
  }

  #webApp .home-v3__game-tab strong {
    font-size: 13px !important;
  }

  .red-envelope-account {
    grid-template-columns: 46px minmax(0, 1fr) auto;
    gap: 8px;
    padding-right: 13px;
    padding-left: 13px;
  }

  .red-envelope-account__avatar {
    width: 46px;
    height: 46px;
  }

  .red-envelope-account__balance strong {
    font-size: 17px;
  }

  .red-envelope-seat-list {
    gap: 5px;
  }

  .red-envelope-seat {
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 2px 4px;
    padding: 7px 5px;
  }

  .red-envelope-seat > span {
    width: 22px;
    height: 22px;
  }
}

@media (min-width: 700px) {
  .red-envelope-modal {
    align-items: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .red-envelope-loading span {
    animation-duration: 1.6s;
  }
}

/* Mark Six mobile page */
#webApp .mark-six-page {
  height: 100%;
  max-height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  background: #eef3ff;
  color: #1f2a44;
  overflow: hidden;
}

#webApp .mark-six-page__header {
  height: 48px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 52px;
  align-items: center;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

#webApp .mark-six-page__header strong {
  text-align: center;
  font-size: 16px;
  font-weight: 950;
}

#webApp .mark-six-page__back,
#webApp .mark-six-page__refresh {
  border: 0;
  background: transparent;
  color: #1f2a44;
  font-weight: 900;
}

#webApp .mark-six-page__back {
  font-size: 30px;
  line-height: 1;
}

#webApp .mark-six-page__refresh {
  font-size: 13px;
}

#webApp .mark-six-page__board {
  display: grid;
  gap: 6px;
  padding: 8px 10px;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.26), transparent 22%),
    linear-gradient(135deg, #8097ff 0%, #4567d8 100%);
  color: #fff;
  min-height: 0;
}

#webApp .mark-six-page__board-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#webApp .mark-six-page__board-top div:first-child {
  display: grid;
  gap: 2px;
}

#webApp .mark-six-page__board-top span {
  font-size: 17px;
  font-weight: 900;
}

#webApp .mark-six-page__board-top em {
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  opacity: 0.86;
}

#webApp .mark-six-page__timer {
  display: flex;
  gap: 5px;
}

#webApp .mark-six-page__timer b {
  min-width: 34px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: #1e293b;
  font-size: 17px;
}

#webApp .mark-six-page__latest {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-height: 56px;
  padding: 6px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
}

#webApp .mark-six-page__latest > span {
  font-size: 14px;
  font-weight: 900;
}

#webApp .mark-six-balls {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 3px;
  overflow-x: auto;
  padding-bottom: 1px;
}

#webApp .mark-six-ball {
  width: 30px;
  min-width: 30px;
  height: 38px;
  display: grid;
  place-items: center;
  gap: 0;
  border-radius: 999px 999px 12px 12px;
  background: #ef4444;
  color: #fff;
  font-style: normal;
  box-shadow: 0 5px 12px rgba(15, 23, 42, 0.22);
}

#webApp .mark-six-ball strong {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  color: #111827;
  font-size: 13px;
  font-weight: 950;
}

#webApp .mark-six-ball em {
  color: #fff;
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

#webApp .mark-six-ball--blue {
  background: #3b82f6;
}

#webApp .mark-six-ball--green {
  background: #22c55e;
}

#webApp .mark-six-ball--red {
  background: #ef4444;
}

#webApp .mark-six-balls__plus {
  color: #fff;
  font-size: 16px;
}

#webApp .mark-six-balls__empty {
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 800;
}

#webApp .mark-six-page__user {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 48px 48px;
  align-items: center;
  gap: 7px;
}

#webApp .mark-six-page__avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

#webApp .mark-six-page__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#webApp .mark-six-page__user div:nth-child(2) {
  display: grid;
  gap: 2px;
}

#webApp .mark-six-page__user strong,
#webApp .mark-six-page__user span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#webApp .mark-six-page__user span {
  font-size: 11px;
  font-weight: 800;
}

#webApp .mark-six-page__user button,
#webApp .mark-six-page__tools button {
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
  color: #243b75;
  font-weight: 900;
}

#webApp .mark-six-page__history {
  min-height: 0;
  overflow-y: auto;
  padding: 12px 14px;
  display: grid;
  align-content: start;
  gap: 8px;
}

#webApp .mark-six-history-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 5px 10px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

#webApp .mark-six-history-row strong {
  font-size: 13px;
  color: #243b75;
}

#webApp .mark-six-history-row span {
  min-width: 0;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#webApp .mark-six-history-row em {
  grid-column: 2;
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#webApp .mark-six-history-row--empty {
  display: block;
  color: #64748b;
  text-align: center;
}

#webApp .mark-six-page__chat {
  min-height: 0;
  overflow-y: auto;
  margin: 8px 10px 0;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 24px rgba(31, 42, 68, 0.08);
}

#webApp .mark-six-page__tools {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  padding: 6px 10px 4px;
  background: transparent;
  border-top: 0;
}

#webApp .mark-six-page__tools button {
  height: 30px;
  border-color: rgba(148, 163, 184, 0.24);
  background: #fff;
  font-size: 11px;
}

#webApp .mark-six-page__composer {
  grid-template-columns: 58px minmax(0, 1fr) 64px 38px;
  gap: 6px;
  padding: 0 10px calc(8px + env(safe-area-inset-bottom, 0px));
}

#webApp .mark-six-page__composer .draw-page__composer-label,
#webApp .mark-six-page__composer .draw-page__composer-input,
#webApp .mark-six-page__composer button {
  height: 38px;
  border-radius: 10px;
  font-size: 12px;
}

#webApp .mark-six-page__composer .draw-page__composer-label {
  background: rgba(69, 103, 216, 0.1);
  color: #243b75;
}

#webApp .mark-six-page__composer button:not(.draw-page__composer-more):not(.draw-page__composer-input) {
  border-color: rgba(69, 103, 216, 0.18);
  background: linear-gradient(180deg, #9db0ff, #4567d8);
  color: #fff;
}

#webApp .mark-six-page__composer .draw-page__composer-more {
  background: #ef4444;
}

#webApp .quick-bet-grid--mark-six {
  max-height: min(52dvh, 460px);
  overflow-y: auto;
}

#webApp .wallet-modal-card--mark-six .quick-bet-footer__summary {
  color: #64748b;
  font-size: 12px;
}

#webApp .mark-six-trend-panel {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  background: #f4f6fb;
}

#webApp .mark-six-trend-panel__top {
  border-bottom-color: #edf1f7;
}

#webApp .mark-six-trend-panel__top strong {
  color: #1f2937;
  font-size: 20px;
  font-weight: 700;
}

#webApp .mark-six-trend-toolbar {
  flex: 0 0 auto;
  height: 44px;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 74px;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: #f4f6fb;
  border-bottom: 1px solid #e8edf6;
}

#webApp .mark-six-trend-toolbar span {
  min-width: 0;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#webApp .mark-six-trend-toolbar button {
  height: 28px;
  border: 1px solid #dbe4f0;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

#webApp .mark-six-trend-state {
  flex: 1 1 auto;
  display: grid;
  place-items: center;
  padding: 28px 16px;
  color: #64748b;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

#webApp .mark-six-trend-state--error {
  color: #dc2626;
}

#webApp .mark-six-trend-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: #fff;
}

#webApp .mark-six-trend-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  background: #fff;
  color: #1f2a44;
}

#webApp .mark-six-trend-table th,
#webApp .mark-six-trend-table td {
  border: 1px solid #edf0f5;
  text-align: center;
}

#webApp .mark-six-trend-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 52px;
  background: #fff;
  color: #2f3d5c;
  font-size: 16px;
  font-weight: 800;
}

#webApp .mark-six-trend-table th:first-child,
#webApp .mark-six-trend-table td:first-child {
  width: 104px;
}

#webApp .mark-six-trend-table td {
  height: 52px;
  padding: 6px 5px;
}

#webApp .mark-six-trend-issue {
  color: #34456c;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

#webApp .mark-six-trend-numbers {
  min-width: 0;
}

#webApp .mark-six-trend-balls {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

#webApp .mark-six-trend-ball {
  width: 30px;
  min-width: 30px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px 999px 11px 11px;
  color: #fff;
  font-style: normal;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.18);
}

#webApp .mark-six-trend-ball strong {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  color: #111827;
  font-size: 13px;
  font-weight: 950;
  line-height: 1;
}

#webApp .mark-six-trend-ball em {
  color: #ffe600;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.22);
}

@media (max-width: 380px) {
  #webApp .mark-six-page__timer b {
    min-width: 33px;
    height: 31px;
    font-size: 16px;
  }

  #webApp .mark-six-page__latest {
    grid-template-columns: 70px minmax(0, 1fr);
  }

  #webApp .mark-six-ball {
    width: 31px;
    min-width: 31px;
  }

  #webApp .mark-six-trend-table th:first-child,
  #webApp .mark-six-trend-table td:first-child {
    width: 88px;
  }

  #webApp .mark-six-trend-balls {
    gap: 3px;
  }

  #webApp .mark-six-trend-ball {
    width: 27px;
    min-width: 27px;
    height: 35px;
  }

  #webApp .mark-six-trend-ball strong {
    width: 23px;
    height: 23px;
    font-size: 12px;
  }

  #webApp .mark-six-trend-ball em {
    font-size: 9px;
  }
}

/* Mark Six account strip structure. */
#webApp .mark-six-page__timer b {
  color: #f4d887 !important;
  background: #151923 !important;
  box-shadow: none;
}

#webApp .mark-six-page__composer .draw-page__composer-label {
  color: #f4d887 !important;
}

#webApp .mark-six-page__avatar {
  width: 48px !important;
  height: 48px !important;
  border: 1px solid rgba(244, 216, 135, 0.74) !important;
  color: #15110a !important;
  background: radial-gradient(circle at 35% 25%, #fff7e5 0%, #d6a53b 42%, #6f4708 100%) !important;
  font-size: 25px !important;
  box-shadow: 0 10px 24px rgba(214, 165, 59, 0.22) !important;
}

#webApp .mark-six-page__user-meta {
  min-width: 0 !important;
  display: grid !important;
  gap: 3px !important;
}

#webApp .mark-six-page__user-meta strong {
  font-size: 18px !important;
  font-weight: 1000 !important;
  line-height: 1.15 !important;
  letter-spacing: 0 !important;
}

#webApp .mark-six-page__user-balance {
  display: flex !important;
  align-items: baseline !important;
  gap: 6px !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  line-height: 1.2 !important;
}

#webApp .mark-six-page__user-balance b {
  font-size: 16px !important;
  font-weight: 1000 !important;
}

#webApp .mark-six-page__user {
  grid-template-columns: 48px minmax(0, 1fr) auto auto !important;
  gap: 10px !important;
  padding: 12px 14px !important;
  border: 1px solid rgba(244, 216, 135, 0.42) !important;
  border-radius: 20px !important;
  color: #fffaf0 !important;
  background:
    linear-gradient(135deg, rgba(255, 247, 229, 0.08), rgba(214, 165, 59, 0.08)),
    #101623 !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3) !important;
}

#webApp .mark-six-page__user button {
  min-width: 50px !important;
  height: 38px !important;
  padding: 0 12px !important;
  border: 1px solid rgba(244, 216, 135, 0.54) !important;
  border-radius: 14px !important;
  color: #17120a !important;
  background: #d6a53b !important;
  font-size: 14px !important;
  font-weight: 950 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 16px rgba(0, 0, 0, 0.22) !important;
}

@media (max-width: 420px) {
  #webApp .mark-six-page__user {
    gap: 9px !important;
    padding: 10px !important;
  }

  #webApp .mark-six-page__user button {
    min-width: 44px !important;
    padding: 0 8px !important;
    font-size: 13px !important;
  }
}

/* Theme picker: Nuxt UI inspired tokens with compact mobile-safe controls. */
#webApp.theme-rose-gold {
  --ui-primary: #f7b58f;
  --ui-primary-600: #b45309;
  --ui-primary-soft: rgba(247, 181, 143, 0.22);
  --ui-bg: #fff7ed;
  --ui-bg-muted: #ffedd5;
  --ui-bg-elevated: rgba(255, 255, 255, 0.92);
  --ui-text: #28120a;
  --ui-text-muted: #8a5a37;
  --ui-text-toned: #5f351c;
  --ui-border: rgba(180, 83, 9, 0.16);
  --ui-border-strong: rgba(180, 83, 9, 0.28);
  --ui-ring: rgba(247, 181, 143, 0.36);
  --theme-deep: #7c2d12;
  --theme-glow: rgba(247, 181, 143, 0.34);
  --theme-gradient: linear-gradient(135deg, #fff7ed 0%, #fed7aa 48%, #fb923c 100%);
  --theme-button-text: #2b1207;
}

#webApp.theme-sky-blue {
  --ui-primary: #7dd3fc;
  --ui-primary-600: #0284c7;
  --ui-primary-soft: rgba(125, 211, 252, 0.22);
  --ui-bg: #eff6ff;
  --ui-bg-muted: #dbeafe;
  --ui-bg-elevated: rgba(255, 255, 255, 0.92);
  --ui-text: #082f49;
  --ui-text-muted: #42708f;
  --ui-text-toned: #164e63;
  --ui-border: rgba(2, 132, 199, 0.16);
  --ui-border-strong: rgba(2, 132, 199, 0.3);
  --ui-ring: rgba(56, 189, 248, 0.34);
  --theme-deep: #075985;
  --theme-glow: rgba(125, 211, 252, 0.32);
  --theme-gradient: linear-gradient(135deg, #eff6ff 0%, #bae6fd 50%, #38bdf8 100%);
  --theme-button-text: #062235;
}

#webApp.theme-frosted-gray {
  --ui-primary: #94a3b8;
  --ui-primary-600: #334155;
  --ui-primary-soft: rgba(148, 163, 184, 0.2);
  --ui-bg: #f8fafc;
  --ui-bg-muted: #e2e8f0;
  --ui-bg-elevated: rgba(255, 255, 255, 0.86);
  --ui-text: #0f172a;
  --ui-text-muted: #64748b;
  --ui-text-toned: #334155;
  --ui-border: rgba(100, 116, 139, 0.18);
  --ui-border-strong: rgba(51, 65, 85, 0.28);
  --ui-ring: rgba(148, 163, 184, 0.36);
  --theme-deep: #111827;
  --theme-glow: rgba(148, 163, 184, 0.24);
  --theme-gradient: linear-gradient(135deg, #ffffff 0%, #e2e8f0 50%, #94a3b8 100%);
  --theme-button-text: #0f172a;
}

#webApp.theme-rose-red {
  --ui-primary: #fb7185;
  --ui-primary-600: #be123c;
  --ui-primary-soft: rgba(251, 113, 133, 0.2);
  --ui-bg: #fff1f2;
  --ui-bg-muted: #ffe4e6;
  --ui-bg-elevated: rgba(255, 255, 255, 0.92);
  --ui-text: #3f0715;
  --ui-text-muted: #9f5061;
  --ui-text-toned: #881337;
  --ui-border: rgba(190, 18, 60, 0.16);
  --ui-border-strong: rgba(190, 18, 60, 0.28);
  --ui-ring: rgba(251, 113, 133, 0.36);
  --theme-deep: #881337;
  --theme-glow: rgba(251, 113, 133, 0.32);
  --theme-gradient: linear-gradient(135deg, #fff1f2 0%, #fecdd3 50%, #fb7185 100%);
  --theme-button-text: #3f0715;
}

body:has(#webApp.theme-rose-gold) {
  --ui-bg: #fff7ed;
  --ui-bg-muted: #ffedd5;
  --theme-glow: rgba(247, 181, 143, 0.34);
}

body:has(#webApp.theme-sky-blue) {
  --ui-bg: #eff6ff;
  --ui-bg-muted: #dbeafe;
  --theme-glow: rgba(125, 211, 252, 0.32);
}

body:has(#webApp.theme-frosted-gray) {
  --ui-bg: #f8fafc;
  --ui-bg-muted: #e2e8f0;
  --theme-glow: rgba(148, 163, 184, 0.24);
}

body:has(#webApp.theme-rose-red) {
  --ui-bg: #fff1f2;
  --ui-bg-muted: #ffe4e6;
  --theme-glow: rgba(251, 113, 133, 0.32);
}

#webApp.theme-rose-gold .home-v3,
#webApp.theme-sky-blue .home-v3,
#webApp.theme-frosted-gray .home-v3,
#webApp.theme-rose-red .home-v3 {
  background:
    radial-gradient(circle at 82% 2%, var(--theme-glow), transparent 28%),
    radial-gradient(circle at 10% 16%, var(--ui-primary-soft), transparent 30%),
    var(--ui-bg);
}

#webApp.theme-rose-gold .home-v3__brand,
#webApp.theme-sky-blue .home-v3__brand,
#webApp.theme-frosted-gray .home-v3__brand,
#webApp.theme-rose-red .home-v3__brand,
#webApp.theme-rose-gold .home-v3__enter,
#webApp.theme-sky-blue .home-v3__enter,
#webApp.theme-frosted-gray .home-v3__enter,
#webApp.theme-rose-red .home-v3__enter {
  background: linear-gradient(135deg, var(--theme-deep), var(--ui-primary-600));
  color: #fff;
}

#webApp.theme-rose-gold .home-v3__link,
#webApp.theme-sky-blue .home-v3__link,
#webApp.theme-frosted-gray .home-v3__link,
#webApp.theme-rose-red .home-v3__link {
  border-color: var(--ui-border-strong);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ui-primary-600);
  font-weight: 900;
}

#webApp.theme-rose-gold .home-v3__game-card,
#webApp.theme-sky-blue .home-v3__game-card,
#webApp.theme-frosted-gray .home-v3__game-card,
#webApp.theme-rose-red .home-v3__game-card {
  background:
    radial-gradient(circle at 92% 78%, var(--ui-primary-soft), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), var(--ui-bg-muted));
}

#webApp.theme-rose-gold .bottom-nav,
#webApp.theme-sky-blue .bottom-nav,
#webApp.theme-frosted-gray .bottom-nav,
#webApp.theme-rose-red .bottom-nav {
  border-top: 1px solid var(--ui-border);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
}

#webApp.theme-rose-gold .bottom-nav__item--light.bottom-nav__item--active,
#webApp.theme-sky-blue .bottom-nav__item--light.bottom-nav__item--active,
#webApp.theme-frosted-gray .bottom-nav__item--light.bottom-nav__item--active,
#webApp.theme-rose-red .bottom-nav__item--light.bottom-nav__item--active {
  background: linear-gradient(135deg, var(--theme-deep), var(--ui-primary-600));
  color: #fff;
}

#webApp.theme-rose-gold .wallet-request-submit,
#webApp.theme-sky-blue .wallet-request-submit,
#webApp.theme-frosted-gray .wallet-request-submit,
#webApp.theme-rose-red .wallet-request-submit,
#webApp.theme-rose-gold .quick-bet-footer__primary,
#webApp.theme-sky-blue .quick-bet-footer__primary,
#webApp.theme-frosted-gray .quick-bet-footer__primary,
#webApp.theme-rose-red .quick-bet-footer__primary,
#webApp.theme-rose-gold .draw-page__composer button:not(.draw-page__composer-more):not(.draw-page__composer-input),
#webApp.theme-sky-blue .draw-page__composer button:not(.draw-page__composer-more):not(.draw-page__composer-input),
#webApp.theme-frosted-gray .draw-page__composer button:not(.draw-page__composer-more):not(.draw-page__composer-input),
#webApp.theme-rose-red .draw-page__composer button:not(.draw-page__composer-more):not(.draw-page__composer-input) {
  border-color: transparent;
  background: linear-gradient(180deg, var(--ui-primary), var(--ui-primary-600));
  color: var(--theme-button-text);
}

.theme-panel-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: end center;
  pointer-events: none;
}

.theme-panel-modal__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(8px);
  pointer-events: auto;
}

.theme-panel {
  position: relative;
  width: min(100%, 430px);
  max-height: min(76dvh, 640px);
  display: grid;
  gap: 14px;
  padding: 18px 14px calc(16px + env(safe-area-inset-bottom, 0px));
  border: 1px solid var(--ui-border);
  border-radius: 26px 26px 0 0;
  background:
    radial-gradient(circle at 86% 0%, var(--theme-glow, rgba(0, 220, 130, 0.16)), transparent 34%),
    var(--ui-bg-elevated);
  color: var(--ui-text);
  box-shadow: var(--ui-shadow-lg);
  pointer-events: auto;
  overflow: hidden;
}

.theme-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.theme-panel__head div {
  display: grid;
  gap: 3px;
}

.theme-panel__head span {
  color: var(--ui-primary-600);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0;
}

.theme-panel__head strong {
  color: var(--ui-text);
  font-size: 20px;
  font-weight: 950;
  letter-spacing: 0;
}

.theme-panel__head button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--ui-border);
  border-radius: 999px;
  background: var(--ui-bg);
  color: var(--ui-text-muted);
  font-size: 20px;
  font-weight: 800;
}

.theme-panel__list {
  display: grid;
  gap: 9px;
  max-height: min(50dvh, 420px);
  overflow-y: auto;
  padding-right: 2px;
}

.theme-option {
  width: 100%;
  min-height: 70px;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  color: var(--ui-text);
  background: rgba(255, 255, 255, 0.08);
  text-align: left;
  box-shadow: var(--ui-shadow-sm);
}

.theme-option--active {
  border-color: rgba(238, 197, 98, 0.34);
  background: rgba(247, 212, 134, 0.12);
  box-shadow: 0 0 0 3px var(--ui-primary-soft), var(--ui-shadow-md);
}

.theme-option__swatches {
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-option__swatches i {
  width: 26px;
  height: 44px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  box-shadow: var(--ui-shadow-sm);
}

.theme-option__swatches i + i {
  margin-left: -10px;
}

.theme-option__copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.theme-option__copy strong {
  color: #f7d486;
  font-size: 15px;
  font-weight: 950;
}

.theme-option__copy em {
  color: rgba(226, 232, 240, 0.64);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.35;
}

.theme-option b {
  justify-self: end;
  min-width: 42px;
  padding: 6px 8px;
  border-radius: 999px;
  background: var(--ui-primary-soft);
  color: #f7d486;
  font-size: 12px;
  font-weight: 950;
  text-align: center;
}

.theme-panel__confirm {
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--ui-primary), var(--ui-primary-600));
  color: var(--theme-button-text, #052e20);
  font-size: 15px;
  font-weight: 950;
  box-shadow: var(--ui-shadow-md);
}

@media (max-width: 380px) {
  .theme-option {
    grid-template-columns: 54px minmax(0, 1fr) 44px;
    gap: 8px;
  }

  .theme-option__swatches i {
    width: 23px;
    height: 40px;
  }

  .theme-option__copy em {
    font-size: 11px;
  }
}

/* Support chat and image viewer. */
#webApp .panel--support {
  min-height: calc(var(--web-visual-viewport-height, 100dvh) - 72px) !important;
  padding: 10px 10px 132px !important;
}

#webApp .panel--support .support-list {
  display: none !important;
}

#webApp .support-chat {
  display: grid !important;
  gap: 10px !important;
  max-width: 760px !important;
}

#webApp .support-chat__messages {
  overflow-y: auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

#webApp .support-chat__empty {
  margin: auto !important;
  color: #8a7448 !important;
  font-weight: 800 !important;
}

#webApp .support-message {
  max-width: 82% !important;
  display: grid !important;
  gap: 5px !important;
  padding: 10px 12px !important;
  border-radius: 12px !important;
  color: #20180d !important;
  background: #f1e2be !important;
}

#webApp .support-message--user {
  align-self: flex-end !important;
  background: #17120a !important;
  color: #fff7df !important;
  border: 1px solid rgba(214, 165, 59, 0.55) !important;
}

#webApp .support-message--agent {
  align-self: flex-start !important;
  background: #fff2ce !important;
  border: 1px solid rgba(176, 126, 34, 0.22) !important;
}

#webApp .support-message--virtual {
  background: #fff6df !important;
  border-color: rgba(214, 165, 59, 0.42) !important;
  box-shadow: 0 8px 18px rgba(111, 73, 12, 0.12) !important;
}

#webApp .support-message span {
  font-size: 12px !important;
  font-weight: 950 !important;
  opacity: 0.78 !important;
}

#webApp .support-message p {
  margin: 0 !important;
  font-size: 15px !important;
  line-height: 1.55 !important;
  white-space: pre-wrap !important;
  overflow-wrap: anywhere !important;
}

#webApp .support-message__image-button {
  padding: 0 !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  overflow: hidden !important;
  text-align: left !important;
}

#webApp .support-message__image {
  display: block !important;
  border-radius: 10px !important;
  border: 1px solid rgba(214, 165, 59, 0.28) !important;
}

#webApp .support-image-viewer {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999 !important;
  display: grid !important;
  place-items: center !important;
  padding: 20px !important;
  background: rgba(0, 0, 0, 0.82) !important;
}

#webApp .support-image-viewer__panel {
  position: relative !important;
  width: min(94vw, 720px) !important;
  max-height: 90vh !important;
  display: grid !important;
  gap: 12px !important;
}

#webApp .support-image-viewer__image {
  width: 100% !important;
  max-height: calc(90vh - 82px) !important;
  object-fit: contain !important;
  border-radius: 12px !important;
  background: #111 !important;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45) !important;
}

#webApp .support-image-viewer__close {
  position: absolute !important;
  top: -14px !important;
  right: -10px !important;
  width: 34px !important;
  height: 34px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #fff6df !important;
  color: #20180d !important;
  font-size: 22px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
}

#webApp .support-image-viewer__actions {
  display: flex !important;
  justify-content: center !important;
  gap: 10px !important;
}

#webApp .support-image-viewer__actions a,
#webApp .support-image-viewer__actions button {
  min-width: 108px !important;
  min-height: 42px !important;
  display: inline-grid !important;
  place-items: center !important;
  border: 0 !important;
  border-radius: 10px !important;
  padding: 0 16px !important;
  background: #d6a53b !important;
  color: #17120a !important;
  font-size: 15px !important;
  font-weight: 950 !important;
  text-decoration: none !important;
}

#webApp .support-image-viewer__actions button {
  background: #fff6df !important;
}

#webApp .support-message time {
  justify-self: end !important;
  font-size: 11px !important;
  opacity: 0.62 !important;
}

#webApp .support-chat__feedback {
  min-height: 20px !important;
  color: #f4d37a !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

#webApp .support-chat__feedback--error {
  color: #ffb4a8 !important;
}

#webApp .support-chat__image-preview {
  display: grid !important;
  grid-template-columns: 56px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 10px !important;
  border: 1px solid rgba(214, 165, 59, 0.35) !important;
  border-radius: 10px !important;
  background: #17130c !important;
  color: #fff7df !important;
}

#webApp .support-chat__image-preview img {
  width: 56px !important;
  height: 56px !important;
  object-fit: cover !important;
  border-radius: 8px !important;
}

#webApp .support-chat__image-preview span {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#webApp .draw-page__user-meta,
#webApp .mark-six-page__user-meta {
  color: #4f3500 !important;
}

#webApp .support-chat__image-preview button {
  border: 0 !important;
  border-radius: 999px !important;
  padding: 7px 12px !important;
  background: rgba(255, 255, 255, 0.12) !important;
  color: #fff7df !important;
  font-weight: 900 !important;
}

#webApp .support-chat__composer {
  display: grid !important;
  align-items: stretch !important;
}

#webApp .support-chat__file {
  display: none !important;
}

#webApp .support-chat__attach {
  display: grid !important;
  place-items: center !important;
  border: 1px solid rgba(214, 165, 59, 0.42) !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  font-weight: 950 !important;
}

#webApp .support-chat__composer textarea {
  width: 100% !important;
  border: 1px solid rgba(214, 165, 59, 0.42) !important;
  border-radius: 10px !important;
  padding: 12px !important;
  font-size: 15px !important;
  line-height: 1.45 !important;
  outline: none !important;
}

#webApp .support-chat__composer textarea:focus {
  border-color: #d6a53b !important;
  box-shadow: 0 0 0 3px rgba(214, 165, 59, 0.18) !important;
}

#webApp .support-chat__composer button {
  border: 0 !important;
  border-radius: 10px !important;
  background: #d6a53b !important;
  color: #17120a !important;
  font-size: 15px !important;
  font-weight: 950 !important;
  box-shadow: 0 8px 18px rgba(214, 165, 59, 0.2) !important;
}

#webApp .support-chat__composer button:disabled {
  cursor: not-allowed !important;
  opacity: 0.54 !important;
}

@media (max-width: 480px) {
  #webApp .support-chat__messages {
    height: calc(var(--web-visual-viewport-height, 100dvh) - 300px) !important;
    min-height: 330px !important;
  }

  #webApp .support-message {
    max-width: 90% !important;
  }

  #webApp .support-chat__composer {
    grid-template-columns: 50px minmax(0, 1fr) 66px !important;
  }
}

/* Bright gold reference home skin: clear typography, warm stage light, white game cards. */
body:has(#webApp .home-v3) {
  background:
    linear-gradient(180deg, #ffd826 0%, #ffe45f 46%, #fff2b5 100%) !important;
}

#webApp {
  --home-ink: #40516f;
  --home-ink-strong: #23304c;
  --home-muted: #66728a;
  --home-gold: #f4ae00;
  --home-gold-soft: #fff3a8;
  --home-red: #ef1238;
  --home-cream: rgba(255, 250, 216, 0.84);
  --home-card: #ffffff;
  --home-font: "Microsoft YaHei UI", "PingFang SC", "Hiragino Sans GB", "Segoe UI", Arial, sans-serif;
}

#webApp .home-v3,
#webApp[class] .home-v3,
#webApp .mobile-shell .home-v3,
body #webApp .home-v3 {
  position: relative !important;
  width: min(100%, 430px) !important;
  min-height: var(--web-visual-viewport-height, 100dvh) !important;
  margin: 0 auto !important;
  padding: 0 0 98px !important;
  gap: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: var(--home-ink) !important;
  font-family: var(--home-font) !important;
  background-color: #ffdb2f !important;
  background-image:
    linear-gradient(112deg, rgba(255, 255, 255, 0.4) 0 8%, transparent 9% 25%, rgba(255, 255, 255, 0.22) 26% 31%, transparent 32% 52%, rgba(255, 255, 255, 0.16) 53% 57%, transparent 58%),
    linear-gradient(98deg, transparent 0 46%, rgba(255, 255, 255, 0.32) 47% 49%, transparent 50% 66%, rgba(255, 255, 255, 0.18) 67% 69%, transparent 70%),
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.28) 26%, transparent 58%),
    linear-gradient(180deg, #ffd51f 0%, #ffe03f 42%, #fff2a6 78%, #fff8d8 100%) !important;
  box-shadow: none !important;
  overflow-x: clip !important;
  overflow-y: visible !important;
}

#webApp .home-v3::before,
#webApp[class] .home-v3::before {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  height: auto !important;
  pointer-events: none !important;
  opacity: 0.34 !important;
  background:
    repeating-linear-gradient(105deg, transparent 0 34px, rgba(255, 255, 255, 0.38) 35px 38px, transparent 39px 68px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), transparent 62%) !important;
  mix-blend-mode: screen;
}

#webApp .home-v3 > * {
  position: relative !important;
  z-index: 1 !important;
}

#webApp .home-v3__banner {
  width: 100% !important;
  min-height: 0 !important;
  height: auto !important;
  aspect-ratio: 3.54 / 1 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 0 10px 10px !important;
  background-color: #e81127 !important;
  background-size: cover !important;
  background-position: center top !important;
  box-shadow: 0 4px 0 rgba(255, 186, 0, 0.42) !important;
  overflow: hidden !important;
}

#webApp .home-v3__banner--image {
  background-size: cover !important;
  background-position: center top !important;
}

#webApp .home-v3__banner--image::after {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 224, 45, 0.08)),
    linear-gradient(90deg, rgba(255, 28, 44, 0.1), transparent 52%, rgba(255, 202, 48, 0.12)) !important;
}

#webApp .home-v3__banner--fallback {
  align-items: flex-start !important;
  justify-content: center !important;
  padding: 18px 20px !important;
  background:
    linear-gradient(120deg, #d7001d 0%, #ff3d21 48%, #ffd34f 100%) !important;
}

#webApp .home-v3__banner-kicker {
  color: #fff4b4 !important;
}

#webApp .home-v3__banner--fallback strong {
  color: #ffffff !important;
  font-size: 25px !important;
  font-weight: 950 !important;
  text-shadow: 0 2px 8px rgba(94, 0, 0, 0.34) !important;
}

#webApp .home-v3__banner--fallback em {
  color: rgba(255, 255, 255, 0.92) !important;
}

#webApp .home-v3__notice {
  display: grid !important;
  grid-template-columns: 72px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 10px !important;
  height: 42px !important;
  margin: 0 !important;
  padding: 0 14px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background:
    linear-gradient(90deg, #ffeb67 0%, #fff191 50%, #ffdf38 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 -1px 0 rgba(222, 166, 0, 0.22) !important;
  overflow: hidden !important;
}

#webApp .home-v3__notice span {
  width: 100% !important;
  height: 30px !important;
  display: grid !important;
  place-items: center !important;
  min-width: 42px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 999px !important;
  color: #ef9f00 !important;
  background: transparent !important;
  font-size: 0 !important;
  font-weight: 900 !important;
  box-shadow: none !important;
}

#webApp .home-v3__notice span::before {
  content: "\1F50A";
  font-size: 18px;
  line-height: 1;
}

#webApp .home-v3__notice div {
  min-width: 0 !important;
  padding-left: 18px !important;
  overflow: hidden !important;
}

#webApp .home-v3__notice strong {
  width: max-content !important;
  min-width: max-content !important;
  padding-left: 100% !important;
  display: inline-block !important;
  color: #59657a !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  text-overflow: clip !important;
  text-shadow: none !important;
  white-space: nowrap !important;
  will-change: transform !important;
  animation: noticeMarquee 26s linear infinite !important;
  overflow: visible !important;
}

#webApp .home-v3__account,
#webApp[class] .home-v3__account,
#webApp:is(.theme-rose-gold, .theme-sky-blue, .theme-frosted-gray, .theme-rose-red) .home-v3__account {
  min-height: 112px !important;
  margin: 0 !important;
  padding: 18px 18px 16px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background:
    linear-gradient(115deg, rgba(255, 250, 172, 0.32), rgba(255, 255, 255, 0.12) 48%, rgba(248, 181, 0, 0.2)) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

#webApp .home-v3__avatar {
  flex: 0 0 56px !important;
  color: #ffffff !important;
}

#webApp .home-v3__account-main {
  min-width: 0 !important;
}

#webApp .home-v3__account-main strong {
  line-height: 1.24 !important;
}

#webApp .home-v3__account-main em {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.46) !important;
}

#webApp .home-v3__account-actions {
  flex: 0 0 auto !important;
  display: grid !important;
  align-items: center !important;
}

#webApp .home-v3__account-actions button {
  padding: 0 !important;
  display: grid !important;
  justify-items: center !important;
  align-content: center !important;
  gap: 5px !important;
}

#webApp .home-v3__account-actions button::before {
  content: "\21E7";
  width: 32px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 3px solid currentColor;
  border-radius: 7px;
  font-size: 18px;
  line-height: 1;
  font-weight: 950;
}

#webApp .home-v3__account-actions button:nth-child(2)::before {
  content: "\21E9";
}

#webApp .home-v3__account-actions span {
  display: none !important;
}

#webApp .home-v3__account-actions strong {
  line-height: 1.1 !important;
}

#webApp .home-v3__game-tabs,
#webApp[class] .home-v3__game-tabs,
#webApp:is(.theme-rose-gold, .theme-sky-blue, .theme-frosted-gray, .theme-rose-red) .home-v3__game-tabs {
  min-height: 58px !important;
  margin: 0 18px 18px !important;
  padding: 6px !important;
  border: 0 !important;
  border-radius: 20px !important;
  background: var(--home-cream) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 8px 18px rgba(179, 128, 0, 0.14) !important;
  backdrop-filter: blur(10px) !important;
  overflow: hidden !important;
}

#webApp .home-v3__game-tab {
  min-height: 46px !important;
  border: 0 !important;
  border-radius: 15px !important;
  background: transparent !important;
  font-size: 17px !important;
  font-weight: 900 !important;
  box-shadow: none !important;
  position: relative !important;
}

#webApp .home-v3__game-tab span,
#webApp .home-v3__game-tab strong {
  color: inherit !important;
}

#webApp .home-v3__game-tab::after {
  content: "" !important;
  position: absolute !important;
  left: 18px !important;
  right: 18px !important;
  bottom: 0 !important;
  height: 5px !important;
  border-radius: 999px !important;
  background: transparent !important;
  transform: none !important;
}

#webApp .home-v3__game-tab--active::after {
  background: linear-gradient(90deg, #ffb000, #ffcc18) !important;
}

#webApp .home-v3__section-title {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 14px !important;
}

#webApp .home-v3__section-title::before,
#webApp .home-v3__section-title::after {
  content: "" !important;
  height: 1px !important;
  flex: 1 1 0 !important;
  background: rgba(255, 255, 255, 0.88) !important;
  box-shadow: 0 1px 0 rgba(214, 157, 0, 0.14) !important;
}

#webApp .home-v3__section-title span {
  display: none !important;
}

#webApp .home-v3__section-title strong {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.58) !important;
}

#webApp .home-v3__section-title strong::before,
#webApp .home-v3__section-title strong::after {
  display: none !important;
}

#webApp .home-v3__game-grid {
  width: 100% !important;
  margin: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

#webApp .home-v3__game-card,
#webApp[class] .home-v3__game-card,
#webApp:is(.theme-rose-gold, .theme-sky-blue, .theme-frosted-gray, .theme-rose-red) .home-v3__game-card {
  min-width: 0 !important;
  min-height: 126px !important;
  aspect-ratio: 1.5 / 1 !important;
  padding: 16px 10px 12px !important;
  border: 1px solid rgba(103, 95, 83, 0.42) !important;
  border-radius: 14px !important;
  background:
    linear-gradient(135deg, #ffffff 0%, #ffffff 54%, #f3f7ff 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 3px 0 rgba(84, 70, 45, 0.32),
    0 12px 22px rgba(128, 94, 0, 0.13) !important;
  overflow: hidden !important;
}

#webApp .home-v3__game-card--macau28,
#webApp[class] .home-v3__game-card--macau28 {
  background:
    linear-gradient(135deg, #ffffff 0%, #ffffff 54%, #effff9 100%) !important;
}

#webApp .home-v3__game-card--hongkong28,
#webApp[class] .home-v3__game-card--hongkong28 {
  background:
    linear-gradient(135deg, #ffffff 0%, #ffffff 54%, #edf4ff 100%) !important;
}

#webApp .home-v3__game-card--singapore28,
#webApp[class] .home-v3__game-card--singapore28 {
  background:
    linear-gradient(135deg, #ffffff 0%, #ffffff 54%, #fff0f4 100%) !important;
}

#webApp .home-v3__game-card div {
  position: relative !important;
  z-index: 4 !important;
  min-width: 0 !important;
}

#webApp .home-v3__game-card strong {
  color: #536078 !important;
  line-height: 1.22 !important;
  letter-spacing: 0 !important;
}

#webApp .home-v3__game-card em {
  color: #536078 !important;
  font-size: 15px !important;
  line-height: 1.35 !important;
  font-weight: 500 !important;
}

#webApp .home-v3__hot {
  top: 18px !important;
  right: 12px !important;
  width: 24px !important;
  height: 24px !important;
  border: 0 !important;
  border-radius: 50% !important;
  color: rgba(255, 255, 255, 0.88) !important;
  background: rgba(238, 24, 56, 0.12) !important;
  box-shadow: none !important;
  font-size: 10px !important;
  font-weight: 950 !important;
}

#webApp .home-v3__enter {
  position: relative !important;
  z-index: 4 !important;
  align-self: start !important;
  min-width: 86px !important;
  height: 34px !important;
  padding: 0 14px !important;
  border: 0 !important;
  border-radius: 999px !important;
  display: inline-grid !important;
  place-items: center !important;
  background: linear-gradient(135deg, #ff1744, #e9002e) !important;
  color: #ffffff !important;
  font-size: 13px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  box-shadow: 0 8px 14px rgba(239, 18, 56, 0.22) !important;
}

#webApp .home-v3__game-balls {
  right: 42px !important;
  bottom: 9px !important;
  z-index: 5 !important;
  gap: 2px !important;
}

#webApp .home-v3__game-balls i {
  width: 27px !important;
  height: 27px !important;
  border: 2px solid #ffffff !important;
  color: #38465f !important;
  background:
    radial-gradient(circle at 34% 28%, #ffffff 0 17%, #ffe58d 18% 43%, #ff8b27 44% 100%) !important;
  box-shadow: 0 5px 10px rgba(133, 81, 0, 0.24) !important;
}

#webApp .home-v3__game-balls i:first-child {
  width: 23px !important;
  height: 23px !important;
  margin-bottom: 15px !important;
  background:
    radial-gradient(circle at 34% 28%, #ffffff 0 17%, #ffe46a 18% 45%, #d3aa22 46% 100%) !important;
}

#webApp .home-v3__game-emblem {
  right: -7px !important;
  bottom: -8px !important;
  width: 82px !important;
  height: 60px !important;
  opacity: 0.98 !important;
  z-index: 2 !important;
}

#webApp .bottom-nav,
#webApp[class] .bottom-nav,
#webApp:is(.theme-rose-gold, .theme-sky-blue, .theme-frosted-gray, .theme-rose-red) .bottom-nav {
  left: 50% !important;
  right: auto !important;
  bottom: 0 !important;
  width: min(100%, 430px) !important;
  transform: translateX(-50%) !important;
  gap: 0 !important;
  padding: 9px 14px calc(9px + env(safe-area-inset-bottom, 0px)) !important;
  border: 1px solid rgba(222, 174, 72, 0.34) !important;
  border-top: 1px solid #e7e2d3 !important;
  border-bottom: 0 !important;
  background: #ffffff !important;
  box-shadow: 0 -8px 18px rgba(82, 65, 34, 0.1) !important;
  backdrop-filter: none !important;
  overflow: hidden !important;
}

#webApp .bottom-nav__item {
  min-width: 0 !important;
  padding: 6px 4px !important;
  border-radius: 0 !important;
  color: #59627a !important;
  background: transparent !important;
  font-size: 16px !important;
  line-height: 1.2 !important;
  font-weight: 500 !important;
  box-shadow: none !important;
}

#webApp .bottom-nav__item--light.bottom-nav__item--active,
#webApp[class] .bottom-nav__item--light.bottom-nav__item--active,
#webApp:is(.theme-rose-gold, .theme-sky-blue, .theme-frosted-gray, .theme-rose-red) .bottom-nav__item--light.bottom-nav__item--active {
  color: #f2a400 !important;
  background: transparent !important;
}

#webApp .bottom-nav__icon {
  width: 30px !important;
  height: 30px !important;
  --nav-icon-color: #3f3f3f !important;
}

#webApp .bottom-nav__item--active .bottom-nav__icon {
  --nav-icon-color: #f2a400 !important;
}

@media (max-width: 380px) {
  #webApp .home-v3,
  #webApp[class] .home-v3 {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

/* Gold stage frontend system: one bright, readable language across every user page. */
:root {
  --gold-stage: #f7b500;
  --gold-sun: #ffe257;
  --gold-pale: #fff2a6;
  --gold-line: #e7bd4d;
  --gold-porcelain: #fffdf5;
  --gold-ink: #24324c;
  --gold-muted: #66728a;
  --gold-red: #ed173c;
  --gold-shadow: rgba(116, 78, 0, 0.16);
  color-scheme: light;
}

html,
body,
button,
input,
textarea,
select {
  font-family: "Microsoft YaHei UI", "PingFang SC", "Hiragino Sans GB", "Segoe UI", Arial, sans-serif !important;
  letter-spacing: 0 !important;
}

body:has(#webApp),
body.detail-page,
body.auth-page-body--light {
  background:
    linear-gradient(116deg, rgba(255, 255, 255, 0.32) 0 9%, transparent 10% 34%, rgba(255, 255, 255, 0.18) 35% 39%, transparent 40%),
    linear-gradient(180deg, #ffd329 0%, #ffe466 48%, #fff4bd 100%) !important;
  color: var(--gold-ink) !important;
}

body:has(#webApp .draw-card),
body:has(#webApp .mark-six-page),
body:has(#webApp .panel) {
  color: #fffaf0;
  background: #090a0d !important;
}

#webApp,
#webApp.theme-rose-gold,
#webApp.theme-sky-blue,
#webApp.theme-frosted-gray,
#webApp.theme-rose-red {
  --ui-bg: #090a0d;
  --ui-bg-muted: #12151d;
  --ui-bg-elevated: #191d27;
  --ui-text: #fffaf0;
  --ui-text-muted: rgba(255, 250, 240, 0.72);
  --ui-border: rgba(222, 174, 72, 0.42);
  --ui-primary: #d6a53b;
  --ui-primary-600: #9f731f;
  --ui-primary-soft: rgba(214, 165, 59, 0.18);
  --theme-deep: #2b1c05;
  --theme-glow: rgba(214, 165, 59, 0.16);
  --theme-button-text: #161006;
  width: min(100%, 430px) !important;
  color: var(--gold-ink) !important;
  background: linear-gradient(180deg, #ffdb31 0%, #fff1a1 100%) !important;
  box-shadow: 0 0 0 1px rgba(116, 78, 0, 0.12), 0 18px 52px rgba(116, 78, 0, 0.12) !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#webApp .mobile-shell {
  width: 100% !important;
  background: linear-gradient(180deg, #ffdc31 0%, #fff4bb 100%) !important;
  scrollbar-color: rgba(184, 130, 0, 0.55) transparent;
}

#webApp .home-v3,
#webApp[class] .home-v3 {
  width: 100% !important;
  min-height: 100% !important;
  padding-bottom: 108px !important;
}

/* Show each uploaded activity image at its natural ratio instead of cropping it into a strip. */
#webApp .home-v3__banner.home-v3__banner--image,
#webApp[class] .home-v3__banner.home-v3__banner--image {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 0 12px 12px !important;
  background-image: none !important;
  background-color: #d90f23 !important;
  line-height: 0 !important;
  box-shadow: 0 5px 0 rgba(232, 167, 0, 0.34), 0 14px 30px rgba(151, 90, 0, 0.12) !important;
}

#webApp .home-v3__banner--image::after {
  display: none !important;
}

#webApp .home-v3__preload {
  position: static !important;
  display: block !important;
  width: 100% !important;
  height: auto !important;
  opacity: 1 !important;
  object-fit: contain !important;
  pointer-events: none !important;
}

#webApp .home-v3__banner--fallback {
  aspect-ratio: 2.05 / 1 !important;
  min-height: 190px !important;
}

#webApp .home-v3__account,
#webApp[class] .home-v3__account {
  position: relative !important;
  grid-template-columns: 62px minmax(0, 1fr) auto !important;
  column-gap: 12px !important;
  min-height: 106px !important;
  margin: 0 !important;
  padding: 16px 16px 15px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.62) !important;
  border-bottom: 1px solid rgba(221, 162, 0, 0.22) !important;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.7), rgba(255, 249, 189, 0.32) 52%, rgba(255, 205, 41, 0.22)) !important;
}

#webApp .home-v3__avatar {
  width: 60px !important;
  height: 60px !important;
  flex-basis: 60px !important;
  border: 3px solid #ffffff !important;
  border-radius: 50% !important;
  background:
    radial-gradient(circle at 34% 26%, #fffbdc 0 13%, transparent 14%),
    linear-gradient(145deg, #f9ca38 0%, #c98700 100%) !important;
  box-shadow: 0 0 0 2px rgba(207, 143, 0, 0.34), 0 9px 20px rgba(116, 78, 0, 0.2) !important;
  overflow: hidden !important;
}

#webApp .home-v3__avatar img {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  object-fit: cover !important;
}

#webApp .home-v3__avatar:has(img[src*="default-avatar.svg"]) img {
  display: none !important;
}

#webApp .home-v3__avatar span {
  display: grid !important;
  width: 100% !important;
  height: 100% !important;
  place-items: center !important;
  color: #ffffff !important;
  font-family: Bahnschrift, "Arial Narrow", Arial, sans-serif !important;
  font-size: 21px !important;
  font-weight: 800 !important;
}

#webApp .home-v3__avatar:has(img[src*="default-avatar.svg"])::before {
  content: "28" !important;
  inset: 0 !important;
  width: auto !important;
  height: auto !important;
  display: grid !important;
  place-items: center !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: #ffffff !important;
  font-family: Bahnschrift, "Arial Narrow", Arial, sans-serif !important;
  font-size: 21px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
  text-shadow: 0 2px 5px rgba(101, 61, 0, 0.25) !important;
  transform: none !important;
}

#webApp .home-v3__avatar:has(img[src*="default-avatar.svg"])::after {
  display: none !important;
}

#webApp .home-v3__account-main {
  align-self: center !important;
  gap: 3px !important;
}

#webApp .home-v3__account-main strong {
  max-width: 100% !important;
  overflow: hidden !important;
  color: var(--gold-ink) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#webApp .home-v3__account-main em {
  display: block !important;
  color: #334361 !important;
  font-family: Bahnschrift, "Segoe UI", Arial, sans-serif !important;
  font-size: 25px !important;
  line-height: 1.12 !important;
  font-weight: 750 !important;
  font-variant-numeric: tabular-nums lining-nums !important;
  white-space: nowrap !important;
}

#webApp .home-v3__account-actions {
  grid-template-columns: repeat(2, 58px) !important;
  gap: 8px !important;
}

#webApp .home-v3__account-actions button {
  width: 58px !important;
  min-width: 58px !important;
  min-height: 66px !important;
  border: 1px solid rgba(187, 130, 0, 0.24) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.42) !important;
  color: #17233b !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78) !important;
}

#webApp .home-v3__account-actions button::before {
  border-width: 2px !important;
  border-radius: 7px !important;
}

#webApp .home-v3__account-actions strong {
  color: #24324c !important;
  font-size: 15px !important;
  font-weight: 750 !important;
}

#webApp .home-v3__game-tabs,
#webApp[class] .home-v3__game-tabs {
  position: sticky !important;
  top: 8px !important;
  z-index: 30 !important;
  width: auto !important;
  max-width: calc(100% - 28px) !important;
  height: 70px !important;
  min-height: 58px !important;
  margin: 0 14px 18px !important;
  padding: 6px !important;
  gap: 0 !important;
  border: 1px solid rgba(212, 164, 36, 0.34) !important;
  border-radius: 18px !important;
  background: rgba(255, 253, 229, 0.9) !important;
  box-shadow: 0 9px 22px rgba(116, 78, 0, 0.15), inset 0 1px 0 #ffffff !important;
  backdrop-filter: blur(14px) saturate(1.18) !important;
}

#webApp .home-v3__game-tab {
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  min-width: 0 !important;
  color: #46536c !important;
  text-align: center !important;
}

#webApp .home-v3__game-tab span {
  display: inline-grid !important;
  width: 20px !important;
  place-items: center !important;
  font-size: 16px !important;
  line-height: 1 !important;
}

#webApp .home-v3__game-tab strong {
  font-size: 17px !important;
  line-height: 1 !important;
  font-weight: 750 !important;
}

#webApp .home-v3__game-tab--active {
  color: #e89d00 !important;
  background: rgba(255, 255, 255, 0.7) !important;
}

#webApp .home-v3__games {
  scroll-margin-top: 88px !important;
  margin: 0 !important;
  padding: 0 !important;
}

#webApp .home-v3__games + .home-v3__games {
  padding-top: 8px !important;
}

#webApp .home-v3__section-title {
  width: auto !important;
  min-height: 34px !important;
  margin: 0 14px 14px !important;
  padding: 0 !important;
}

#webApp .home-v3__section-title strong {
  min-width: 92px !important;
  color: #4a5873 !important;
  font-size: 20px !important;
  line-height: 1.25 !important;
  font-weight: 800 !important;
  text-align: center !important;
}

#webApp .home-v3__game-grid {
  padding: 0 16px 24px !important;
  gap: 15px 12px !important;
}

#webApp .home-v3__game-card {
  min-height: 132px !important;
  border-radius: 13px !important;
}

#webApp .home-v3__game-card strong {
  font-size: 17px !important;
  font-weight: 800 !important;
}

#webApp .home-v3__game-card--markSix {
  background:
    radial-gradient(circle at 86% 18%, rgba(96, 211, 207, 0.16) 0 18px, transparent 19px),
    linear-gradient(135deg, #ffffff 0%, #f8ffff 58%, #e8fbf8 100%) !important;
}

#webApp .home-v3__mark-six-ball {
  position: absolute !important;
  right: 12px !important;
  bottom: -10px !important;
  z-index: 3 !important;
  width: 66px !important;
  height: 66px !important;
  display: grid !important;
  place-items: center !important;
  border: 7px solid #ef8c3c !important;
  border-radius: 50% !important;
  color: #9d3c12 !important;
  background: #ffffff !important;
  font-family: Bahnschrift, "Arial Narrow", Arial, sans-serif !important;
  font-size: 37px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
  box-shadow: 0 8px 16px rgba(130, 70, 0, 0.18) !important;
}

/* Shared bright-gold layout for wallet, support and profile tabs. */
#webApp .panel {
  min-height: calc(var(--web-visual-viewport-height, 100dvh) - 76px) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: var(--gold-ink) !important;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.2) 0 12%, transparent 13% 46%, rgba(255, 255, 255, 0.16) 47% 52%, transparent 53%),
    linear-gradient(180deg, #ffda31 0%, #fff1a2 58%, #fff9dd 100%) !important;
}

#webApp .app-topbar,
#webApp .app-topbar--plain {
  position: sticky !important;
  top: 0 !important;
  z-index: 25 !important;
  min-height: 58px !important;
  border-bottom: 1px solid rgba(191, 135, 0, 0.24) !important;
  color: var(--gold-ink) !important;
  background: rgba(255, 249, 195, 0.94) !important;
  box-shadow: 0 5px 18px rgba(116, 78, 0, 0.1) !important;
  backdrop-filter: blur(12px) !important;
}

#webApp .app-topbar__title {
  color: var(--gold-ink) !important;
  font-size: 20px !important;
  font-weight: 800 !important;
}

#webApp .app-topbar__icon {
  border: 1px solid rgba(184, 130, 0, 0.24) !important;
  color: #8f6400 !important;
  background: rgba(255, 255, 255, 0.7) !important;
}

#webApp .wallet-shell,
#webApp .profile-shell {
  color: var(--gold-ink) !important;
  background: transparent !important;
}

#webApp .wallet-stats-bar {
  margin: 12px !important;
  border: 1px solid rgba(203, 151, 19, 0.32) !important;
  border-radius: 14px !important;
  color: var(--gold-ink) !important;
  background: rgba(255, 253, 245, 0.9) !important;
  box-shadow: 0 10px 24px var(--gold-shadow) !important;
}

#webApp .wallet-stats-bar__item {
  border-color: rgba(209, 164, 49, 0.24) !important;
}

#webApp .wallet-stats-bar__item span,
#webApp .wallet-request-field > span,
#webApp .wallet-request-line__label,
#webApp .wallet-request-methods__title {
  color: var(--gold-muted) !important;
}

#webApp .wallet-stats-bar__item strong,
#webApp .profile-balance-card strong {
  color: var(--gold-ink) !important;
  font-family: Bahnschrift, "Segoe UI", Arial, sans-serif !important;
  font-variant-numeric: tabular-nums !important;
}

#webApp .wallet-promo-banner,
#webApp .wallet-request-card {
  margin-left: 12px !important;
  margin-right: 12px !important;
  border: 1px solid rgba(203, 151, 19, 0.34) !important;
  border-radius: 15px !important;
  color: var(--gold-ink) !important;
  background: rgba(255, 253, 247, 0.96) !important;
  box-shadow: 0 12px 28px var(--gold-shadow) !important;
}

#webApp .wallet-request-switch {
  border-bottom: 1px solid rgba(203, 151, 19, 0.24) !important;
  background: #fff7cf !important;
}

#webApp .wallet-request-switch__tab {
  color: #5b6680 !important;
  background: transparent !important;
}

#webApp .wallet-request-switch__tab--active {
  color: #8c5d00 !important;
  background: #ffffff !important;
  box-shadow: inset 0 -3px 0 var(--gold-stage) !important;
}

#webApp .wallet-request-method,
#webApp .wallet-request-line,
#webApp .wallet-request-field input,
#webApp .wallet-request-line input {
  border: 1px solid rgba(203, 151, 19, 0.34) !important;
  color: var(--gold-ink) !important;
  background: #ffffff !important;
}

#webApp .wallet-request-method--active {
  border-color: var(--gold-stage) !important;
  color: #8b5c00 !important;
  background: #fff6c5 !important;
  box-shadow: 0 0 0 2px rgba(247, 181, 0, 0.12) !important;
}

#webApp .wallet-request-upload__trigger {
  border-color: rgba(203, 151, 19, 0.46) !important;
  color: #a46d00 !important;
  background: #fff9df !important;
}

#webApp .wallet-request-submit {
  border: 0 !important;
  color: #ffffff !important;
  background: linear-gradient(135deg, #f31a45 0%, #dc0a31 100%) !important;
  box-shadow: 0 10px 20px rgba(221, 10, 49, 0.22) !important;
}

#webApp .wallet-request-history-link {
  margin: 12px !important;
  border: 1px solid rgba(203, 151, 19, 0.34) !important;
  color: #865a00 !important;
  background: rgba(255, 253, 245, 0.92) !important;
}

#webApp .profile-shell__top {
  margin: 12px !important;
  border: 1px solid rgba(255, 225, 123, 0.52) !important;
  border-radius: 16px !important;
  color: #ffffff !important;
  background:
    radial-gradient(circle at 86% 18%, rgba(255, 244, 168, 0.5), transparent 24%),
    linear-gradient(130deg, #9d1c26 0%, #e6312d 54%, #efb528 100%) !important;
  box-shadow: 0 14px 30px rgba(139, 45, 25, 0.2) !important;
}

#webApp .wallet-user-card,
#webApp .profile-balance-card {
  color: #ffffff !important;
  background: transparent !important;
}

#webApp .wallet-user-card__avatar {
  border-color: #ffffff !important;
  background: linear-gradient(145deg, #ffd95a, #bd7c00) !important;
}

#webApp .wallet-user-card__name,
#webApp .profile-balance-card span,
#webApp .profile-balance-card strong {
  color: #ffffff !important;
}

#webApp .profile-avatar-upload span {
  border-color: rgba(255, 255, 255, 0.54) !important;
  color: #ffffff !important;
  background: rgba(91, 15, 25, 0.22) !important;
}

#webApp .wallet-benefit-card,
#webApp .wallet-shortcuts,
#webApp .profile-overview,
#webApp .wallet-menu {
  margin-left: 12px !important;
  margin-right: 12px !important;
  border: 1px solid rgba(203, 151, 19, 0.3) !important;
  border-radius: 14px !important;
  color: var(--gold-ink) !important;
  background: rgba(255, 253, 247, 0.94) !important;
  box-shadow: 0 9px 22px rgba(116, 78, 0, 0.1) !important;
}

#webApp .wallet-shortcuts__item,
#webApp .wallet-menu__item,
#webApp .profile-overview__item,
#webApp .wallet-benefit-card__item {
  border-color: rgba(203, 151, 19, 0.2) !important;
  color: var(--gold-ink) !important;
  background: transparent !important;
}

#webApp .wallet-shortcuts__icon,
#webApp .wallet-menu__icon,
#webApp .wallet-benefit-card__icon {
  color: #8b5c00 !important;
  background: #fff0a8 !important;
}

#webApp .wallet-menu__side,
#webApp .wallet-benefit-card__content span,
#webApp .profile-overview__item span {
  color: var(--gold-muted) !important;
}

#webApp .panel--support {
  color: var(--gold-ink) !important;
  background: linear-gradient(180deg, #ffe057 0%, #fff6cb 100%) !important;
}

#webApp .support-chat {
  margin: 12px !important;
  border: 1px solid rgba(203, 151, 19, 0.32) !important;
  border-radius: 15px !important;
  color: var(--gold-ink) !important;
  background: rgba(255, 253, 247, 0.96) !important;
  box-shadow: 0 12px 28px var(--gold-shadow) !important;
  overflow: hidden !important;
}

#webApp .support-chat__messages {
  background: linear-gradient(180deg, #fffdf7 0%, #fff8dc 100%) !important;
}

#webApp .support-message > span,
#webApp .support-message time,
#webApp .support-chat__empty {
  color: var(--gold-muted) !important;
}

#webApp .support-message p {
  border: 1px solid rgba(203, 151, 19, 0.28) !important;
  color: var(--gold-ink) !important;
  background: #ffffff !important;
}

#webApp .support-chat__composer {
  border-top: 1px solid rgba(203, 151, 19, 0.22) !important;
  background: #ffffff !important;
}

#webApp .support-chat__composer textarea {
  border-color: rgba(203, 151, 19, 0.3) !important;
  color: var(--gold-ink) !important;
  background: #fffdf7 !important;
}

#webApp .support-chat__attach {
  color: #8b5c00 !important;
  background: #fff1ad !important;
}

#webApp .support-chat__composer > button {
  color: #ffffff !important;
  background: var(--gold-red) !important;
}

#webApp .support-list {
  margin: 0 12px 104px !important;
  color: var(--gold-ink) !important;
  background: transparent !important;
}

#webApp .support-item {
  border: 1px solid rgba(203, 151, 19, 0.28) !important;
  color: var(--gold-ink) !important;
  background: rgba(255, 253, 247, 0.94) !important;
}

#webApp .support-item span {
  color: var(--gold-muted) !important;
}

#webApp .status-text {
  color: #72500a !important;
  background: rgba(255, 253, 237, 0.9) !important;
}

/* Draw pages keep their dense workflow, but use the same porcelain/gold system. */
#webApp .mobile-shell.mobile-shell--draw {
  width: 100% !important;
  color: var(--gold-ink) !important;
  background: #fff7cf !important;
}

#webApp .draw-page,
#webApp .mark-six-page {
  color: var(--gold-ink) !important;
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.32) 0 11%, transparent 12% 49%, rgba(255, 255, 255, 0.18) 50% 55%, transparent 56%),
    linear-gradient(180deg, #ffdc36 0%, #fff4bd 36%, #fffdf5 100%) !important;
}

#webApp .draw-page__header,
#webApp .mark-six-page__header {
  border-bottom: 1px solid rgba(203, 151, 19, 0.3) !important;
  color: var(--gold-ink) !important;
  background: rgba(255, 253, 242, 0.96) !important;
  box-shadow: 0 5px 18px rgba(116, 78, 0, 0.1) !important;
}

#webApp .draw-page__back,
#webApp .mark-six-page__back,
#webApp .mark-six-page__refresh {
  color: #8d6000 !important;
  background: #fff1ad !important;
}

#webApp .draw-page__title,
#webApp .mark-six-page__header strong {
  color: var(--gold-ink) !important;
}

#webApp .draw-page__board,
#webApp .mark-six-page__board {
  border: 1px solid rgba(203, 151, 19, 0.34) !important;
  color: var(--gold-ink) !important;
  background: rgba(255, 253, 247, 0.96) !important;
  box-shadow: 0 12px 28px var(--gold-shadow) !important;
}

#webApp .draw-page__board::before,
#webApp .draw-page__board::after {
  opacity: 0.12 !important;
}

#webApp .draw-page__expect,
#webApp .draw-page__timer-info,
#webApp .draw-page__result-meta,
#webApp .mark-six-page__board-top,
#webApp .mark-six-page__latest {
  color: var(--gold-ink) !important;
}

#webApp .mark-six-page__board-top,
#webApp .mark-six-page__latest {
  border: 1px solid rgba(222, 174, 72, 0.35);
  background: #f8ecd0 !important;
}

#webApp .draw-page__result-panel,
#webApp .draw-page__user-strip,
#webApp .mark-six-page__user {
  border-color: rgba(203, 151, 19, 0.26) !important;
  color: var(--gold-ink) !important;
  background: #fffdf7 !important;
}

#webApp .draw-page__user-card,
#webApp .mark-six-page__user-meta,
#webApp .mark-six-page__user-balance,
#webApp .draw-page__user-name,
#webApp .draw-page__user-balance {
  color: var(--gold-ink) !important;
}

#webApp .draw-page__chat,
#webApp .mark-six-page__chat {
  border-color: rgba(203, 151, 19, 0.26) !important;
  background: rgba(255, 253, 247, 0.9) !important;
}

#webApp .draw-message__bubble {
  border-color: rgba(203, 151, 19, 0.24) !important;
  color: var(--gold-ink) !important;
  background: #ffffff !important;
}

#webApp .draw-message--self .draw-message__bubble {
  color: #ffffff !important;
  background: linear-gradient(135deg, #e91b40, #c70d2d) !important;
}

#webApp .draw-message__head,
#webApp .draw-message__system-head {
  color: #604716 !important;
  font-weight: 900;
}

#webApp .draw-page__tools,
#webApp .mark-six-page__tools,
#webApp .draw-page__composer,
#webApp .mark-six-page__composer {
  border-color: rgba(203, 151, 19, 0.28) !important;
  color: var(--gold-ink) !important;
  background: rgba(255, 253, 247, 0.97) !important;
}

#webApp .draw-page__composer,
#webApp .mark-six-page__composer {
  border-top: 1px solid rgba(203, 151, 19, 0.28) !important;
}

#webApp .draw-page__tools button,
#webApp .mark-six-page__tools button {
  color: #765000 !important;
  background: #fff0a8 !important;
}

#webApp .draw-page__composer-input {
  border-color: rgba(203, 151, 19, 0.3) !important;
  color: var(--gold-ink) !important;
  background: #ffffff !important;
}

#webApp .draw-page__composer > button:not(.draw-page__composer-input),
#webApp .mark-six-page__composer > button:not(.draw-page__composer-input) {
  color: #ffffff !important;
  background: var(--gold-red) !important;
}

/* Room selection follows the white reference cards and lets the uploaded art stay visible. */
#webApp .room-list-modal {
  align-items: center !important;
  padding: 12px !important;
  background: rgba(88, 58, 0, 0.12) !important;
}

#webApp .room-list-modal__backdrop {
  background: rgba(52, 37, 6, 0.46) !important;
  backdrop-filter: blur(6px) !important;
}

#webApp .room-list-panel,
#webApp[class] .room-list-panel {
  width: min(100%, 466px) !important;
  height: auto !important;
  max-height: calc(var(--web-visual-viewport-height, 100dvh) - 24px) !important;
  border: 1px solid rgba(203, 151, 19, 0.38) !important;
  border-radius: 18px !important;
  color: var(--gold-ink) !important;
  background: #ffffff !important;
  box-shadow: 0 24px 64px rgba(67, 43, 0, 0.28) !important;
}

#webApp .room-list-panel__head {
  min-height: 70px !important;
  padding: 18px 58px 16px !important;
  border-bottom: 1px solid rgba(203, 151, 19, 0.22) !important;
  color: #43526e !important;
  background: #fffdf8 !important;
  font-size: 19px !important;
}

#webApp .room-list-panel__head strong {
  color: #43526e !important;
  font-weight: 800 !important;
}

#webApp .room-list-panel__head button {
  top: 16px !important;
  right: 14px !important;
  width: 38px !important;
  height: 38px !important;
  border: 0 !important;
  color: #8d6000 !important;
  background: #fff0aa !important;
  box-shadow: none !important;
}

#webApp .room-list-panel__body {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  flex: 1 1 auto !important;
  grid-auto-rows: auto !important;
  align-content: start !important;
  gap: 16px !important;
  padding: 18px 18px 24px !important;
  background: #ffffff !important;
}

#webApp .room-card,
#webApp[class] .room-card {
  min-height: 0 !important;
  aspect-ratio: 2.4 / 1 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 13px !important;
  background: transparent !important;
  box-shadow: 0 8px 18px rgba(116, 78, 0, 0.1) !important;
  overflow: hidden !important;
}

#webApp .room-card::after {
  display: none !important;
}

#webApp .room-card img {
  position: static !important;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  object-fit: cover !important;
  filter: none !important;
  opacity: 1 !important;
}

#webApp .room-card--has-image .room-card__content,
#webApp .room-card--has-image > i,
#webApp .room-card--has-image .room-card__fallback {
  display: none !important;
}

#webApp .room-card:not(.room-card--has-image) .room-card__fallback {
  display: block !important;
  color: transparent !important;
  background:
    radial-gradient(circle at 16% 76%, rgba(33, 188, 145, 0.16), transparent 34%),
    linear-gradient(135deg, #f9fcff 0%, #eef8f4 100%) !important;
}

#webApp .room-card:not(.room-card--has-image) .room-card__content {
  z-index: 2 !important;
  grid-column: 1 / -1 !important;
  justify-items: start !important;
  gap: 7px !important;
  padding: 0 78px 0 18px !important;
}

#webApp .room-card:not(.room-card--has-image) .room-card__content strong {
  color: #172b4e !important;
  font-size: 23px !important;
  line-height: 1.15 !important;
}

#webApp .room-card:not(.room-card--has-image) .room-card__content em {
  color: #8b620a !important;
  font-size: 12px !important;
}

#webApp .room-card--disabled {
  opacity: 0.68 !important;
  filter: saturate(0.72) !important;
}

#webApp .wallet-modal-card,
#webApp .draw-info-panel,
#webApp .theme-panel,
#webApp .home-announcement-modal__panel,
#webApp .support-image-viewer__panel {
  border: 1px solid rgba(203, 151, 19, 0.34) !important;
  color: var(--gold-ink) !important;
  background: #fffdf7 !important;
  box-shadow: 0 20px 54px rgba(67, 43, 0, 0.26) !important;
}

#webApp .wallet-modal-card__top,
#webApp .draw-info-panel__top,
#webApp .theme-panel__head {
  border-color: rgba(203, 151, 19, 0.24) !important;
  color: var(--gold-ink) !important;
  background: #fff7cf !important;
}

#webApp .quick-bet-tabs__item,
#webApp .quick-bet-option,
#webApp .wallet-form__field input {
  border-color: rgba(203, 151, 19, 0.3) !important;
  color: var(--gold-ink) !important;
  background: #ffffff !important;
}

#webApp .quick-bet-tabs__item--active,
#webApp .quick-bet-option--selected,
#webApp .quick-bet-footer__primary,
#webApp .home-announcement-modal__confirm {
  color: #ffffff !important;
  background: var(--gold-red) !important;
}

#webApp .rules-content,
#webApp .rules-content * {
  color: var(--gold-ink) !important;
}

/* Standalone record, referral and login pages use the same type and surface tokens. */
body.detail-page .detail-shell,
body.detail-page .agent-shell {
  width: min(100%, 430px) !important;
  min-height: var(--web-visual-viewport-height, 100dvh) !important;
  color: var(--gold-ink) !important;
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.24) 0 12%, transparent 13% 48%, rgba(255, 255, 255, 0.18) 49% 54%, transparent 55%),
    linear-gradient(180deg, #ffdc36 0%, #fff5c4 58%, #fffdf5 100%) !important;
  box-shadow: 0 0 0 1px rgba(116, 78, 0, 0.1), 0 18px 48px rgba(116, 78, 0, 0.12) !important;
}

body.detail-page .detail-topbar,
body.detail-page .agent-topbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 20 !important;
  border-bottom: 1px solid rgba(203, 151, 19, 0.28) !important;
  color: var(--gold-ink) !important;
  background: rgba(255, 252, 232, 0.96) !important;
  box-shadow: 0 5px 18px rgba(116, 78, 0, 0.1) !important;
  backdrop-filter: blur(12px) !important;
}

body.detail-page .detail-topbar__button,
body.detail-page .agent-topbar__button,
body.detail-page .agent-invite-button {
  color: #865a00 !important;
  background: #fff0aa !important;
}

body.detail-page .detail-hero,
body.detail-page .agent-summary-card {
  border: 1px solid rgba(255, 228, 133, 0.58) !important;
  color: #ffffff !important;
  background:
    radial-gradient(circle at 88% 14%, rgba(255, 245, 176, 0.48), transparent 25%),
    linear-gradient(130deg, #a51d28 0%, #df302d 52%, #efb72c 100%) !important;
  box-shadow: 0 14px 30px rgba(139, 45, 25, 0.18) !important;
}

body.detail-page .detail-hero *,
body.detail-page .agent-summary-card * {
  color: inherit !important;
}

body.detail-page .detail-card,
body.detail-page .agent-tabs-card,
body.detail-page .agent-downline-card,
body.detail-page .agent-sheet__panel {
  border: 1px solid rgba(203, 151, 19, 0.3) !important;
  color: var(--gold-ink) !important;
  background: rgba(255, 253, 247, 0.96) !important;
  box-shadow: 0 10px 24px rgba(116, 78, 0, 0.1) !important;
}

body.detail-page .detail-kpi,
body.detail-page .detail-list__item,
body.detail-page .detail-referral-line,
body.detail-page .agent-level-tabs,
body.detail-page .agent-order-card {
  border-color: rgba(203, 151, 19, 0.22) !important;
  color: var(--gold-ink) !important;
  background: #ffffff !important;
}

body.detail-page .detail-card__head span,
body.detail-page .detail-list__meta span,
body.detail-page .detail-list__side span,
body.detail-page .detail-empty,
body.detail-page .agent-downline-card span,
body.detail-page .agent-empty {
  color: var(--gold-muted) !important;
}

.agent-access-denied {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 24px 18px;
  text-align: center;
}

.agent-access-denied h2,
.agent-access-denied p {
  margin: 0;
}

.agent-access-denied h2 {
  color: #1d2a40;
  font-size: 20px;
}

.agent-access-denied p {
  color: #667085;
  font-size: 14px;
  line-height: 1.7;
}

body.detail-page .agent-level-tabs__item--active,
body.detail-page .agent-order-button,
body.detail-page .agent-sheet__cancel {
  color: #ffffff !important;
  background: var(--gold-red) !important;
}

body.auth-page-body--light #authApp {
  width: min(100%, 520px) !important;
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.26) 0 12%, transparent 13% 48%, rgba(255, 255, 255, 0.18) 49% 54%, transparent 55%),
    linear-gradient(180deg, #ffd62d 0%, #fff0a1 48%, #fff9df 100%) !important;
  box-shadow: 0 18px 54px rgba(116, 78, 0, 0.14) !important;
}

body.auth-page-body--light .auth-screen {
  min-height: var(--web-visual-viewport-height, 100dvh);
  padding: 28px 18px;
  display: grid;
  align-items: center;
}

body.auth-page-body--light .auth-screen::before {
  content: "AOMEN 28";
  align-self: end;
  justify-self: center;
  margin-bottom: 22px;
  color: rgba(247, 212, 134, 0.82);
  font-size: 13px;
  font-weight: 950;
}

body.auth-page-body--light .auth-screen--mobile {
  color: var(--gold-ink) !important;
  background: transparent !important;
}

body.auth-page-body--light .auth-login-card {
  width: min(100%, 390px);
  margin: 0 auto;
  padding: 26px 20px;
  border: 1px solid rgba(203, 151, 19, 0.34) !important;
  border-radius: 18px !important;
  color: var(--gold-ink) !important;
  background: rgba(255, 253, 247, 0.96) !important;
  box-shadow: 0 16px 36px rgba(116, 78, 0, 0.16) !important;
}

body.auth-page-body--light .auth-screen__close {
  color: #865a00 !important;
  background: rgba(255, 253, 245, 0.86) !important;
}

body.auth-page-body--light .auth-line-field__label {
  color: var(--gold-ink) !important;
  font-size: 15px !important;
  font-weight: 950 !important;
  opacity: 1 !important;
}

body.auth-page-body--light .auth-line-field__control {
  border: 1px solid rgba(203, 151, 19, 0.34) !important;
  color: #17120a !important;
  background: #ffffff !important;
}

body.auth-page-body--light .auth-line-field__control input {
  color: var(--gold-ink) !important;
  background: transparent !important;
}

body.auth-page-body--light .auth-line-field__control input::placeholder {
  color: #17120a !important;
  opacity: 1 !important;
}

body.auth-page-body--light .auth-code-btn {
  border: 1px solid rgba(23, 18, 10, 0.16) !important;
  color: #8b5c00 !important;
  background: #fff0aa !important;
  font-weight: 950 !important;
}

body.auth-page-body--light .auth-submit-btn {
  color: #ffffff !important;
  background: linear-gradient(135deg, #f31a45, #d90a31) !important;
  box-shadow: 0 12px 24px rgba(217, 10, 49, 0.22) !important;
}

@media (max-width: 380px) {
  #webApp .home-v3__account {
    grid-template-columns: 54px minmax(0, 1fr) auto !important;
    column-gap: 9px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  #webApp .home-v3__avatar {
    width: 52px !important;
    height: 52px !important;
    flex-basis: 52px !important;
  }

  #webApp .home-v3__account-main em {
    font-size: 20px !important;
  }

  #webApp .home-v3__account-actions {
    grid-template-columns: repeat(2, 50px) !important;
    gap: 6px !important;
  }

  #webApp .home-v3__account-actions button {
    width: 50px !important;
    min-width: 50px !important;
  }

  #webApp .home-v3__game-grid {
    padding-left: 12px !important;
    padding-right: 12px !important;
    gap: 12px 9px !important;
  }

  #webApp .home-v3__mark-six-ball {
    width: 58px !important;
    height: 58px !important;
    border-width: 6px !important;
    font-size: 32px !important;
  }
}

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

/* Wallet content surfaces. */
#webApp .wallet-benefit-card::after {
  display: none !important;
}

#webApp .wallet-user-card__avatar {
  box-shadow: 0 10px 24px rgba(184, 135, 47, 0.24) !important;
}

#webApp .profile-overview__item {
  box-shadow: none !important;
}

#webApp .profile-overview__item strong {
  color: #17120a !important;
}

#webApp .wallet-stats-bar__item,
#webApp[class] .wallet-stats-bar__item {
  border: 1px solid rgba(203, 151, 19, 0.2) !important;
  color: var(--gold-ink) !important;
  background: #fffdf7 !important;
}

#webApp .wallet-stats-bar__item span,
#webApp[class] .wallet-stats-bar__item span {
  color: var(--gold-muted) !important;
}

#webApp .wallet-stats-bar__item strong,
#webApp[class] .wallet-stats-bar__item strong {
  color: var(--gold-ink) !important;
}

#webApp[class] .wallet-user-card,
#webApp[class] .profile-balance-card {
  border: 0 !important;
  color: #ffffff !important;
  background: transparent !important;
  box-shadow: none !important;
}

#webApp[class] .wallet-user-card__name,
#webApp[class] .profile-balance-card span,
#webApp[class] .profile-balance-card strong {
  color: #ffffff !important;
}

#webApp[class] .wallet-benefit-card,
#webApp[class] .wallet-shortcuts,
#webApp[class] .wallet-menu {
  border: 1px solid rgba(203, 151, 19, 0.3) !important;
  color: var(--gold-ink) !important;
  background: rgba(255, 253, 247, 0.96) !important;
  box-shadow: 0 9px 22px rgba(116, 78, 0, 0.1) !important;
}

#webApp[class] .wallet-benefit-card__item,
#webApp[class] .wallet-shortcuts__item,
#webApp[class] .wallet-menu__item {
  color: var(--gold-ink) !important;
  background: transparent !important;
}

#webApp[class] .wallet-benefit-card__content strong,
#webApp[class] .wallet-shortcuts__item span:last-child,
#webApp[class] .wallet-menu__item,
#webApp[class] .wallet-menu__main {
  color: var(--gold-ink) !important;
}

#webApp[class] .wallet-benefit-card__content span,
#webApp[class] .wallet-menu__side {
  color: var(--gold-muted) !important;
}

#webApp[class] .wallet-benefit-card__icon,
#webApp[class] .wallet-shortcuts__icon,
#webApp[class] .wallet-menu__icon {
  color: #8b5c00 !important;
  background: #fff0a8 !important;
}

#webApp .home-announcement-modal__panel strong,
#webApp[class] .home-announcement-modal__panel strong {
  color: var(--gold-ink) !important;
}

#webApp .home-announcement-modal__panel p,
#webApp[class] .home-announcement-modal__panel p {
  color: var(--gold-muted) !important;
}

#webApp .home-announcement-modal__close,
#webApp[class] .home-announcement-modal__close {
  color: #8b5c00 !important;
  background: #fff0aa !important;
}

/* Shared app-bar geometry and keyboard focus states. */
#webApp .app-topbar,
#webApp[class] .app-topbar {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

#webApp button:focus-visible,
#webApp a:focus-visible,
#webApp input:focus-visible,
#webApp textarea:focus-visible,
body.detail-page button:focus-visible,
body.detail-page a:focus-visible,
body.auth-page-body--light button:focus-visible,
body.auth-page-body--light input:focus-visible {
  outline: 3px solid rgba(231, 164, 0, 0.58) !important;
  outline-offset: 2px !important;
}

/* Default avatar fallback shared by wallet and draw rooms. */
#webApp .wallet-user-card__avatar:has(img[src*="default-avatar.svg"]),
#webApp .draw-page__user-avatar:has(img[src*="default-avatar.svg"]),
#webApp .mark-six-page__avatar:has(img[src*="default-avatar.svg"]) {
  position: relative !important;
  border: 2px solid #ffffff !important;
  background: linear-gradient(145deg, #f6c63a, #bd7b00) !important;
  overflow: hidden !important;
}

#webApp .wallet-user-card__avatar:has(img[src*="default-avatar.svg"]) img,
#webApp .draw-page__user-avatar:has(img[src*="default-avatar.svg"]) img,
#webApp .mark-six-page__avatar:has(img[src*="default-avatar.svg"]) img {
  opacity: 0 !important;
}

#webApp .wallet-user-card__avatar:has(img[src*="default-avatar.svg"])::after,
#webApp .draw-page__user-avatar:has(img[src*="default-avatar.svg"])::after,
#webApp .mark-six-page__avatar:has(img[src*="default-avatar.svg"])::after {
  content: "28" !important;
  position: absolute !important;
  inset: 0 !important;
  display: grid !important;
  place-items: center !important;
  color: #ffffff !important;
  font-family: Bahnschrift, "Arial Narrow", Arial, sans-serif !important;
  font-size: 18px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
  text-shadow: 0 2px 5px rgba(87, 50, 0, 0.26) !important;
}

/* Standalone balance records. */
body.detail-page .detail-shell--flat,
body.detail-page .balance-detail-page {
  color: var(--gold-ink) !important;
  background: transparent !important;
}

body.detail-page .balance-tabs {
  position: sticky !important;
  top: 58px !important;
  z-index: 15 !important;
  border-bottom: 1px solid rgba(203, 151, 19, 0.28) !important;
  border-radius: 0 !important;
  background: rgba(255, 253, 245, 0.96) !important;
  box-shadow: 0 6px 18px rgba(116, 78, 0, 0.08) !important;
  backdrop-filter: blur(12px) !important;
}

body.detail-page .balance-tabs button {
  color: #4d5a73 !important;
  background: transparent !important;
}

body.detail-page .balance-tabs__item--active {
  color: #c88400 !important;
}

body.detail-page .balance-tabs__item--active::after {
  background: linear-gradient(90deg, #f0a000, #ffc929) !important;
}

body.detail-page .balance-detail-list {
  min-height: 160px !important;
  padding: 12px 12px 24px !important;
  background: transparent !important;
}

body.detail-page .balance-detail-card {
  border: 1px solid rgba(203, 151, 19, 0.28) !important;
  border-radius: 10px !important;
  color: var(--gold-ink) !important;
  background: rgba(255, 253, 247, 0.96) !important;
  box-shadow: 0 9px 22px rgba(116, 78, 0, 0.09) !important;
}

body.detail-page .balance-detail-card__row span,
body.detail-page .balance-detail-card__row strong {
  color: var(--gold-ink) !important;
}

body.detail-page .balance-detail-page > .detail-empty,
body.detail-page .balance-detail-list > .detail-empty {
  border: 1px solid rgba(203, 151, 19, 0.22) !important;
  border-radius: 10px !important;
  color: var(--gold-muted) !important;
  background: rgba(255, 253, 247, 0.86) !important;
}

/* Active home and bottom-navigation states. */
#webApp .home-v3__game-tab--active,
#webApp[class] .home-v3__game-tab--active {
  color: #a86a00 !important;
}

#webApp .bottom-nav__item--light.bottom-nav__item--active,
#webApp[class] .bottom-nav__item--light.bottom-nav__item--active {
  color: #b46e00 !important;
}

#webApp .bottom-nav__item--active .bottom-nav__icon,
#webApp[class] .bottom-nav__item--active .bottom-nav__icon {
  --nav-icon-color: #b46e00 !important;
}

/* Homepage section headers, room cards and regional game artwork. */
#webApp .home-v3__section-title,
#webApp[class] .home-v3__section-title {
  justify-content: stretch !important;
  column-gap: 16px !important;
}

#webApp .home-v3__section-title::before,
#webApp .home-v3__section-title::after,
#webApp[class] .home-v3__section-title::before,
#webApp[class] .home-v3__section-title::after {
  width: 100% !important;
  min-width: 0 !important;
  flex: none !important;
}

#webApp .home-v3__section-title strong,
#webApp[class] .home-v3__section-title strong {
  justify-self: center !important;
  margin: 0 !important;
  white-space: nowrap !important;
}

#webApp .home-v3__game-card,
#webApp[class] .home-v3__game-card {
  isolation: isolate !important;
}

#webApp .home-v3__game-emblem,
#webApp[class] .home-v3__game-emblem {
  right: -4px !important;
  bottom: -7px !important;
  width: 104px !important;
  height: 78px !important;
  border-radius: 0 !important;
  opacity: 1 !important;
  z-index: 2 !important;
  overflow: visible !important;
}

#webApp .home-v3__game-emblem::before,
#webApp .home-v3__game-emblem::after {
  display: none !important;
}

#webApp .home-v3__game-card--macau28 .home-v3__game-emblem,
#webApp[class] .home-v3__game-card--macau28 .home-v3__game-emblem {
  background: url("./assets/game-card-macau28.svg?v=20260712-01") center / contain no-repeat !important;
}

#webApp .home-v3__game-card--hongkong28 .home-v3__game-emblem,
#webApp[class] .home-v3__game-card--hongkong28 .home-v3__game-emblem {
  background: url("./assets/game-card-hongkong28.svg?v=20260712-01") center / contain no-repeat !important;
}

#webApp .home-v3__game-card--singapore28 .home-v3__game-emblem,
#webApp[class] .home-v3__game-card--singapore28 .home-v3__game-emblem {
  background: url("./assets/game-card-singapore28.svg?v=20260712-01") center / contain no-repeat !important;
}

#webApp .home-v3__game-balls,
#webApp[class] .home-v3__game-balls {
  right: 38px !important;
  bottom: 8px !important;
}

#webApp .room-card--disabled,
#webApp[class] .room-card--disabled {
  opacity: 1 !important;
  filter: none !important;
}

@media (max-width: 430px) {
  #webApp,
  #webApp .mobile-shell,
  #webApp .home-v3,
  #webApp .bottom-nav {
    width: 100% !important;
    max-width: none !important;
  }

  #webApp .home-v3__game-tabs {
    max-width: calc(100% - 24px) !important;
    margin-left: 12px !important;
    margin-right: 12px !important;
  }

  #webApp .home-v3__section-title {
    margin-left: 12px !important;
    margin-right: 12px !important;
    column-gap: 12px !important;
  }

  #webApp .home-v3__section-title strong {
    font-size: 19px !important;
  }

  #webApp .home-v3__game-grid {
    padding-left: 12px !important;
    padding-right: 12px !important;
    gap: 12px 10px !important;
  }

  #webApp .home-v3__game-card {
    min-height: 122px !important;
    aspect-ratio: 1.48 / 1 !important;
    padding: 14px 9px 10px !important;
  }

  #webApp .home-v3__game-card strong {
    font-size: 16px !important;
  }

  #webApp .home-v3__game-card em {
    font-size: 14px !important;
  }

  #webApp .home-v3__game-emblem {
    right: -5px !important;
    bottom: -7px !important;
    width: 92px !important;
    height: 69px !important;
  }

  #webApp .home-v3__game-balls {
    right: 32px !important;
    bottom: 7px !important;
  }

  #webApp .room-list-modal {
    padding: 8px !important;
  }

  #webApp .room-list-panel {
    width: 100% !important;
    max-width: 100% !important;
    max-height: calc(var(--web-visual-viewport-height, 100dvh) - 16px) !important;
    border-radius: 15px !important;
  }

  #webApp .room-list-panel__head {
    min-height: 64px !important;
    padding: 16px 52px 14px !important;
    font-size: 18px !important;
  }

  #webApp .room-list-panel__body {
    max-height: calc(var(--web-visual-viewport-height, 100dvh) - 80px) !important;
    gap: 14px !important;
    padding: 14px 12px 20px !important;
  }

  #webApp .room-card {
    width: 100% !important;
    aspect-ratio: 2.4 / 1 !important;
  }
}

@media (max-width: 380px) {
  #webApp .home-v3__section-title strong {
    font-size: 18px !important;
  }

  #webApp .home-v3__game-card {
    min-height: 116px !important;
    padding: 12px 8px 9px !important;
  }

  #webApp .home-v3__game-card strong {
    font-size: 15px !important;
  }

  #webApp .home-v3__game-card em {
    font-size: 13px !important;
  }

  #webApp .home-v3__enter {
    min-width: 76px !important;
    height: 31px !important;
    padding: 0 10px !important;
    font-size: 12px !important;
  }

  #webApp .home-v3__game-emblem {
    width: 84px !important;
    height: 63px !important;
  }

  #webApp .home-v3__game-balls {
    right: 30px !important;
  }
}

@media (max-width: 360px) {
  #webApp .home-v3__game-grid {
    padding-left: 10px !important;
    padding-right: 10px !important;
    gap: 10px 8px !important;
  }

  #webApp .home-v3__game-card {
    min-height: 112px !important;
  }

  #webApp .home-v3__game-emblem {
    width: 78px !important;
    height: 59px !important;
  }

  #webApp .home-v3__game-balls {
    right: 27px !important;
  }
}

/* Mobile shell sizing and room identity. */
#webApp .mobile-shell {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

#webApp .mobile-shell::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}

#webApp .draw-page__user-strip,
#webApp .mark-six-page__user {
  border-color: rgba(177, 122, 0, 0.32) !important;
  background: linear-gradient(135deg, #fffef9 0%, #fff5cb 100%) !important;
  box-shadow: 0 10px 24px rgba(128, 85, 0, 0.12) !important;
}

#webApp .draw-page__user-meta strong,
#webApp .mark-six-page__user-meta strong {
  max-width: 100% !important;
  overflow: hidden !important;
  color: #4f3500 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#webApp .draw-page__user-balance,
#webApp .mark-six-page__user-balance {
  color: #795b1f !important;
}

#webApp .draw-page__user-balance b,
#webApp .mark-six-page__user-balance b {
  color: #a56400 !important;
}

@media (max-width: 380px) {
  #webApp .draw-page__user-card {
    gap: 8px !important;
  }

  #webApp .draw-page__user-avatar {
    width: 42px !important;
    height: 42px !important;
  }

  #webApp .draw-page__user-meta strong {
    font-size: 15px !important;
  }

  #webApp .draw-page__user-balance b {
    font-size: 14px !important;
  }
}

@media (max-width: 350px) {
  #webApp .draw-page__user-strip {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  #webApp .draw-page__user-actions {
    width: 100% !important;
  }

  #webApp .draw-page__user-actions button {
    flex: 1 1 0 !important;
    min-width: 0 !important;
  }
}

/* Homepage section-title geometry. */
#webApp .home-v3__section-title,
#webApp[class] .home-v3__section-title {
  position: relative !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
  grid-template-rows: 1fr !important;
  align-items: center !important;
  width: auto !important;
}

#webApp .home-v3__section-title::before,
#webApp[class] .home-v3__section-title::before {
  grid-column: 1 !important;
  grid-row: 1 !important;
}

#webApp .home-v3__section-title strong,
#webApp[class] .home-v3__section-title strong {
  grid-column: 2 !important;
  grid-row: 1 !important;
  display: block !important;
  grid-template-columns: none !important;
  width: auto !important;
  min-width: 0 !important;
  padding: 0 8px !important;
  transform: none !important;
  text-align: center !important;
}

#webApp .home-v3__section-title::after,
#webApp[class] .home-v3__section-title::after {
  grid-column: 3 !important;
  grid-row: 1 !important;
}

/* Mobile content rail, cards and navigation-safe panels. */
#webApp .mobile-shell,
#webApp[class] .mobile-shell {
  box-sizing: border-box !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

#webApp .home-v3__game-grid,
#webApp[class] .home-v3__game-grid {
  box-sizing: border-box !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px !important;
  width: 100% !important;
  padding-left: 18px !important;
  padding-right: 18px !important;
}

#webApp .home-v3__game-card,
#webApp[class] .home-v3__game-card {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 118px !important;
  aspect-ratio: 1.58 / 1 !important;
  justify-self: stretch !important;
  overflow: hidden !important;
}

#webApp .home-v3__game-card > div,
#webApp[class] .home-v3__game-card > div {
  min-width: 0 !important;
  max-width: calc(100% - 20px) !important;
}

#webApp .panel--wallet,
#webApp .panel--profile,
#webApp .panel--support {
  box-sizing: border-box !important;
  min-height: var(--web-visual-viewport-height, 100dvh) !important;
  padding: 0 0 calc(98px + env(safe-area-inset-bottom, 0px)) !important;
  overflow-x: clip !important;
}

#webApp .panel--wallet > .app-topbar,
#webApp .panel--profile > .app-topbar,
#webApp .panel--support > .app-topbar {
  width: 100% !important;
  max-width: 100% !important;
}

#webApp .wallet-shell,
#webApp .profile-shell {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: none !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
}

#webApp .wallet-stats-bar,
#webApp .wallet-promo-banner,
#webApp .wallet-request-card,
#webApp .wallet-request-history-link,
#webApp .profile-shell__top,
#webApp .wallet-benefit-card,
#webApp .wallet-shortcuts,
#webApp .profile-overview,
#webApp .wallet-menu {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

#webApp .wallet-stats-bar,
#webApp .profile-shell__top {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

#webApp .wallet-user-card {
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
}

#webApp .wallet-user-card__avatar,
#webApp .profile-avatar-upload {
  flex: 0 0 auto !important;
}

#webApp .wallet-user-card__name {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  letter-spacing: 0 !important;
}

#webApp .profile-avatar-upload {
  min-width: 0 !important;
  max-width: 84px !important;
}

#webApp .profile-avatar-upload input {
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
}

#webApp .profile-avatar-upload span {
  box-sizing: border-box !important;
  max-width: 100% !important;
  white-space: nowrap !important;
}

#webApp .wallet-request-history-link {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  justify-self: stretch !important;
}

#webApp .support-chat,
#webApp[class] .support-chat {
  box-sizing: border-box !important;
  grid-template-rows: minmax(0, 1fr) auto auto auto !important;
  gap: 0 !important;
  width: auto !important;
  max-width: none !important;
  height: calc(var(--web-visual-viewport-height, 100dvh) - 168px - env(safe-area-inset-bottom, 0px)) !important;
  min-height: 420px !important;
  margin: 0 12px !important;
}

#webApp .support-chat__messages {
  box-sizing: border-box !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 14px 12px !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overscroll-behavior: contain !important;
}

#webApp .support-message,
#webApp .support-message--agent,
#webApp .support-message--user,
#webApp .support-message--virtual {
  max-width: 88% !important;
  padding: 0 !important;
  border: 0 !important;
  color: var(--gold-ink) !important;
  background: transparent !important;
  box-shadow: none !important;
}

#webApp .support-message p,
#webApp .support-message--agent p,
#webApp .support-message--virtual p {
  padding: 10px 12px !important;
  border: 1px solid rgba(203, 151, 19, 0.28) !important;
  border-radius: 12px !important;
  color: var(--gold-ink) !important;
  background: #ffffff !important;
  box-shadow: 0 5px 14px rgba(116, 78, 0, 0.08) !important;
}

#webApp .support-message--user p {
  border-color: transparent !important;
  color: #ffffff !important;
  background: linear-gradient(135deg, #f31a45, #dc0a31) !important;
}

#webApp .support-message--user > span,
#webApp .support-message--user time {
  color: rgba(255, 255, 255, 0.84) !important;
}

#webApp .support-message__image-button {
  width: min(300px, 100%) !important;
  border: 1px solid rgba(203, 151, 19, 0.3) !important;
  background: #ffffff !important;
  box-shadow: 0 6px 16px rgba(116, 78, 0, 0.1) !important;
}

#webApp .support-message__image {
  width: 100% !important;
  max-height: 320px !important;
  object-fit: contain !important;
  background: #ffffff !important;
}

#webApp .support-chat__feedback,
#webApp .support-chat__image-preview {
  margin: 0 10px 8px !important;
}

#webApp .support-chat__composer {
  box-sizing: border-box !important;
  grid-template-columns: 50px minmax(0, 1fr) 66px !important;
  gap: 8px !important;
  width: 100% !important;
  padding: 10px !important;
}

#webApp .support-chat__attach,
#webApp .support-chat__composer > button {
  min-width: 0 !important;
  min-height: 52px !important;
}

#webApp .support-chat__composer textarea {
  box-sizing: border-box !important;
  min-width: 0 !important;
  min-height: 52px !important;
  max-height: 96px !important;
  resize: none !important;
}

@media (max-width: 380px) {
  #webApp .home-v3__game-grid,
  #webApp[class] .home-v3__game-grid {
    gap: 10px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  #webApp .home-v3__game-card,
  #webApp[class] .home-v3__game-card {
    min-height: 108px !important;
    padding: 11px 7px 8px !important;
  }

  #webApp .home-v3__game-card strong,
  #webApp[class] .home-v3__game-card strong {
    font-size: 14px !important;
  }

  #webApp .home-v3__game-card em,
  #webApp[class] .home-v3__game-card em {
    font-size: 12px !important;
  }

  #webApp .home-v3__enter,
  #webApp[class] .home-v3__enter {
    min-width: 68px !important;
    height: 30px !important;
    padding: 0 8px !important;
    font-size: 11px !important;
  }

  #webApp .home-v3__game-emblem,
  #webApp[class] .home-v3__game-emblem {
    right: -4px !important;
    bottom: -5px !important;
    width: 70px !important;
    height: 53px !important;
  }

  #webApp .home-v3__game-balls,
  #webApp[class] .home-v3__game-balls {
    right: 23px !important;
    bottom: 5px !important;
    transform: scale(0.86) !important;
    transform-origin: right bottom !important;
  }

  #webApp .support-chat,
  #webApp[class] .support-chat {
    margin-left: 10px !important;
    margin-right: 10px !important;
  }

  #webApp .support-chat__composer {
    grid-template-columns: 46px minmax(0, 1fr) 60px !important;
    gap: 6px !important;
    padding: 8px !important;
  }
}

/* Homepage category navigation. */
#webApp .home-v3__game-tabs,
#webApp[class] .home-v3__game-tabs {
  display: grid !important;
  grid-template-columns: repeat(var(--home-game-tab-count, 1), minmax(0, 1fr)) !important;
}

#webApp .home-v3__game-tab,
#webApp[class] .home-v3__game-tab {
  min-width: 0 !important;
  white-space: nowrap !important;
}

#webApp .home-v3__game-card--redEnvelopeBull,
#webApp[class] .home-v3__game-card--redEnvelopeBull {
  border-color: rgba(166, 25, 44, 0.26) !important;
  color: #45101a !important;
  background:
    radial-gradient(circle at 15% 18%, rgba(255, 213, 104, 0.52) 0 21px, transparent 22px),
    linear-gradient(135deg, #fffdf8 0%, #fff2d7 54%, #ffe1dc 100%) !important;
}

#webApp .home-v3__game-card--redEnvelopeBull .home-v3__enter {
  border-color: #b3122d !important;
  color: #ffffff !important;
  background: linear-gradient(135deg, #d8273e, #a70e28) !important;
}

#webApp .home-v3__game-card .home-v3__red-envelope-art,
#webApp[class] .home-v3__game-card .home-v3__red-envelope-art {
  position: absolute !important;
  inset: auto 12px -8px auto !important;
  z-index: 3 !important;
  width: 66px !important;
  height: 82px !important;
  display: grid !important;
  place-items: center !important;
  border: 2px solid rgba(127, 6, 25, 0.36) !important;
  border-radius: 8px 8px 4px 4px !important;
  color: #8b1325 !important;
  background: linear-gradient(145deg, #ef4054 0%, #b40e2b 72%) !important;
  box-shadow: 0 10px 18px rgba(129, 8, 29, 0.22) !important;
  transform: rotate(7deg) !important;
}

#webApp .home-v3__game-card .home-v3__red-envelope-art i,
#webApp[class] .home-v3__game-card .home-v3__red-envelope-art i {
  position: absolute !important;
  inset: 0 0 auto !important;
  width: auto !important;
  height: 29px !important;
  border: 0 !important;
  border-radius: 7px 7px 50% 50% !important;
  background: #ff6570 !important;
  box-shadow: none !important;
  transform: none !important;
}

#webApp .home-v3__game-card .home-v3__red-envelope-art b,
#webApp[class] .home-v3__game-card .home-v3__red-envelope-art b {
  position: relative !important;
  z-index: 2 !important;
  width: 29px !important;
  height: 29px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 50% !important;
  color: #7b3111 !important;
  background: linear-gradient(145deg, #fff1a9, #e7b52d) !important;
  font-size: 16px !important;
  line-height: 1 !important;
}

#webApp .home-v3__game-card .home-v3__red-envelope-cow,
#webApp[class] .home-v3__game-card .home-v3__red-envelope-cow {
  position: absolute !important;
  right: -2px !important;
  bottom: -4px !important;
  z-index: 3 !important;
  width: 116px !important;
  height: 92px !important;
  object-fit: contain !important;
  object-position: right bottom !important;
  pointer-events: none !important;
  filter: drop-shadow(0 7px 8px rgba(112, 15, 34, 0.16)) !important;
}

@media (max-width: 420px) {
  #webApp .home-v3__game-card .home-v3__red-envelope-cow,
  #webApp[class] .home-v3__game-card .home-v3__red-envelope-cow {
    right: -6px !important;
    width: 96px !important;
    height: 80px !important;
  }
}

/* Four-game red-envelope homepage shelf. */
#webApp .home-v3__game-card--baccarat {
  border-color: rgba(15, 102, 78, 0.34) !important;
  color: #123d32 !important;
  background: radial-gradient(circle at 82% 24%, rgba(231, 193, 96, 0.48), transparent 28%), linear-gradient(135deg, #f8fff9, #d9eee6) !important;
}

#webApp .home-v3__game-card--baccarat .home-v3__enter {
  border-color: #b3122d !important;
  color: #ffffff !important;
  background: linear-gradient(135deg, #d8273e, #a70e28) !important;
}

#webApp .home-v3__game-art {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 3;
  width: 88px;
  height: 88px;
  border-radius: 10px;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
  filter: drop-shadow(0 7px 8px rgba(20, 30, 50, 0.18));
}

#webApp .home-v3__game-card--baccarat .home-v3__game-art {
  mix-blend-mode: multiply;
}

#webApp .home-v3__game-card--baccarat > div,
#webApp .home-v3__game-card--fishing > div {
  position: relative;
  z-index: 4;
}

#webApp .home-v3__baccarat-mark {
  position: absolute;
  right: 14px;
  bottom: 9px;
  color: #8e1729;
  font-family: Georgia, serif;
  font-size: 42px;
  font-weight: 900;
  transform: rotate(8deg);
}

#webApp .home-v3__game-card--fishing {
  border-color: rgba(13, 112, 138, 0.38) !important;
  color: #133e55 !important;
  background:
    radial-gradient(circle at 76% 25%, rgba(255, 255, 255, 0.82) 0 4px, transparent 5px),
    radial-gradient(circle at 88% 38%, rgba(255, 255, 255, 0.64) 0 6px, transparent 7px),
    linear-gradient(135deg, #f3ffff 0%, #c9edf0 100%) !important;
}

#webApp .home-v3__game-card--fishing > div {
  position: relative;
  z-index: 4;
  max-width: 58% !important;
}

#webApp .home-v3__game-card--fishing .home-v3__enter {
  border-color: #b3122d !important;
  color: #ffffff !important;
  background: linear-gradient(135deg, #d8273e, #a70e28) !important;
}

#webApp .home-v3__fishing-mark {
  position: absolute;
  right: 17px;
  bottom: 15px;
  z-index: 3;
  width: 60px;
  height: 36px;
  border: 2px solid rgba(12, 99, 123, 0.42);
  border-radius: 54% 46% 49% 51% / 57% 47% 53% 43%;
  background: linear-gradient(145deg, #59d5dc 0%, #1a9db6 68%, #157f9d 100%);
  box-shadow: 0 8px 13px rgba(20, 103, 126, 0.22);
  transform: rotate(-11deg);
}

#webApp .home-v3__fishing-mark::before {
  content: "";
  position: absolute;
  top: 7px;
  right: -17px;
  width: 21px;
  height: 22px;
  border-radius: 3px 14px 14px 3px;
  background: #167f9b;
  clip-path: polygon(0 50%, 100% 0, 100% 100%);
}

#webApp .home-v3__fishing-mark::after {
  content: "";
  position: absolute;
  top: 10px;
  left: 14px;
  width: 7px;
  height: 7px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: #163e52;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.38);
}

#webApp .home-v3__game-card--baccarat > div,
#webApp .home-v3__game-card--fishing > div {
  max-width: calc(100% - 94px) !important;
}

#webApp .home-v3__game-card--redEnvelopeMine,
#webApp[class] .home-v3__game-card--redEnvelopeMine {
  border-color: rgba(156, 20, 43, 0.28) !important;
  color: #42101a !important;
  background:
    radial-gradient(circle at 14% 16%, rgba(255, 217, 113, 0.46) 0 20px, transparent 21px),
    linear-gradient(135deg, #fffdf8 0%, #fff0dc 55%, #ffdce1 100%) !important;
}

#webApp .home-v3__game-card--redEnvelope28,
#webApp[class] .home-v3__game-card--redEnvelope28 {
  border-color: rgba(27, 111, 90, 0.24) !important;
  color: #143d34 !important;
  background:
    radial-gradient(circle at 15% 18%, rgba(238, 197, 75, 0.42) 0 20px, transparent 21px),
    linear-gradient(135deg, #fffef8 0%, #f1f7e8 52%, #d7eee6 100%) !important;
}

#webApp .home-v3__game-card--redEnvelopeDragon,
#webApp[class] .home-v3__game-card--redEnvelopeDragon {
  border-color: rgba(177, 65, 38, 0.25) !important;
  color: #4a2118 !important;
  background:
    radial-gradient(circle at 14% 16%, rgba(255, 225, 117, 0.5) 0 20px, transparent 21px),
    linear-gradient(135deg, #fffdf6 0%, #fff1cf 52%, #ffe0d4 100%) !important;
}

#webApp .home-v3__game-card--redEnvelopeBull > div,
#webApp .home-v3__game-card--redEnvelopeMine > div,
#webApp .home-v3__game-card--redEnvelope28 > div,
#webApp .home-v3__game-card--redEnvelopeDragon > div {
  position: relative !important;
  z-index: 4 !important;
  max-width: 62% !important;
}

#webApp .home-v3__game-card--redEnvelopeMine .home-v3__enter,
#webApp .home-v3__game-card--redEnvelopeDragon .home-v3__enter {
  border-color: #aa1730 !important;
  color: #ffffff !important;
  background: linear-gradient(135deg, #df3349, #a80e2a) !important;
}

#webApp .home-v3__game-card--redEnvelope28 .home-v3__enter {
  border-color: #aa1730 !important;
  color: #ffffff !important;
  background: linear-gradient(135deg, #df3349, #a80e2a) !important;
}

#webApp .home-v3__game-card .home-v3__red-envelope-illustration,
#webApp[class] .home-v3__game-card .home-v3__red-envelope-illustration {
  position: absolute !important;
  right: -5px !important;
  bottom: -3px !important;
  z-index: 3 !important;
  width: 106px !important;
  height: 88px !important;
  object-fit: contain !important;
  object-position: right bottom !important;
  pointer-events: none !important;
  filter: drop-shadow(0 7px 8px rgba(84, 20, 31, 0.14)) !important;
}

@media (max-width: 380px) {
  #webApp .home-v3__game-card .home-v3__red-envelope-illustration,
  #webApp[class] .home-v3__game-card .home-v3__red-envelope-illustration {
    right: -8px !important;
    width: 88px !important;
    height: 74px !important;
  }
}

/* Homepage red-envelope cards use the supplied full-card artwork. */
#webApp #home-game-redEnvelope .home-v3__game-grid,
#webApp[class] #home-game-redEnvelope .home-v3__game-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

#webApp #home-game-redEnvelope .home-v3__game-card,
#webApp[class] #home-game-redEnvelope .home-v3__game-card {
  min-height: 0 !important;
  aspect-ratio: 335 / 239 !important;
  border-radius: 8px !important;
}

#webApp #home-game-redEnvelope .home-v3__game-card--photo,
#webApp[class] #home-game-redEnvelope .home-v3__game-card--photo {
  padding: 16px 10px 10px !important;
  border-color: rgba(122, 163, 184, 0.24) !important;
  background: #f5fbff !important;
  box-shadow: 0 7px 16px rgba(66, 105, 127, 0.12) !important;
}

#webApp #home-game-redEnvelope .home-v3__game-card--photo > div,
#webApp[class] #home-game-redEnvelope .home-v3__game-card--photo > div {
  position: relative !important;
  z-index: 4 !important;
  max-width: 58% !important;
}

#webApp #home-game-redEnvelope .home-v3__game-card--photo strong,
#webApp[class] #home-game-redEnvelope .home-v3__game-card--photo strong {
  color: #34425f !important;
  font-size: 18px !important;
}

#webApp #home-game-redEnvelope .home-v3__game-card--photo em,
#webApp[class] #home-game-redEnvelope .home-v3__game-card--photo em {
  color: #69748b !important;
  font-size: 13px !important;
}

#webApp #home-game-redEnvelope .home-v3__game-card--photo .home-v3__red-envelope-illustration,
#webApp[class] #home-game-redEnvelope .home-v3__game-card--photo .home-v3__red-envelope-illustration {
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  filter: none !important;
}

#webApp #home-game-redEnvelope .home-v3__game-card--photo .home-v3__enter,
#webApp[class] #home-game-redEnvelope .home-v3__game-card--photo .home-v3__enter {
  position: relative !important;
  z-index: 4 !important;
  min-width: 76px !important;
  height: 31px !important;
  padding: 0 10px !important;
  font-size: 11px !important;
}

#webApp #home-game-redEnvelope .home-v3__hot,
#webApp #home-game-redEnvelope .home-v3__game-orb {
  display: none !important;
}

@media (max-width: 380px) {
  #webApp #home-game-redEnvelope .home-v3__game-grid,
  #webApp[class] #home-game-redEnvelope .home-v3__game-grid {
    gap: 9px !important;
  }

  #webApp #home-game-redEnvelope .home-v3__game-card--photo,
  #webApp[class] #home-game-redEnvelope .home-v3__game-card--photo {
    padding: 13px 8px 8px !important;
  }

  #webApp #home-game-redEnvelope .home-v3__game-card--photo strong,
  #webApp[class] #home-game-redEnvelope .home-v3__game-card--photo strong {
    font-size: 16px !important;
  }

  #webApp #home-game-redEnvelope .home-v3__game-card--photo em,
  #webApp[class] #home-game-redEnvelope .home-v3__game-card--photo em {
    font-size: 11px !important;
  }
}

/* Red-envelope result disclosure: every packet amount remains visible after settlement. */
.red-envelope-history-results {
  display: grid;
  gap: 6px;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid #eee8e3;
}

.red-envelope-history-result {
  min-width: 0;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid #ebe5df;
  border-radius: 6px;
  background: #faf9f7;
}

.red-envelope-history-result.is-me {
  border-color: rgba(167, 22, 46, 0.3);
  background: #fff4f5;
}

.red-envelope-history-result > b,
.red-envelope-result-list article > b {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #74300f;
  background: #ebc45a;
  font-size: 10px;
}

.red-envelope-history-result > div,
.red-envelope-result-list article > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.red-envelope-history-result > div > strong,
.red-envelope-history-result > div > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.red-envelope-history-result > div > strong {
  color: #38292b;
  font-size: 11px;
}

.red-envelope-history-result > div > span {
  color: #827476;
  font-size: 9px;
}

.red-envelope-history-result__profit {
  justify-items: end;
  text-align: right;
}

.red-envelope-history-result__profit strong {
  font-size: 11px !important;
}

.red-envelope-history-result__profit span {
  font-size: 9px !important;
}

.red-envelope-result-modal-shell {
  align-items: center;
}

.red-envelope-result-modal {
  width: min(100%, 496px);
  max-height: calc(var(--web-visual-viewport-height, 100dvh) - 36px);
  padding: 18px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: 0 22px 60px rgba(36, 17, 21, 0.32);
}

.red-envelope-result-modal > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.red-envelope-result-modal > header > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.red-envelope-result-modal > header span {
  color: #aa7a22;
  font-size: 9px;
  font-weight: 800;
}

.red-envelope-result-modal > header strong {
  color: #2f2022;
  font-size: 20px;
  font-weight: 850;
}

.red-envelope-result-modal > header em {
  color: #918284;
  font-size: 10px;
  font-style: normal;
}

.red-envelope-result-modal > header button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #665759;
  background: #eee9e4;
  font-size: 23px;
  line-height: 1;
}

.red-envelope-result-summary {
  display: grid;
  margin-bottom: 12px;
  padding: 11px 0;
  border: 1px solid #ead8a5;
  border-radius: 7px;
  background: #fff8df;
}

.red-envelope-quick-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.red-envelope-quick-values button,
.red-envelope-digit-picker button {
  min-height: 38px;
  border: 1px solid rgba(159, 111, 21, 0.24);
  border-radius: 6px;
  color: #5d4526;
  background: #fffaf0;
  font-weight: 800;
}

.red-envelope-quick-values button.is-active,
.red-envelope-digit-picker button.is-active {
  border-color: #b51a34;
  color: #ffffff;
  background: linear-gradient(135deg, #dc3048, #a70e2a);
  box-shadow: 0 5px 12px rgba(153, 17, 43, 0.2);
}

.red-envelope-digit-picker,
.red-envelope-fixed-game {
  display: grid;
  gap: 9px;
  padding: 13px;
  border: 1px solid #eadfce;
  border-radius: 7px;
  background: #fffdf8;
}

.red-envelope-digit-picker > span,
.red-envelope-fixed-game > span {
  color: #7e7072;
  font-size: 12px;
  font-weight: 800;
}

.red-envelope-digit-picker > div {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.red-envelope-fixed-game strong {
  color: #392629;
  font-size: 15px;
}

.red-envelope-fixed-game em {
  color: #8b777a;
  font-size: 11px;
  font-style: normal;
}

.red-envelope-result-summary {
  grid-template-columns: repeat(auto-fit, minmax(78px, 1fr));
}

.red-envelope-game--mine .red-envelope-topbar {
  background: linear-gradient(135deg, #781124, #202027 72%);
}

.red-envelope-game--mine .red-envelope-account::after {
  content: "MINE";
}

.red-envelope-game--bar28 .red-envelope-topbar {
  background: linear-gradient(135deg, #174f43, #0f2d28 72%);
}

.red-envelope-game--bar28 .red-envelope-account::after {
  content: "TWO EIGHT";
  font-size: 32px;
}

.red-envelope-game--dragon .red-envelope-topbar {
  background: linear-gradient(135deg, #9b261d, #6f1024 72%);
}

.red-envelope-game--dragon .red-envelope-account::after {
  content: "DRAGON";
  font-size: 34px;
}

.red-envelope-game--bar28 .red-envelope-submit,
.red-envelope-game--bar28 .red-envelope-primary-action,
.red-envelope-game--bar28 .red-envelope-create-button {
  border-color: #981329;
  background: linear-gradient(135deg, #d12a42, #941126);
  box-shadow: 0 7px 15px rgba(151, 17, 39, 0.18);
}

.redpacket-game-filter {
  display: flex;
  gap: 7px;
  padding: 0 1px 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.redpacket-game-filter::-webkit-scrollbar {
  display: none;
}

.redpacket-game-filter button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid #e4d9c8;
  border-radius: 6px;
  color: #786669;
  background: #fffdf8;
  font-size: 12px;
  font-weight: 800;
}

.redpacket-game-filter button.is-active {
  border-color: #b51a34;
  color: #ffffff;
  background: #b51a34;
}

/* Chat-style red-envelope room, matching the mobile quick-packet workflow. */

.red-envelope-page .red-envelope-shell {
  padding-bottom: 142px;
  background: #edf3ff;
}

.red-envelope-page .red-envelope-topbar {
  top: 0;
  z-index: 30;
  padding: env(safe-area-inset-top) 20px 0;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  color: #15243c;
  background: #ffffff;
  box-shadow: 0 1px 0 #e5e9f2;
}

.red-envelope-page .red-envelope-icon-button,
.red-envelope-page .red-envelope-topbar__spacer {
  width: 44px;
  height: 44px;
}

.red-envelope-page .red-envelope-icon-button {
  color: #10243d;
  background: transparent;
  font-size: 45px;
  font-weight: 300;
  line-height: 36px;
}

.red-envelope-page .red-envelope-topbar__title {
  display: grid;
  place-items: center;
}

.red-envelope-page .red-envelope-topbar__title strong {
  color: #17233a;
  font-size: 28px;
  letter-spacing: 0;
}

.red-envelope-page .red-envelope-account {
  position: relative;
  z-index: 10;
  display: grid;
  align-items: center;
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  color: #ffffff;
  background:
    linear-gradient(45deg, transparent 43%, rgba(255,255,255,.035) 44% 56%, transparent 57%) 0 0 / 74px 74px,
    linear-gradient(135deg, #6f92f6 0%, #486ee0 100%);
  box-shadow: 0 8px 22px rgba(48, 82, 175, 0.16);
}

.red-envelope-page .red-envelope-account::after {
  display: none;
}

.red-envelope-page .red-envelope-account__avatar {
  color: #ffffff;
  background: rgba(255,255,255,.28);
  box-shadow: none;
}

.red-envelope-page .red-envelope-account__balance {
  justify-items: start;
  grid-auto-flow: column;
  justify-content: start;
  gap: 4px;
}

.red-envelope-page .red-envelope-account__balance span,
.red-envelope-page .red-envelope-account__balance strong {
  color: #ffffff;
  font-weight: 500;
  white-space: nowrap;
}

.red-envelope-account__actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(64px, 1fr));
  gap: 14px;
}

.red-envelope-account__actions button {
  min-width: 72px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 6px;
  color: #263557;
  background: rgba(255,255,255,.9);
  font-size: 16px;
  box-shadow: 0 3px 8px rgba(24, 53, 139, 0.12);
}

.red-envelope-page .red-envelope-content {
  padding: 14px 24px 24px;
}

.red-envelope-section-head--lobby {
  min-height: 22px;
  margin-bottom: 4px;
  opacity: .72;
}

.red-envelope-section-head--lobby span,
.red-envelope-section-head--lobby strong {
  font-size: 10px;
}

.red-envelope-page .red-envelope-round-list {
  gap: 24px;
}

.red-envelope-page .red-envelope-round {
  position: relative;
  min-height: 176px;
  padding: 0 0 0 94px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.red-envelope-page .red-envelope-round::before {
  display: none;
}

.red-envelope-page .red-envelope-round__head {
  min-height: 58px;
  align-items: center;
  padding: 0;
  border: 0;
}

.red-envelope-page .red-envelope-round__banker {
  position: absolute;
  top: 4px;
  left: 0;
  width: 100%;
  align-items: center;
}

.red-envelope-page .red-envelope-round__avatar {
  width: 70px;
  height: 70px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  color: #53647e;
  background: #d7dfec;
  box-shadow: 0 2px 7px rgba(50, 65, 96, .15);
  font-size: 22px;
}

.red-envelope-page .red-envelope-round__banker > div {
  position: absolute;
  top: 1px;
  left: 94px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.red-envelope-page .red-envelope-round__banker strong {
  color: #8995a9;
  font-size: 15px;
  font-weight: 500;
}

.red-envelope-page .red-envelope-round__banker span {
  color: #536a91;
  font-size: 10px;
  font-weight: 800;
}

.red-envelope-page .red-envelope-round__status {
  display: none;
}

.red-envelope-chat-packet {
  position: relative;
  min-height: 142px;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px 18px 34px 26px;
  border-radius: 11px;
  color: #ffffff;
  background: #ff9d37;
  box-shadow: 0 8px 18px rgba(205, 120, 26, .12);
}

.red-envelope-chat-packet::before {
  content: "";
  position: absolute;
  top: 58px;
  left: -30px;
  border-width: 19px 30px 19px 0;
  border-style: solid;
  border-color: transparent #ff9d37 transparent transparent;
}

.red-envelope-chat-packet__icon {
  width: 52px;
  height: 66px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: #9d5d13;
  background: #f34e52;
}

.red-envelope-chat-packet__icon::before {
  content: "";
  position: absolute;
  width: 52px;
  height: 25px;
  margin-top: -40px;
  border-radius: 4px 4px 50% 50%;
  background: #ff6262;
}

.red-envelope-chat-packet__icon b {
  position: relative;
  z-index: 1;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #a75f14;
  background: #ffd34d;
  font-size: 12px;
}

.red-envelope-chat-packet > div {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 10px;
}

.red-envelope-chat-packet strong,
.red-envelope-chat-packet span,
.red-envelope-chat-packet em {
  color: #ffffff;
  font-style: normal;
}

.red-envelope-chat-packet strong,
.red-envelope-chat-packet span {
  font-size: 18px;
}

.red-envelope-chat-packet em {
  grid-column: 1 / -1;
  font-size: 17px;
  font-weight: 700;
}

.red-envelope-chat-packet small {
  position: absolute;
  right: 18px;
  bottom: 0;
  left: 44px;
  min-height: 30px;
  padding-top: 7px;
  border-top: 1px solid rgba(255,255,255,.85);
  color: #ffffff;
  font-size: 14px;
}

.red-envelope-page .red-envelope-round__money,
.red-envelope-page .red-envelope-seat-list,
.red-envelope-page .red-envelope-my-packet {
  display: none;
}

.red-envelope-page .red-envelope-round__actions {
  position: absolute;
  right: 18px;
  bottom: 38px;
  z-index: 3;
  width: auto;
}

.red-envelope-page .red-envelope-round__actions button {
  min-height: 34px;
  padding: 0 15px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 5px;
  color: #df7918;
  background: #ffffff;
  box-shadow: none;
  font-size: 12px;
}

.red-envelope-page .red-envelope-round__actions .red-envelope-grab-action span,
.red-envelope-page .red-envelope-round__actions .red-envelope-grab-action em {
  display: none;
}

.red-envelope-page .red-envelope-waiting-note {
  max-width: 128px;
  min-height: 0;
  padding: 0;
  border: 0;
  color: rgba(255,255,255,.9);
  background: transparent;
  font-size: 10px;
  text-align: right;
}

.red-envelope-page .red-envelope-bottom-nav {
  z-index: 40;
  box-sizing: border-box;
  display: block;
  margin: 0;
  border-top: 1px solid #e4e9f1;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(14px);
}

.red-envelope-bottom-nav nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 10px;
}

.red-envelope-page .red-envelope-bottom-nav nav button {
  min-width: 0;
  grid-auto-flow: column;
  place-content: center;
  gap: 6px;
  padding: 0 8px;
  border: 1px solid #d9dde5;
  border-radius: 24px;
  color: #444b58;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(34, 48, 75, .05);
}

.red-envelope-page .red-envelope-bottom-nav nav button span,
.red-envelope-page .red-envelope-bottom-nav nav button strong {
  color: inherit;
  font-size: 16px;
  font-weight: 500;
}

.red-envelope-page .red-envelope-bottom-nav nav button.is-active {
  border-color: #5e80df;
  color: #4f72d6;
}

.red-envelope-page .red-envelope-bottom-nav .red-envelope-quick-create {
  width: 100%;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #86a7f5;
  border-radius: 7px;
  color: #4f72da;
  background: #ffffff;
  font-size: 19px;
  font-weight: 800;
  box-shadow: inset 0 0 16px rgba(93, 132, 230, .08);
}

.red-envelope-page .red-envelope-bottom-nav .red-envelope-quick-create:disabled {
  opacity: .48;
}

@media (max-width: 520px) {
  .red-envelope-page .red-envelope-account {
    grid-template-columns: 44px minmax(76px, 1fr) auto;
    gap: 6px;
    padding: 12px 10px;
  }

  .red-envelope-page .red-envelope-account__avatar {
    width: 44px;
    height: 44px;
  }

  .red-envelope-account__actions {
    gap: 8px;
  }

  .red-envelope-account__actions button {
    min-width: 54px;
    min-height: 38px;
    padding: 0 7px;
    font-size: 13px;
  }

  .red-envelope-page .red-envelope-account__balance span,
  .red-envelope-page .red-envelope-account__balance strong {
    font-size: 12px;
  }

  .red-envelope-page .red-envelope-content {
    padding-right: 18px;
    padding-left: 18px;
  }

  .red-envelope-page .red-envelope-round {
    padding-left: 76px;
  }

  .red-envelope-page .red-envelope-round__avatar {
    width: 60px;
    height: 60px;
  }

  .red-envelope-page .red-envelope-round__banker > div {
    left: 76px;
  }

  .red-envelope-page .red-envelope-bottom-nav {
    padding-right: 12px;
    padding-left: 12px;
  }

  .red-envelope-bottom-nav nav {
    gap: 8px;
  }

  .red-envelope-page .red-envelope-bottom-nav nav button span,
  .red-envelope-page .red-envelope-bottom-nav nav button strong {
    font-size: 14px;
  }
}

.red-envelope-chat-packet[role="button"] {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.red-envelope-chat-packet[role="button"]:active {
  transform: scale(.992);
}

.red-envelope-packet-layer {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 0;
  background: rgba(16, 24, 38, .56);
}

.red-envelope-packet-cover {
  position: relative;
  width: min(100%, 500px);
  height: min(100dvh, 800px);
  overflow: hidden;
  border-radius: 14px;
  color: #ffe7ad;
  background: #fa5548;
  box-shadow: 0 26px 80px rgba(60, 20, 17, .34);
}

.red-envelope-packet-cover::before {
  content: "";
  position: absolute;
  right: -16%;
  bottom: 160px;
  left: -16%;
  height: 310px;
  border-bottom: 3px solid rgba(173, 48, 37, .22);
  border-radius: 0 0 50% 50%;
  background: #fb5c50;
  box-shadow: 0 12px 15px rgba(135, 39, 31, .15);
}

.red-envelope-packet-back {
  position: absolute;
  top: calc(18px + env(safe-area-inset-top));
  left: 18px;
  z-index: 3;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  color: #ffe7ad;
  background: transparent;
  font-size: 42px;
  line-height: 36px;
}

.red-envelope-packet-owner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding-top: 90px;
}

.red-envelope-packet-owner > span,
.red-envelope-packet-info__hero > div > span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 7px;
  color: #ffffff;
  background: #718094;
  font-size: 18px;
}

.red-envelope-packet-owner img,
.red-envelope-packet-seats img,
.red-envelope-packet-info__hero img,
.red-envelope-packet-info__avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.red-envelope-packet-owner strong,
.red-envelope-packet-info__hero strong {
  font-size: 20px;
  letter-spacing: 0;
}

.red-envelope-packet-stake {
  position: relative;
  z-index: 2;
  margin-top: 30px;
  text-align: center;
  font-size: 29px;
}

.red-envelope-packet-seats {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(5, 58px);
  justify-content: center;
  gap: 28px;
  margin-top: 80px;
}

.red-envelope-packet-seats > span {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #ffffff;
  background: #8a5960;
  font-size: 20px;
}

.red-envelope-packet-seats > span.is-empty {
  color: rgba(136, 143, 151, .18);
  background: rgba(255,255,255,.86);
}

.red-envelope-packet-open {
  position: absolute;
  z-index: 4;
  bottom: 74px;
  left: 50%;
  width: 128px;
  height: 128px;
  padding: 0;
  border: 10px solid rgba(226, 84, 64, .44);
  border-radius: 50%;
  color: #3f4147;
  background: #f3d496;
  box-shadow: 0 7px 14px rgba(111, 38, 30, .25);
  font-family: STKaiti, KaiTi, serif;
  font-size: 46px;
  transform: translateX(-50%);
}

.red-envelope-packet-open:disabled {
  opacity: .72;
}

.red-envelope-packet-layer--info {
  place-items: stretch center;
  background: #ffffff;
}

.red-envelope-packet-info {
  width: min(100%, 630px);
  min-height: var(--web-visual-viewport-height, 100dvh);
  overflow-y: auto;
  color: #1d2d4c;
  background: #ffffff;
}

.red-envelope-packet-info > header {
  min-height: 72px;
  display: grid;
  grid-template-columns: 50px 1fr 50px;
  align-items: center;
  padding: env(safe-area-inset-top) 12px 0;
  color: #ffffff;
  background: #fa443f;
}

.red-envelope-packet-info > header button {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  color: #ffffff;
  background: transparent;
  font-size: 42px;
  line-height: 35px;
}

.red-envelope-packet-info > header strong {
  text-align: center;
  font-size: 19px;
}

.red-envelope-packet-info__hero {
  position: relative;
  min-height: 176px;
  display: grid;
  place-content: center;
  gap: 18px;
  overflow: hidden;
  color: #ffe7ad;
  background: #fa5548;
}

.red-envelope-packet-info__hero::after {
  content: "";
  position: absolute;
  right: -10%;
  bottom: -80px;
  left: -10%;
  height: 120px;
  border: 2px solid #f3c04d;
  border-radius: 50% 50% 0 0;
  background: #ffffff;
}

.red-envelope-packet-info__hero > div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.red-envelope-packet-info__hero p {
  z-index: 1;
  margin: 0;
  text-align: center;
  font-size: 20px;
}

.red-envelope-packet-info__count {
  min-height: 64px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  border-bottom: 1px solid #e7eaf0;
  color: #516487;
  font-size: 17px;
}

.red-envelope-packet-info__list article {
  min-height: 112px;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 82px 58px;
  gap: 14px;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid #edf0f4;
}

.red-envelope-packet-info__avatar {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #ffffff;
  background: #77849a;
  font-size: 22px;
}

.red-envelope-packet-info__list article > div {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.red-envelope-packet-info__list article > div > strong,
.red-envelope-packet-info__list article > div > small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.red-envelope-packet-info__list article > div > strong {
  color: #16223a;
  font-size: 17px;
}

.red-envelope-packet-info__list article > div > small {
  color: #9aa2b1;
  font-size: 13px;
}

.red-envelope-packet-info__result,
.red-envelope-packet-info__amount {
  justify-items: end;
  text-align: right;
}

.red-envelope-packet-info__result span,
.red-envelope-packet-info__amount span {
  color: #52658a;
  font-size: 14px;
}

.red-envelope-packet-info__result strong,
.red-envelope-packet-info__amount strong {
  color: #263b65 !important;
  font-size: 16px !important;
}

.red-envelope-create-modal--quick {
  width: min(100%, 628px);
  padding: 22px;
  border-radius: 0;
  background: #ffffff;
}

.red-envelope-create-modal--quick > header {
  align-items: center;
  justify-content: center;
  margin: -4px 0 28px;
  text-align: center;
}

.red-envelope-create-modal--quick > header > div span {
  display: none;
}

.red-envelope-create-modal--quick > header strong {
  color: #263b65;
  font-size: 22px;
}

.red-envelope-create-modal--quick > header button {
  position: absolute;
  top: 18px;
  right: 18px;
  color: #aeb5c1;
  background: transparent;
  font-size: 36px;
}

.red-envelope-create-modal--quick > label:first-of-type {
  padding: 0;
  border: 0;
  background: transparent;
}

.red-envelope-create-modal--quick > label:first-of-type > span {
  color: #102b50;
  font-size: 16px;
}

.red-envelope-create-modal--quick .red-envelope-money-input {
  border-width: 0 0 1px;
  border-radius: 0;
  background: #ffffff;
}

.red-envelope-create-modal--quick .red-envelope-money-input input {
  color: #233d68;
}

.red-envelope-quick-label {
  display: block;
  margin: 18px 0 10px;
  color: #61708d;
  font-size: 15px;
  text-align: center;
}

.red-envelope-stake-presets {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.red-envelope-stake-presets button {
  min-height: 48px;
  padding: 0 6px;
  border: 0;
  border-radius: 6px;
  color: #29416b;
  background: #e9edf3;
  font-size: 16px;
}

.red-envelope-stake-presets button.is-active {
  color: #ffffff;
  background: #fb2636;
}

.red-envelope-create-modal--quick .red-envelope-fixed-game {
  padding: 10px 12px;
  background: #f8f9fb;
}

.red-envelope-create-modal--quick .red-envelope-submit {
  min-height: 54px;
  border-radius: 28px;
  background: #fa2635;
}

/* Red-envelope mobile chat viewport. */
.red-envelope-page {
  overflow: hidden;
  background: #0b0e13;
}

.red-envelope-page .red-envelope-shell {
  width: 100%;
  max-width: 430px;
  height: var(--web-visual-viewport-height, 100dvh);
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
}

.red-envelope-page .red-envelope-topbar {
  position: relative;
  min-height: 72px;
}

.red-envelope-page .red-envelope-chat-room {
  min-height: 0;
  display: block;
  padding: 10px 14px 16px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.red-envelope-page .red-envelope-chat-room::-webkit-scrollbar {
  display: none;
}

.red-envelope-page .red-envelope-chat-room .red-envelope-section-head--lobby {
  top: -10px;
  z-index: 8;
  min-height: 34px;
  margin: 0 -14px 6px;
  padding: 7px 14px 3px;
  background: linear-gradient(#edf3ff 82%, rgba(237,243,255,0));
}

.red-envelope-page .red-envelope-chat-room .red-envelope-round-list {
  min-height: calc(100% - 40px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 18px;
}

.red-envelope-page .red-envelope-chat-room .red-envelope-round {
  flex: 0 0 auto;
}

.red-envelope-page .red-envelope-chat-room .red-envelope-round__avatar {
  border-radius: 8px;
}

.red-envelope-page .red-envelope-chat-room .red-envelope-chat-packet {
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 14px 32px 20px;
  border-radius: 8px;
}

.red-envelope-page .red-envelope-chat-room .red-envelope-chat-packet::before {
  top: 50px;
  left: -24px;
  border-width: 16px 24px 16px 0;
}

.red-envelope-page .red-envelope-chat-room .red-envelope-chat-packet__icon {
  width: 46px;
  height: 62px;
}

.red-envelope-page .red-envelope-chat-room .red-envelope-chat-packet__icon::before {
  width: 46px;
}

.red-envelope-page .red-envelope-chat-room .red-envelope-chat-packet strong,
.red-envelope-page .red-envelope-chat-room .red-envelope-chat-packet span {
  font-size: 16px;
}

.red-envelope-page .red-envelope-chat-room .red-envelope-chat-packet em {
  font-size: 15px;
}

.red-envelope-page .red-envelope-chat-room .red-envelope-chat-packet small {
  font-size: 12px;
}

.red-envelope-page .red-envelope-bottom-nav {
  position: relative;
  right: auto;
  bottom: auto;
  left: auto;
  width: 100%;
  max-width: none;
  min-height: 122px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  transform: none;
}

.red-envelope-page .red-envelope-bottom-nav nav {
  gap: 8px;
  margin-bottom: 8px;
}

.red-envelope-page .red-envelope-bottom-nav nav button {
  min-height: 42px;
}

.red-envelope-page .red-envelope-bottom-nav .red-envelope-quick-create {
  min-height: 52px;
}

.red-envelope-page .red-envelope-chat-room .red-envelope-empty {
  min-height: calc(100% - 40px);
  align-content: end;
  padding-bottom: 28px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.red-envelope-packet-cover,
.red-envelope-packet-info {
  max-width: 430px;
}

@media (min-width: 431px) {
  .red-envelope-page .red-envelope-shell {
    box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 20px 80px rgba(0,0,0,.5);
  }
}

.red-envelope-page .red-envelope-chat-room .red-envelope-chat-packet {
  padding-top: 9px;
}

.red-envelope-page .red-envelope-chat-room .red-envelope-chat-packet > div {
  position: relative;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto auto;
  align-content: center;
  gap: 3px 8px;
}

.red-envelope-page .red-envelope-chat-room .red-envelope-chat-packet__deposit {
  position: absolute;
  right: 0;
  color: rgba(255,255,255,.96);
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.25;
  text-align: right;
  white-space: nowrap;
}

.red-envelope-chat-packet__deposit--banker {
  top: 25px;
}

.red-envelope-chat-packet__deposit--idle {
  top: 42px;
}

.red-envelope-page .red-envelope-chat-room .red-envelope-chat-packet em {
  box-sizing: border-box;
  grid-column: 1 / -1;
  grid-row: 2 / span 2;
  align-self: center;
  min-width: 0;
  padding-right: 104px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 360px) {
  .red-envelope-page .red-envelope-chat-room .red-envelope-chat-packet > div {
    column-gap: 5px;
  }

  .red-envelope-page .red-envelope-chat-room .red-envelope-chat-packet__deposit {
    font-size: 9px;
  }

  .red-envelope-page .red-envelope-chat-room .red-envelope-chat-packet em {
    padding-right: 92px;
  }
}

/* Fallback deposit row for rounds without role-specific markup. */
.red-envelope-chat-packet__deposit:not(.red-envelope-chat-packet__deposit--banker):not(.red-envelope-chat-packet__deposit--idle) {
  grid-column: 1 / -1;
  color: rgba(255,255,255,.94);
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
}

/* Red-envelope room state and standalone record page. */
.red-envelope-page .red-envelope-chat-room .red-envelope-round__actions {
  display: none;
}

.red-envelope-page .red-envelope-chat-room .red-envelope-round--settled .red-envelope-chat-packet,
.red-envelope-page .red-envelope-chat-room .red-envelope-round--cancelled .red-envelope-chat-packet {
  opacity: 1;
}

.red-envelope-page .red-envelope-chat-room .red-envelope-section-head--lobby {
  position: static;
}

.red-envelope-page #redEnvelopeApp.is-history-view .red-envelope-shell {
  grid-template-rows: minmax(0, 1fr);
}

.red-envelope-page #redEnvelopeApp.is-history-view .red-envelope-topbar,
.red-envelope-page #redEnvelopeApp.is-history-view .red-envelope-account {
  display: none;
}

.red-envelope-record-page {
  min-height: 0;
  padding: 0 14px 24px !important;
  overflow-y: auto;
  background: #f3f6fc;
}

.red-envelope-record-title {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 72px;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  margin: 0 -14px 12px;
  padding: env(safe-area-inset-top) 12px 0;
  border-bottom: 1px solid #e5e9f1;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
}

.red-envelope-record-title button {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  color: #14243c;
  background: transparent;
  font-size: 42px;
  line-height: 34px;
}

.red-envelope-record-title strong {
  color: #14243c;
  font-size: 21px;
  text-align: center;
}

.red-envelope-record-date {
  min-height: 72px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 116px;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid #dde5f3;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 5px 16px rgba(45, 73, 124, .05);
}

.red-envelope-record-date > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid #d7e3f5;
  border-radius: 7px;
  color: #5273a6;
  background: #f2f7ff;
  font-size: 20px;
}

.red-envelope-record-date > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.red-envelope-record-date small {
  color: #304a72;
  font-size: 13px;
  font-weight: 800;
}

.red-envelope-record-date strong {
  color: #12223b;
  font-size: 15px;
}

.red-envelope-record-date input {
  min-width: 0;
  height: 42px;
  padding: 0 8px;
  border: 1px solid #d7e3f5;
  border-radius: 21px;
  color: #285fb2;
  background: #f8fbff;
  font-size: 12px;
  font-weight: 700;
}

.red-envelope-record-summary {
  margin-bottom: 10px;
  overflow: hidden;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 5px 16px rgba(45, 73, 124, .05);
}

.red-envelope-record-summary > header {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border-bottom: 1px solid #e8edf5;
  color: #54709c;
  font-size: 13px;
}

.red-envelope-record-summary > header strong {
  color: #285fe6;
}

.red-envelope-record-summary > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 14px 0;
}

.red-envelope-record-summary p {
  min-width: 0;
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0 8px;
  border-right: 1px solid #e4eaf3;
  text-align: center;
}

.red-envelope-record-summary p:last-child {
  border-right: 0;
}

.red-envelope-record-summary p strong {
  overflow: hidden;
  color: #245be0;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.red-envelope-record-summary p span {
  color: #60718d;
  font-size: 12px;
}

.red-envelope-record-list {
  display: grid;
  gap: 10px;
}

.red-envelope-record-list > article {
  overflow: hidden;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 5px 16px rgba(45, 73, 124, .05);
}

.red-envelope-record-list > article > header {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #e8edf5;
}

.red-envelope-record-list > article > header > div {
  display: grid;
  gap: 5px;
}

.red-envelope-record-list > article > header small {
  color: #7d8ba2;
  font-size: 12px;
}

.red-envelope-record-list > article > header strong {
  color: #10213c;
  font-size: 20px;
}

.red-envelope-record-list > article > header b {
  padding: 4px 10px;
  border: 2px solid currentColor;
  border-radius: 5px;
  font-size: 12px;
  transform: rotate(-4deg);
}

.red-envelope-record-list > article > header b.is-settled {
  color: #099b58;
}

.red-envelope-record-list > article > header b.is-cancelled {
  color: #8b95a6;
}

.red-envelope-record-list dl {
  margin: 0;
  padding: 0 14px 8px;
}

.red-envelope-record-list dl > div {
  min-height: 48px;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid #edf1f6;
}

.red-envelope-record-list dl > div:last-child {
  border-bottom: 0;
}

.red-envelope-record-list dt {
  color: #7185a6;
  font-size: 13px;
}

.red-envelope-record-list dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: #14243d;
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.red-envelope-record-summary .is-win,
.red-envelope-record-list .is-win {
  color: #079455 !important;
}

.red-envelope-record-summary .is-loss,
.red-envelope-record-list .is-loss {
  color: #e03143 !important;
}

.red-envelope-record-empty {
  padding: 42px 16px;
  color: #8794a8;
  text-align: center;
}

@media (max-width: 520px) {
  .red-envelope-packet-cover {
    width: 100%;
    height: var(--web-visual-viewport-height, 100dvh);
    border-radius: 0;
  }

  .red-envelope-packet-seats {
    grid-template-columns: repeat(5, 48px);
    gap: 14px;
  }

  .red-envelope-packet-seats > span {
    width: 48px;
    height: 54px;
  }

  .red-envelope-packet-open {
    width: 112px;
    height: 112px;
    font-size: 40px;
  }

  .red-envelope-packet-info__list article {
    grid-template-columns: 54px minmax(0, 1fr) 66px 48px;
    gap: 9px;
    min-height: 96px;
    padding: 10px 14px;
  }

  .red-envelope-packet-info__avatar {
    width: 54px;
    height: 54px;
  }

  .red-envelope-packet-info__list article > div > strong {
    font-size: 14px;
  }

  .red-envelope-packet-info__list article > div > small,
  .red-envelope-packet-info__result span,
  .red-envelope-packet-info__amount span {
    font-size: 11px;
  }

  .red-envelope-packet-info__result strong,
  .red-envelope-packet-info__amount strong {
    font-size: 13px !important;
  }

  .red-envelope-create-modal--quick {
    max-height: calc(var(--web-visual-viewport-height, 100dvh) - 24px);
    padding: 20px 16px;
  }

  .red-envelope-stake-presets {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }
}

@media (max-width: 380px) {
  .red-envelope-digit-picker {
    padding: 10px;
  }

  .red-envelope-digit-picker > div {
    gap: 5px;
  }

  .red-envelope-digit-picker button {
    min-height: 34px;
    padding: 0;
  }
}

.red-envelope-result-summary > div {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 0 6px;
  border-right: 1px solid #ead8a5;
  text-align: center;
}

.red-envelope-result-summary > div:last-child {
  border-right: 0;
}

.red-envelope-platform-funding-note {
  display: block;
  margin-top: 7px;
  color: #7b6c62;
  font-size: 10px;
  line-height: 1.55;
}

.red-envelope-deposit-preview small {
  color: #85756d;
  font-size: 9px;
}

.red-envelope-result-summary span {
  color: #88734f;
  font-size: 9px;
}

.red-envelope-result-summary strong {
  max-width: 100%;
  overflow: hidden;
  color: #35272a;
  font-family: Bahnschrift, Arial, sans-serif;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.red-envelope-result-list {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.red-envelope-result-list article {
  min-width: 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid #e8e1da;
  border-radius: 7px;
  background: #faf9f7;
}

.red-envelope-result-list article.is-me {
  border-color: rgba(167, 22, 46, 0.34);
  background: #fff3f4;
}

.red-envelope-result-list article > div > strong,
.red-envelope-result-list article > div > span,
.red-envelope-result-list article > div > small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.red-envelope-result-list article > div > strong {
  color: #342628;
  font-size: 11px;
}

.red-envelope-result-list article > div > span {
  color: #8f1025;
  font-size: 11px;
  font-weight: 750;
}

.red-envelope-result-list article > div > small {
  color: #827476;
  font-size: 9px;
}

.red-envelope-result-list__outcome {
  justify-items: end;
  text-align: right;
}

.red-envelope-result-list__outcome strong {
  font-size: 12px !important;
}

.red-envelope-result-list__outcome span {
  font-size: 9px !important;
}

.red-envelope-history-result .is-win,
.red-envelope-result-modal .is-win {
  color: #b0142d !important;
}

.red-envelope-history-result .is-loss,
.red-envelope-result-modal .is-loss {
  color: #147552 !important;
}

@media (max-width: 420px) {
  .red-envelope-result-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .red-envelope-result-summary > div:nth-child(2) {
    border-right: 0;
  }

  .red-envelope-result-summary > div:nth-child(-n + 2) {
    padding-bottom: 9px;
    border-bottom: 1px solid #ead8a5;
  }

  .red-envelope-result-summary > div:nth-child(n + 3) {
    padding-top: 9px;
  }

  .red-envelope-history-result,
  .red-envelope-result-list article {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .red-envelope-history-result__profit,
  .red-envelope-result-list__outcome {
    grid-column: 2;
    justify-items: start;
    text-align: left;
  }
}

/* Red-envelope mobile account, packet and sheet geometry. */
.red-envelope-page .red-envelope-account {
  grid-template-columns: 54px minmax(86px, 1fr) auto;
  min-height: 84px;
  gap: 7px;
  padding: 10px;
}

.red-envelope-page .red-envelope-account__avatar {
  width: 54px;
  height: 54px;
  border: 2px solid rgba(255,255,255,.86);
  border-radius: 50%;
}

.red-envelope-page .red-envelope-account__balance span,
.red-envelope-page .red-envelope-account__balance strong {
  font-size: 14px;
}

.red-envelope-page .red-envelope-account__actions {
  gap: 6px;
}

.red-envelope-page .red-envelope-account__actions button {
  min-width: 58px;
  min-height: 40px;
  padding: 0 8px;
  font-size: 14px;
}

.red-envelope-page .red-envelope-chat-room .red-envelope-round {
  min-height: 132px;
  padding-left: 68px;
}

.red-envelope-page .red-envelope-chat-room .red-envelope-round__head {
  min-height: 30px;
}

.red-envelope-page .red-envelope-chat-room .red-envelope-round__avatar {
  width: 54px;
  height: 54px;
}

.red-envelope-page .red-envelope-chat-room .red-envelope-round__banker > div {
  left: 68px;
}

.red-envelope-page .red-envelope-chat-room .red-envelope-chat-packet {
  width: min(100%, 274px);
  min-height: 102px;
  box-sizing: border-box;
}

.red-envelope-page .red-envelope-quick-modal-shell {
  align-items: flex-end;
  padding: 0;
}

.red-envelope-page .red-envelope-quick-modal-shell .red-envelope-create-modal--quick {
  width: 430px;
  max-width: 100vw;
  max-height: calc(var(--web-visual-viewport-height, 100dvh) - 8px);
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  box-sizing: border-box;
  border-radius: 0;
  scrollbar-width: none;
}

.red-envelope-page .red-envelope-quick-modal-shell .red-envelope-create-modal--quick::-webkit-scrollbar {
  display: none;
}

.red-envelope-page .red-envelope-create-modal--quick > header {
  position: relative;
  min-height: 36px;
}

.red-envelope-page .red-envelope-create-modal--quick > header button {
  top: 50%;
  right: 0;
  transform: translateY(-50%);
}

.red-envelope-packet-live-status {
  position: absolute;
  bottom: 196px;
  left: 50%;
  width: min(calc(100% - 40px), 360px);
  display: grid;
  gap: 5px;
  color: #ffe4aa;
  text-align: center;
  transform: translateX(-50%);
}

.red-envelope-packet-live-status strong {
  font-size: 15px;
}

.red-envelope-packet-live-status span {
  font-size: 13px;
}

.red-envelope-page .red-envelope-deposit-preview--compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 4px;
  padding: 10px;
  border-color: #e4e9f1;
  background: #f7f9fc;
}

.red-envelope-page .red-envelope-deposit-preview--compact > div {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid #e1e6ef;
  border-radius: 6px;
  background: #ffffff;
}

.red-envelope-page .red-envelope-deposit-preview--compact strong {
  grid-row: auto;
  grid-column: auto;
  color: #d52939;
  font-size: 16px;
}

.red-envelope-page .red-envelope-deposit-preview--compact > small {
  grid-column: 1 / -1;
  color: #68768b;
  font-size: 10px;
  line-height: 1.55;
}

.red-envelope-page .red-envelope-fixed-game--compact {
  gap: 5px;
  border-color: #e3e8f0;
  background: #f7f9fc;
}

.red-envelope-page .red-envelope-quick-submit-row {
  position: sticky;
  bottom: -20px;
  z-index: 4;
  margin: 6px -16px -20px;
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid #edf0f4;
  background: rgba(255,255,255,.97);
}

.red-envelope-page .red-envelope-quick-submit-row p {
  min-width: 0;
}

.red-envelope-page .red-envelope-quick-submit-row p strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 360px) {
  .red-envelope-page .red-envelope-account {
    grid-template-columns: 48px minmax(72px, 1fr) auto;
    padding-right: 7px;
    padding-left: 7px;
  }

  .red-envelope-page .red-envelope-account__avatar {
    width: 48px;
    height: 48px;
  }

  .red-envelope-page .red-envelope-account__actions button {
    min-width: 52px;
    padding: 0 6px;
    font-size: 12px;
  }
}

.red-envelope-page .red-envelope-rules-modal-shell {
  align-items: flex-end;
  padding: 0;
}

.red-envelope-page .red-envelope-rules-modal-shell .red-envelope-rules-modal {
  width: 100%;
  max-width: 430px;
  margin: 0;
  border-radius: 0;
}

#webApp .draw-page__composer button.is-feedback-disabled,
#webApp .mark-six-page__composer button.is-feedback-disabled {
  border-color: var(--ui-border) !important;
  background: #cbd5e1 !important;
  color: #475569 !important;
  cursor: pointer !important;
  opacity: 1 !important;
}

/* Mobile browser viewport compatibility, including HarmonyOS browser toolbars. */
#webApp {
  height: var(--web-visual-viewport-height, 100dvh) !important;
  max-height: var(--web-visual-viewport-height, 100dvh) !important;
}

.agent-shell,
.detail-page-shell,
.records-page,
.red-envelope-page {
  min-height: var(--web-visual-viewport-height, 100dvh) !important;
}

.agent-sheet {
  top: var(--web-visual-viewport-offset-top, 0px) !important;
  bottom: auto !important;
  height: var(--web-visual-viewport-height, 100dvh) !important;
}

.agent-sheet__panel {
  max-height: calc(var(--web-visual-viewport-height, 100dvh) - 18px) !important;
  padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)) !important;
}

.red-envelope-page .red-envelope-bottom-nav {
  bottom: var(--web-visual-viewport-bottom-gap, 0px) !important;
}

.red-envelope-page .red-envelope-chat-room,
.red-envelope-page .red-envelope-create-room {
  padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px) + var(--web-visual-viewport-bottom-gap, 0px)) !important;
}
