.shell:has(#task-center-page:not([hidden])) #profile-header { display: none; }
.shell:has(#task-center-page:not([hidden])) > .page { grid-row: 2; }

.task-center-list {
  display: grid;
  gap: 16px;
  padding: 12px 12px max(24px, env(safe-area-inset-bottom));
}

.task-center-card {
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 12px;
  background: linear-gradient(118deg, #221e19, #262119) padding-box,
    linear-gradient(125deg, #76605c, #383029 22%, #312c26) border-box;
}

.task-center-card:nth-child(1) { background: linear-gradient(118deg, #221e19, #332a1a 70%, #29241d) padding-box, linear-gradient(125deg, #76605c, #383029 22%, #312c26) border-box; }

.task-center-card-header {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 24px;
  align-items: start;
  gap: 12px;
  padding: 12px;
  background: #12100c4f;
}

.task-center-art {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #373027;
}

.task-center-art img { width: 28px; height: 28px; object-fit: contain; }
.task-center-heading { min-width: 0; color: var(--color-hi); }
.task-center-heading h2 { font-size: 14px; font-weight: 600; line-height: 20px; }
.task-center-heading p { margin-top: 2px; color: var(--color-mid); font-size: 12px; line-height: 18px; }

.task-center-info {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin: 2px auto 0;
  border: 2px solid #867d70;
  border-radius: 50%;
  color: #93877a;
  font: 700 13px/1 Georgia, serif;
}

.task-center-card-body {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.task-center-rule {
  padding: 8px;
  border-radius: 7px;
  background: #ffffff0a;
  color: #c9b58f;
  font-size: 12px;
  line-height: 1.5;
}

.task-center-target {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  color: var(--color-hi);
  font-size: 14px;
  line-height: 18px;
}

.task-center-stage, .task-center-reward p {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 16px;
  margin: 0 0 8px;
  color: var(--color-mid);
  font-size: 12px;
  line-height: 16px;
}

.task-center-stage span, .task-center-currency {
  display: grid;
  flex: none;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #a9967b;
  color: #fff;
  font-size: 10px;
  line-height: 1;
}

.task-center-reward p { justify-content: flex-end; color: #f0dcc1; }
.task-center-reward p:last-child { margin-bottom: 0; }
.task-center-reward svg { width: 13px; height: 13px; }
.task-center-reward strong { font-size: 14px; }
.task-center-currency { background: #259c7d; font-size: 12px; font-weight: 800; }

.task-center-progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.task-center-progress {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 22px;
  overflow: hidden;
  border-radius: 99px;
  background: #ffffff0d;
  color: #fff;
  text-align: center;
  font-size: 11px;
  line-height: 14px;
}

.task-center-progress [data-progress-fill] { position: absolute; inset: 0 auto 0 0; background: #987b4d80; }
.task-center-progress [data-task-progress] { position: relative; padding: 3px 6px; }

.task-center-action {
  min-width: 60px;
  min-height: 28px;
  padding: 3px 8px;
  border: 1px solid #806b68;
  border-radius: 9px;
  background: linear-gradient(145deg, #705b55, #312923);
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
}

.task-center-action:not(:disabled):hover { filter: brightness(1.18); }
.task-center-action:disabled { border-color: #69583e; background: #373027; color: #c9b58f; cursor: default; }

.task-center-steps {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 24px;
  gap: 12px;
  align-items: center;
}

.task-center-step-list { position: relative; display: flex; justify-content: space-between; align-items: center; }
.task-center-step-list::before { content: ''; position: absolute; inset-inline: 12px; top: calc(50% - 1.5px); height: 3px; background: #3d3b39; }

.task-center-step-list button {
  position: relative;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #3b3a39;
  color: #fff;
  font-size: 14px;
}

.task-center-step-list button[aria-pressed='true'] { background: #a9967b; }
.task-center-step-arrow { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid #ffffff12; border-radius: 8px; color: #a9967b; }
.task-center-step-arrow .chevron { width: 7px; height: 7px; }
.task-center-step-arrow[data-step-prev] .chevron { transform: rotate(225deg); }
.task-center-step-arrow:disabled { opacity: .45; cursor: default; }

@media (max-width: 330px) {
  .task-center-steps, .task-center-progress-row { gap: 7px; }
  .task-center-step-list button { width: 22px; height: 22px; }
}

/* Task rules bottom sheet (item 11) */
.task-rules-sheet {
  inset: auto 0 0;
  width: min(100%, 480px);
  max-width: 100%;
  max-height: 82vh;
  margin: 0 auto;
  padding: 10px 18px calc(16px + env(safe-area-inset-bottom));
  overflow-y: auto;
  border: 0;
  border-radius: 16px 16px 0 0;
  background: #1a1612;
  color: #f3e6d6;
  box-shadow: 0 -8px 30px #0008;
}
.task-rules-sheet::backdrop { background: #000a; }
.task-rules-sheet[open] { animation: task-rules-up .22s ease-out; }
@keyframes task-rules-up { from { transform: translateY(40px); } }
.task-rules-grip { display: block; width: 36px; height: 4px; margin: 0 auto 16px; border-radius: 2px; background: #ffffff33; }
.task-rules-sheet h2 { margin: 0 0 14px; font-size: 18px; font-weight: 600; }
.task-rules-sheet h3 { margin: 14px 0 8px; color: #d8c8b6; font-size: 14px; font-weight: 500; }
.task-rules-table-wrap { overflow: hidden; border: 1px solid #ffffff1f; border-radius: 8px; }
.task-rules-sheet table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: center; }
.task-rules-sheet th { padding: 9px 6px; background: #2c2620; color: #cdb9a3; font-weight: 500; }
.task-rules-sheet td { padding: 9px 6px; font-variant-numeric: tabular-nums; }
.task-rules-sheet tbody tr:nth-child(odd) { background: #0d0b09; }
.task-rules-sheet tbody tr:nth-child(even) { background: #2a2622; }
.task-rules-list { margin: 0; padding-left: 20px; list-style: disc; color: #ece0d2; font-size: 13px; line-height: 1.75; }
.task-rules-ok {
  display: block;
  width: 100%;
  min-height: 46px;
  margin-top: 18px;
  border: 1px solid #8a7059;
  border-radius: 10px;
  background: linear-gradient(159deg, #7a6360, #322b25);
  color: #fff1df;
  font-size: 15px;
}
