.first-challenge{padding:36px 20px;background:#f7fafc}.first-challenge__inner{max-width:1200px;margin:auto}.first-challenge__header{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:24px}.first-challenge__title{width:min(420px,100%);height:auto}.first-challenge__header p{margin:0;font-weight:700}.first-challenge__count{margin-left:auto;padding:8px 16px;border:1px solid #c9d5e8;border-radius:99px;color:#1d3296;font-weight:700}.first-challenge__cards{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}.first-challenge__card{position:relative;min-width:0;display:flex;flex-direction:column;align-items:center;text-align:center;gap:12px;padding:16px 10px;background:#fff;border:1px solid #c9d5e8;border-radius:12px;box-shadow:0 3px 0 #dce4f0}.first-challenge__number{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:#0aa493;color:#fff;font-weight:700}.first-challenge__card h3{min-height:3em;margin:0;color:#142e94;font-size:1rem;line-height:1.5}.first-challenge__card .first-challenge__illustration{width:100%;max-width:150px;height:130px;object-fit:contain}.first-challenge__link,.first-challenge__disabled,.first-challenge__done{display:block;box-sizing:border-box;width:100%;margin-top:auto;padding:8px 5px;border-radius:99px;font-size:.875rem;font-weight:700}.first-challenge__link{border:0;background:#1d3296;color:#fff;text-decoration:none;font-family:inherit;cursor:pointer}.first-challenge__link:focus-visible{outline:3px solid #1d3296;outline-offset:3px}.first-challenge__disabled{background:#e9edf2;color:#555}.first-challenge__disabled+.first-challenge__link{margin-top:0}.first-challenge__done{color:#285950;background:#dce9e7}.first-challenge__card.is-complete{background:#e8edf1;overflow:hidden}.first-challenge__card.is-complete .first-challenge__illustration{filter:saturate(.55);opacity:.7}.first-challenge__stamp{position:absolute;top:58%;left:50%;z-index:2;pointer-events:none;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:55%;max-width:200px;aspect-ratio:1/1;overflow:hidden;background:#fff;border-radius:50%;padding:5px;box-shadow:0 2px 10px rgba(0,0,0,.3);transform:translate(-50%,-50%) rotate(10deg)}.first-challenge__stamp img{display:block;flex:0 1 auto;min-width:0;min-height:0;width:100%;height:100%;object-fit:contain}@media(max-width:1024px){.first-challenge__title{width:min(360px,100%)}.first-challenge__cards{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:600px){.first-challenge__title{width:min(300px,100%)}.first-challenge__cards{grid-template-columns:repeat(2,minmax(0,1fr))}.first-challenge__header{justify-content:center;text-align:center}.first-challenge__count{margin:0}.first-challenge__card h3{font-size:.9rem}.first-challenge__card .first-challenge__illustration{height:100px}}@media(max-width:360px){.first-challenge__cards{grid-template-columns:1fr}.first-challenge__card .first-challenge__illustration{height:120px}}

.first-challenge__heading {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.first-challenge__title {
  box-sizing: border-box;
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding: 10px 20px;
  border: 3px solid #87caff;
  border-radius: 18px;
  background: linear-gradient(110deg, #0b52bb, #1731a4);
  box-shadow: 0 4px 0 #c6dcf7;
  color: #fff;
  font-size: clamp(1.25rem, 2.6vw, 2.125rem);
  font-weight: 800;
  line-height: 1.4;
  text-wrap: balance;
}

.first-challenge__title span { color: #ffe16b; }
.first-challenge__heading p { color: #17318d; font-size: clamp(1rem, 1.8vw, 1.25rem); }

@media (max-width: 600px) {
  .first-challenge__heading { align-items: center; width: 100%; }
  .first-challenge__title { padding: 10px 14px; }
}

/* Keep the stamp background circular even when the image has intrinsic dimensions. */
.first-challenge__stamp { display: grid; place-items: center; }
.first-challenge__stamp img { position: absolute; inset: 5px; width: calc(100% - 10px); height: calc(100% - 10px); }

.first-challenge__ticket-help { box-sizing: border-box; width: 100%; margin: auto 0 0; padding: 8px; border: 1px solid #f0d787; border-radius: 10px; background: #fff8d9; color: #473a17; font-size: .8rem; font-weight: 700; line-height: 1.55; text-align: left; }
.first-challenge__ticket-help + .first-challenge__link { margin-top: 0; }

/* Achievement presentation is scoped to the shared challenge dialog. */
.first-challenge-modal [hidden] { display: none; }
.first-challenge-modal__dialog { width: min(100%, 720px); box-sizing: border-box; padding: 30px 36px 34px; text-align: center; color: #142e94; }
.first-challenge-modal .first-challenge-modal__heading { position: relative; z-index: 1; display: inline-block; max-width: 100%; box-sizing: border-box; margin: 0 0 18px; padding: 8px 28px; border-radius: 100px; background: linear-gradient(100deg,#0865d5,#1731b0); color: #fff; font-size: clamp(1.3rem,3vw,2rem); line-height: 1.35; }
.first-challenge-modal__challenge { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 0 auto 12px; font-weight: 800; font-size: clamp(1.15rem,2.6vw,1.8rem); line-height: 1.5; }
.first-challenge-modal__challenge p { margin: 0; overflow-wrap: anywhere; text-decoration: underline; text-decoration-color: #ffe18b; text-decoration-thickness: .3em; text-underline-offset: -.1em; text-decoration-skip-ink: none; }
.first-challenge-modal__number,.first-challenge-modal__card-number { display: grid; place-items: center; flex: none; border-radius: 50%; background: #0aa493; color: #fff; font-weight: 800; }
.first-challenge-modal__number { width: 48px; height: 48px; }
.first-challenge-modal__fifth { margin: 0 0 10px; font-weight: 800; font-size: 1.2rem; }
.first-challenge-modal__art { position: relative; display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,.8fr); align-items: end; gap: clamp(8px,2vw,20px); box-sizing: border-box; width: min(100%,500px); min-height: 180px; margin: 0 auto 14px; padding: 0 clamp(38px,6vw,56px); }
.first-challenge-modal__illustration { display: block; width: 100%; max-height: 185px; object-fit: contain; justify-self: end; }
.first-challenge-modal__cup { display: block; width: 100%; max-height: 125px; object-fit: contain; justify-self: start; }
.first-challenge-modal__stamp { position: absolute; z-index: 2; top: 4%; left: 58%; width: min(27%,135px); height: auto; opacity: 0; pointer-events: none; }
.first-challenge-modal:not([hidden]) .first-challenge-modal__stamp { animation: challenge-stamp .75s .2s both; }
.first-challenge-modal__spark { position: absolute; z-index: 1; width: clamp(42px,5vw,66px); height: auto; pointer-events: none; animation: challenge-spark-float 3s ease-in-out infinite alternate; }
.first-challenge-modal__spark--left { top: 12%; left: 0; }
.first-challenge-modal__spark--right { top: 18%; right: 0; animation-delay: -.9s; }
.first-challenge-modal__spark--confetti-left { bottom: 4%; left: 2%; width: clamp(32px,4vw,48px); animation-delay: -1.7s; }
.first-challenge-modal__spark--confetti-right { right: 2%; bottom: 0; width: clamp(32px,4vw,48px); animation-delay: -2.2s; }
.first-challenge-modal.is-complete .first-challenge-modal__spark { width: clamp(48px,6vw,72px); }
.first-challenge-modal.is-complete .first-challenge-modal__spark--confetti-left,.first-challenge-modal.is-complete .first-challenge-modal__spark--confetti-right { width: clamp(36px,4.5vw,54px); }
@keyframes challenge-stamp { 0% { opacity: 0; transform: translate(-50%,-70%) rotate(-17deg) scale(1.3); } 42% { opacity: 1; transform: translate(-50%,0) rotate(-10deg) scale(.87); } 66% { transform: translate(-50%,0) rotate(-14deg) scale(1.06); } 84% { transform: translate(-50%,0) rotate(-10deg) scale(.98); } 100% { opacity: 1; transform: translate(-50%,0) rotate(-12deg) scale(1); } }
@keyframes challenge-spark-float { from { transform: translateY(0) rotate(-5deg) scale(.96); } to { transform: translateY(-7px) rotate(5deg) scale(1.05); } }
.first-challenge-modal__progress { padding: 16px 20px; border-radius: 22px; background: #f0f5ff; }
.first-challenge-modal__remaining { margin: 0 0 12px; font-size: clamp(1.1rem,2.5vw,1.55rem); font-weight: 800; }
.first-challenge-modal__steps { position: relative; display: flex; align-items: center; justify-content: space-between; max-width: 440px; margin: 0 auto; padding: 0; list-style: none; }
.first-challenge-modal__steps::before { position: absolute; top: calc(50% - 2px); right: 21px; left: 21px; height: 4px; background: #b9c9dc; content: ""; }
.first-challenge-modal.is-complete .first-challenge-modal__steps::before { background: #0aa493; }
.first-challenge-modal__steps li { position: relative; display: grid; place-items: center; flex: none; width: 42px; height: 42px; border: 3px solid #9cafc8; border-radius: 50%; background: #fff; color: #587d9f; font-weight: 800; }
.first-challenge-modal__steps li.is-done { border-color: #0aa493; background: #0aa493; color: #fff; }
.first-challenge-modal__count { display: inline-block; margin: 12px 0 0; padding: 3px 20px; border: 1px solid #bed0ed; border-radius: 99px; font-weight: 800; }
.first-challenge-modal__all { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 5px; margin: 14px 0 0; padding: 0; list-style: none; }
.first-challenge-modal__all li { min-width: 0; padding: 6px 3px; border: 1px solid #c7d7ee; border-radius: 10px; background: #fff; }
.first-challenge-modal__card-number { width: 22px; height: 22px; margin: 0 auto 2px; font-size: .8rem; }
.first-challenge-modal__all img { display: block; width: 100%; height: 64px; object-fit: contain; }
.first-challenge-modal__card-done { color: #008b71; font-size: .78rem; font-weight: 800; }
.first-challenge-modal__actions { display: flex; justify-content: center; gap: 12px; margin-top: 22px; }
.first-challenge-modal__button { min-width: 140px; min-height: 46px; padding: 8px 18px; border: 1px solid #1731b0; border-radius: 99px; background: #fff; color: #1731b0; font: inherit; font-weight: 800; cursor: pointer; }
.first-challenge-modal__button--primary { background: #1731b0; color: #fff; }
.first-challenge-modal__button:focus-visible { outline: 3px solid #f4b600; outline-offset: 3px; }
.first-challenge-modal.is-complete .first-challenge-modal__actions { justify-content: center; }
@media (max-width: 600px) {
  .first-challenge-modal { padding: 12px; }
  .first-challenge-modal__dialog { max-height: calc(100dvh - 24px); padding: 22px 14px; border-radius: 18px; }
  .first-challenge-modal .first-challenge-modal__heading { padding: 8px 16px; }
  .first-challenge-modal__challenge { gap: 8px; }
  .first-challenge-modal__number { width: 38px; height: 38px; }
  .first-challenge-modal__art { min-height: 130px; padding: 0 26px; gap: 8px; }
  .first-challenge-modal__illustration { max-height: 145px; }
  .first-challenge-modal__cup { max-height: 90px; }
  .first-challenge-modal__stamp { width: 29%; }
  .first-challenge-modal__spark { width: 40px; }
  .first-challenge-modal__spark--confetti-left,.first-challenge-modal__spark--confetti-right { width: 30px; }
  .first-challenge-modal__progress { padding: 14px 8px; }
  .first-challenge-modal__steps li { width: 34px; height: 34px; }
  .first-challenge-modal__steps::before { right: 17px; left: 17px; }
  .first-challenge-modal__all { grid-template-columns: repeat(5,minmax(0,1fr)); gap: 2px; }
  .first-challenge-modal__all li { padding: 4px 1px; }
  .first-challenge-modal__all img { height: 46px; }
  .first-challenge-modal__card-done { font-size: .65rem; }
  .first-challenge-modal__actions { flex-direction: column; align-items: stretch; }
  .first-challenge-modal__button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .first-challenge-modal__spark,.first-challenge-modal:not([hidden]) .first-challenge-modal__stamp { animation: none; }
  .first-challenge-modal__stamp { opacity: 1; transform: translate(-50%,0) rotate(-12deg); }
}
