﻿/* Prompt card component */
.pm-card {
  width: 100%;
  max-width: var(--pm-card-max-width, 100%);
  --pm-card-min-height: 0px; /* 不强制统一高度，改用内边距和间距控制垂直节奏 */
  --pm-card-block-x: 1.15rem;
  --pm-card-block-y: 0.5rem; /* 上下留白对称，突出上下等压感 */
  --pm-card-column-gap: 0.85rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) max-content;
  grid-template-rows: auto auto;
  align-items: stretch;
  column-gap: var(--pm-card-column-gap);
  row-gap: 0;
  padding: var(--pm-card-block-y) var(--pm-card-block-x);
  min-height: var(--pm-card-min-height);
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: linear-gradient(130deg, rgba(255, 255, 255, 0.98), rgba(247, 249, 253, 0.94));
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 180ms ease, box-shadow 180ms ease;
  overflow: hidden;
  min-width: 0;
}

.pm-card:hover {
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: 0 12px 24px rgba(59, 130, 246, 0.12), 0 4px 8px rgba(59, 130, 246, 0.08);
}

body.sheet-open .pm-card,
body.sheet-open .pm-card:hover,
.pm-card.pm-card--active,
.pm-card.pm-card--active:hover {
  transform: none !important;
}

.pm-card__body {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* 内容顶部对齐，避免额外垂直空白 */
  padding: 0 0;
  gap: 0.35rem;
}

.pm-card__body-main {
  flex: 1 1 70%;
  display: flex;
  flex-direction: column;
  gap: 0.16rem;
  justify-content: flex-start; /* 保持与父级一致的顶部对齐 */
}

.pm-card__info-row {
  grid-column: 2 / span 2;
  grid-row: 2;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  position: relative;
  margin-top: 0.35rem; /* 控制正文与信息行之间的统一间距 */
  padding-top: 0.2rem; /* 轻量分割线间距，减少向下偏移 */
}

.pm-card__info-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 4%;
  right: 4%;
  height: 1px;
  background: rgba(148, 163, 184, 0.45);
  border-radius: 999px;
  pointer-events: none;
}

.pm-card__author {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
}

.pm-card__avatar {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  object-fit: cover;
  flex-shrink: 0;
  background: linear-gradient(135deg, #e0f2fe, #ede9fe);
}

.pm-card__author-name {
  font-size: 0.76rem;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pm-card__last-used {
  font-size: 0.72rem;
  font-weight: 500;
  color: #6b7280;
  white-space: nowrap;
}

.pm-card__favorite {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #b45309;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.pm-card__favorite i {
  font-size: 0.82rem;
  line-height: 1;
  transition: color 120ms ease, transform 120ms ease;
}

.pm-card.is-favorite-sync-pending .pm-card__favorite i,
.pm-card.is-favorite-sync-pending [data-action="favorite-card"] i {
  transform: scale(0.96);
}

.pm-card__favorite-count {
  color: #b45309;
}

.pm-card__favorite[data-favorite-readonly="1"] {
  cursor: default;
  user-select: none;
}

.pm-card .pm-card__meta-icon.is-favorite-unavailable,
.pm-card .pm-card__favorite.is-favorite-unavailable {
  color: #94a3b8;
  cursor: not-allowed;
  opacity: 0.72;
}

.pm-card .pm-card__meta-icon.is-favorite-unavailable i,
.pm-card .pm-card__favorite.is-favorite-unavailable i,
.pm-card .pm-card__favorite.is-favorite-unavailable .pm-card__favorite-count {
  color: #94a3b8;
}

.pm-card .pm-card__meta-icon.is-favorite-unavailable:hover,
.pm-card .pm-card__favorite.is-favorite-unavailable:hover {
  transform: none;
  box-shadow: none;
}

.pm-card__meta {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  padding: 0 0;
  gap: 0.35rem;
  min-width: 0;
}

.pm-card__meta-capsule {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
  min-width: 55px;
  padding: 6px 4px;
  gap: 0.1rem;
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.96);
  border: 1px solid rgba(203, 213, 225, 0.9);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.pm-card__meta-top,
.pm-card__meta-bottom {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pm-card__meta-divider {
  flex: 0 0 1px;
  width: 72%;
  align-self: center;
  background: rgba(148, 163, 184, 0.6);
  border-radius: 999px;
}

.pm-card__meta-icon {
  width: 34px;
  height: 34px;
  padding: 0;
}

.pm-card__actions-left {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 70px;
  max-width: 70px;
  margin-top: calc(-1 * var(--pm-card-block-y));
  margin-bottom: calc(-1 * var(--pm-card-block-y));
  margin-left: calc(-1 * var(--pm-card-block-x));
}

.pm-card__title {
  font-size: 0.84rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0;
}

.pm-card__snippet {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: rgba(15, 23, 42, 0.78);
  text-align: justify;
  text-justify: inter-ideograph;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* 限制摘要最多 2 行，防止个别卡片被长文案撑高 */
  -webkit-box-orient: vertical;
  line-clamp: 3;
  overflow: hidden;
}

.pm-card__timestamp {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: rgba(71, 85, 105, 0.9);
  font-weight: 600;
  text-align: center;
  width: 100%;
}

.pm-card__actions-right {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.pm-card__meta-link {
  border: 0;
  background: transparent;
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 650;
  padding: 0.2rem 0;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: none;
  transition: color 140ms ease, text-decoration-color 140ms ease;
  width: 100%;
  text-align: center;
}

.pm-card__meta-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.pm-card__meta-link:active {
  text-decoration: underline;
}

.pm-card__action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0;
  padding: 0.4rem 0.55rem; /* 缩小左右内边距，让操作列更紧凑 */
  min-height: 48px;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 0.78rem;
  font-weight: 600;
  color: inherit;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.pm-card__action-btn--primary {
  background: rgba(219, 234, 254, 0.95);
  color: #1d4ed8;
}

.pm-card__action-btn--primary:hover {
  background: #1d4ed8;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(59, 130, 246, 0.22);
}

.pm-card__action-btn--secondary {
  background: rgba(243, 232, 255, 0.95);
  color: #7c3aed;
}

.pm-card__action-btn--secondary:hover {
  background: #7c3aed;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(124, 58, 237, 0.22);
}

.pm-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(248, 250, 252, 0.92);
  color: rgba(30, 41, 59, 0.9);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.pm-icon-btn svg {
  width: 18px;
  height: 18px;
}

.pm-icon-btn svg path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: fill 160ms ease, stroke 160ms ease;
}

.pm-icon-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(59, 130, 246, 0.22);
  border-color: rgba(59, 130, 246, 0.5);
  color: #2563eb;
  background: #f8fbff;
}

.pm-card .pm-icon-btn:hover {
  transform: none;
}

.pm-icon-btn--surface {
  background: rgba(248, 250, 252, 0.98);
  border-color: rgba(226, 232, 240, 0.95);
}

.pm-icon-btn--surface:hover {
  background: #eff6ff;
}

.pm-icon-btn--favorite {
  background: rgba(255, 247, 237, 0.9);
  border-color: rgba(251, 191, 36, 0.6);
  color: #b45309;
}

.pm-icon-btn--favorite:hover {
  color: #ea580c;
  border-color: rgba(249, 115, 22, 0.6);
  background: rgba(253, 230, 173, 0.9);
  box-shadow: 0 14px 28px rgba(249, 115, 22, 0.25);
}

.pm-icon-btn--favorite[aria-pressed="true"] {
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #facc15);
  border-color: transparent;
  box-shadow: 0 18px 36px rgba(249, 115, 22, 0.42);
}

.pm-icon-btn--favorite[aria-pressed="true"] svg path {
  fill: currentColor;
  stroke: currentColor;
}

.pm-card__actions-left > .pm-card__action-btn:first-child {
  border-top-left-radius: 16px;
}

.pm-card__actions-left > .pm-card__action-btn:last-child {
  border-bottom-left-radius: 16px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 520px) {
  .pm-card {
    --pm-card-block-x: 0.9rem;
    --pm-card-block-y: 0.46rem;
    --pm-card-column-gap: 0.68rem;
  }

  .pm-card__actions-left {
    min-width: 62px;
    max-width: 62px;
  }

  .pm-card__action-btn {
    min-height: 44px;
    padding: 0.34rem 0.4rem;
    font-size: 0.72rem;
  }

  .pm-card__meta-icon,
  .pm-icon-btn {
    width: 34px;
    height: 34px;
  }

  .pm-card__title {
    font-size: 0.8rem;
  }

  .pm-card__snippet {
    font-size: 0.76rem;
    line-height: 1.38;
  }

  .pm-card__author-name {
    font-size: 0.74rem;
  }

  .pm-card__last-used {
    font-size: 0.7rem;
  }

  .pm-card__favorite {
    font-size: 0.72rem;
  }
}

@media (max-width: 380px) {
  .pm-card {
    --pm-card-block-x: 0.68rem;
    --pm-card-block-y: 0.38rem;
    --pm-card-column-gap: 0.5rem;
    border-radius: 14px;
  }

  .pm-card__actions-left {
    min-width: 54px;
    max-width: 54px;
  }

  .pm-card__actions-left > .pm-card__action-btn:first-child {
    border-top-left-radius: 14px;
  }

  .pm-card__actions-left > .pm-card__action-btn:last-child {
    border-bottom-left-radius: 14px;
  }

  .pm-card__action-btn {
    min-height: 38px;
    padding: 0.26rem 0.28rem;
    font-size: 0.66rem;
  }

  .pm-card__meta-icon,
  .pm-icon-btn {
    width: 30px;
    height: 30px;
  }

  .pm-card__info-row {
    margin-top: 0.24rem;
    padding-top: 0.14rem;
    gap: 0.35rem;
  }

  .pm-card__avatar {
    width: 18px;
    height: 18px;
  }

  .pm-card__author {
    gap: 0.18rem;
  }

  .pm-card__author-name {
    font-size: 0.7rem;
  }

  .pm-card__last-used {
    display: none;
  }

  .pm-card__favorite {
    font-size: 0.68rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pm-card,
  .pm-card__action-btn,
  .pm-icon-btn {
    transition-duration: 0s !important;
  }
}

/* V2 asset cards: shared Prompt / Set / Folder visual language. */
.pm-v2-card {
  --pm-v2-radius: 18px;
  --pm-v2-media-height: 226px;
  --pm-v2-action-height: 40px;
  position: relative;
  overflow: visible;
  border: 1px solid rgba(203, 213, 225, 0.92);
  border-radius: var(--pm-v2-radius);
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.085), 0 1px 3px rgba(15, 23, 42, 0.055);
}

.pm-card.pm-v2-card,
.pm-folder-card.pm-v2-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  grid-template-columns: none;
  grid-template-rows: none;
  min-height: 0;
  padding: 0;
  column-gap: 0;
  row-gap: 0;
  overflow: visible;
}

.pm-v2-card:hover {
  border-color: rgba(59, 130, 246, 0.38);
  box-shadow: 0 12px 24px rgba(59, 130, 246, 0.12), 0 4px 8px rgba(59, 130, 246, 0.08);
}

.pm-v2-card__media {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  width: 100%;
  box-sizing: border-box;
  min-height: var(--pm-v2-media-height);
  overflow: visible;
  border-top-left-radius: calc(var(--pm-v2-radius) - 1px);
  border-top-right-radius: calc(var(--pm-v2-radius) - 1px);
  background:
    radial-gradient(circle at 18% 12%, rgba(59, 130, 246, 0.12), transparent 28%),
    linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
}

.pm-v2-card__media::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 92px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.13));
  pointer-events: none;
}

.pm-v2-card__media--cover::after,
.pm-v2-card__media:has(.pm-v2-card__tiles)::after {
  height: 112px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, 0.10) 48%, rgba(15, 23, 42, 0.42) 100%);
}

.pm-v2-card__cover,
.pm-v2-card__tile {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.pm-v2-card__cover {
  min-height: var(--pm-v2-media-height);
  border-top-left-radius: calc(var(--pm-v2-radius) - 1px);
  border-top-right-radius: calc(var(--pm-v2-radius) - 1px);
  background-color: #0f172a;
}

/* A private Cloud v2 preview can be mounted before media authority finishes
   activation. Show a neutral loading surface instead of a permanent black
   cover while the owner-scoped hydration retry is pending. */
.pm-v2-card__cover.is-effect-image-hydrating,
.pm-v2-card__tile.is-effect-image-hydrating,
.pm-v2-card__cover.is-effect-image-hydration-failed,
.pm-v2-card__tile.is-effect-image-hydration-failed {
    background-color: #eef3fb;
    background-image: linear-gradient(110deg, #eef3fb 8%, #f8faff 18%, #eef3fb 33%);
    background-size: 200% 100%;
}

.pm-v2-card__cover.is-effect-image-hydrating,
.pm-v2-card__tile.is-effect-image-hydrating {
    animation: pm-effect-image-hydrating 1.15s linear infinite;
}

@keyframes pm-effect-image-hydrating {
    to { background-position-x: -200%; }
}

.pm-v2-card__tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  min-height: var(--pm-v2-media-height);
  overflow: hidden;
  border-top-left-radius: calc(var(--pm-v2-radius) - 1px);
  border-top-right-radius: calc(var(--pm-v2-radius) - 1px);
  background: #e2e8f0;
}

.pm-v2-card__tiles[data-count="1"] {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}

.pm-v2-card__tiles[data-count="2"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
}

.pm-v2-card__tiles[data-count="3"] {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.pm-v2-card__tiles[data-count="3"] > .pm-v2-card__tile:first-child {
  grid-row: 1 / span 2;
}

.pm-v2-card__tile {
  min-height: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.44);
  border-bottom: 1px solid rgba(255, 255, 255, 0.44);
}

.pm-v2-card__placeholder {
  display: grid;
  place-items: center;
  min-height: var(--pm-v2-media-height);
  padding: 22px;
  overflow: hidden;
  border-top-left-radius: calc(var(--pm-v2-radius) - 1px);
  border-top-right-radius: calc(var(--pm-v2-radius) - 1px);
  color: #2563eb;
  text-align: center;
}

.pm-v2-card__placeholder--prompt {
  background: transparent;
}

.pm-v2-card__placeholder--set {
  background:
    linear-gradient(135deg, rgba(79, 70, 229, 0.12), transparent 45%),
    linear-gradient(145deg, #f8fafc 0%, #eef2ff 100%);
}

.pm-v2-card__placeholder--folder {
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.12), transparent 42%),
    linear-gradient(145deg, #f8fafc 0%, #ecfeff 100%);
}

.pm-v2-card__asset-mark {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  color: #2563eb;
}

.pm-v2-card__asset-mark svg {
  width: 58px;
  height: 58px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pm-v2-card__type {
  position: absolute;
  top: -10px;
  right: 13px;
  z-index: 12;
}

.asset-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 20px;
  padding: 0 8px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.98);
  color: #334155;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.015em;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), 0 5px 12px rgba(15, 23, 42, 0.09);
  backdrop-filter: blur(12px);
}

.pm-v2-card__batch {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 7;
}

.pm-v2-card__edit {
  position: absolute;
  top: calc(var(--pm-v2-media-height) + 22px);
  right: 11px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pm-v2-card__edit .pm-card__meta-icon {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.86);
  color: rgba(30, 41, 59, 0.86);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.10);
  backdrop-filter: blur(10px);
}

.pm-v2-card__media-title {
  position: absolute;
  left: 12px;
  right: 14px;
  bottom: 10px;
  z-index: 3;
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #111827;
  font-size: 14.7px;
  font-weight: 850;
  line-height: 1.18;
  letter-spacing: 0;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.pm-folder-card.pm-v2-card .pm-folder-card__name-input {
  position: absolute;
  left: 12px;
  right: 14px;
  bottom: 8px;
  z-index: 6;
  width: auto;
  max-width: none;
  box-sizing: border-box;
  margin: 0;
}

.pm-v2-card__media--cover .pm-v2-card__media-title {
  color: #fff;
  text-shadow: 0 1px 14px rgba(15, 23, 42, 0.82), 0 1px 4px rgba(15, 23, 42, 0.72);
}

.pm-v2-card__media:has(.pm-v2-card__tiles) .pm-v2-card__media-title {
  color: #fff;
  text-shadow: 0 1px 14px rgba(15, 23, 42, 0.82), 0 1px 4px rgba(15, 23, 42, 0.72);
}

.pm-v2-card__body,
.pm-folder-card.pm-v2-card .pm-v2-card__body {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  flex: 0 0 auto;
  gap: 0;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 0;
  overflow: hidden;
  border-top: 1px solid rgba(203, 213, 225, 0.82);
  border-bottom-left-radius: calc(var(--pm-v2-radius) - 1px);
  border-bottom-right-radius: calc(var(--pm-v2-radius) - 1px);
  background: #fff;
}

.pm-folder-card.pm-v2-card .pm-v2-card__body,
.pm-folder-card.pm-set-card.pm-v2-card .pm-v2-card__body {
  grid-column: auto;
  display: grid;
  justify-content: stretch;
  align-items: stretch;
  gap: 0;
}

.pm-v2-card__summary,
.pm-v2-card__stat {
  margin: 0;
  min-height: 34px;
  padding: 8px 54px 7px 12px;
  color: #64748b;
  font-size: 11.6px;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: 0;
}

.pm-v2-card__summary {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pm-v2-card__stat {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  align-self: stretch;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  text-align: left;
}

.pm-v2-card__stat-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  flex: 0 0 auto;
  padding: 1px 8px;
  border: 1px solid rgba(147, 197, 253, 0.72);
  border-radius: 999px;
  background: rgba(239, 246, 255, 0.92);
  color: #2563eb;
  font-size: 11.2px;
  font-weight: 780;
}

.pm-v2-card__stat-note {
  min-width: 0;
  overflow: hidden;
  color: #64748b;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pm-v2-card .pm-card__info-row {
  grid-column: auto;
  grid-row: auto;
  min-width: 0;
  width: auto;
  margin: 0 54px 6px 12px;
  padding: 0.2rem 0 0;
  box-sizing: border-box;
}

.pm-v2-card .pm-card__info-row::before {
  left: 4%;
  right: 4%;
}

.card-statuses {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: 0 0 auto;
}

.card-status {
  display: inline-flex;
  width: 16px;
  height: 16px;
  color: #2563eb;
}

.card-status--sync-on.card-status--syncing,
.card-status--sync-on.card-status--delete-pending {
  color: #d97706;
}

.card-status--sync-on.card-status--failed,
.card-status--sync-on.card-status--over-quota {
  color: #dc2626;
}

.card-status svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card-status--public-on {
  color: #0f766e;
}

.pm-v2-card__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-column: 1 / -1;
  justify-self: stretch;
  align-self: stretch;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  margin: 0;
  border: 0;
  border-top: 1px solid rgba(191, 219, 254, 0.95);
  border-bottom-left-radius: calc(var(--pm-v2-radius) - 1px);
  border-bottom-right-radius: calc(var(--pm-v2-radius) - 1px);
}

.pm-v2-card__actions--single {
  grid-template-columns: minmax(0, 1fr);
}

.pm-v2-card__action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  min-height: var(--pm-v2-action-height);
  margin: 0;
  padding: 0 6px;
  border: 0 !important;
  border-right: 1px solid rgba(191, 219, 254, 0.95);
  border-radius: 0 !important;
  box-shadow: none !important;
  font-size: 12.2px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transform: none !important;
}

.pm-v2-card__actions > .pm-v2-card__action {
  min-inline-size: 0;
  max-inline-size: none;
}

.pm-v2-card__action:last-child {
  border-right: 0;
}

.pm-v2-card__action:hover,
.pm-v2-card__action:focus-visible {
  box-shadow: none;
  transform: none !important;
}

.pm-v2-card__actions--single .pm-v2-card__action:last-child {
  border-right: 0;
}

.pm-v2-card__action.pm-card__action-btn--primary,
.pm-v2-card .pm-card__action-btn.pm-card__action-btn--primary,
[data-panel-view="folder"] .pm-v2-card .pm-card__action-btn.pm-card__action-btn--primary,
[data-panel-view="set-detail"] .pm-v2-card .pm-card__action-btn.pm-card__action-btn--primary,
[data-panel-view="set"] .pm-v2-card .pm-card__action-btn.pm-card__action-btn--primary,
.pm-v2-card__actions--single .pm-v2-card__action.pm-card__action-btn--primary {
  background: rgba(219, 234, 254, 0.95) !important;
  color: #1d4ed8 !important;
}

.pm-v2-card__action.pm-card__action-btn--secondary,
.pm-v2-card .pm-card__action-btn.pm-card__action-btn--secondary,
[data-panel-view="folder"] .pm-v2-card .pm-card__action-btn.pm-card__action-btn--secondary,
[data-panel-view="set-detail"] .pm-v2-card .pm-card__action-btn.pm-card__action-btn--secondary,
[data-panel-view="set"] .pm-v2-card .pm-card__action-btn.pm-card__action-btn--secondary {
  background: rgba(243, 232, 255, 0.95) !important;
  color: #7c3aed !important;
}

.pm-v2-card .pm-card__action-btn.pm-card__action-btn--primary:hover,
.pm-v2-card .pm-card__action-btn.pm-card__action-btn--primary:focus-visible,
[data-panel-view="folder"] .pm-v2-card .pm-card__action-btn.pm-card__action-btn--primary:hover,
[data-panel-view="folder"] .pm-v2-card .pm-card__action-btn.pm-card__action-btn--primary:focus-visible,
[data-panel-view="set-detail"] .pm-v2-card .pm-card__action-btn.pm-card__action-btn--primary:hover,
[data-panel-view="set-detail"] .pm-v2-card .pm-card__action-btn.pm-card__action-btn--primary:focus-visible,
[data-panel-view="set"] .pm-v2-card .pm-card__action-btn.pm-card__action-btn--primary:hover,
[data-panel-view="set"] .pm-v2-card .pm-card__action-btn.pm-card__action-btn--primary:focus-visible {
  background: #1d4ed8 !important;
  color: #ffffff !important;
}

.pm-v2-card .pm-card__action-btn.pm-card__action-btn--secondary:hover,
.pm-v2-card .pm-card__action-btn.pm-card__action-btn--secondary:focus-visible,
[data-panel-view="folder"] .pm-v2-card .pm-card__action-btn.pm-card__action-btn--secondary:hover,
[data-panel-view="folder"] .pm-v2-card .pm-card__action-btn.pm-card__action-btn--secondary:focus-visible,
[data-panel-view="set-detail"] .pm-v2-card .pm-card__action-btn.pm-card__action-btn--secondary:hover,
[data-panel-view="set-detail"] .pm-v2-card .pm-card__action-btn.pm-card__action-btn--secondary:focus-visible,
[data-panel-view="set"] .pm-v2-card .pm-card__action-btn.pm-card__action-btn--secondary:hover,
[data-panel-view="set"] .pm-v2-card .pm-card__action-btn.pm-card__action-btn--secondary:focus-visible {
  background: #7c3aed !important;
  color: #ffffff !important;
}

body.pm-card-two-column .pm-v2-card,
body.pm-card-cols-2 .pm-v2-card,
body.pm-card-cols-3 .pm-v2-card,
body.pm-card-cols-4 .pm-v2-card {
  --pm-v2-radius: 16px;
  --pm-v2-media-height: 210px;
  --pm-v2-action-height: 38px;
}

/*
 * A mixed Grid row adopts the tallest Set / Folder card. Let a Prompt body
 * absorb that row stretch so its fixed-height action rail remains attached to
 * the outer card edge. Painting over a fixed pixel cannot repair this gap:
 * the unused space belongs to the outer flex item, not to the action rail.
 */
.pm-card.pm-v2-card.pm-v2-card--prompt > .pm-v2-card__body {
  flex: 1 1 auto;
  grid-template-rows: minmax(34px, 1fr) auto max-content;
}

body.pm-card-two-column .pm-v2-card__summary,
body.pm-card-two-column .pm-v2-card__stat,
body.pm-card-cols-2 .pm-v2-card__summary,
body.pm-card-cols-2 .pm-v2-card__stat,
body.pm-card-cols-3 .pm-v2-card__summary,
body.pm-card-cols-3 .pm-v2-card__stat,
body.pm-card-cols-4 .pm-v2-card__summary,
body.pm-card-cols-4 .pm-v2-card__stat {
  min-height: 34px;
  padding: 8px 42px 7px 10px;
  font-size: 10.8px;
}

body.pm-card-two-column .pm-v2-card__media-title,
body.pm-card-cols-2 .pm-v2-card__media-title,
body.pm-card-cols-3 .pm-v2-card__media-title,
body.pm-card-cols-4 .pm-v2-card__media-title {
  left: 10px;
  right: 10px;
  bottom: 8px;
  font-size: 12.4px;
}

body.pm-card-two-column .pm-v2-card .pm-card__info-row,
body.pm-card-cols-2 .pm-v2-card .pm-card__info-row,
body.pm-card-cols-3 .pm-v2-card .pm-card__info-row,
body.pm-card-cols-4 .pm-v2-card .pm-card__info-row {
  margin: 0 42px 5px 10px;
}

body.pm-card-two-column .pm-v2-card__edit,
body.pm-card-cols-2 .pm-v2-card__edit,
body.pm-card-cols-3 .pm-v2-card__edit,
body.pm-card-cols-4 .pm-v2-card__edit {
  top: calc(var(--pm-v2-media-height) + 22px);
  right: 8px;
}

body.pm-card-two-column .pm-v2-card__edit .pm-card__meta-icon,
body.pm-card-cols-2 .pm-v2-card__edit .pm-card__meta-icon,
body.pm-card-cols-3 .pm-v2-card__edit .pm-card__meta-icon,
body.pm-card-cols-4 .pm-v2-card__edit .pm-card__meta-icon {
  width: 28px;
  height: 28px;
}

body.pm-card-two-column .pm-v2-card__action,
body.pm-card-cols-2 .pm-v2-card__action,
body.pm-card-cols-3 .pm-v2-card__action,
body.pm-card-cols-4 .pm-v2-card__action {
  min-height: 38px;
  font-size: 11.2px;
}

body.pm-card-two-column .pm-v2-card .pm-card__author-name,
body.pm-card-two-column .pm-v2-card .pm-card__favorite-count,
body.pm-card-cols-2 .pm-v2-card .pm-card__author-name,
body.pm-card-cols-2 .pm-v2-card .pm-card__favorite-count,
body.pm-card-cols-3 .pm-v2-card .pm-card__author-name,
body.pm-card-cols-3 .pm-v2-card .pm-card__favorite-count,
body.pm-card-cols-4 .pm-v2-card .pm-card__author-name,
body.pm-card-cols-4 .pm-v2-card .pm-card__favorite-count {
  font-size: 10.8px;
}

@media (max-width: 520px) {
  .pm-v2-card {
    --pm-v2-media-height: 210px;
  }
}

@media (max-width: 380px) {
  .pm-v2-card {
    --pm-v2-radius: 16px;
    --pm-v2-media-height: 188px;
  }
}
