.wiki-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-primary);
  overflow: hidden;
}

.wiki-thumb {
  border-radius: 13px;
  max-width: 40%;
  float: right;
  margin-left: 1rem;
  margin-bottom: 1rem;
  background: var(--border-color);
}

.wiki-thumb--logo {
  display: block;
  max-width: 80%;
  max-height: 60px;
  width: auto;
  object-fit: contain;
  object-position: left center;
  margin-bottom: 0.75rem;
  margin: 0.75rem auto 2rem auto;
}

.wiki-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.wiki-title {
  display: block;
  font-size: var(--font-large);
  font-weight: 600;
  color: var(--link-color);
  text-decoration: none;
  line-height: 1.1;
}

.wiki-title:hover {
  color: var(--link-hover, var(--link-color));
  text-decoration: underline;
}

.wiki-desc {
  margin-bottom: 1rem;
  font-size: var(--font-small);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 500;
}

.wiki-extract {
  font-size: var(--font-medium);
  color: var(--text-primary);
  display: inline;
}

.wiki-footer-link {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-decoration: none;
}

.wiki-footer-link:hover {
  color: var(--link-color);
  text-decoration: underline;
}

.rss-result-date {
  font-size: 12px;
  color: var(--text-secondary);
}
.rss-result-date::before {
  content: "\00b7";
  margin: 0 6px;
}

#main-home.has-feed {
  justify-content: flex-start;
  margin-top: 0;
  padding-top: 80px;
  padding-bottom: 24px;
}

.home-news-feed {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 584px;
  margin: 24px auto 0;
  gap: 16px;
}
.home-news-feed:empty {
  display: none;
}

.skeleton-feed {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 16px;
}
.skeleton-feed-card {
  background: var(--bg-light);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.skeleton-feed-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(
    90deg,
    var(--bg-light) 25%,
    var(--bg-hover) 50%,
    var(--bg-light) 75%
  );
  background-size: 200% 100%;
  animation: freshrss-shimmer 1.6s ease-in-out infinite;
}
.skeleton-feed-body {
  padding: 10px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.skeleton-feed-line {
  background: linear-gradient(
    90deg,
    var(--bg-light) 25%,
    var(--bg-hover) 50%,
    var(--bg-light) 75%
  );
  background-size: 200% 100%;
  animation: freshrss-shimmer 1.6s ease-in-out infinite;
  border-radius: 4px;
  height: 12px;
}
.skeleton-feed-line.skeleton-feed-source {
  width: 100px;
}
.skeleton-feed-line.skeleton-feed-title {
  height: 16px;
  width: 85%;
}

@keyframes freshrss-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@keyframes freshrss-fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.home-feed-card {
  position: relative;
  display: block;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
  animation: freshrss-fade-in 0.4s ease-out backwards;
}

.freshrss-mark-read {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--overlay-bg);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--btn-text);
  font-size: 10px;
  opacity: 0;
  transition: opacity 0.2s, background 0.15s, transform 0.15s;
  z-index: 1;
}
.home-feed-card:hover .freshrss-mark-read {
  opacity: 1;
}
.freshrss-mark-read:hover {
  background: var(--btn-bg);
  transform: scale(1.1);
}
.freshrss-mark-read:active {
  transform: scale(0.95);
}

@keyframes freshrss-mark-out {
  to { opacity: 0; transform: scale(0.94); }
}
.freshrss-marking-read {
  animation: freshrss-mark-out 0.32s ease forwards;
  pointer-events: none;
}
.home-feed-card.ext-card {
  padding: 0;
}
.home-feed-card:nth-child(1) {
  animation-delay: 0.02s;
}
.home-feed-card:nth-child(2) {
  animation-delay: 0.06s;
}
.home-feed-card:nth-child(3) {
  animation-delay: 0.1s;
}
.home-feed-card:nth-child(4) {
  animation-delay: 0.14s;
}
.home-feed-card:nth-child(5) {
  animation-delay: 0.18s;
}
.home-feed-card:nth-child(6) {
  animation-delay: 0.22s;
}
.home-feed-card:nth-child(7) {
  animation-delay: 0.26s;
}
.home-feed-card:nth-child(8) {
  animation-delay: 0.3s;
}
.home-feed-card:nth-child(n + 9) {
  animation-delay: 0.34s;
}
.home-feed-card:active {
  background: var(--bg-hover);
}

.home-feed-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: var(--bg-hover);
}
.home-feed-card-favicon-wrap {
  display: flex;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg-hover);
  align-items: center;
  justify-content: center;
}
.home-feed-card-favicon {
  width: 48px;
  height: 48px;
  opacity: 0.6;
}
.home-feed-card-body {
  padding: 10px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.home-feed-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}
.home-feed-card-source-favicon {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  flex-shrink: 0;
  object-fit: contain;
}

.home-feed-card-source {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-feed-card-date {
  flex-shrink: 0;
}
.home-feed-card-date::before {
  content: "\00b7";
  margin-right: 6px;
}
.home-feed-card-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.3;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 768px) {
  .home-news-feed:not(.home-news-feed--desktop) {
    display: none !important;
  }
  .home-news-feed--desktop {
    flex-direction: row;
    max-width: 100%;
    margin: 24px 0 0;
    padding: 0 24px;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .home-news-feed--desktop::-webkit-scrollbar {
    display: none;
  }
  .home-news-feed--desktop .home-feed-card {
    flex: 0 0 280px;
    min-width: 280px;
  }
  .home-news-feed--desktop .home-feed-card-img {
    aspect-ratio: 16 / 9;
  }
  .home-news-feed--desktop .home-feed-sentinel {
    flex: 0 0 1px;
    min-width: 1px;
  }
  .home-news-feed--desktop .skeleton-feed {
    display: flex;
    flex-direction: row;
    gap: 16px;
  }
  .home-news-feed--desktop .skeleton-feed-card {
    flex: 0 0 280px;
    min-width: 280px;
  }
}

@media (max-width: 767px) {
  .home-news-feed {
    width: 100vw;
    margin: 2em -1em;
    gap: 0;
  }

  .home-news-feed .home-feed-card {
    border-radius: 0;
    background: var(--bg);
  }

  .home-feed-card-body {
    padding: 1.3em 1em;
  }

  .home-feed-card-title {
    font-size: 16px;
    font-weight: normal;
  }

  .home-feed-card-meta {
    margin-bottom: 0.1em;
  }

  .home-feed-card-source,
  .home-feed-card-date {
    font-size: 10px;
  }

  .home-feed-card-source-favicon {
    background: var(--bg-light);
    border-radius: 100%;
  }

  .freshrss-mark-read {
    opacity: 1;
    top: 8px;
    right: 8px;
  }
}

.qr-result .qr-label {
  word-break: break-all;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.qr-result .qr-image {
  display: block;
  border-radius: 8px;
}

.ac-item--history {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
}

.ac-item--history .ac-item-icon--clock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
}

.ac-item--history .ac-item-icon--clock svg {
  width: 20px;
  height: 20px;
}

.ac-item--history .ac-item-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ac-item--history .ac-item-delete {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  border-radius: 50%;
  opacity: 0.8;
}

.ac-item--history .ac-item-delete:hover {
  opacity: 1;
  background: var(--bg-hover);
  color: var(--danger);
}

.ac-item--history .ac-item-delete svg {
  width: 18px;
  height: 18px;
}

.search-history-result .result-favicon--clock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  color: var(--text-cite);
}

.search-history-result .result-favicon--clock svg {
  width: 22px;
  height: 22px;
}

.search-history-result .history-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-left: auto;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-secondary);
  border-radius: 50%;
  text-decoration: none;
}

.search-history-result .history-delete-btn:hover {
  color: var(--danger);
  background: var(--bg-hover);
}

.search-history-result .history-delete-btn svg {
  width: 18px;
  height: 18px;
}

