.main-goals-preview,
.gold-badge-effect-host {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  margin-top: 0;
  pointer-events: none;
  flex-shrink: 0;
}

.gold-badge-effect-host::before,
.gold-badge-effect-host::after {
  content: "";
  position: absolute;
  inset: -1.25rem;
  z-index: -1;
  border-radius: 999rem;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.36) rotate(-8deg);
}

.gold-badge-effect-host::before {
  background:
    radial-gradient(circle at 4% 46%, rgba(255, 242, 166, 0.98) 0 0.085rem, transparent 0.105rem),
    radial-gradient(circle at 16% 10%, rgba(255, 255, 255, 0.9) 0 0.075rem, transparent 0.095rem),
    radial-gradient(circle at 30% 92%, rgba(245, 184, 39, 0.9) 0 0.08rem, transparent 0.1rem),
    radial-gradient(circle at 58% -4%, rgba(255, 235, 137, 0.95) 0 0.085rem, transparent 0.105rem),
    radial-gradient(circle at 94% 32%, rgba(255, 255, 255, 0.86) 0 0.075rem, transparent 0.095rem),
    radial-gradient(circle at 84% 96%, rgba(230, 147, 22, 0.82) 0 0.08rem, transparent 0.1rem);
  animation: main-goals-gold-sparks 1.35s ease-out 0.08s both;
}

.gold-badge-effect-host::after {
  inset: -1.55rem;
  background:
    radial-gradient(circle at -2% 16%, rgba(255, 255, 255, 0.92) 0 0.07rem, transparent 0.09rem),
    radial-gradient(circle at 18% 108%, rgba(255, 219, 91, 0.9) 0 0.08rem, transparent 0.105rem),
    radial-gradient(circle at 50% -12%, rgba(255, 241, 169, 0.95) 0 0.076rem, transparent 0.098rem),
    radial-gradient(circle at 78% 12%, rgba(255, 255, 255, 0.78) 0 0.07rem, transparent 0.09rem),
    radial-gradient(circle at 106% 70%, rgba(240, 174, 35, 0.86) 0 0.08rem, transparent 0.105rem),
    radial-gradient(circle at 60% 118%, rgba(255, 233, 126, 0.86) 0 0.076rem, transparent 0.098rem);
  animation: main-goals-gold-sparks 1.55s ease-out 0.18s both;
}

.card-sub--roster {
  opacity: 1;
  color: rgba(248, 250, 252, 0.75);
}

.card-sub--roster .start-roster-chip:not(.quag-gold-badge) {
  opacity: 0.75;
}

.main-goals-preview__button {
  max-width: 100%;
  gap: 0.32rem;
  padding: 0.22rem 0.52rem;
  font-size: 0.78rem;
  line-height: 1.05;
  cursor: pointer;
  pointer-events: auto;
}

.gold-badge-effect-host .quag-gold-badge {
  pointer-events: auto;
}

.quag-gold-badge {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  border: 0.0625rem solid rgba(255, 230, 138, 0.78);
  border-radius: 999rem;
  background:
    linear-gradient(135deg, rgba(255, 248, 196, 0.95) 0%, rgba(247, 206, 91, 0.98) 34%, rgba(179, 119, 18, 0.98) 100%);
  color: #2f2104;
  font-weight: 700;
  text-shadow: 0 0.0625rem 0 rgba(255, 255, 255, 0.5);
  box-shadow:
    0 0.18rem 0.54rem rgba(120, 76, 6, 0.24),
    inset 0 0.0625rem 0 rgba(255, 255, 255, 0.72),
    inset 0 -0.08rem 0 rgba(93, 57, 4, 0.2);
  overflow: hidden;
  transform-origin: center;
  animation:
    main-goals-badge-enter 0.86s cubic-bezier(0.2, 1.25, 0.28, 1) both,
    main-goals-badge-settle 1.15s ease-out 0.18s;
}

.quag-gold-badge--roster {
  gap: 0.32rem;
  cursor: pointer;
}

.quag-gold-badge::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background:
    radial-gradient(circle at 22% 0%, rgba(255, 255, 255, 0.58), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), transparent 52%);
  pointer-events: none;
}

.quag-gold-badge::after {
  content: "";
  position: absolute;
  top: -60%;
  bottom: -60%;
  left: -78%;
  z-index: 0;
  width: 76%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.04) 12%,
    rgba(255, 244, 181, 0.34) 30%,
    rgba(255, 255, 255, 0.88) 48%,
    rgba(255, 240, 145, 0.5) 64%,
    rgba(255, 255, 255, 0.08) 82%,
    transparent 100%
  );
  transform: translateX(-150%) skewX(-22deg);
  opacity: 0;
  pointer-events: none;
  animation: main-goals-gold-sheen 12s ease-in-out 1.6s infinite;
}

.quag-gold-badge:hover,
.quag-gold-badge:focus-visible {
  background:
    linear-gradient(135deg, rgba(255, 253, 223, 0.98) 0%, rgba(255, 218, 94, 1) 38%, rgba(193, 130, 18, 1) 100%);
  color: #231704;
  box-shadow:
    0 0.22rem 0.72rem rgba(128, 83, 8, 0.32),
    0 0 0 0.14rem rgba(255, 218, 94, 0.18),
    inset 0 0.0625rem 0 rgba(255, 255, 255, 0.78),
    inset 0 -0.08rem 0 rgba(93, 57, 4, 0.18);
}

.main-goals-preview__label,
.main-goals-preview__icons,
.quag-gold-badge > span,
.quag-gold-badge__icons {
  position: relative;
  z-index: 1;
  transform: translateY(0.035rem);
}

.main-goals-preview__label {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  white-space: nowrap;
}

.main-goals-preview__icons,
.quag-gold-badge__icons {
  display: inline-flex;
  align-items: center;
  gap: 0.24rem;
  min-width: 0;
  line-height: 1;
}

.main-goals-preview__icons i,
.quag-gold-badge__icons i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #3b2604;
  font-size: 0.86rem;
  line-height: 1;
}

.offcanvas.gold-insight-offcanvas {
  --bs-offcanvas-height: min(88dvh, 44rem);
  height: min(88dvh, 44rem);
  max-height: calc(100dvh - 0.75rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #1f2a44;
}

.gold-insight-offcanvas .offcanvas-header {
  flex: 0 0 auto;
  padding: 0.85rem 1rem 0.72rem;
  border-bottom: 0.0625rem solid rgba(202, 213, 229, 0.72);
  background: linear-gradient(180deg, #fffdf8 0%, #f8fbff 100%);
}

.gold-insight-offcanvas .offcanvas-title {
  font-size: clamp(1.08rem, 1.45vw, 1.32rem);
  line-height: 1.22;
  font-weight: 800;
  color: #17233a;
}

.gold-insight-offcanvas .btn-close {
  opacity: 0.82;
}

.offcanvas.gold-insight-offcanvas > .offcanvas-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 48%, #fffaf0 100%);
}

.gold-insight-grid,
.future-goals-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 0;
}

.gold-insight-card,
.future-goal-card {
  position: relative;
  border: 0;
  border-top: 0.125rem solid rgba(176, 190, 212, 0.72);
  border-radius: 0;
  background: #fff8e2;
  box-shadow: none;
  padding: 0.88rem 1rem 0.92rem;
  display: flex;
  flex-direction: column;
  gap: 0.66rem;
}

.gold-insight-card::before,
.future-goal-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 0.22rem;
  background: rgba(204, 153, 43, 0.72);
}

.gold-insight-card + .gold-insight-card,
.future-goal-card + .future-goal-card {
  border-top-color: rgba(142, 159, 188, 0.78);
}

.gold-insight-grid > .gold-insight-card:nth-child(even),
.future-goals-grid > .future-goal-card:nth-child(even) {
  background: #eef6ff;
}

.gold-insight-grid > .gold-insight-card:nth-child(even)::before,
.future-goals-grid > .future-goal-card:nth-child(even)::before {
  background: rgba(83, 139, 225, 0.7);
}

.gold-insight-card__header,
.future-goal-card__header {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}

.gold-insight-card__type,
.future-goal-card__type {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  width: fit-content;
  padding: 0;
  font-size: 0.74rem;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  color: #80580c;
  background: transparent;
}

.gold-insight-card__title,
.future-goal-card__title {
  font-size: clamp(1.03rem, 1.2vw, 1.16rem);
  line-height: 1.3;
  font-weight: 800;
  color: #17233a;
}

.gold-insight-card__description,
.future-goal-card__description {
  margin-top: 0;
  font-size: 0.93rem;
  line-height: 1.42;
  color: #52627a;
}

.gold-insight-card__divider,
.future-goal-card__divider {
  border-top: 0.0625rem dashed rgba(157, 174, 201, 0.72);
  margin: 0;
}

.gold-insight-card__section,
.future-goal-card__section {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.gold-insight-card__section-title,
.future-goal-card__section-title {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  width: fit-content;
  padding: 0;
  font-size: 0.78rem;
  line-height: 1.12;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.045em;
  color: #24508f;
  background: transparent;
  margin-bottom: 0;
}

.gold-insight-card__section-title::before,
.future-goal-card__section-title::before {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 999rem;
  background: #78a9ff;
  box-shadow: 0 0 0 0.18rem rgba(120, 169, 255, 0.16);
  flex: 0 0 auto;
}

.gold-insight-card__status,
.future-goal-card__status,
.gold-insight-card__plan,
.future-goal-card__plan {
  border-left: 0.14rem solid rgba(120, 169, 255, 0.72);
  border-radius: 0;
  background: transparent;
  color: #243b5a;
  font-size: 0.96rem;
  line-height: 1.48;
  box-shadow: none;
}

.gold-insight-card__status,
.future-goal-card__status {
  padding: 0 0 0 0.56rem;
}

.gold-insight-card__plan,
.future-goal-card__plan {
  margin: 0;
  padding: 0 0 0 0.56rem;
}

@media (min-width: 768px) {
  .offcanvas.gold-insight-offcanvas {
    left: 50%;
    right: auto;
    width: min(92vw, 56rem);
    margin-inline: auto;
    border-top-left-radius: 1.1rem;
    border-top-right-radius: 1.1rem;
    transform: translate(-50%, 100%);
  }

  .offcanvas.gold-insight-offcanvas.show:not(.hiding),
  .offcanvas.gold-insight-offcanvas.showing {
    transform: translate(-50%, 0);
  }

  .offcanvas.gold-insight-offcanvas.hiding {
    transform: translate(-50%, 100%);
  }

  .gold-insight-offcanvas--count-1 {
    width: min(92vw, 42rem);
  }

  .gold-insight-offcanvas--count-2 {
    width: min(92vw, 58rem);
  }

  .gold-insight-offcanvas--count-3,
  .gold-insight-offcanvas--count-4 {
    width: min(92vw, 74rem);
  }

  .gold-insight-grid,
  .future-goals-grid {
    gap: 0.75rem;
  }

  .gold-insight-grid--count-1,
  .future-goals-grid.goals-count-1 {
    grid-template-columns: minmax(20rem, 35rem);
    justify-content: center;
  }

  .gold-insight-grid--count-2,
  .gold-insight-grid--count-4,
  .future-goals-grid.goals-count-2,
  .future-goals-grid.goals-count-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gold-insight-grid--count-3,
  .future-goals-grid.goals-count-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@keyframes main-goals-badge-enter {
  0% {
    opacity: 0;
    transform: scale(0.68);
    filter: saturate(1.28) brightness(1.28);
  }
  34% {
    opacity: 1;
    transform: scale(1.12);
  }
  56% {
    transform: scale(0.94);
  }
  78% {
    transform: scale(1.04);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    filter: saturate(1) brightness(1);
  }
}

@keyframes main-goals-badge-settle {
  0%, 100% {
    box-shadow:
      0 0.18rem 0.54rem rgba(120, 76, 6, 0.24),
      inset 0 0.0625rem 0 rgba(255, 255, 255, 0.72),
      inset 0 -0.08rem 0 rgba(93, 57, 4, 0.2);
  }
  42% {
    box-shadow:
      0 0.28rem 0.92rem rgba(177, 117, 11, 0.38),
      0 0 0 0.16rem rgba(255, 225, 116, 0.16),
      inset 0 0.0625rem 0 rgba(255, 255, 255, 0.78),
      inset 0 -0.08rem 0 rgba(93, 57, 4, 0.18);
  }
}

@keyframes main-goals-gold-sparks {
  0% {
    opacity: 0;
    transform: scale(0.32) rotate(-10deg);
    filter: blur(0.045rem);
  }
  24% {
    opacity: 1;
  }
  68% {
    opacity: 0.72;
  }
  100% {
    opacity: 0;
    transform: scale(1.95) rotate(10deg);
    filter: blur(0);
  }
}

@keyframes main-goals-gold-sheen {
  0%, 54% {
    opacity: 0;
    transform: translateX(-150%) skewX(-22deg);
  }
  58% {
    opacity: 0.82;
  }
  88% {
    opacity: 0.42;
    transform: translateX(360%) skewX(-22deg);
  }
  92%, 100% {
    opacity: 0;
    transform: translateX(360%) skewX(-22deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .gold-badge-effect-host::before,
  .gold-badge-effect-host::after,
  .quag-gold-badge,
  .quag-gold-badge::after {
    animation: none;
  }
}
