/* Word Practice layout shared by the live flow and the design preview. */

.wp-switcher {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 14px 0 0;
  padding: 10px 14px;
  border: 2px dashed var(--teal);
  border-radius: 18px;
  background: #fff;
  font-size: 14px;
}

.wp-switcher strong {
  color: var(--teal-deep);
}

.wp-switcher-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wp-switcher a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--cream-deep);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.wp-switcher a[aria-current="true"] {
  background: var(--teal);
  color: #fff;
}

.wp-select {
  max-width: 900px;
  margin: 0 auto;
}

.wp-select-card {
  padding: clamp(20px, 5vw, 42px);
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

.wp-select-card > .btn {
  margin-top: 24px;
}

.wp-select-card h1 {
  margin: 16px 0 6px;
  font-size: clamp(32px, 7vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.daily-challenge {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #d5ece7;
  border-radius: 20px;
  background: #f3fbf9;
}

.daily-challenge-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.daily-challenge-kicker {
  margin: 0 0 4px;
  color: var(--teal-deep);
  font-size: 13px;
  font-weight: 700;
}

.daily-challenge-heading h2 {
  margin: 0;
  font-size: clamp(19px, 4vw, 24px);
  line-height: 1.15;
}

.daily-challenge-emoji {
  flex: none;
  font-size: 38px;
}

.daily-challenge-word {
  margin: 12px 0 4px;
  font-size: 18px;
}

.daily-challenge-word strong {
  letter-spacing: 0.06em;
}

.daily-challenge-status,
.daily-challenge-feedback {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.daily-challenge-details {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.daily-challenge-details p {
  margin: 0;
}

.daily-challenge-listen {
  min-height: 44px;
  margin-top: 12px;
}

.daily-challenge-choices:not([hidden]) {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.daily-challenge-choice {
  display: grid;
  min-width: 0;
  min-height: 84px;
  justify-items: center;
  align-content: center;
  gap: 4px;
  padding: 8px 4px;
  border: 2px solid #e7d4c0;
  border-radius: 14px;
  background: white;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.daily-challenge-choice:hover,
.daily-challenge-choice:focus-visible {
  border-color: var(--teal);
}

.daily-challenge-choice-emoji {
  font-size: 32px;
  line-height: 1.1;
}

.daily-challenge-choice-word {
  font-size: 17px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.daily-challenge-feedback:empty {
  display: none;
}

.wp-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.wp-filter {
  max-width: 100%;
  min-height: 44px;
  padding: 8px 14px;
  border: 2px solid #e7d4c0;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}

.wp-filter.is-active {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.wp-group {
  margin: 26px 0 0;
}

.wp-group-count {
  color: var(--muted);
  font-size: 0.85em;
}

.wp-group h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.wp-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wp-card {
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 18px 10px 14px;
  border-radius: 22px;
  background: #fff8ee;
  box-shadow: inset 0 0 0 1px #f0dfc9;
  color: var(--ink);
  border: 0;
  font: inherit;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

.wp-card:hover,
.wp-card:focus-visible {
  box-shadow: inset 0 0 0 2px var(--teal);
}

.wp-card-emoji {
  font-size: clamp(44px, 9vw, 60px);
  line-height: 1.1;
}

.wp-card-stage {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 126px;
  place-items: center;
  overflow: hidden;
  border-radius: 16px;
  background: #ffe4e6;
}

#word-things .wp-card-stage {
  background: #fef3c7;
}

.wp-card-status {
  position: absolute;
  top: 8px;
  left: 8px;
  max-width: calc(100% - 16px);
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.wp-card-status.is-complete {
  color: var(--teal-deep);
}

.wp-card-word {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.wp-card-meta {
  color: var(--muted);
  font-size: 14px;
}

.wp-card-phonics {
  color: var(--muted);
  font-size: 13px;
}

.wp-card-progress {
  display: flex;
  min-height: 12px;
  align-items: center;
  gap: 5px;
}

.wp-progress-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ddd6ce;
}

.wp-progress-dot.is-complete {
  background: var(--teal);
}

.wp-card-action {
  margin-top: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.wp-note {
  margin: 10px 0 0;
  padding: 8px 12px;
  border-radius: 12px;
  background: #fff7d6;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.wp-rewards {
  margin: 18px 0 0;
  padding: 14px;
  border: 1px solid #f0dfc9;
  border-radius: 18px;
  background: #fffaf1;
}

.wp-rewards h2 {
  margin: 12px 0 8px;
  font-size: 17px;
}

.wp-daily-goal {
  margin: 0;
  padding: 8px 12px;
  border-radius: 12px;
  background: #eaf6ff;
  color: #264d69;
  font-size: 14px;
  font-weight: 700;
}

.wp-storage-warning {
  margin: 8px 0 0;
  color: #8d3c23;
  font-size: 13px;
  font-weight: 700;
}

.wp-sticker-shelf {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wp-sticker {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 3px;
  border-radius: 12px;
  background: #fff0dc;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.wp-sticker:not(.is-earned) {
  background: #f5f2ec;
}

.wp-sticker-emoji {
  font-size: 22px;
  line-height: 1.2;
}

.wp-sticker:not(.is-earned) .wp-sticker-emoji {
  filter: grayscale(1);
  opacity: 0.55;
}

.wp-sticker-status {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.wp-completion-reward:not([hidden]) {
  display: block;
  margin: 12px auto;
  padding: 10px 14px;
  border-radius: 14px;
  background: #fff0bf;
  color: #624a0c;
  font-weight: 700;
  animation: sticker-pop 500ms ease-out both;
}

@keyframes sticker-pop {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

.wp-word-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.wp-word-emoji {
  font-size: 40px;
  line-height: 1;
}

.wp-word-name {
  margin: 0;
  font-size: 26px;
  letter-spacing: 0.04em;
}

.wp-preview-view .name-tile {
  cursor: default;
}

.wp-completed-emoji {
  display: block;
  margin-bottom: 6px;
  font-size: 56px;
  line-height: 1;
}

.word-tracing .stars-pill {
  display: none;
}

.wp-preview-view .completed-full-name {
  letter-spacing: 0.06em;
}

.wp-preview-view .completed-tiles {
  max-width: 300px;
}

@media (max-width: 719px) {
  .wp-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

@media (max-width: 560px) {
  .wp-sticker-shelf {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 340px) {
  .wp-cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .wp-sticker-shelf {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .wp-word-head {
    margin-bottom: 8px;
  }

  .wp-word-emoji {
    font-size: 32px;
  }

  .wp-word-name {
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wp-completion-reward {
    animation: none;
  }
}
