/* 任务列表页：B 封面沉浸卡 · LightSNS 配色
   Scope: .task-article-list-page 的动态列表卡（task-list-cover.css 仅本页族使用）。
   Uses full border + cover + floating trader avatar, no left accent bars.
   配色令牌见同目录 task-list-lightsns.css（--ls-*，取自 lightsns.com）。 */

.task-list-card--cover {
  min-height: 0;
  overflow: hidden;
}

.task-cover-card {
  display: block !important;
  height: 100%;
}

.task-cover-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 8.6;
  overflow: hidden;
  background: var(--ls-bg-hover, #f1f5f9);
}

.task-cover-media > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.task-cover-media::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 56%;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, .58));
  pointer-events: none;
}

.task-cover-flags {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
  max-width: calc(100% - 16px);
}

/* 3X4 任务 → LightSNS warning 家族 */
.task-cover-flag {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border: 1px solid var(--ls-warning, #f59e0b);
  border-radius: 999px;
  background: rgba(255, 251, 235, .95);
  color: #b45309;
  font-size: 10.5px;
  font-style: normal;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}

/* 仙女棒 / 灯塔 → LightSNS accent 紫 */
.task-cover-flag--lightkeeper {
  border-color: var(--ls-accent, #6338f6);
  background: rgba(243, 240, 255, .95);
  color: #4a1fb8;
}

.task-cover-trader {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 1;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  width: max-content;
  max-width: calc(100% - 20px);
  min-width: 0;
  padding: 5px 9px 5px 5px;
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 999px;
  background: rgba(15, 23, 42, .62);
  color: #fff;
  backdrop-filter: blur(5px);
}

.task-cover-avatar {
  display: block;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 50%;
  background: var(--ls-bg-hover, #f1f5f9);
}

.task-cover-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.task-cover-trader__text {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.task-cover-trader__text strong {
  font-size: 12px;
  font-weight: 950;
  line-height: 1.2;
  white-space: nowrap;
}

.task-cover-trader__text span {
  overflow: hidden;
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1.2;
  opacity: .84;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.task-cover-body {
  display: grid;
  gap: 6px;
  padding: 11px 13px 13px;
}

.task-cover-title {
  display: block;
  overflow: hidden;
  color: var(--ls-text, #1f2937);
  font-size: 17px;
  font-weight: 950;
  line-height: 1.28;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-cover-en {
  display: block;
  overflow: hidden;
  margin-top: -2px;
  color: var(--ls-text-muted, #9ca3af);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .4px;
  line-height: 1.3;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.task-cover-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.task-cover-meta em {
  display: inline-flex;
  min-height: 21px;
  align-items: center;
  max-width: 100%;
  padding: 0 7px;
  border: 1px solid var(--ls-border, #e5e7eb);
  border-radius: 999px;
  background: var(--ls-bg, #f8fafc);
  color: var(--ls-text-secondary, #4b5563);
  font-size: 10.5px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-cover-objective {
  display: -webkit-box;
  overflow: hidden;
  min-height: 40px;
  margin: 0;
  color: var(--ls-text-secondary, #4b5563);
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.task-cover-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 6px;
  align-items: start;
  min-width: 0;
}

.task-cover-row b {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  justify-content: center;
  color: var(--ls-text-muted, #9ca3af);
  font-size: 10.5px;
  font-weight: 950;
  line-height: 1;
}

.task-cover-row .task-intel-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.task-cover-row .task-intel-chips em {
  display: inline-flex;
  min-height: 21px;
  align-items: center;
  max-width: 100%;
  padding: 0 7px;
  border: 1px solid var(--ls-border, #e5e7eb);
  border-radius: 999px;
  background: var(--ls-bg, #f8fafc);
  color: var(--ls-text-secondary, #4b5563);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.15;
}

/* 准备项 → LightSNS success */
.task-cover-row .task-intel-chips--prep em {
  border-color: #a7f3d0;
  background: var(--ls-success-light, #ecfdf5);
  color: #047857;
}

/* 限制项 → LightSNS warning */
.task-cover-row .task-intel-chips--risk em {
  border-color: #fcd34d;
  background: var(--ls-warning-light, #fffbeb);
  color: #b45309;
}

.task-list-card--cover:hover,
.task-list-card--cover:focus-within {
  border-color: var(--ls-primary, #3b82f6);
  box-shadow: var(--ls-shadow-md, 0 4px 12px rgba(0, 0, 0, .08));
  transform: translateY(-1px);
}

@media (max-width: 980px) {
  .task-cover-media {
    aspect-ratio: 16 / 8;
  }
}

@media (max-width: 700px) {
  .task-cover-media {
    width: 100%;
    min-height: 128px;
    aspect-ratio: 16 / 7;
  }

  .task-cover-title {
    overflow: visible;
    font-size: 19px;
    line-height: 1.3;
    text-overflow: clip;
    white-space: normal;
  }

  .task-cover-body {
    gap: 7px;
    padding: 13px 14px 14px;
  }

  .task-cover-objective {
    min-height: 0;
    font-size: 13px;
    -webkit-line-clamp: 3;
  }
}

/* 攻略待补：该任务尚无攻略页，卡片不可点 */
.task-cover-flag--soon {
  border-color: var(--ls-border, #e5e7eb);
  background: rgba(248, 250, 252, .95);
  color: var(--ls-text-secondary, #4b5563);
}
