:root {
  --header-h: 64px;
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --accent: #2254f4;
  --line: #e5e7eb;
}
* { box-sizing: border-box; }
body.tpl--portal { margin: 0; font-family: "PingFang SC", "Microsoft YaHei", sans-serif; color: var(--text); background: var(--bg); line-height: 1.6; padding-top: var(--header-h); }
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; height: var(--header-h); background: #fff; border-bottom: 1px solid var(--line); }
.site-header__inner { max-width: 1180px; margin: 0 auto; padding: 0 1rem; height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.site-logo { font-size: 1.05rem; font-weight: 800; color: var(--accent); text-decoration: none; display: inline-flex; align-items: center; gap: 0.45rem; }
.site-logo img { height: 36px; width: auto; max-width: 160px; object-fit: contain; display: none; }
.site-logo.is-with-logo img { display: block; }
.site-nav { flex: 1; display: flex; justify-content: flex-end; align-items: center; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem 0.45rem; align-items: center; }
.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #334155;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), #5b7cff);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}
.site-nav a:hover {
  color: var(--accent);
  background: rgba(34, 84, 244, 0.1);
  transform: translateY(-1px);
}
.site-nav a:hover::after,
.site-nav a:focus-visible::after { transform: scaleX(1); }
.site-nav a:focus-visible {
  outline: none;
  background: rgba(34, 84, 244, 0.14);
  box-shadow: 0 0 0 2px rgba(34, 84, 244, 0.2);
}
.site-nav--loading ul::after { content: "加载导航..."; font-size: 0.82rem; color: var(--muted); }
.site-nav--error ul::after { content: attr(data-error); font-size: 0.82rem; color: var(--accent); }
.nav-toggle { display: none; border: 1px solid var(--line); background: #fff; color: #374151; padding: 0.4rem 0.65rem; border-radius: 4px; cursor: pointer; font-size: 0.78rem; font-weight: 600; }

main { max-width: 1180px; margin: 0 auto; padding: 1rem 1rem 2rem; }
.tpl2-shell { display: grid; grid-template-columns: 1fr 300px; gap: 1rem; align-items: start; }
.tpl2-main-col { min-width: 0; }
.tpl2-side-col {
  min-width: 0;
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  align-self: start;
}
.tpl2-side-card { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 0.9rem; margin-bottom: 1rem; }
.tpl2-side-card__title { margin: 0 0 0.65rem; font-size: 0.95rem; color: #111827; border-left: 3px solid var(--accent); padding-left: 0.45rem; }
.tpl2-side-card__body { margin: 0; }

.hero { background: var(--card); border: 1px solid var(--line); border-radius: 6px; margin-bottom: 1rem; padding: 1rem 1rem 0.9rem; }
.hero h1 { margin: 0 0 0.35rem; font-size: 1.2rem; color: #111827; }
.hero p { margin: 0; color: var(--muted); font-size: 0.88rem; }

.site-carousel-wrap { margin-bottom: 0.9rem; }
.site-carousel { position: relative; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.site-carousel[hidden], .site-carousel--empty { display: none !important; }
.site-carousel--loading {
  min-height: 180px;
  background: linear-gradient(105deg, #f3f4f6 0%, #e5e7eb 40%, #f3f4f6 100%);
  background-size: 200% 100%;
  animation: site-car-shimmer 1.4s ease-in-out infinite;
}
@keyframes site-car-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.site-carousel__viewport { overflow: hidden; aspect-ratio: 24 / 9; max-height: 380px; }
.site-carousel__track { display: flex; height: 100%; transition: transform 0.5s cubic-bezier(0.33, 1, 0.68, 1); }
.site-carousel__slide { flex-shrink: 0; height: 100%; position: relative; }
.site-carousel__slide-inner { position: relative; height: 100%; }
.site-carousel__link { display: block; height: 100%; line-height: 0; }
.site-carousel__slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.site-carousel__caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 1rem 1rem 0.75rem; background: linear-gradient(transparent, rgba(0, 0, 0, 0.72)); color: #fff; pointer-events: none; }
.site-carousel__title { display: block; font-size: 1rem; font-weight: 700; margin-bottom: 0.2rem; color: #fff; }
.site-carousel__desc { margin: 0; font-size: 0.84rem; color: rgba(255, 255, 255, 0.85); line-height: 1.45; }
.site-carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  cursor: pointer;
}
.site-carousel__btn:hover { background: rgba(0, 0, 0, 0.65); }
.site-carousel__btn--prev { left: 8px; }
.site-carousel__btn--next { right: 8px; }
.site-carousel__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 6px;
}
.site-carousel__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}
.site-carousel__dot.is-active {
  background: var(--accent);
  transform: scale(1.35);
}
.site-carousel--single .site-carousel__btn,
.site-carousel--single .site-carousel__dots { display: none; }
.site-carousel--error {
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.84rem;
  border: 1px dashed rgba(211, 32, 41, 0.35);
  border-radius: 4px;
  background: #fff;
}

.site-banner-ad { margin: 12px 0 18px; border-radius: 4px; overflow: hidden; border: none; background: transparent; }
.site-banner-ad[hidden] { display: none !important; }
.site-banner-ad__rich { display: block; width: 100%; padding: 0; background: transparent; line-height: 1.6; }
.site-banner-ad__link { display: block; text-decoration: none; color: inherit; }
.site-banner-ad__rich p { margin: 0; padding: 0; }
.site-banner-ad__rich img { display: block; width: 100% !important; height: auto !important; max-width: 100% !important; border: 0; outline: 0; }
.site-banner-ad__rich * { max-width: 100%; }
.site-banner-ad--sidebar-long { margin: 0 0 12px; }
.site-banner-ad--sidebar-short { margin: 0 0 12px; }
.site-banner-ad--detail { margin: 18px 0; }

.site-category-tabs { margin-bottom: 1rem; background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 0.8rem; }
.site-tabs__scroll { overflow-x: auto; margin: 0 -0.15rem 0.7rem; padding: 0 0.15rem; }
.site-tabs__list { display: flex; flex-wrap: nowrap; gap: 0.35rem; min-height: 38px; }
.site-tabs__tab { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; border: 1px solid var(--line); background: #fff; color: #4b5563; font-size: 0.84rem; font-weight: 600; padding: 0.45rem 0.85rem; border-radius: 4px; cursor: pointer; white-space: nowrap; text-decoration: none; }
.site-tabs__tab:hover { color: var(--accent); border-color: rgba(34, 84, 244, 0.35); }
.site-tabs__tab.is-active { background: rgba(211, 32, 41, 0.08); color: var(--accent); border-color: var(--accent); }
.site-tabs__loading,.site-tabs__empty,.site-tabs__hint,.site-tabs__error { margin: 0; text-align: center; padding: 1.5rem 0.75rem; color: var(--muted); font-size: 0.88rem; }
.site-tabs__error { color: var(--accent); }

.site-article-list { display: flex; flex-direction: column; gap: 0.95rem; }
.site-article-row {
  position: relative;
  display: block;
  text-decoration: none !important;
  color: inherit;
  border: 1px solid #edf0f5;
  border-radius: 8px;
  background: #f5f7fb;
  padding: 1rem;
  transition: box-shadow 0.2s, transform 0.2s, background 0.2s;
}
.site-article-row:hover {
  background: #f2f5fb;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}
.site-article-row__title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #364e65;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.site-article-row__title em { font-style: italic; }
.site-article-row__meta {
  margin: 0.45rem 0 0;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.98rem;
  color: #6b7280;
}
.site-article-row__meta .meta-cat::before {
  content: "◧";
  display: inline-block;
  margin-right: 0.3rem;
  color: #7b8798;
  font-size: 0.9em;
}
.site-article-row__meta .meta-time::before {
  content: "◷";
  display: inline-block;
  margin-right: 0.3rem;
  color: #7b8798;
  font-size: 0.9em;
}
.site-article-row__count {
  position: absolute;
  right: 1rem;
  top: 1rem;
  font-size: 0.95rem;
  color: var(--accent);
  background: #edf3ff;
  border-radius: 6px;
  padding: 0.2rem 0.55rem;
  font-weight: 600;
}
.site-article-row__count::before {
  content: "💬";
  font-size: 0.9em;
  margin-right: 0.25rem;
}
.site-article-row__body {
  margin-top: 0.75rem;
  display: flex;
  gap: 1rem;
  align-items: stretch;
}
.site-article-row__thumb {
  flex: 0 0 252px;
  width: 252px;
  min-height: 140px;
  border-radius: 6px;
  overflow: hidden;
  background: #e5e7eb;
}
.site-article-row__thumb--placeholder { display: flex; align-items: center; justify-content: center; font-size: 1.2rem; font-weight: 700; color: #9ca3af; }
.site-article-row__img { width: 100%; height: 100%; min-height: 140px; object-fit: cover; display: block; }
.site-article-row__excerpt {
  margin: 0;
  font-size: 14px;
  color: rgba(0,0,0,.5);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
  background: #edf0f5;
  border-radius: 0 6px 6px 0;
  padding: 0.85rem 1rem;
}

.site-tabs__pager { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-top: 1rem; }
.site-tabs__page-numbers { display: inline-flex; align-items: center; gap: 0.35rem; }
.site-tabs__page-btn,.site-tabs__page-num { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 0.7rem; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--text) !important; text-decoration: none !important; font-size: 0.85rem; line-height: 1; }
.site-tabs__page-btn:hover,.site-tabs__page-num:hover { border-color: var(--accent); color: var(--accent) !important; }
.site-tabs__page-btn[disabled],.site-tabs__page-num[disabled] { color: #a8a29e !important; background: #f5f5f4; cursor: not-allowed; }
.site-tabs__page-num.is-active { background: var(--accent); border-color: #1b45c7; color: #fff !important; }

#tpl1-hot-list,#tpl1-random-list { display: flex; flex-direction: column; gap: 8px; }
.tpl1-hot-item,.tpl1-random-item { display: block; text-decoration: none; color: inherit; padding-bottom: 8px; border-bottom: 1px dashed rgba(0,0,0,.08); }
.tpl1-hot-item:last-child,.tpl1-random-item:last-child { border-bottom: none; padding-bottom: 0; }
.tpl1-hot-item__title,.tpl1-random-item__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; line-height: 1.45; font-weight: 600; }
.tpl1-hot-item:hover .tpl1-hot-item__title,.tpl1-random-item:hover .tpl1-random-item__title { color: var(--accent); }
.tpl1-random-item { display: flex; gap: 8px; align-items: flex-start; }
.tpl1-random-item__thumb { flex: 0 0 72px; width: 72px; height: 50px; border-radius: 3px; overflow: hidden; background: #f3f4f6; }
.tpl1-random-item__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

footer.site-footer { text-align: center; padding: 1.2rem 1rem; background: #fff; border-top: 1px solid var(--line); font-size: 0.8rem; color: var(--muted); }
.site-footer__friend-title { margin: 0 0 0.4rem; color: #374151; font-weight: 700; }
.site-footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.7rem 1rem; margin: 0; padding: 0; list-style: none; }
.site-footer__links a { color: #4b5563; text-decoration: none; border-bottom: 1px dashed #d1d5db; }
.site-footer__links a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.site-customer-service-fixed {
  position: fixed;
  right: max(14px, calc((100vw - 1180px) / 2 - 194px));
  bottom: 184px;
  z-index: 950;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
}
.site-customer-service-fixed__card {
  width: 168px;
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(20, 150, 212, 0.16);
  box-shadow: 0 16px 30px rgba(34, 52, 78, 0.1);
  color: #202a36;
}
.site-customer-service-fixed__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.site-customer-service-fixed__avatar {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(20, 150, 212, 0.1);
  color: #1496d4;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.site-customer-service-fixed__avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.site-customer-service-fixed__avatar svg {
  width: 18px;
  height: 18px;
  display: block;
}
.site-customer-service-fixed__meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.site-customer-service-fixed__platform {
  font-size: 12px;
  line-height: 1.2;
  color: #738193;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-customer-service-fixed__title {
  font-size: 13px;
  line-height: 1.3;
  font-weight: 400;
  color: #202a36;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-customer-service-fixed__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.site-customer-service-fixed__field-label {
  font-size: 11px;
  line-height: 1.25;
  color: #738193;
}
.site-customer-service-fixed__field-value {
  font-size: 15px;
  line-height: 1.35;
  font-weight: 400;
  color: #202a36;
  word-break: break-all;
  min-height: 20px;
}
.site-customer-service-fixed__actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.site-customer-service-fixed__button {
  appearance: none;
  border: 0;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  transition: transform .18s ease, opacity .18s ease;
}
.site-customer-service-fixed__button:hover { transform: translateY(-1px); }
.site-customer-service-fixed__button.is-copy {
  width: 44px;
  background: rgba(32, 42, 54, 0.08);
  color: #202a36;
}
.site-customer-service-fixed__button.is-copy[disabled] {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}
.site-customer-service-fixed__button.is-contact {
  flex: 1 1 auto;
  background: #1496d4;
  color: #ffffff;
}
.site-customer-service-fixed__button.is-contact.is-whatsapp {
  background: #25D366;
}
.site-customer-service-fixed__copy-state {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.35;
  color: #738193;
  min-height: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav { position: absolute; top: var(--header-h); left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 0.65rem 1rem; display: none; }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; align-items: stretch; width: 100%; }
  .site-nav li { border-bottom: 1px solid #f3f4f6; }
  .site-nav a { display: block; padding: 0.7rem 0.2rem; border-radius: 0; }
  .site-nav a::after { left: 0; right: 0; bottom: 0; height: 1px; background: rgba(34, 84, 244, 0.35); }
  .site-nav a:hover { transform: none; background: rgba(34, 84, 244, 0.08); }
  .tpl2-shell { grid-template-columns: 1fr; }
  .tpl2-side-col { position: static; top: auto; }
  .site-article-row__title { font-size: 18px; }
  .site-article-row__meta { font-size: 0.84rem; gap: 0.55rem; }
  .site-article-row__count { position: static; display: inline-flex; margin-top: 0.5rem; }
  .site-article-row__body { flex-direction: column; }
  .site-article-row__thumb { width: 100%; min-height: 180px; flex: none; }
  .site-article-row__excerpt { font-size: 14px; border-radius: 6px; }
  .site-carousel__viewport { aspect-ratio: 16 / 9; max-height: 220px; }
  .site-customer-service-fixed { right: 10px; bottom: 140px; }
}
@media (max-width: 1200px) {
  .site-customer-service-fixed {
    right: 10px;
    bottom: 140px;
  }
  .site-customer-service-fixed__card { width: 160px; }
}
