body {
  margin: 0;
  font-family: 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
  background: #e23b37;
  color: #222;
}

body.tg-light,
body.tg-dark {
  background-color: #E3FAFA !important;
}

.tg-dark body {
  background: #181818;
  color: #f7f7f7;
}


.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 10px 12px;
  background: transparent;
}


.search-bar {
  --primary: #1677ff;

  display: flex;
  align-items: center;
  gap: 8px;

  border: 2px solid var(--primary);

  border-radius: 999px;
  padding: 6px;
  background: rgba(240, 245, 255, 1);

}


.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 10px 12px;
  font-size: 14px;
  color: #1f2a44;
}


.search-btn {
  border: none;
  background: var(--primary);

  color: #fff;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}


.search-bar:focus-within {
  box-shadow: 0 0 0 3px rgba(22, 119, 255, .18);
}


.welcome-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;

  background: rgba(255, 255, 255, 0.65);

  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  z-index: 9999;

  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  overflow: hidden;

}


.welcome-content {
  position: fixed;

  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  background: #d0ebd3;
  border-radius: 24px;
  box-shadow: 0 8px 40px 0 rgba(40, 80, 160, 0.18);
  padding: 32px 24px 24px 24px;
  max-width: 360px;
  width: 90vw;
  min-width: 0;
  text-align: center;
  box-sizing: border-box;
  transition: transform 0.22s cubic-bezier(.47, 1.64, .41, .8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10000;

}


.welcome-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 8px;
  text-align: center;
}

.welcome-desc {
  font-size: 0.95rem;
  color: #5a6c7d;
  margin-bottom: 20px;
  text-align: center;
}


.welcome-banners {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-bottom: 20px;
}

.welcome-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 300px;
  margin-bottom: 15px;
}

.welcome-banner img {
  width: 100%;
  height: auto;
  max-height: 150px;
  object-fit: cover;

  background: #f3f6fb;
  border-radius: 12px;
  margin-bottom: 8px;
  box-shadow: 0 2px 8px rgba(51, 65, 85, 0.1);
}

.banner-caption {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 5px;
  font-size: 15px;
  color: #232b45;
  font-weight: 600;
  margin-bottom: 2px;
}

.badge {
  font-style: normal;
  font-size: 12px;
  padding: 2px 9px;
  background: #fa4f33;
  color: #fff;
  border-radius: 12px;
  margin-left: 2px;
  font-weight: 700;
  box-shadow: 0 1px 4px #fa4f3340;
}

.main-btn,
.sub-btn {
  width: 100%;
  margin-top: 8px;
  border-radius: 999px;
  font-size: 16px;
  padding: 12px 0;
  font-weight: 700;
  outline: none;
  border: none;
  cursor: pointer;
  letter-spacing: 1px;
  box-shadow: 0 2px 10px #1677ff15;
}

.main-btn {
  background: #1677ff;
  color: #fff;
  margin-bottom: 8px;
}

.sub-btn {
  background: #f6f8fb;
  color: #1677ff;
}

.welcome-close {
  position: absolute;
  right: 16px;
  top: 14px;
  font-size: 22px;
  color: #b2b7c6;
  cursor: pointer;
  user-select: none;
  line-height: 1;
}

.welcome-note {
  margin-top: 14px;
  font-size: 11px;
  color: #b3bdd1;
  text-align: center;
}

@media (max-width: 520px) {
  .welcome-content {
    padding: 14px 2vw 10px 2vw;
    max-width: 99vw;
    border-radius: 10px;
  }

  .welcome-banner {
    max-width: 99vw;
  }

  .welcome-banner img {
    max-height: 30vw;
  }
}


.banner-slider {
  width: 100%;
  margin: 10px 0 12px;
  min-height: 90px;
  cursor: pointer;
}

.banner-wrap {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: #f2f4f8;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);

}

.banner-track {
  display: flex;
  width: 100%;
  transform: translateX(0);
  transition: transform .35s ease;
  will-change: transform;
}

.banner-slide {
  flex: 0 0 100%;
  position: relative;
}


.banner-slide::before {
  content: none;
}

.banner-slide img {
  position: static;
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  object-position: center;
  background: #f2f4f8;
}

.banner-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  display: flex;
  gap: 6px;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

.banner-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .55);
}

.banner-dot.is-active {
  background: rgba(255, 255, 255, .95);
}


.biz-entrance-iframe-grid {
  width: 100%;
}

.biz-iframe-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
}


.biz-entry {
  display: flex;
  flex-direction: column;
  align-items: center;

  width: 100%;

  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  user-select: none;
}


.biz-card {
  position: relative;
  width: clamp(56px, 100%, 72px);
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: center;

  transition: transform .12s ease, box-shadow .12s ease;
}


.biz-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;

  display: block;
}


.biz-label {
  width: 100%;
  max-width: 72px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #212c4b;
  margin: 6px 0 0 0;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


.biz-iframe {
  display: none !important;
  width: 0;
  height: 0;
  border: 0;
}


.biz-entry:hover .biz-card {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.10);
}

.biz-entry:active .biz-card {
  transform: translateY(0px) scale(0.98);
}


.category-section {
  margin: 20px 0 12px 0;
  width: 100%;
}


.cat-title {
  font-size: 17px;
  font-weight: 800;
  margin-left: 10px;
  margin-bottom: 8px;
}

.cat-title.red {
  color: #e23b37;
}


.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px 6px;
  justify-items: center;
  width: 100%;
  padding: 0 6px;
}


@media (max-width: 400px) {
  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 500px) and (max-width: 700px) {
  .cat-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 900px) {
  .cat-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (min-width: 1200px) {
  .cat-grid {
    grid-template-columns: repeat(8, 1fr);
  }
}


.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  min-width: 68px;
  min-height: 88px;
  padding: 6px 2px 0 2px;
  border-radius: 18px;
  transition: background .12s;
  user-select: none;
}

.cat-card:active {
  background: #f1f6fe;
}

.cat-circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #f5f7fa;
  overflow: hidden;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 6px #d2e0f640;
}

.cat-circle img {
  width: 84%;
  height: 84%;
  object-fit: contain;
  object-position: center;
  border-radius: 12px;
  background: transparent;
  display: block;

}

.cat-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #222c35;
  margin-top: 3px;
  line-height: 1.12;
  text-align: center;
  word-break: keep-all;
  max-width: 80px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


.cat-card:hover,
.cat-card:focus {
  background: #eaf4ff;
}
/* Home: stats and signin */
.func-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
  background: transparent;
  width: calc(100% - 24px);
  max-width: 100%;
  padding: 0;
  border-radius: 15px;
  margin: 12px auto 18px;
  box-shadow: none;
}

.func-stats-grid {
  display: contents;
}

.func-stat-chip {
  width: 100%;
  min-height: 62px;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 6px 5px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.stat-visit {
  background: #e7f8e8;
  border-color: #85F26B;
}

.stat-coupon {
  background: #f7f6d9;
  border-color: #D8DB0F;
}

.stat-view {
  background: #f8def8;
  border-color: #F291F7;
}

.stat-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: auto;
  font-size: 11px;
  font-weight: 700;
  color: #1b1c1f;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
}

.stat-value {
  display: block;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.05;
  color: #1b1c1f;
  white-space: nowrap;
}

.func-signin-card {
  background: #f3f4f6;
  border-color: #e5e7eb;
  padding: 4px 5px 5px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.stats-update {
  flex: 0 0 auto;
  width: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  padding: 0;
  font-size: 11px;
  line-height: 1.1;
  color: #1b1c1f;
  white-space: nowrap;
  text-align: center;
}

.func-signin {
  flex: 1 1 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 4px 0 0;
  text-align: center;
}

.signin-btn {
  background: #1976ed;
  color: #fff;
  font-weight: 700;
  border: none;
  padding: 5px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.1;
}

#signinMsg {
  color: #19884d;
  font-size: 10px;
  margin-left: 0;
  line-height: 1.1;
  text-align: center;
  min-height: 11px;
}

/* 进一步保证超小屏下仍然四个同排，但不挤到贴边 */
@media (max-width: 480px) {
  .func-row {
    gap: 8px;
    width: calc(100% - 20px);
  }

  .func-stat-chip {
    min-height: 58px;
    padding: 5px 4px;
    border-radius: 12px;
  }

  .stat-title {
    font-size: 10px;
  }

  .stat-value {
    font-size: 15px;
  }

  .signin-btn {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 9px;
  }

  .stats-update {
    font-size: 10px;
  }

  #signinMsg {
    font-size: 9px;
    min-height: 10px;
  }
}
/* Home: hot recommend */
.hot-recommend {
  margin: 18px 0;
}

.hot-title {
  font-size: 17px;
  font-weight: 800;
  margin: 0 0 12px 12px;
}

.hot-cards {
  display: flex;
  gap: 12px;
  padding: 0 12px 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.hot-cards::-webkit-scrollbar {
  display: none;
}

.hot-card {
  flex: 0 0 160px;
  min-width: 160px;
  max-width: 160px;
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 1px 6px #ececec;
  display: flex;
  flex-direction: column;
  align-items: center;
  scroll-snap-align: start;
  min-height: 0;
  box-sizing: border-box;
}

.hot-card-img {
  width: calc(100% - 20px);
  height: 86px;
  overflow: hidden;
  border-radius: 12px;
  margin: 10px 10px 8px 10px;
  flex: 0 0 auto;
}

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

.hot-card-content {
  width: 100%;
  padding: 0 10px 10px 10px;
  text-align: center;
  box-sizing: border-box;
}

.hot-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #111;
  line-height: 1.15;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: keep-all;
}

.hot-card-desc {
  font-size: 12px;
  font-weight: 300;
  color: #b7b7b7;
  line-height: 1.2;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 28px;
}

.hot-card-btn,
.hot-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 14px;
  border: 1px solid #1f7a35;
  border-radius: 8px;
  background: linear-gradient(180deg, #1b6f31 0%, #f7fff8 100%);
  color: #135125;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.1;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.hot-card-btn:hover,
.hot-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(25, 95, 46, 0.16);
}

@media (max-width: 700px) {
  .hot-cards {
    gap: 10px;
    padding: 0 10px 8px;
  }

  .hot-card {
    flex: 0 0 138px;
    min-width: 138px;
    max-width: 138px;
  }

  .hot-card-img {
    height: 78px;
  }
}

@media (min-width: 1200px) {
  .hot-card {
    flex: 0 0 170px;
    min-width: 170px;
    max-width: 170px;
  }
}

/* Home: nearby stores */

.store-section {
  margin: 16px 0;
}

.store-title {
  font-size: 15px;
  font-weight: 800;
  margin-left: 12px;
}

.hot-title.red,
.store-title.red {
  color: #e23b37;
}

.store-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 10px;
  margin: 11px 10px 0 10px;
}

.store-card {
  background: #fff;
  border-radius: 17px;
  box-shadow: 0 2px 7px #f2f2f2;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}

.store-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 18px rgba(0, 0, 0, .14);
}

.store-img {
  height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top-left-radius: 17px;
  border-top-right-radius: 17px;
  overflow: hidden;
}

.store-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.store-info {
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.store-name-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.store-name {
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 8px;
  background: #ffd54a;
  color: #1d4ed8;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.store-category-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 16px;
  padding: 0 8px;
  border: 1px solid #E84657;
  border-radius: 4px;
  color: #E84657;
  font-size: 12px;
  line-height: 16px;
  white-space: nowrap;
  background: #fff;
}

.store-btn {
  background: #1976ed;
  color: #fff;
  padding: 4px 0;
  border: none;
  border-radius: 8px;
  width: 100%;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.store-more-wrap {
  margin: 18px 12px 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.store-more-line {
  flex: 1 1 auto;
  min-width: 20px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(25, 118, 237, 0) 0%, rgba(25, 118, 237, .7) 55%, rgba(25, 118, 237, .9) 100%);
  box-shadow: 0 1px 4px rgba(25, 118, 237, .35);
}

.store-more-wrap .store-more-line:last-child {
  transform: scaleX(-1);
}

.store-more-btn {
  flex: 0 0 auto;
  background: #fff;
  color: #1976ed;
  font-weight: 700;
  border: 1px solid #1976ed;
  border-radius: 14px;
  padding: 7px 22px;
  box-shadow: 0 3px 10px rgba(25, 118, 237, .16);
}

/* Home: announcement and merchant entry */
.announcement-bar {
  background: #fff;
  margin: 16px 7px 0 7px;
  border-radius: 12px;
  padding: 8px 14px;
  box-shadow: 0 1px 4px #f3f3f3;
}

.announcement-title {
  font-size: 14px;
  font-weight: 700;
}

.announcement-content {
  font-size: 13px;
  color: #2d3748;
  line-height: 1.7;
}


.merchant-entry {
  margin: 20px 7px;
}

.entry-header {
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
}

.see-more {
  color: #1976ed;
  font-size: 13px;
}

.entry-content {
  display: none;
}

.entry-card {
  background: #f6f8fa;
  border-radius: 10px;
  padding: 13px 13px;
  margin: 8px 0;
  box-shadow: 0 1px 6px #f0f0f0;
}

.entry-title {
  font-weight: 700;
  font-size: 14px;
}

.entry-desc {
  font-size: 13px;
  color: #888;
}

.entry-btn {
  margin-top: 7px;
  background: #1976ed;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 5px 20px;
  font-size: 12px;
}

.entry-collapse {
  margin: 6px 0 0 0;
  width: 100%;
  background: #fff;
  color: #1976ed;
  border: 1px solid #1976ed;
  border-radius: 8px;
  padding: 3px 0;
  font-size: 13px;
}

.merchant-notice-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.merchant-notice-modal.hidden {
  display: none;
}

.merchant-notice-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.merchant-notice-dialog {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 420px);
  max-height: 78vh;
  overflow: hidden;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
  padding: 20px 18px 18px;
  box-sizing: border-box;
}

.merchant-notice-close {
  position: absolute;
  right: 12px;
  top: 10px;
  border: 0;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #999;
}

.merchant-notice-title {
  font-size: 22px;
  font-weight: 700;
  color: #f54927;
  text-align: center;
  margin-bottom: 8px;
}

.merchant-notice-subtitle {
  font-size: 12px;
  font-weight: 400;
  color: #999;
  text-align: center;
  margin-bottom: 14px;
  line-height: 1.6;
}

.merchant-notice-content {
  max-height: calc(78vh - 96px);
  overflow-y: auto;
  font-size: 13px;
  color: #111;
  line-height: 1.75;
  word-break: break-word;
}

.merchant-notice-content p {
  margin: 0 0 10px;
}

/* Home: bottom navigation */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 0 8px 0;
  background: rgba(38, 42, 49, 0.91);
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  backdrop-filter: blur(12px);
}

.nav-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 15px;
  padding: 7px 18px;
  border-radius: 16px;
  font-weight: 700;
  opacity: 0.82;
}

.nav-btn.active {
  background: #1976ed;
  color: #fff;
  opacity: 1;
}

@media (max-width:700px) {
  .welcome-content {
    max-width: 97vw;
  }

  .biz-iframe-row,
  .biz-label-row {
    gap: 4px;
  }

  .cat-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .store-list {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width:1000px) {
  .biz-iframe {
    width: 82px;
    height: 82px;
  }

  .biz-label {
    width: 100%;
    max-width: 72px;
  }
}

/* Home: interactive feedback */
.stat-updated {
  animation: statPulse 0.5s ease-in-out;
}

@keyframes statPulse {

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

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


.coupon-reward {
  animation: couponPulse 0.5s ease-in-out 3;
}

@keyframes couponPulse {

  0%,
  100% {
    color: #e23b37;
    transform: scale(1);
  }

  50% {
    color: #ff9800;
    transform: scale(1.1);
  }
}


.reward-tip {
  position: absolute;
  background: #ff9800;
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: bold;
  z-index: 100;
  animation: rewardFloat 1s ease-out forwards;
  white-space: nowrap;
}

@keyframes rewardFloat {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.8);
  }

  20% {
    opacity: 1;
    transform: translateY(-20px) scale(1);
  }

  100% {
    opacity: 0;
    transform: translateY(-40px) scale(1);
  }
}


.coupon-tip {
  display: inline-block;
  width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  border-radius: 50%;
  background-color: #ff9800;
  color: white;
  font-size: 12px;
  margin-left: 5px;
  cursor: help;
  position: relative;
  vertical-align: middle;
  transition: background-color 0.2s, transform 0.1s;
}

.coupon-tip:hover {
  background-color: #e68900;
}

.coupon-tip:active {
  transform: scale(0.95);
}


.coupon-tip:hover::after {
  content: "今日已发放优惠券数量，签到可获得更多优惠券！";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  padding: 8px 10px;
  background-color: #333;
  color: white;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.4;
  z-index: 1000;
  white-space: normal;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  margin-bottom: 8px;
  text-align: center;
  pointer-events: none;
}

.coupon-tip:hover::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #333;
  margin-bottom: 2px;
  pointer-events: none;
}


@media (max-width: 480px) {
  .coupon-tip:hover::after {
    width: 140px;
    font-size: 11px;
    left: 50%;
    transform: translateX(-50%);
  }

  .reward-tip {
    font-size: 10px;
    padding: 3px 6px;
  }
}




.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
  margin-right: 8px;
  vertical-align: middle;
}

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


.signin-success-animation {
  animation: pulse-success 0.6s ease-in-out;
  box-shadow: 0 0 0 8px rgba(40, 167, 69, 0.2);
}

@keyframes pulse-success {
  0% {
    box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
  }

  70% {
    box-shadow: 0 0 0 12px rgba(40, 167, 69, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
  }
}


.coupon-bounce {
  animation: bounce 0.6s ease-in-out;
  display: inline-block;
}

@keyframes bounce {

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

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


.signin-processing {
  color: #17a2b8;
  font-weight: bold;
}

.signin-success {
  color: #28a745;
  text-align: center;
}

.signin-error {
  color: #dc3545;
}

.success-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  background-color: #28a745;
  color: white;
  border-radius: 50%;
  text-align: center;
  line-height: 20px;
  margin-right: 8px;
  font-weight: bold;
}

.checked-icon {
  display: inline-block;
  margin-right: 5px;
  font-weight: bold;
}


.signin-btn:disabled {
  opacity: 0.8;
  cursor: not-allowed !important;
}

/* Home: toast */
.global-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  min-width: 300px;
  max-width: 400px;
  padding: 15px 20px;
  border-radius: 8px;
  color: white;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateX(150%);
  transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.global-toast.show {
  transform: translateX(0);
}

.toast-success {
  background: linear-gradient(135deg, #28a745, #20c997);
  border-left: 4px solid #1e7e34;
}

.toast-error {
  background: linear-gradient(135deg, #dc3545, #e83e8c);
  border-left: 4px solid #bd2130;
}

.toast-warning {
  background: linear-gradient(135deg, #ffc107, #fd7e14);
  border-left: 4px solid #d39e00;
}

.toast-info {
  background: linear-gradient(135deg, #17a2b8, #6f42c1);
  border-left: 4px solid #138496;
}

.toast-content {
  display: flex;
  align-items: center;
}

.toast-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-right: 10px;
  font-weight: bold;
  font-size: 16px;
}


.flash {
  animation: flash 0.5s ease-in-out;
}

@keyframes flash {

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

  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

.share-bonus {
  animation: bounce 0.5s ease-in-out;
}


@media (max-width: 768px) {
  .global-toast {
    left: 20px;
    right: 20px;
    min-width: auto;
    max-width: none;
  }
}

/* My page: member center template layout */
.my-member-page {
  width: 100%;
  min-height: calc(100vh - 68px);
  overflow-x: hidden;
  background: linear-gradient(180deg, #251f32 0%, #ffffff 200px);
  padding-bottom: 0;
}

.my-member-top {
  position: relative;
  height: 44px;
  line-height: 44px;
  width: 100%;
  text-align: center;
  font-size: 19px;
  color: #fff;
  letter-spacing: 0.5px;
}

.my-member-top i {
  position: absolute;
  left: 12px;
  top: 0;
  width: 18px;
  height: 44px;
}

.my-member-top i::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15px;
  width: 10px;
  height: 10px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
}

.my-member-info-card {
  margin: 10px 10px 0;
  border-radius: 18px;
  background: linear-gradient(135deg, #2b2437 0%, #564555 100%);
  box-shadow: 0 6px 20px rgba(17, 11, 25, 0.25);
  overflow: hidden;
}

.my-member-user {
  display: flex;
  align-items: center;
  padding: 24px 18px 16px;
  color: #fff;
}

.my-member-user img {
  margin-right: 12px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
}

.my-member-name {
  display: flex;
  flex-direction: column;
}

.my-member-name p {
  font-size: 21px;
  padding-bottom: 8px;
}

.my-member-name span {
  font-size: 13px;
  color: #e5d9c6;
}

.my-member-info {
  display: flex;
  align-items: center;
  padding: 0 18px 22px;
  color: #fff;
}

.my-member-item {
  min-width: 72px;
  margin-right: 24px;
}

.my-member-item p {
  font-size: 13px;
  color: #cfb386;
  padding-bottom: 6px;
}

.my-member-item span {
  font-size: 21px;
}

h5.my-member-title {
  width: min(100%, 680px);
  margin: 0 auto;
  box-sizing: border-box;
  font-size: 18px;
  color: #1c1c1c;
  padding: 14px 14px;
  letter-spacing: 0.5px;
  font-weight: 400;
}

.my-member-coupon {
  width: min(100%, 680px);
  margin: -46px auto 0;
  box-sizing: border-box;
  padding: 0 14px;
}

.my-member-coupon ul {
  display: flex;
  width: 100%;
  overflow-x: auto;
  margin: 0;
  padding: 0;
}

.my-member-coupon ul::-webkit-scrollbar {
  width: 0;
}

.my-member-coupon ul li {
  display: flex;
  align-items: flex-end;
  flex-shrink: 0;
  width: 160px;
  height: 230px;
  position: relative;
  margin-right: 10px;
}

.my-member-coupon ul li .desc {
  width: 160px;
  height: 212px;
  background: #fff;
  border: 2px solid #f2f2f3;
  border-radius: 12px;
  text-align: center;
}

.my-member-coupon ul li .desc .type {
  font-size: 20px;
  color: #1c1c1c;
  padding-top: 22px;
  font-weight: 700;
}

.my-member-coupon ul li .desc .remark {
  font-size: 13px;
  color: #a5a3a2;
  padding: 14px 12px 0;
  line-height: 1.45;
  text-align: left;
}

.my-member-coupon ul li .limit {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 12px;
  color: #fff;
  background: linear-gradient(to right, #222a44, #494f67);
  padding: 4px 10px;
  border-radius: 12px 0 12px 0;
}

.my-member-coupon ul li.active .desc {
  background: #fbf1e5;
  border: 2px solid #edd2a9;
}

.my-member-coupon ul .holder {
  flex-shrink: 0;
  width: 14px;
}

.my-member-coupon .btn {
  padding-right: 0;
  margin-top: 8px;
}

.my-member-coupon .btn button {
  width: 100%;
  height: 46px;
  line-height: 46px;
  font-size: 17px;
  color: #1c1c1c;
  background: #eccb98;
  border: 0;
  outline: 0;
  box-shadow: none;
  border-radius: 46px;
  letter-spacing: 0.5px;
  font-weight: 400;
  text-shadow: none;
}

.my-member-coupon .btn p {
  font-size: 13px;
  color: #a5a3a2;
  padding-top: 8px;
  text-align: center;
}

.my-member-perks-title {
  margin-top: -4px;
  padding-top: 8px;
  font-weight: 400;
}

.my-member-perks {
  width: min(100%, 680px);
  margin: 0 auto;
  box-sizing: border-box;
  padding: 0 14px calc(10px + var(--bottom-nav-safe-height, calc(76px + env(safe-area-inset-bottom))));
}

.my-member-perks ul {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  justify-items: center;
  align-items: start;
}

.my-member-perks li {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #202737;
  font-size: 12px;
  line-height: 1.2;
}

.my-perk-icon {
  display: inline-block;
  width: 46px;
  height: 46px;
  object-fit: contain;
  margin-bottom: 6px;
}

/* ===== 输入光标颜色统一修复（全局） ===== */
input,
textarea {
  caret-color: #529e5f;
}
