:root {
  color-scheme: light;
  font-family: "Nunito", ui-rounded, "Arial Rounded MT Bold", sans-serif;
  font-synthesis: none;
  --page-width: 448px;
  --heading: #195975;
  --muted: #7692a5;
  --blue: #2693b8;
  --accent: #35bce8;
  --gold: #c38428;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --motion-press: 120ms;
  --motion-step: 180ms;
  --motion-panel: 200ms;
}

* { box-sizing: border-box; }
body { position: relative; min-height: 100svh; margin: 0; background: #f0f8ff; color: var(--muted); }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible { outline: 3px solid #1888b0; outline-offset: 5px; }
svg { display: block; width: 1em; height: 1em; flex-shrink: 0; }
p, h1 { margin: 0; }
[hidden] { display: none !important; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }

.task-panel {
  position: relative;
  touch-action: pan-y pinch-zoom;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--page-width);
  min-height: 712px;
  min-height: max(712px, 100svh);
  margin-inline: auto;
  padding: 47px 27px 25px;
  overflow: hidden;
  border: 1px solid #fff;
  border-radius: 30px;
  background: linear-gradient(150deg, #f1fbff 0%, #fcfeff 48%, #fff 67%, #f2fbff 100%);
  box-shadow: 0 12px 38px #19597510;
  transition: opacity var(--motion-panel) var(--ease-out), transform var(--motion-panel) var(--ease-out);
}
.task-panel[data-closed] { opacity: 0; transform: translateY(8px) scale(.98); pointer-events: none; }

.close-button {
  position: absolute;
  top: 10px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 8px;
  border: 0;
  border-radius: 50%;
  color: #64879b;
  background: #e6f2f8;
}
.close-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; }
.step-summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.step-label { color: #258fb2; font-size: 12px; font-weight: 1000; letter-spacing: 1.4px; }
.completed-label { font-size: 12px; font-weight: 600; }
.step-progress { display: flex; gap: 6px; margin-top: 24px; }
.step-segment { position: relative; flex: 1; height: 5px; padding: 0; border: 0; border-radius: 0; background: #deedf3; }
.step-segment::after { content: ""; position: absolute; inset: -9px 0; }
.step-segment::before { content: ""; position: absolute; inset: 0; background: var(--accent); opacity: 0; transform: scaleX(.85); transition: opacity var(--motion-press) ease, transform var(--motion-step) var(--ease-out); }
.step-segment.is-current::before, .step-segment.is-complete::before { opacity: 1; transform: scaleX(1); }

.task-viewport { position: relative; overflow: clip; touch-action: pan-y pinch-zoom; }
.task-swipe-track { position: relative; transition: transform var(--motion-step) var(--ease-out); }
.task-swipe-track[data-dragging] { user-select: none; -webkit-user-select: none; }
.task-content { display: flex; align-items: center; flex-direction: column; min-height: 319px; text-align: center; transition: opacity var(--motion-step) var(--ease-out), transform var(--motion-step) var(--ease-out); }
.task-content.task-preview { position: absolute; top: 0; left: 0; width: 100%; min-height: 100%; pointer-events: none; }
.task-content[data-phase="leaving"] { opacity: 0; transform: translateX(-8px); transition-duration: 100ms; }
.task-content[data-phase="entering"] { opacity: 0; transform: translateX(8px); transition: none; }
.task-content[data-direction="backward"][data-phase="leaving"] { transform: translateX(8px); }
.task-content[data-direction="backward"][data-phase="entering"] { transform: translateX(-8px); }
.task-illustration { position: relative; width: 112px; height: 112px; margin-top: 30px; }
.illustration-tile {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 5px solid #effbff;
  border-radius: 33px;
  background: linear-gradient(135deg, #d7f3ff, #c2ecfb);
  box-shadow: 0 12px 29px #369ac417;
  color: #2694b8;
}
.register-icon { width: 79px; height: 71px; margin-top: 7px; margin-left: 2px; }
.flame-bubble { position: absolute; right: -7px; bottom: -7px; display: grid; place-items: center; width: 40px; height: 40px; border: 3px solid #fff; border-radius: 50%; background: #fff0d6; color: #f79a1e; }
.flame-bubble svg { width: 13px; height: 18px; }
.reward-badge { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 29px; margin-top: 30px; padding: 5px 13px; border-radius: 30px; background: #fff0d9; color: #ce841d; font-size: 12px; line-height: 19px; font-weight: 1000; }
.reward-badge svg { width: 9px; height: 12px; }
h1 { margin-top: 16px; color: var(--heading); font-size: 29px; font-weight: 1000; line-height: 1.4; letter-spacing: -.65px; }
.task-description { margin-top: 12px; font-size: 15px; line-height: 1.65; font-weight: 600; color: #6f8b9e; }

.confirmed-progress { margin-top: 28px; padding: 16px 17px 15px; border: 1px solid #dcebf3; border-radius: 17px; background: #f7fbfe; }
.progress-summary { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: #7799b0; }
.progress-count { display: inline-flex; align-items: center; gap: 4px; color: #e28e26; font-weight: 800; }
.progress-count svg { width: 9px; height: 12px; }
.reward-progress { height: 8px; margin-top: 10px; overflow: hidden; border-radius: 8px; background: #e2eef5; }
.reward-progress > span { display: block; width: 100%; height: 100%; border-radius: inherit; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform var(--motion-panel) linear; }
.reward-conversion { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 11px; color: var(--gold); font-size: 14px; font-weight: 1000; }
.reward-conversion > span { display: inline-flex; align-items: center; gap: 4px; }
.reward-conversion svg { width: 10px; height: 14px; }
.reward-conversion .conversion-arrow { width: 16px; height: 16px; color: #8ca8b6; }

.task-footer { margin-top: auto; padding-top: 35px; }
.task-action { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 53px; padding: 13px 16px; border: 0; border-radius: 16px; background: linear-gradient(#37bee9, #1d9dc8); box-shadow: 0 4px 0 #cde6f0; color: #fff; font: inherit; font-size: 16px; font-weight: 1000; line-height: 1.5; text-align: center; text-decoration: none; cursor: pointer; }
.task-action svg { width: 17px; height: 17px; }
.task-action:active:not([aria-disabled="true"]) { transform: translateY(2px) scale(.98); }
.task-action[aria-disabled="true"] { cursor: default; background: #83bad0; box-shadow: 0 4px 0 #dcecf3; }
.step-navigation { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 17px; }
.step-navigation button { display: inline-flex; align-items: center; justify-content: center; gap: 3px; min-height: 27px; padding: 3px 8px; border: 0; background: transparent; color: #6a8aa0; font-size: 13px; line-height: 1.5; font-weight: 1000; }
.step-navigation svg { width: 15px; height: 15px; }
.back-arrow { transform: rotate(180deg); }
.footer-note { margin-top: 15px; color: #809bb0; font-size: 10.5px; line-height: 1.7; font-weight: 600; text-align: center; }
.closed-panel { position: absolute; top: 0; right: 0; left: 0; display: grid; align-items: center; max-width: var(--page-width); min-height: 100svh; margin-inline: auto; padding: 28px; transition: opacity var(--motion-panel) var(--ease-out), transform var(--motion-panel) var(--ease-out); }
.closed-panel[data-closed] { opacity: 0; transform: translateY(8px); pointer-events: none; }
.close-button, .step-navigation button, .task-action { transition: transform var(--motion-press) var(--ease-out), opacity var(--motion-press) ease; }
.close-button:active, .step-navigation button:active:not(:disabled) { transform: scale(.95); }
.step-navigation button:disabled { opacity: .65; }

@media (hover: hover) and (pointer: fine) {
  .close-button:hover { background: #d9edf7; }
  .task-action:hover:not([aria-disabled="true"]) { opacity: .92; }
  .step-navigation button:hover:not(:disabled) { color: var(--heading); }
  .step-navigation button:hover:not(:disabled) svg { translate: 2px 0; }
  .step-navigation button:hover:not(:disabled) .back-arrow { translate: -2px 0; }
  .step-navigation svg { transition: translate var(--motion-press) var(--ease-out); }
}

@media (max-width: 374px) {
  .task-panel { padding-inline: 20px; }
  .step-label { font-size: 11px; letter-spacing: 1px; }
  .completed-label { font-size: 11px; }
  h1 { font-size: 25px; }
  .task-description { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .task-swipe-track { transition: none; }
  .task-panel, .closed-panel, .task-content { transition-property: opacity; transition-duration: 120ms; }
  .task-panel[data-closed], .closed-panel[data-closed],
  .task-content[data-phase="leaving"], .task-content[data-phase="entering"] { transform: none !important; }
  .close-button:active, .step-navigation button:active:not(:disabled), .task-action:active:not([aria-disabled="true"]) { transform: none; opacity: .8; }
  .step-navigation button:hover:not(:disabled) svg { translate: none; }
  .step-segment::before { transform: none; transition-property: opacity; }
  .reward-progress > span { transition: none; }
}
