/* V100 — Activity Rewards overlay (#/activity/DailyTasks*) — page-scoped */

html.co-ar-open,
html.co-ar-open body {
  overflow: hidden;
  background: #1a201e !important;
  min-height: 100%;
  min-height: 100dvh;
}

/* Only reserve tabbar space when the bar is actually mounted. */
html.co-ar-open:has(.tabbar__container) .co-ar {
  height: calc(100% - 1.72rem);
  height: calc(100dvh - 1.72rem - env(safe-area-inset-bottom, 0px));
  bottom: auto;
}

html.co-ar-open #app {
  visibility: hidden !important;
  z-index: 120 !important;
  pointer-events: none !important;
}
html.co-ar-open .tabbar__container,
html.co-ar-open #app .tabbar__container {
  visibility: visible !important;
  z-index: 121 !important;
  overflow: visible !important;
  pointer-events: auto !important;
}
html.co-ar-open .tabbar__container-item,
html.co-ar-open .tabbar__container .turntableBg,
html.co-ar-open .tabbar__container .v83-spin-wrap,
html.co-ar-open .tabbar__container .v83-spin-disc {
  overflow: visible !important;
}
html.co-ar-open .tabbar__container-item:nth-of-type(3),
html.co-ar-open .tabbar__container [data-v83-key="turntable"] {
  z-index: 122 !important;
}

.co-ar {
  --activity-bg: #1a201e;
  --activity-header: #27312f;
  --activity-card: #303936;
  --activity-inner: #3e4845;
  --activity-dark: #252d2a;
  --activity-primary: #f1f4f2;
  --activity-secondary: #c0cac5;
  --activity-muted: #919d98;
  --activity-emerald: #27e68b;
  --activity-emerald-soft: rgba(39, 230, 139, 0.18);
  --activity-gold: #d9bc59;
  --activity-border: rgba(235, 244, 239, 0.08);
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 10rem;
  /* Full viewport by default — DailyTasks route often has no tabbar in DOM. */
  height: 100%;
  height: 100dvh;
  bottom: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  background: var(--activity-bg);
  color: var(--activity-primary);
  font-family: inherit;
  overflow: hidden;
}

.co-ar *,
.co-ar *:before,
.co-ar *:after { box-sizing: border-box; }

.co-ar__header {
  flex: none;
  display: grid;
  grid-template-columns: 0.85333rem 1fr auto;
  align-items: center;
  height: 1.17333rem;
  padding: 0 0.24rem 0 0.32rem;
  background: var(--activity-header);
}

.co-ar__title {
  text-align: center;
  font-size: 0.45333rem;
  font-weight: 800;
}

.co-claim-hub-tabs {
  flex: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.12rem;
  margin: 0;
  padding: 0.16rem 0.32rem 0.2rem;
  border: 0;
  border-radius: 0;
  background: var(--activity-header);
}

.co-claim-hub-tab {
  height: 0.88rem;
  border: 0;
  border-radius: 0.16rem;
  background: #343d3a;
  color: var(--activity-secondary);
  font-size: 0.34667rem;
  font-weight: 800;
  letter-spacing: 0;
  cursor: pointer;
  box-shadow: none;
}

.co-claim-hub-tab.is-on {
  color: var(--activity-primary);
  background: #202724;
  box-shadow: none;
}

.co-ar__rec-btn,
.co-activity-header__record-action {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(235, 244, 239, 0.07);
  border-radius: 9px;
  background: rgba(39, 230, 139, 0.10);
  color: #27e68b;
  cursor: pointer;
  padding: 0;
  font-size: 0;
  line-height: 0;
}

.co-ar__rec-btn svg,
.co-activity-header__record-action svg {
  width: 16px;
  height: 16px;
  display: block;
}

.co-ar__scroll {
  flex: 1;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 0 0.56rem;
}

.co-ar__banner {
  position: relative;
  height: 3.84rem;
  margin: 0.32rem 0.32rem 0;
  overflow: hidden;
  border-radius: 0.4rem;
  border: 1px solid var(--activity-border);
  background: var(--activity-dark);
}

.co-ar__banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 82% 48%;
  display: block;
}

/* Banner art already has title/copy — no HTML overlay. */
.co-ar__banner-copy {
  display: none !important;
}

.co-ar__h {
  margin: 0.4rem 0.36rem 0.08rem;
  font-size: 0.37333rem;
  font-weight: 800;
  color: #ffffff;
}

.co-activity-task-card {
  margin: 0.32rem 0.32rem 0;
  padding: 0.37333rem;
  border-radius: 0.4rem;
  background: linear-gradient(135deg, #303936, #252d2a);
  border: 1px solid var(--activity-border);
  box-shadow: 0 9px 20px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.co-ar__badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.16rem;
  margin-bottom: 0.2rem;
}

.co-ar__badge {
  padding: 0.06rem 0.16rem;
  border-radius: 0.8rem;
  background: var(--activity-emerald-soft);
  color: var(--activity-emerald);
  font-size: 0.24rem;
  font-weight: 800;
}

.co-ar__badge.is-muted {
  background: rgba(145, 157, 152, 0.12);
  color: var(--activity-muted);
}

.co-ar__status {
  font-size: 0.26667rem;
  color: #ffffff;
  font-weight: 700;
}

.co-ar__status.is-ok { color: #ffffff; }

.co-ar__name {
  font-size: 0.37333rem;
  font-weight: 800;
  color: #ffffff;
}

.co-ar__desc {
  margin-top: 0.08rem;
  font-size: 0.29333rem;
  color: #ffffff;
  line-height: 1.35;
}

.co-claim-prog {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.08rem;
  min-width: 0;
  margin-top: 0.2rem;
  margin-bottom: 0.08rem;
}

.co-claim-prog__bar {
  position: relative;
  height: 0.44rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #252d2a 0%, #151a18 100%);
  box-shadow: inset 0 0.03rem 0.08rem rgba(0, 0, 0, 0.55);
  overflow: hidden;
  min-width: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.co-claim-prog__bar > i {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  height: 100%;
  border-radius: inherit;
  max-width: 100%;
  z-index: 0;
  transition: width 0.55s ease;
}

.co-claim-prog.is-gold .co-claim-prog__bar > i {
  background-image: linear-gradient(90deg, #0f9f45 0%, #26e58a 55%, #86e671 100%);
  box-shadow: 0 0 0.12rem rgba(38, 229, 138, 0.35);
}

.co-claim-prog.is-blue .co-claim-prog__bar > i {
  background-image: linear-gradient(90deg, #2f7fd4 0%, #5eb6ff 55%, #9fd0ff 100%);
  box-shadow: 0 0 0.12rem rgba(94, 182, 255, 0.35);
}

.co-claim-prog__pip {
  position: absolute;
  top: 50%;
  width: 0.3rem;
  height: 0.3rem;
  margin: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  pointer-events: none;
  transition: left 0.55s ease;
  animation: co-claim-pip-blink-gold 1.2s ease-in-out infinite;
}

.co-claim-prog__pip::after {
  content: "";
  position: absolute;
  left: 18%;
  top: 16%;
  width: 38%;
  height: 38%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  pointer-events: none;
}

.co-claim-prog.is-gold .co-claim-prog__pip {
  background: radial-gradient(circle at 35% 30%, #fff59a 0%, #ffe14a 38%, #e0b400 72%, #9a7400 100%);
  animation-name: co-claim-pip-blink-gold;
}

.co-claim-prog.is-blue .co-claim-prog__pip {
  background: radial-gradient(circle at 35% 30%, #d8f0ff 0%, #7ec8ff 40%, #3a9adf 72%, #1a5f9a 100%);
  animation-name: co-claim-pip-blink-blue;
}

@keyframes co-claim-pip-blink-gold {
  0%, 100% {
    opacity: 1;
    box-shadow:
      0 0 0 0.03rem rgba(255, 245, 170, 0.35) inset,
      0 0 0.12rem rgba(255, 214, 40, 0.55),
      0 0.04rem 0.1rem rgba(0, 0, 0, 0.45);
  }
  50% {
    opacity: 0.85;
    box-shadow:
      0 0 0 0.03rem rgba(255, 245, 170, 0.5) inset,
      0 0 0.28rem rgba(255, 230, 80, 0.95),
      0 0.04rem 0.1rem rgba(0, 0, 0, 0.45);
  }
}

@keyframes co-claim-pip-blink-blue {
  0%, 100% {
    opacity: 1;
    box-shadow:
      0 0 0 0.03rem rgba(200, 230, 255, 0.35) inset,
      0 0 0.12rem rgba(90, 180, 255, 0.55),
      0 0.04rem 0.1rem rgba(0, 0, 0, 0.45);
  }
  50% {
    opacity: 0.85;
    box-shadow:
      0 0 0 0.03rem rgba(200, 230, 255, 0.5) inset,
      0 0 0.28rem rgba(130, 200, 255, 0.95),
      0 0.04rem 0.1rem rgba(0, 0, 0, 0.45);
  }
}

.co-claim-prog__val {
  position: relative;
  z-index: 4;
  font-size: 0.22rem;
  font-weight: 800;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
  white-space: nowrap;
  pointer-events: none;
  padding: 0.04rem 0.16rem;
  border-radius: 999px;
  background: #101614;
  box-shadow: 0 0 0 0.015rem rgba(255, 255, 255, 0.18);
}

.co-claim-prog__lab {
  font-size: 0.29333rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.co-ar__award {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.24rem;
  font-size: 0.29333rem;
  color: #ffffff;
}

.co-ar__award b {
  color: #ffffff;
  font-size: 0.4rem;
}

.co-ar__btn {
  width: 100%;
  margin-top: 0.24rem;
  height: 0.88rem;
  border: 0;
  border-radius: 0.16rem;
  background: var(--activity-inner);
  color: #ffffff;
  font-size: 0.34667rem;
  font-weight: 800;
  cursor: pointer;
}

.co-ar__btn.is-on {
  background: #d9bc59;
  color: #1a1408;
}

.co-ar__btn.is-done {
  background: #252c2a;
  color: rgba(255, 255, 255, 0.72);
  cursor: default;
}

.co-ar__btn.is-go {
  background: #3e4845;
  color: #ffffff;
}

.co-ar__state {
  padding: 1.2rem 0.4rem;
  text-align: center;
  color: var(--activity-secondary);
  font-size: 0.34667rem;
}

.co-ar__retry,
.co-ar__more {
  margin: 0.32rem auto 0;
  display: block;
  height: 0.88rem;
  padding: 0 0.48rem;
  border: 0;
  border-radius: 0.16rem;
  background: var(--activity-card);
  color: var(--activity-primary);
  font-size: 0.34667rem;
  font-weight: 800;
  cursor: pointer;
}

.co-ar__rec {
  display: flex;
  align-items: center;
  gap: 0.24rem;
  margin: 0.16rem 0.32rem 0;
  padding: 0.26667rem 0.32rem;
  min-height: 1.46667rem;
  border-radius: 0.32rem;
  background: var(--activity-card);
  border: 1px solid var(--activity-border);
}

.co-ar__rec-ico {
  flex: none;
  width: 0.8rem;
  height: 0.8rem;
  display: grid;
  place-items: center;
  border-radius: 0.21333rem;
  color: #27e68b;
  background: rgba(39, 230, 139, 0.16);
}

.co-ar__rec-ico svg {
  width: 0.4rem;
  height: 0.4rem;
}

.co-ar__rec-main {
  min-width: 0;
  flex: 1;
}

.co-ar__rec-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.16rem;
  font-weight: 800;
  color: #ffffff;
}

.co-ar__rec-h strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.co-ar__rec p {
  display: flex;
  justify-content: space-between;
  margin: 0.06rem 0 0;
  font-size: 0.29333rem;
  color: #ffffff;
}

.co-ar__rec b { color: #27e68b; }

.co-ar__toast {
  position: absolute;
  left: 50%;
  bottom: 0.4rem;
  transform: translateX(-50%);
  z-index: 5;
  max-width: 82%;
  padding: 0.2rem 0.36rem;
  border-radius: 0.16rem;
  background: #323b39;
  font-size: 0.32rem;
  font-weight: 700;
}

.co-ar__toast.is-err { color: #ffb4b0; }
