.task-page {
  min-height: 100vh;
  background: #fff;
  padding-bottom: 90px;
}

.task-loading {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.72);
  z-index: 20;
}

.task-loading::after {
  content: '';
  width: 36px;
  height: 36px;
  border: 3px solid #ddd;
  border-top-color: #382859;
  border-radius: 50%;
  animation: task-spin 0.8s linear infinite;
}

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

.task-swipe-wrap {
  position: relative;
  margin: 20px 20px 0;
}

.task-swipe {
  overflow: hidden;
}

.task-track {
  display: flex;
  transition: transform 0.3s ease;
}

.task-slide {
  min-width: 100%;
  text-align: center;
}

.task-slide img {
  width: 100%;
}

.task-room-title {
  text-align: center;
  font-size: 30px;
  margin: 0;
  line-height: 30px;
  font-weight: 400;
}

.task-room-title.title2 {
  color: #7433f5 !important;
}

.task-room-title.title3 {
  color: #d8c554 !important;
}

.task-room-title.title4 {
  color: #f57e00 !important;
}

.task-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: absolute;
  width: 100%;
  bottom: 30px;
  left: 0;
  pointer-events: none;
  z-index: 2;
}

.task-nav button {
  border: 0;
  background: transparent;
  padding: 0;
  pointer-events: auto;
  cursor: pointer;
}

.task-nav img {
  height: 70px;
}

.task-enter {
  padding: 20px;
}

.task-enter .van-button--normal {
  padding: 0;
}

.start-task-page {
  min-height: 100vh;
  background: #fff;
  padding-bottom: 90px;
}

.start-task-banner {
  padding: 20px 15px 0;
}

.start-task-banner-frame {
  width: 100%;
  height: calc(100vw * 657 / 1029);
  max-height: calc(500px * 657 / 1029);
}

.start-task-banner-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: fill;
}

.start-task-divider {
  text-align: center;
  padding: 15px;
}

.start-task-divider span {
  display: block;
  background: #000;
  height: 3px;
  border-radius: 100px;
  width: 60px;
  margin: 0 auto;
}

.start-task-room-name.title2,
.title2 {
  color: #7433f5 !important;
}

.start-task-room-name.title3,
.title3 {
  color: #d8c554 !important;
}

.start-task-room-name.title4,
.title4 {
  color: #f57e00 !important;
}

.start-task-note {
  margin-top: 15px;
  line-height: 1.2;
  font-size: 14px;
  padding: 0 20px;
  color: #7432f4;
  text-align: center;
}

.start-task-wallet {
  padding: 15px;
  display: flex;
  align-items: center;
  position: relative;
}

.start-task-wallet img.icon {
  height: 46px;
  margin-right: 15px;
}

.start-task-wallet .record-link {
  height: 50px;
  position: absolute;
  right: 15px;
  cursor: pointer;
}

.start-task-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  margin: 10px 15px;
  border-bottom: 1px solid #e1e1e1;
  padding-bottom: 15px;
}

.start-task-stats .col {
  width: 33%;
}

.start-task-stats .col + .col {
  border-left: 1px solid #e1e1e1;
}

.start-task-stats p {
  margin: 0;
}

.start-task-actions {
  padding: 20px 15px;
}

.start-task-actions.is-hidden {
  display: none;
}

.start-task-actions button {
  width: 100%;
  height: 60px;
  border: 0;
  border-radius: 100px;
  background: #382859;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

.stBox1,
.stBox2,
.stBox3 {
  position: relative;
  border-radius: 100px;
  height: 60px;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 64px;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  font-size: 20px;
  cursor: pointer;
}

.stBox1 {
  background: #000;
  color: #fff;
}

.start-task-room-label {
  min-width: 0;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.start-task-room-icon {
  display: block;
  width: 34px;
  height: 34px;
  margin-left: 20px;
  object-fit: contain;
}

.stBox2 {
  background: #3a295d;
  color: #fff;
}

.stBox3 {
  background: #7830f4;
  color: #fff;
}

.user-task-list {
  padding: 16px 20px 0;
}

.user-task-empty {
  text-align: center;
  color: #999;
  padding: 40px 0;
}

.user-task-card {
  display: flex;
  gap: 12px;
  padding: 12px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: #f7f7f7;
}

.user-task-card__image {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.user-task-card__body {
  flex: 1;
  min-width: 0;
}

.user-task-card__id {
  margin: 0;
  font-size: 12px;
  color: #7432f5;
}

.user-task-card__name {
  margin: 4px 0 0;
  font-size: 16px;
  font-weight: 700;
}

.user-task-card__desc {
  margin: 4px 0 0;
  font-size: 12px;
  color: #666;
}

.user-task-card__type {
  margin: 6px 0 0;
  font-size: 12px;
  color: #382859;
}

.start-task-search-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgb(0 0 0 / 90%);
}

.start-task-search-modal.is-hidden,
.start-task-search-loading.is-hidden,
.start-task-search-result.is-hidden {
  display: none;
}

.start-task-search-modal.is-result {
  align-items: flex-end;
  padding: 0 12px;
}

.start-task-search-panel {
  position: relative;
  box-sizing: border-box;
  width: min(100%, 430px);
  min-height: 330px;
  padding: 42px 18px 28px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 18px 42px rgb(0 0 0 / 28%);
}

.start-task-search-panel::before {
  position: absolute;
  display: none;
  top: 14px;
  left: 50%;
  width: 54px;
  height: 5px;
  content: '';
  border-radius: 999px;
  background: #e4e4e4;
}

.start-task-search-close {
  position: absolute;
  display: none;
  top: 14px;
  right: 16px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #f0f0f3;
  color: #555;
  font-size: 28px;
  line-height: 30px;
  cursor: pointer;
}

.start-task-search-modal.is-result .start-task-search-close {
  display: block;
}

.start-task-search-modal.is-result .start-task-search-panel {
  width: min(100%, 500px);
  max-height: calc(100vh - 44px);
  overflow-y: auto;
  padding: 48px 18px 30px;
  border-radius: 32px 32px 0 0;
  background: linear-gradient(180deg, #fff 0%, #fbfbfd 100%);
  box-shadow: 0 -20px 50px rgb(0 0 0 / 32%);
  animation: start-task-sheet-up 240ms ease-out both;
}

.start-task-search-modal.is-result .start-task-search-panel::before {
  display: block;
}

.start-task-search-loading {
  display: flex;
  min-height: 300px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.start-task-search-loading img {
  width: min(260px, 66vw);
  height: auto;
  display: block;
}

.start-task-search-loading p {
  margin: 26px 0 0;
  color: #000;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}

.start-task-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.start-task-result-header p {
  margin: 0;
  color: #777788;
  font-size: 13px;
  line-height: 1.2;
}

.start-task-result-header b {
  display: block;
  margin-top: 4px;
  color: #14141a;
  font-size: 19px;
  line-height: 1.15;
}

.start-task-result-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 12px;
  border: 1px solid #ececf2;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 30px rgb(0 0 0 / 8%);
}

.start-task-result-image {
  width: 100%;
  height: clamp(190px, 48vw, 240px);
  flex-shrink: 0;
  border-radius: 18px;
  object-fit: cover;
}

.start-task-result-body {
  min-width: 0;
  flex: 1;
  padding: 2px 4px 4px;
}

.start-task-result-id {
  margin: 0;
  color: #7432f5;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.start-task-result-name {
  margin: 6px 0 0;
  color: #080808;
  font-size: 25px;
  font-weight: 800;
  line-height: 1.15;
}

.start-task-result-desc {
  margin: 8px 0 0;
  color: #4b4b5d;
  font-size: 14px;
  line-height: 1.25;
}

.start-task-result-type {
  margin: 9px 0 0;
  color: #382859;
  font-size: 14px;
  line-height: 1.2;
}

.start-task-result-meta {
  display: grid;
  gap: 12px;
  padding: 18px;
  margin-top: 16px;
  border: 1px solid #ececf2;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 30px rgb(0 0 0 / 7%);
}

.start-task-result-meta div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #777788;
  font-size: 15px;
  line-height: 1.25;
}

.start-task-result-meta b {
  min-width: 0;
  color: #111;
  font-size: 16px;
  font-weight: 800;
  text-align: right;
  overflow-wrap: anywhere;
}

.start-task-recharge-guard {
  padding: 16px;
  margin-top: 16px;
  border: 1px solid #eee6ff;
  border-radius: 22px;
  background: linear-gradient(180deg, #fbf8ff 0%, #fff 100%);
  box-shadow: 0 12px 30px rgb(72 48 122 / 8%);
}

.start-task-recharge-guard.is-ready {
  border-color: #cff1dc;
  background: linear-gradient(180deg, #f6fffa 0%, #fff 100%);
}

.start-task-recharge-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.start-task-recharge-head p {
  margin: 0;
  color: #6f687e;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.start-task-recharge-head b {
  display: block;
  margin-top: 5px;
  color: #16151c;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.1;
}

.start-task-recharge-head span {
  flex-shrink: 0;
  padding: 7px 10px;
  border-radius: 999px;
  background: #fff1dd;
  color: #a55f00;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.start-task-recharge-head span.is-ready {
  background: #dcf8e8;
  color: #12814b;
}

.start-task-recharge-original,
.start-task-recharge-discount {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding: 9px 11px;
  border-radius: 14px;
  background: rgb(255 255 255 / 82%);
  color: #7b7489;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.start-task-recharge-original b,
.start-task-recharge-discount b {
  color: #1b1724;
  font-size: 13px;
  font-weight: 900;
}

.start-task-recharge-discount {
  border: 1px solid #e8dfff;
  background: #f6f0ff;
  color: #5a28c8;
}

.start-task-recharge-progress {
  height: 8px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #eeeaf6;
}

.start-task-recharge-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #382859 0%, #7432f5 100%);
  transition: width 180ms ease;
}

.start-task-recharge-guard.is-ready .start-task-recharge-progress i {
  background: linear-gradient(90deg, #13a95d 0%, #31d17d 100%);
}

.start-task-recharge-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.start-task-recharge-grid div {
  min-width: 0;
  padding: 10px;
  border: 1px solid #efedf5;
  border-radius: 14px;
  background: #fff;
}

.start-task-recharge-grid span {
  display: block;
  color: #858092;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.start-task-recharge-grid b {
  display: block;
  margin-top: 5px;
  color: #18151f;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.start-task-heart-rating {
  padding: 18px;
  margin-top: 16px;
  border: 1px solid #ffe0eb;
  border-radius: 22px;
  background: linear-gradient(180deg, #fff7fb 0%, #fffafd 100%);
}

.start-task-heart-rating p {
  margin: 0 0 10px;
  color: #1d1d24;
  font-size: 15px;
  font-weight: 800;
}

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

.start-task-hearts button {
  height: 44px;
  border: 1px solid #f0d7e3;
  border-radius: 14px;
  background: #fff;
  color: #d4c4cc;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.start-task-hearts button.is-active {
  border-color: #ff4f88;
  background: #fff0f6;
  color: #ff2d73;
  transform: translateY(-1px);
}

.start-task-submit-button {
  width: 100%;
  height: 56px;
  margin-top: 18px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #382859 0%, #7432f5 100%);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 30px rgb(116 50 245 / 28%);
}

.start-task-submit-button:disabled {
  background: #111;
  cursor: default;
  opacity: 0.9;
}

@media (max-width: 420px) {
  .start-task-recharge-grid {
    grid-template-columns: 1fr;
  }
}

.start-task-search-empty {
  margin: 60px 0 36px;
  color: #999;
  text-align: center;
}

.start-task-search-message {
  display: grid;
  min-height: 220px;
  place-items: center;
  padding: 28px;
  text-align: center;
}

.start-task-search-message strong {
  display: block;
  color: #16151c;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.35;
}

@keyframes start-task-sheet-up {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}
