/* 广场页（/plaza/）——复用官网 style.css 的变量与组件语汇，只补广场自身布局 */

.plaza-hero {
  padding: 72px 0 8px;
  text-align: center;
}
.plaza-hero h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  letter-spacing: 0.05em;
}
.plaza-hero-sub {
  color: var(--muted, #6b6b6b);
  margin: 12px 0 0;
  line-height: 1.8;
}
.plaza-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 24px 0 8px;
}
.plaza-tab {
  border: 1px solid var(--line, #e5e0d8);
  background: #fff;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.92rem;
  cursor: pointer;
  color: var(--ink, #2b2b2b);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.plaza-tab:hover { border-color: var(--brand, #c0392b); color: var(--brand, #c0392b); }
.plaza-tab.is-active {
  background: var(--brand, #c0392b);
  border-color: var(--brand, #c0392b);
  color: #fff;
}
.plaza-tab-refresh { border-style: dashed; }

.plaza-body { padding-top: 20px; }
.plaza-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  align-items: start;
}

.plaza-feed { display: grid; gap: 14px; min-height: 300px; }
.plaza-loading { color: var(--muted, #6b6b6b); padding: 32px 0; text-align: center; }

.plaza-card {
  display: flex;
  gap: 12px;
  align-items: center;
  position: relative;
  background: #fff;
  border: 1px solid var(--line, #e5e0d8);
  border-radius: 14px;
  padding: 14px 16px;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.plaza-card:hover {
  transform: translateY(-2px);
  border-color: rgba(178, 58, 41, 0.35);
  box-shadow: var(--shadow, 0 10px 40px rgba(32, 29, 26, 0.08));
}
/* 左：站点身份位（恒定可见）——头像>favicon 链>首字，绝不开天窗 */
.plaza-card-avatar {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.plaza-card-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.plaza-media-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent, #b23a29), #c25440);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
}
/* 右：内容缩略图（条目带图才有）——信息流的「更多信息」位，加载失败整块移除 */
.plaza-card-thumb {
  flex: 0 0 84px;
  width: 84px;
  height: 84px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  z-index: 1;
  border: 1px solid var(--line, #e5e0d8);
  background: var(--paper-2, #faf7f2);
}
.plaza-card-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.plaza-card-main { min-width: 0; flex: 1; }
/* 拉伸链接：标题 a 的伪元素铺满整卡 = 整卡可点；meta 里的站点链接 z-index 浮上层各自可点 */
.plaza-card-link { text-decoration: none; color: inherit; display: block; }
.plaza-card-link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: 14px;
}
.plaza-card:hover .plaza-card-title { color: var(--accent, #b23a29); }
.plaza-card-title {
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.5;
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.plaza-card-summary {
  color: var(--muted, #6b6b6b);
  font-size: 0.9rem;
  line-height: 1.7;
  margin: 6px 0 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.plaza-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--muted, #6b6b6b);
}
.plaza-card-meta > * { position: relative; z-index: 1; }
.plaza-site-link { color: var(--accent, #b23a29); text-decoration: none; font-weight: 600; }
.plaza-site-link:hover { text-decoration: underline; }
.plaza-kind-chip {
  border: 1px solid var(--line, #e5e0d8);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 0.72rem;
}
/* 认证徽章：朱砂印（纯图标，色取官网主色 var(--accent)，与站点名红同源——落款与钤印的关系）。
   印章要盖得稳：略大于 meta 行小字（1.05rem ≈ 站点名饱和度），紧贴落款像名后一小枚钤印 */
.plaza-badge {
  display: inline-flex;
  align-items: center;
  color: var(--accent, #b23a29);
  font-size: 1.05rem;
  margin-left: -5px;
}
.plaza-badge-icon {
  width: 1em;
  height: 1em;
  display: block;
  /* 印章底色由 SVG path 承担（fill=var(--accent)），这里只负责基线微调 */
  transform: translateY(0.5px);
}

.plaza-side { display: grid; gap: 16px; position: sticky; top: 84px; }
.plaza-side-card {
  background: #fff;
  border: 1px solid var(--line, #e5e0d8);
  border-radius: 14px;
  padding: 18px;
  font-size: 0.9rem;
  line-height: 1.8;
}
.plaza-side-card h2 { font-size: 1rem; margin: 0 0 10px; }
.plaza-side-card p { margin: 0 0 10px; color: var(--muted, #6b6b6b); }
.plaza-side-card p b { color: var(--ink, #2b2b2b); }
.plaza-sites { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.plaza-sites li { display: flex; align-items: center; gap: 6px; min-width: 0; }
/* 名录行：头像 + 站点名整体可点；头像链与卡片 media 同一套（头像>favicon 链>首字），绝不开天窗 */
.plaza-site-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  text-decoration: none;
}
.plaza-site-avatar {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.plaza-site-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.plaza-site-avatar .plaza-media-fallback { font-size: 0.72rem; font-weight: 800; }
.plaza-sites .plaza-site-name {
  color: var(--ink, #2b2b2b);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.plaza-sites a:hover .plaza-site-name { color: var(--brand, #c0392b); }
.plaza-sites .plaza-badge { flex: 0 0 auto; }
.plaza-sites-count { color: var(--muted, #6b6b6b); font-size: 0.75rem; flex: 0 0 auto; }
.plaza-empty { text-align: center; padding: 48px 0; color: var(--muted, #6b6b6b); }

/* 手机：单列，侧栏落到底部；身份位与缩略图同步收小 */
@media (max-width: 900px) {
  .plaza-wrap { grid-template-columns: 1fr; }
  .plaza-side { position: static; }
  .plaza-card-avatar { flex-basis: 36px; width: 36px; height: 36px; }
  .plaza-card-avatar .plaza-media-fallback { font-size: 0.9rem; }
  .plaza-card-thumb { flex-basis: 64px; width: 64px; height: 64px; }
}
