/* Each character owns a card; only that character's media forms a fan. */
#chars-list.chars-grid.local-media-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 18px;
  align-items: stretch;
}
#chars-list.local-media-cards > .char-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 438px;
  padding: 18px;
  overflow: visible;
  transform: none;
  animation: none !important;
  opacity: 1 !important;
  cursor: default;
}
#chars-list.local-media-cards .char-card-head {
  min-height: 64px;
  padding-right: 30px;
  align-items: center;
}
#chars-list.local-media-cards .char-card-preview {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
  overflow: hidden;
  line-height: 1.45;
  max-height: 2.9em;
}
#chars-list.local-media-cards .char-card-foot {
  flex-shrink: 0;
  margin-top: 14px;
  padding-top: 12px;
  min-height: 30px;
}
#chars-list.local-media-cards .char-card-owner {
  min-width: 0;
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.local-character-media {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
}
.local-media-fan {
  position: relative;
  isolation: isolate;
  display: block;
  width: 100%;
  height: 184px;
  flex-shrink: 0;
  padding: 0;
  margin: 4px 0 0;
  border: 0;
  border-radius: 14px;
  background: radial-gradient(ellipse at 50% 70%, #1eabdf0d, transparent 70%);
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.local-media-fan:focus-visible {
  outline: 2px solid var(--accent, #26ace4);
  outline-offset: 3px;
}
.local-media-preview {
  position: absolute;
  display: block;
  width: 112px;
  height: 142px;
  left: calc(50% - 56px);
  bottom: 22px;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid #ffffff24;
  background: #1b222c;
  box-shadow: 0 10px 24px #0006;
  transform-origin: 50% 100%;
  will-change: transform;
}
.local-media-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.local-media-cover-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #7da9ba;
  background: linear-gradient(145deg, #193a4c, #1c1c2a);
}
.local-media-cover-placeholder svg {
  width: 32px;
  height: 32px;
}
.local-media-preview-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: block;
  padding: 18px 8px 8px;
  background: linear-gradient(transparent, #05080fe8);
  color: #fff;
  font-size: 10px;
  text-align: left;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.local-media-fan.is-empty {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 7px;
  height: 180px;
  margin: 8px 0 0;
  border: 1px dashed #ffffff13;
  background: #ffffff02;
  color: var(--muted, #92929b);
}
.local-media-fan.is-empty > svg {
  width: 34px;
  height: 34px;
  margin-bottom: 5px;
  opacity: 0.65;
}
.local-media-fan.is-empty > span {
  font-size: 13px;
}
.local-media-fan.is-empty small {
  font-size: 11px;
  opacity: 0.65;
}
.local-character-media-count {
  margin: 2px 0 10px;
  font-size: 11px;
  color: var(--muted, #92929b);
}
.local-character-scenes {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 6px;
  min-height: 58px;
  margin-bottom: 12px;
}
.local-character-scene {
  min-width: 0;
  max-width: 100%;
  padding: 6px 9px;
  border-radius: 8px;
  border: 1px solid #ffffff12;
  background: #ffffff04;
  color: var(--text, #e3e3eb);
  font: inherit;
  font-size: 11px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: pointer;
}
.local-character-scene:hover,
.local-character-scene:focus-visible {
  border-color: #24b3e955;
  background: #24b3e90d;
  color: #6dd5ff;
}
.local-character-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}
.local-character-actions .btn {
  flex: 1;
  justify-content: center;
  min-width: 0;
  padding: 9px 10px;
  font-size: 12px;
  min-height: 36px;
}
.local-character-actions .local-open-scenes {
  flex: 1.4;
}
.local-char-delete {
  position: absolute;
  top: 12px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--muted, #92929b);
  background: transparent;
  cursor: pointer;
}
.local-char-delete:hover,
.local-char-delete:focus-visible {
  background: #ff527b14;
  border-color: #ff527b45;
  color: #ff7595;
}
.local-char-delete svg {
  width: 14px;
  height: 14px;
}
#local-character-status {
  padding: 10px 14px;
  border: 1px solid #ff7f9b33;
  border-radius: 10px;
  color: #ff9eb2;
  font-size: 12px;
}
@media (max-width: 640px) {
  #chars-list.chars-grid.local-media-cards {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  #chars-list.local-media-cards > .char-card {
    min-height: 420px;
    padding: 16px;
  }
  .local-character-scenes {
    min-height: 34px;
  }
  .local-char-delete {
    width: 34px;
    height: 34px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .local-media-preview {
    will-change: auto;
  }
}
