/* ============================================================
   番茄岛 · 任务 & 成就页
   ============================================================ */
.page-heading {
  margin-bottom: 30px;
  align-items: flex-end;
}

.page-heading h1 {
  max-width: 900px;
  font-size: clamp(36px, 3.75vw, 52px);
}

.heading-stats {
  display: flex;
  gap: 10px;
  flex: none;
}

.heading-stat {
  min-width: 92px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--glass);
  box-shadow: var(--shadow-soft);
  text-align: right;
}

.heading-stat span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.05em;
}

.heading-stat strong {
  display: block;
  margin-top: 2px;
  font-family: var(--font-digit);
  font-size: 25px;
  font-weight: 600;
  line-height: 1.1;
}

.heading-stat.accent strong {
  color: var(--primary);
}

/* ---------- tasks layout ---------- */
.tasks-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(300px, 0.8fr);
  gap: 22px;
  align-items: start;
}

.tasks-board {
  padding: 24px;
}

.task-compose {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px 9px 16px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface-strong) 82%, transparent), color-mix(in srgb, var(--surface-2) 72%, transparent));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 6px 18px rgba(72, 50, 26, 0.035);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.task-compose:focus-within {
  border-color: color-mix(in srgb, var(--primary) 55%, var(--line));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 8%, transparent), 0 8px 20px rgba(72, 50, 26, 0.05);
}

.compose-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border: 1px dashed var(--line-strong);
  border-radius: 11px;
  color: var(--primary);
  font-size: 19px;
  font-weight: 300;
  line-height: 1;
}

.compose-field {
  flex: 1;
  min-width: 0;
}

.task-compose input {
  width: 100%;
  height: 32px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
}

.task-compose input::placeholder {
  color: var(--muted);
}

.estimate-field {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 0 8px 0 10px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.estimate-field select {
  height: 32px;
  padding: 0 23px 0 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: 0;
  appearance: none;
  background-color: var(--surface-strong);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23948a78' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 7px center;
  color: var(--text);
  font-family: var(--font-digit);
  font-size: 11px;
}

.task-compose .primary-button {
  min-height: 40px;
  padding: 0 19px;
  font-size: 11px;
}

.board-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 22px 0 12px;
}

.filter-tabs {
  display: flex;
  align-items: center;
  gap: 3px;
}

.filter-tab {
  position: relative;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 99px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  transition: color 0.2s, background 0.2s;
}

.filter-tab span {
  margin-left: 3px;
  font-family: var(--font-digit);
  font-size: 9px;
  opacity: 0.7;
}

.filter-tab:hover {
  color: var(--text);
  background: var(--surface-2);
}

.filter-tab.is-active {
  color: var(--primary);
  background: var(--primary-soft);
}

.board-summary {
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.task-item {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 76px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: color-mix(in srgb, var(--surface-strong) 56%, transparent);
  transition: border-color 0.22s, transform 0.25s var(--ease-spring), background 0.22s, box-shadow 0.25s;
}

.task-item:hover {
  border-color: var(--line-strong);
  background: var(--surface-strong);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(75, 52, 26, 0.05);
}

.task-item.is-active {
  border-color: color-mix(in srgb, var(--primary) 42%, var(--line));
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--primary-soft) 25%, var(--surface-strong)), var(--surface-strong));
}

.task-item.is-active::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 17px;
  bottom: 17px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--primary);
}

.task-item.is-done {
  opacity: 0.66;
  background: color-mix(in srgb, var(--surface-2) 48%, transparent);
}

.task-check {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  color: var(--surface-strong);
  transition: border-color 0.2s, background 0.25s var(--ease-spring), transform 0.25s var(--ease-spring);
}

.task-check:hover {
  border-color: var(--leaf);
  transform: scale(1.08);
}

.task-check .icon {
  width: 13px;
  height: 13px;
}

.task-item.is-done .task-check {
  border-color: var(--leaf);
  background: var(--leaf);
}

.task-content {
  min-width: 0;
}

.task-title-button {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 0;
  text-align: left;
}

.task-title-button > span {
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-item.is-done .task-title-button > span {
  text-decoration: line-through;
  text-decoration-color: var(--muted);
  opacity: 0.7;
}

.active-pin {
  flex: none;
  padding: 2px 7px;
  border-radius: 99px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 8px;
  font-style: normal;
  font-weight: 650;
}

.task-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

.task-pom-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-digit);
}

.task-pom-count .icon {
  width: 11px;
  height: 11px;
}

.task-reward {
  color: var(--accent);
  font-weight: 600;
}

.task-done-label {
  color: var(--leaf);
}

.task-progress {
  width: min(260px, 72%);
  height: 3px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface-2);
}

.task-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.4s var(--ease-spring);
}

.task-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0.3;
  transition: opacity 0.2s;
}

.task-item:hover .task-actions,
.task-item.is-active .task-actions {
  opacity: 1;
}

.task-action-button {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--muted);
  transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.2s;
}

.task-action-button:hover {
  color: var(--primary);
  border-color: var(--line);
  background: var(--surface-2);
  transform: translateY(-1px);
}

.task-action-button.subtle:hover {
  color: var(--danger);
}

.task-action-button .icon {
  width: 14px;
  height: 14px;
}

.task-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 52px 24px 55px;
  text-align: center;
}

.task-empty[hidden] {
  display: none;
}

.empty-illustration {
  position: relative;
  display: grid;
  place-items: center;
  width: 90px;
  height: 90px;
  margin-bottom: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface-2) 62%, transparent);
}

.empty-illustration svg {
  width: 66px;
  height: 66px;
  opacity: 0.8;
}

.empty-check {
  position: absolute;
  right: 1px;
  bottom: 9px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--leaf);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.task-empty h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
}

.task-empty p {
  max-width: 300px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

/* ---------- tasks aside ---------- */
.tasks-aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.missions-card {
  padding: 22px;
}

.panel-desc {
  margin: -2px 0 15px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.reset-note {
  color: var(--muted);
  font-size: 8px;
  white-space: nowrap;
}

.mission-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.mission-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border: 1px solid transparent;
  border-radius: 13px;
  transition: background 0.2s, border-color 0.2s;
}

.mission-item:hover {
  background: var(--surface-2);
}

.mission-item.is-ready {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 36%, transparent);
}

.mission-item.is-claimed {
  opacity: 0.55;
}

.mission-glyph {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--primary);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
}

.mission-item.is-ready .mission-glyph {
  background: var(--accent-soft);
  color: color-mix(in srgb, var(--accent) 76%, var(--text));
}

.mission-copy {
  min-width: 0;
}

.mission-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mission-title-row h3 {
  overflow: hidden;
  flex: 1;
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mission-reward {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: none;
  color: var(--accent);
  font-family: var(--font-digit);
  font-size: 9px;
}

.mission-reward svg {
  width: 11px;
  height: 11px;
}

.mission-copy p {
  margin-top: 1px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mission-progress {
  width: 100%;
  height: 3px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: color-mix(in srgb, var(--line-strong) 40%, transparent);
}

.mission-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.4s var(--ease-spring);
}

.mission-state {
  flex: none;
  min-width: 42px;
  color: var(--muted);
  font-family: var(--font-digit);
  font-size: 9px;
  text-align: right;
}

.mission-state.is-claimed {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--leaf);
  white-space: nowrap;
}

.mission-state .icon {
  width: 11px;
  height: 11px;
}

.mission-claim {
  flex: none;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 8px;
  background: var(--primary);
  color: var(--primary-contrast);
  font-size: 9px;
  font-weight: 650;
  white-space: nowrap;
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s;
}

.mission-claim:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px color-mix(in srgb, var(--primary) 25%, transparent);
}

.task-tip-card {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 19px 20px;
  background:
    radial-gradient(ellipse 90% 90% at 100% 100%, var(--leaf-soft), transparent 70%),
    var(--surface);
}

.tip-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 35px;
  height: 35px;
  border-radius: 12px;
  background: var(--leaf-soft);
  color: var(--leaf);
}

.tip-icon .icon {
  width: 17px;
  height: 17px;
}

.task-tip-card h3 {
  margin-top: 3px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
}

.task-tip-card p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.75;
}

.reward-card {
  padding: 20px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 72% 90% at 100% 0%, var(--accent-soft), transparent 60%),
    var(--surface);
}

.reward-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.reward-card h3 {
  margin-top: 3px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
}

.reward-tomato {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  transform: rotate(7deg);
}

.reward-tomato svg {
  width: 40px;
  height: 40px;
}

.reward-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 13px;
}

.reward-list span {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: color-mix(in srgb, var(--surface-strong) 60%, transparent);
  color: var(--muted);
  font-size: 9px;
}

.reward-list b {
  color: var(--primary);
  font-family: var(--font-digit);
  font-size: 10px;
}

/* ---------- achievements overview ---------- */
.achievement-tally {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: none;
  padding: 11px 17px 11px 12px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--glass);
  box-shadow: var(--shadow-soft);
}

.tally-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

.tally-icon .icon {
  width: 20px;
  height: 20px;
}

.achievement-tally strong {
  display: block;
  font-family: var(--font-digit);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.15;
}

.achievement-tally div > span {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 9px;
}

.achievement-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.8fr);
  gap: 20px;
  margin-bottom: 30px;
}

.level-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 20px;
  padding: 24px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 75% 80% at 98% 5%, var(--accent-soft), transparent 58%),
    radial-gradient(ellipse 60% 60% at 0% 110%, var(--leaf-soft), transparent 62%),
    var(--surface);
}

.level-card::after {
  content: "";
  position: absolute;
  right: -20px;
  top: -35px;
  width: 130px;
  height: 130px;
  border: 1px solid var(--line);
  border-radius: 50%;
  pointer-events: none;
}

.level-orbit {
  position: relative;
  display: grid;
  place-items: center;
  align-self: center;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background:
    conic-gradient(var(--primary) 0deg var(--level-progress, 0deg), var(--surface-2) var(--level-progress, 0deg) 360deg);
  box-shadow: 0 10px 24px rgba(80, 52, 26, 0.09);
}

.level-orbit::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.level-orbit::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px dashed var(--line-strong);
  border-radius: 50%;
  animation: rotate-slow 40s linear infinite;
}

.level-glyph {
  position: relative;
  z-index: 2;
  color: var(--primary);
  font-family: var(--font-display);
  font-size: 35px;
  font-weight: 600;
}

.level-copy {
  min-width: 0;
  align-self: center;
}

.level-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 3px;
}

.level-title-row h2 {
  font-family: var(--font-display);
  font-size: 29px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.level-pill {
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--primary-soft);
  color: var(--primary);
  font-family: var(--font-digit);
  font-size: 9px;
  font-weight: 650;
}

.level-copy > p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}

.level-progress {
  margin-top: 15px;
}

.level-bar {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: color-mix(in srgb, var(--line-strong) 36%, transparent);
}

.level-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  box-shadow: 0 0 12px color-mix(in srgb, var(--primary) 35%, transparent);
  transition: width 0.6s var(--ease-spring);
}

.level-progress > span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

.level-stats {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 2px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.level-stats > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding-left: 13px;
  border-left: 1px solid var(--line);
}

.level-stats > div:first-child {
  padding-left: 0;
  border-left: 0;
}

.level-stats strong {
  font-family: var(--font-digit);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
}

.level-stats span {
  color: var(--muted);
  font-size: 8px;
}

.week-card {
  padding: 22px 24px 18px;
}

.week-total {
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.week-chart {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  height: 178px;
  margin-top: 8px;
  padding: 0 2px;
  border-bottom: 1px solid var(--line);
}

.week-day {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 4px;
}

.week-value {
  height: 13px;
  color: var(--muted);
  font-family: var(--font-digit);
  font-size: 8px;
  line-height: 13px;
}

.week-bar-track {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  max-width: 35px;
  height: 128px;
  overflow: hidden;
  border-radius: 7px;
  background:
    linear-gradient(to top, color-mix(in srgb, var(--line-strong) 8%, transparent), transparent 55%),
    color-mix(in srgb, var(--surface-2) 52%, transparent);
}

.week-bar {
  width: 100%;
  min-height: 0;
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(to top, color-mix(in srgb, var(--primary) 72%, var(--primary-deep)), var(--primary-light));
  box-shadow: 0 -4px 12px color-mix(in srgb, var(--primary) 15%, transparent);
  transition: height 0.55s var(--ease-spring);
}

.week-day.is-today .week-bar {
  background: linear-gradient(to top, var(--accent), var(--primary-light));
}

.week-day.is-today .week-bar-track {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent);
}

.week-day.is-today .week-label {
  color: var(--primary);
  font-weight: 700;
}

.week-label {
  color: var(--muted);
  font-size: 8px;
}

/* ---------- achievements grid ---------- */
.achievement-section-head {
  align-items: flex-end;
  margin-bottom: 17px;
}

.section-heading h2,
.collection-heading h2 {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.section-heading p,
.collection-heading p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.compact-tabs {
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--chip-bg);
}

.compact-tabs .filter-tab {
  min-height: 27px;
  padding: 0 10px;
}

.achievement-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.achievement-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 210px;
  padding: 17px 18px 15px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(ellipse 75% 60% at 100% 0%, color-mix(in srgb, var(--surface-2) 58%, transparent), transparent 60%),
    var(--surface);
  box-shadow: 0 6px 20px rgba(76, 53, 28, 0.035);
  transition: transform 0.3s var(--ease-spring), border-color 0.25s, box-shadow 0.3s;
}

.achievement-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}

.achievement-card.is-ready {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background:
    radial-gradient(ellipse 80% 65% at 100% 0%, var(--accent-soft), transparent 62%),
    var(--surface);
}

.achievement-card.is-ready::after {
  content: "";
  position: absolute;
  right: -28px;
  top: -28px;
  width: 95px;
  height: 95px;
  border: 1px dashed color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: 50%;
}

.achievement-card.is-claimed {
  opacity: 0.75;
  background:
    radial-gradient(ellipse 65% 50% at 100% 0%, var(--leaf-soft), transparent 62%),
    var(--surface);
}

.achievement-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 9px;
}

.achievement-glyph {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: color-mix(in srgb, var(--surface-2) 62%, transparent);
  color: var(--primary);
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.achievement-card.is-ready .achievement-glyph {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  background: var(--accent-soft);
  color: color-mix(in srgb, var(--accent) 72%, var(--text));
}

.achievement-card.is-claimed .achievement-glyph {
  background: var(--leaf-soft);
  color: var(--leaf);
}

.achievement-status-row {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.achievement-category {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.achievement-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: 99px;
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--font-digit);
  font-size: 8px;
  white-space: nowrap;
}

.achievement-badge.is-ready {
  background: var(--accent);
  color: #3b2a0b;
  font-family: var(--font-sans);
  font-weight: 700;
  animation: ready-pulse 2.2s ease-in-out infinite;
}

.achievement-badge.is-claimed {
  background: var(--leaf-soft);
  color: var(--leaf);
  font-family: var(--font-sans);
  font-weight: 600;
}

.achievement-badge .icon {
  width: 10px;
  height: 10px;
}

@keyframes ready-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 35%, transparent); }
  50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 0%, transparent); }
}

.achievement-card h3 {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

.achievement-card > p {
  margin-top: 3px;
  min-height: 31px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.65;
}

.achievement-progress {
  width: 100%;
  height: 4px;
  margin-top: 13px;
  overflow: hidden;
  border-radius: 99px;
  background: color-mix(in srgb, var(--line-strong) 30%, transparent);
}

.achievement-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.5s var(--ease-spring);
}

.achievement-card.is-claimed .achievement-progress span {
  background: var(--leaf);
}

.achievement-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 11px;
}

.achievement-reward {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--accent);
  font-family: var(--font-digit);
  font-size: 11px;
  font-weight: 600;
}

.achievement-reward svg {
  width: 13px;
  height: 13px;
}

.achievement-progress-text,
.achievement-done-text {
  color: var(--muted);
  font-family: var(--font-digit);
  font-size: 9px;
}

.achievement-done-text {
  color: var(--leaf);
}

.claim-achievement {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--primary);
  color: var(--primary-contrast);
  font-size: 9px;
  font-weight: 650;
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s;
}

.claim-achievement:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px color-mix(in srgb, var(--primary) 26%, transparent);
}

/* ---------- skin-aware accents in dark mode ---------- */
html[data-skin="midnight"] .panel,
html[data-skin="midnight"] .timer-card,
html[data-skin="midnight"] .achievement-card {
  background-blend-mode: screen;
}

html[data-skin="midnight"] .task-item {
  background: color-mix(in srgb, var(--surface-strong) 60%, transparent);
}

html[data-skin="midnight"] .brand-mark {
  box-shadow: inset 0 0 0 1px var(--line-strong), 0 6px 20px rgba(0, 0, 0, 0.28);
}

html[data-skin="midnight"] .nav-item.is-active {
  color: var(--primary-contrast);
}

html[data-skin="midnight"] .primary-action-copy small {
  color: rgba(30, 20, 24, 0.62);
}

html[data-skin="midnight"] .primary-action,
html[data-skin="midnight"] .primary-button {
  color: var(--primary-contrast);
}
