.challenge-day-card {
  position: relative;
  overflow: hidden;
  margin: 1.25rem 0;
  border: 1px solid rgba(184, 143, 83, 0.24);
  border-radius: 18px;
  background: linear-gradient(135deg, #fffdf9 0%, #f8f1e7 100%);
  color: #1e2229;
  box-shadow: 0 14px 32px rgba(30, 34, 41, 0.08);
}

.challenge-day-card::before {
  content: "01";
  position: absolute;
  right: 26px;
  top: 12px;
  color: rgba(184, 143, 83, 0.14);
  font-family: Georgia, serif;
  font-size: 5rem;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.challenge-day-card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, #e6bf6c, #b88f53);
  pointer-events: none;
}

.challenge-day-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px 30px;
  align-items: center;
  padding: 25px 30px 25px 34px;
}

.challenge-day-header {
  grid-column: 1 / -1;
}

.challenge-day-kicker {
  color: #9a6c2c;
}

.challenge-day-title {
  color: #20252b;
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
}

.challenge-day-subtitle {
  color: #68645d;
}

.challenge-day-meta {
  margin: 0;
}

.challenge-day-chip {
  border-color: rgba(184, 143, 83, 0.25);
  border-radius: 7px;
  color: #66502f;
  background: rgba(255, 255, 255, 0.58);
}

.challenge-day-button {
  border: 1px solid #b88f53;
  border-radius: 9px;
  padding: 12px 18px;
  background: #20252b;
  color: #fff;
  font-size: 0.84rem;
  font-weight: 800;
  box-shadow: 0 7px 16px rgba(30, 34, 41, 0.14);
}

.challenge-day-button:hover {
  background: #3b3933;
  box-shadow: 0 10px 22px rgba(30, 34, 41, 0.2);
}

.challenge-day-button:focus-visible,
.challenge-day-option:focus-within {
  outline-color: #d9ae5e;
}

.challenge-day-dialog {
  border-radius: 18px;
  background: #fbf8f2;
  border-color: rgba(184, 143, 83, 0.3);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
}

.challenge-day-dialog-header {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.challenge-day-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 50%;
}

.challenge-day-close:hover {
  background: #efe6d7;
}

.challenge-day-option {
  border-radius: 10px;
  background: #fff;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.challenge-day-option:hover {
  border-color: #c69a54;
  background: #fffaf2;
}

.challenge-day-result {
  border-radius: 14px;
  background: #f4ecdf;
  border-color: rgba(184, 143, 83, 0.24);
}

@media (max-width: 700px) {
  .challenge-day-card::before {
    right: 14px;
    top: 14px;
    font-size: 3.5rem;
  }

  .challenge-day-inner {
    display: block;
    padding: 22px 20px 22px 26px;
  }

  .challenge-day-title {
    max-width: 82%;
    font-size: 1.45rem;
  }

  .challenge-day-meta {
    margin-top: 18px;
  }

  .challenge-day-button {
    width: 100%;
    margin-top: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .challenge-day-button,
  .challenge-day-option {
    transition: none;
  }
}

[data-challenge-of-day-sidebar] .challenge-day-card {
  margin: 0 0 16px !important;
  border-radius: 16px !important;
}

[data-challenge-of-day-sidebar] .challenge-day-card::before {
  display: none !important;
}

[data-challenge-of-day-sidebar] .challenge-day-inner {
  display: block !important;
  padding: 16px 16px 16px 20px !important;
}

[data-challenge-of-day-sidebar] .challenge-day-title {
  max-width: 100% !important;
  margin: 7px 0 6px !important;
  font-size: 1.05rem !important;
}

[data-challenge-of-day-sidebar] .challenge-day-subtitle {
  font-size: 0.76rem !important;
}

[data-challenge-of-day-sidebar] .challenge-day-meta {
  position: static !important;
  justify-content: flex-start !important;
  margin-top: 12px !important;
}

[data-challenge-of-day-sidebar] .challenge-day-button {
  width: 100% !important;
  margin-top: 14px !important;
  padding: 9px 10px !important;
  font-size: 0.75rem !important;
}

/* Keep the challenge aligned with the homepage's cream card system. */
.challenge-day-card {
  isolation: isolate !important;
  background: #fffdf9 !important;
  border-radius: 24px !important;
  box-shadow: 0 12px 30px rgba(30, 34, 41, 0.06) !important;
}

.challenge-day-card::before {
  content: "" !important;
  inset: 0 !important;
  width: auto !important;
  height: auto !important;
  clip-path: none !important;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(250, 247, 242, 0.96)) !important;
  border: 0 !important;
  box-shadow: none !important;
  z-index: -2 !important;
}

.challenge-day-card::after {
  width: 5px !important;
  height: auto !important;
  inset: 0 auto 0 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: linear-gradient(180deg, #dec58f, #b88f53) !important;
  box-shadow: none !important;
  z-index: 2 !important;
}

.challenge-day-title {
  color: var(--text-main, #1e2229) !important;
}

.challenge-day-subtitle {
  color: var(--text-muted, #6b7280) !important;
}

.challenge-day-kicker {
  color: var(--primary-gold, #b88f53) !important;
}

.challenge-day-chip {
  border-color: var(--border-color, rgba(184, 143, 83, 0.2)) !important;
  color: var(--text-main, #1e2229) !important;
  background: var(--bg-cream, #faf7f2) !important;
}

.challenge-day-button {
  background: linear-gradient(135deg, var(--primary-gold, #b88f53), var(--primary-dark, #916f3d)) !important;
  border-color: transparent !important;
  color: #fff !important;
}

.challenge-day-button:hover {
  background: linear-gradient(135deg, var(--primary-light, #dec58f), var(--primary-gold, #b88f53)) !important;
}

.challenge-day-card {
  margin: 0.75rem 0 !important;
}

.challenge-day-inner {
  gap: 12px 24px !important;
  padding: 16px 24px 16px 29px !important;
}

.challenge-day-title {
  margin: 0.3rem 0 0.2rem !important;
  font-size: clamp(1.15rem, 2vw, 1.55rem) !important;
}

.challenge-day-subtitle {
  font-size: 0.8rem !important;
  line-height: 1.4 !important;
}

.challenge-day-meta {
  gap: 6px !important;
  position: absolute;
  top: 18px;
  right: 24px;
  justify-content: flex-end;
}

.challenge-day-chip {
  padding: 5px 8px !important;
  font-size: 0.68rem !important;
}

.challenge-day-button {
  padding: 9px 14px !important;
  font-size: 0.78rem !important;
  grid-column: 1 !important;
  grid-row: 2 !important;
  justify-self: start;
}

.challenge-day-skeleton {
  height: 128px !important;
}

@media (max-width: 700px) {
  .challenge-day-inner {
    padding: 15px 16px 15px 21px !important;
  }

  .challenge-day-title {
    font-size: 1.25rem !important;
  }

  .challenge-day-button {
    margin-top: 12px !important;
    grid-column: 1 !important;
    grid-row: auto !important;
    justify-self: stretch;
  }

  .challenge-day-meta {
    position: static;
    grid-column: 1 !important;
    grid-row: auto !important;
    justify-content: flex-start;
  }
}
