/*
 Theme Name:   PTG Blog Child Theme
 Description:  基于 Hello Elementor 的子主题，中文科技博客，快捷入口 + 双栏卡片 + 滚动广告
 Template:     hello-elementor
 Version:      2.0.0
 Text Domain:  ptg-blog-child
*/

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
  --ptg-primary:       #2563eb;
  --ptg-primary-dark:  #1d4ed8;
  --ptg-primary-light: #dbeafe;
  --ptg-accent:        #f59e0b;
  --ptg-accent-light:  #fef3c7;

  --ptg-bg:            #f5f6fa;
  --ptg-white:         #ffffff;
  --ptg-text:          #1e293b;
  --ptg-text-sec:      #64748b;
  --ptg-text-light:    #94a3b8;
  --ptg-border:        #e2e8f0;
  --ptg-border-light:  #f1f5f9;

  /* 分类色板 */
  --cat-c1: #3b82f6;
  --cat-c2: #8b5cf6;
  --cat-c3: #06b6d4;
  --cat-c4: #10b981;
  --cat-c5: #f59e0b;
  --cat-c6: #ef4444;
  --cat-c7: #0ea5e9;
  --cat-c8: #6366f1;

  --ptg-radius:    12px;
  --ptg-radius-sm: 8px;
  --ptg-radius-lg: 16px;
  --ptg-shadow:    0 1px 3px rgba(0,0,0,.04), 0 1px 2px rgba(0,0,0,.06);
  --ptg-shadow-md: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
  --ptg-shadow-lg: 0 10px 25px -5px rgba(0,0,0,.08), 0 8px 10px -6px rgba(0,0,0,.04);

  --ptg-font:         "Noto Sans SC","PingFang SC","Microsoft YaHei",sans-serif;
  --ptg-font-display: "Noto Serif SC","Songti SC",serif;
  --ptg-container:    1200px;
  --ptg-sidebar-w:    320px;
  --ptg-gap:          24px;
  --ptg-marquee-speed: 25s;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*,*::before,*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: var(--ptg-font);
  background: var(--ptg-bg);
  color: var(--ptg-text);
  line-height: 1.75;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  overflow-x: hidden;
}
a { color: var(--ptg-primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--ptg-primary-dark); }
img { max-width: 100%; height: auto; }
.ptg-container { max-width: var(--ptg-container); margin: 0 auto; padding: 0 20px; overflow-x: hidden; }

/* ============================================================
   1. 推广横幅条
   ============================================================ */
.ptg-promo-banner {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  color: #fff;
  text-align: center;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
}
.ptg-promo-banner a { color: var(--ptg-accent-light); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.ptg-promo-banner a:hover { color: #fff; }
.ptg-promo-close {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: rgba(255,255,255,.7);
  cursor: pointer; font-size: 16px; line-height: 1; padding: 4px;
}
.ptg-promo-close:hover { color: #fff; }

/* ============================================================
   2. 固定顶部导航
   ============================================================ */
.ptg-header {
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ptg-border);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.ptg-header-inner {
  max-width: var(--ptg-container);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}
.ptg-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 20px;
  color: var(--ptg-text);
  white-space: nowrap;
  text-decoration: none;
}
.ptg-logo:hover { color: var(--ptg-primary); }
.ptg-logo img { height: 36px; width: auto; }
.logo-dot {
  display: inline-block;
  width: 7px; height: 7px;
  background: var(--ptg-accent);
  border-radius: 50%;
  margin-left: 1px;
  flex-shrink: 0;
}
.ptg-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
/* 搜索框 */
.ptg-header-search { position: relative; }
.ptg-header-search input {
  height: 36px;
  width: 180px;
  padding: 0 14px 0 34px;
  border: 1px solid var(--ptg-border);
  border-radius: 18px;
  font-size: 13px;
  background: var(--ptg-bg);
  color: var(--ptg-text);
  outline: none;
  transition: all .25s;
  font-family: var(--ptg-font);
}
.ptg-header-search input:focus {
  border-color: var(--ptg-primary);
  width: 220px;
  box-shadow: 0 0 0 3px var(--ptg-primary-light);
  background: #fff;
}
.ptg-header-search .s-icon {
  position: absolute;
  left: 11px; top: 50%;
  transform: translateY(-50%);
  color: var(--ptg-text-light);
  font-size: 13px;
  pointer-events: none;
}
/* 图标按钮 */
.ptg-header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--ptg-bg);
  color: var(--ptg-text-sec);
  font-size: 17px;
  transition: all .2s;
  text-decoration: none;
}
.ptg-header-icon:hover {
  background: var(--ptg-primary-light);
  color: var(--ptg-primary);
  transform: translateY(-1px);
}
/* 汉堡菜单 */
.ptg-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  color: var(--ptg-text);
  cursor: pointer;
  padding: 4px;
}

/* ============================================================
   3. 快捷入口区域
   ============================================================ */
.ptg-quick-wrap {
  max-width: var(--ptg-container);
  margin: 20px auto 0;
  padding: 0 20px;
}
.ptg-quick-box {
  background: var(--ptg-white);
  border: 1px solid var(--ptg-border);
  border-radius: var(--ptg-radius-lg);
  padding: 20px;
  box-shadow: var(--ptg-shadow);
}
.ptg-quick-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--ptg-text-sec);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
}
/* ============================================================
   快捷入口卡片样式（对齐截图：大圆角，浅灰背景，大字粗体居中）
   父分类首页 6个 和 子分类专属 6个 完全一致
   ============================================================ */

/* 外层容器 */
.ptg-quick-wrap {
  max-width: var(--ptg-container);
  margin: 16px auto 0;
  padding: 0 16px;
  box-sizing: border-box;
  width: 100%;
}
.ptg-quick-box {
  background: var(--ptg-white);
  border: 1px solid var(--ptg-border);
  border-radius: 20px;
  padding: 16px 14px 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}
.ptg-quick-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ptg-text-sec);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 3列固定，手机桌面一致 */
.ptg-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}
.ptg-quick-grid > * {
  min-width: 0;
  overflow: hidden;
}


/* ── 卡片本体（对齐截图）── */
.ptg-qitem {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 22px 8px 18px;
  border-radius: 16px;
  border: none;
  border-top: 4px solid #3b82f6;
  background: #f8f9fc;
  text-decoration: none;
  color: var(--ptg-text);
  min-height: 100px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  transition: all .22s ease;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.ptg-qitem:hover {
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.10);
  transform: translateY(-3px);
}
.ptg-qitem--active {
  background: var(--ptg-primary-light);
  box-shadow: 0 4px 12px rgba(37,99,235,.15);
}

/* 大字标题 */
.ptg-qname {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 7px;
  text-align: center;
  color: #1a1a2e;
  letter-spacing: .2px;
}

/* 灰色副标题 */
.ptg-qdesc {
  font-size: 13px;
  color: #9ca3af;
  text-align: center;
  white-space: normal;
  word-break: break-word;
  overflow: hidden;
  max-width: 100%;
  font-weight: 400;
}

.ptg-qitem:hover .ptg-qname { color: var(--ptg-primary); }
.ptg-qitem--active .ptg-qname { color: var(--ptg-primary); }


  .ptg-qname { font-size: 16px; }
  .ptg-qdesc { font-size: 12px; white-space: normal; line-height: 1.3; }
}

/* 板块页 6格：与首页完全一致，无需额外覆盖 */
.ptg-section-grid {
  grid-template-columns: repeat(3, 1fr) !important;
}

.ptg-section-grid .ptg-qitem {
  min-height: 100px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}



  .ptg-quick-grid { gap: 8px; }
  .ptg-qitem      { padding: 14px 6px 12px; min-height: 84px; border-radius: 12px; }
  .ptg-qname      { font-size: 14px; margin-bottom: 4px; }
  .ptg-qdesc      { font-size: 11px; }
  .ptg-section-grid { grid-template-columns: repeat(3, 1fr) !important; }
}

/* ============================================================
   4. 滚动广告横幅条
   ============================================================ */
.ptg-marquee-wrap {
  max-width: var(--ptg-container);
  margin: 14px auto 0;
  padding: 0 20px;
}
.ptg-marquee {
  background: linear-gradient(135deg, #fff7ed 0%, #fef3c7 50%, #fff7ed 100%);
  border: 1px solid #fde68a;
  border-radius: var(--ptg-radius);
  overflow: hidden;
  position: relative;
  height: 42px;
  display: flex;
  align-items: center;
}
.ptg-marquee-tag {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: linear-gradient(135deg, var(--ptg-accent) 0%, #d97706 100%);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  z-index: 2;
  letter-spacing: .5px;
  border-radius: var(--ptg-radius) 0 0 var(--ptg-radius);
}
.ptg-marquee-tag::after {
  content: '';
  position: absolute;
  right: -8px; top: 0; bottom: 0;
  width: 8px;
  background: linear-gradient(90deg, #d97706, transparent);
}
.ptg-marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: ptgScroll var(--ptg-marquee-speed, 25s) linear infinite;
  padding-left: 80px;
}
.ptg-marquee:hover .ptg-marquee-track { animation-play-state: paused; }
.ptg-marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 22px;
  white-space: nowrap;
  font-size: 13px;
  color: #92400e;
  font-weight: 500;
  text-decoration: none;
  transition: color .2s;
}
.ptg-marquee-item:hover { color: var(--ptg-primary); }
.ptg-marquee-dot {
  display: inline-block;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: #d4a04a;
  opacity: .5;
  flex-shrink: 0;
}
.ptg-marquee::after {
  content: '';
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 40px;
  background: linear-gradient(90deg, transparent, #fef3c7);
  pointer-events: none;
  z-index: 1;
}
@keyframes ptgScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================================
   5. 主体双栏布局
   ============================================================ */
.ptg-layout {
  max-width: var(--ptg-container);
  margin: var(--ptg-gap) auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr var(--ptg-sidebar-w);
  gap: var(--ptg-gap);
  align-items: start;
}

/* — 文章卡片列表 — */
.ptg-posts { display: flex; flex-direction: column; gap: 16px; }

.ptg-card {
  background: var(--ptg-white);
  border-radius: var(--ptg-radius);
  border: 1px solid var(--ptg-border);
  padding: 24px;
  transition: all .3s ease;
  position: relative;
  opacity: 0;
  transform: translateY(16px);
}
.ptg-card.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .5s ease, transform .5s ease, box-shadow .3s ease, border-color .3s ease;
}
.ptg-card:hover {
  box-shadow: var(--ptg-shadow-lg);
  border-color: transparent;
  transform: translateY(-2px);
}
/* 置顶 */
.ptg-card.is-sticky {
  border-left: 3px solid var(--ptg-accent);
}
.ptg-card.is-sticky::after {
  content: '置顶';
  position: absolute;
  top: 14px; right: 14px;
  font-size: 10px;
  font-weight: 700;
  color: var(--ptg-accent);
  background: var(--ptg-accent-light);
  padding: 2px 8px;
  border-radius: 4px;
}
/* 缩略图 */
.ptg-card-thumb {
  border-radius: var(--ptg-radius-sm);
  overflow: hidden;
  aspect-ratio: 16/9;
  margin-bottom: 16px;
}
.ptg-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.ptg-card:hover .ptg-card-thumb img { transform: scale(1.04); }
/* 分类标签 */
.ptg-cat-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .8px;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 10px;
  background: var(--ptg-primary-light);
  color: var(--ptg-primary);
}
.ptg-card-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  color: var(--ptg-text);
}
.ptg-card-title a { color: inherit; }
.ptg-card-title a:hover { color: var(--ptg-primary); }
.ptg-card-excerpt {
  font-size: 14px;
  color: var(--ptg-text-sec);
  line-height: 1.7;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ptg-card-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: var(--ptg-text-light);
}
.ptg-card-meta span { display: flex; align-items: center; gap: 4px; }

/* — 分页 — */
.ptg-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 30px;
}
.ptg-pagination a,
.ptg-pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--ptg-radius-sm);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--ptg-border);
  background: var(--ptg-white);
  color: var(--ptg-text-sec);
  transition: all .2s;
}
.ptg-pagination a:hover { border-color: var(--ptg-primary); color: var(--ptg-primary); }
.ptg-pagination .current { background: var(--ptg-primary); color: #fff; border-color: var(--ptg-primary); }

/* ============================================================
   6. 侧边栏
   ============================================================ */
.ptg-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 88px;
}
.ptg-widget {
  background: var(--ptg-white);
  border-radius: var(--ptg-radius);
  border: 1px solid var(--ptg-border);
  padding: 20px;
  box-shadow: var(--ptg-shadow);
}
.ptg-widget-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ptg-primary);
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ptg-text);
}
/* 搜索 */
.ptg-widget-search form {
  display: flex;
  gap: 8px;
}
.ptg-widget-search input {
  flex: 1;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--ptg-border);
  border-radius: var(--ptg-radius-sm);
  font-size: 13px;
  font-family: var(--ptg-font);
  outline: none;
  transition: border-color .2s;
}
.ptg-widget-search input:focus { border-color: var(--ptg-primary); }
.ptg-widget-search button {
  height: 38px;
  padding: 0 14px;
  background: var(--ptg-primary);
  color: #fff;
  border: none;
  border-radius: var(--ptg-radius-sm);
  font-size: 14px;
  cursor: pointer;
  transition: background .2s;
  font-family: var(--ptg-font);
}
.ptg-widget-search button:hover { background: var(--ptg-primary-dark); }
/* 分类 */
.ptg-cat-list { list-style: none; padding: 0; margin: 0; }
.ptg-cat-list li { margin-bottom: 2px; }
.ptg-cat-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: var(--ptg-radius-sm);
  font-size: 13px;
  color: var(--ptg-text-sec);
  transition: all .2s;
}
.ptg-cat-list li a:hover { background: var(--ptg-primary-light); color: var(--ptg-primary); }
.ptg-cat-count {
  font-size: 11px;
  background: var(--ptg-bg);
  padding: 1px 7px;
  border-radius: 10px;
  color: var(--ptg-text-light);
}
/* 标签云 */
.ptg-tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.ptg-tag-cloud a {
  padding: 4px 12px;
  background: var(--ptg-bg);
  border-radius: 20px;
  font-size: 12px;
  color: var(--ptg-text-sec);
  transition: all .2s;
  border: 1px solid transparent;
}
.ptg-tag-cloud a:hover { background: var(--ptg-primary-light); color: var(--ptg-primary); border-color: var(--ptg-primary); }
/* 热门排行 */
.ptg-popular-list { display: flex; flex-direction: column; gap: 0; }
.ptg-popular-item {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--ptg-border-light);
  align-items: flex-start;
}
.ptg-popular-item:last-child { border-bottom: none; }
.ptg-rank {
  width: 26px; height: 26px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  background: var(--ptg-bg);
  color: var(--ptg-text-light);
  margin-top: 1px;
}
.ptg-popular-item:nth-child(1) .ptg-rank { background: #fef3c7; color: #d97706; }
.ptg-popular-item:nth-child(2) .ptg-rank { background: #e2e8f0; color: #475569; }
.ptg-popular-item:nth-child(3) .ptg-rank { background: #fed7aa; color: #c2410c; }
.ptg-popular-title {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--ptg-text);
  transition: color .2s;
}
.ptg-popular-title:hover { color: var(--ptg-primary); }
/* 联系方式 */
.ptg-contact-list { display: flex; flex-direction: column; gap: 8px; }
.ptg-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--ptg-radius-sm);
  background: var(--ptg-bg);
  font-size: 13px;
  color: var(--ptg-text-sec);
  transition: all .2s;
}
.ptg-contact-item:hover { background: var(--ptg-primary-light); color: var(--ptg-primary); }

/* ============================================================
   7. 文章详情页
   ============================================================ */
.ptg-single {
  background: var(--ptg-white);
  border-radius: var(--ptg-radius);
  border: 1px solid var(--ptg-border);
  padding: 40px;
  box-shadow: var(--ptg-shadow);
}
.ptg-single-header { margin-bottom: 20px; }
.ptg-single h1 {
  font-family: var(--ptg-font-display);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.4;
  margin: 10px 0 14px;
  color: var(--ptg-text);
}
.ptg-single-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  color: var(--ptg-text-light);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--ptg-border);
  margin-bottom: 24px;
}
.ptg-entry-content { font-size: 15px; line-height: 1.85; }
.ptg-entry-content h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 28px 0 14px;
  padding-left: 12px;
  border-left: 3px solid var(--ptg-primary);
  color: var(--ptg-text);
}
.ptg-entry-content h3 { font-size: 17px; font-weight: 600; margin: 22px 0 10px; }
.ptg-entry-content p { margin-bottom: 16px; }
.ptg-entry-content img { border-radius: var(--ptg-radius-sm); margin: 16px 0; }
.ptg-entry-content blockquote {
  border-left: 4px solid var(--ptg-primary);
  background: var(--ptg-primary-light);
  padding: 12px 16px;
  margin: 16px 0;
  border-radius: 0 8px 8px 0;
  color: #374151;
  font-size: 14px;
}
.ptg-entry-content table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
.ptg-entry-content th, .ptg-entry-content td { padding: 8px 12px; border: 1px solid var(--ptg-border); }
.ptg-entry-content th { background: var(--ptg-bg); font-weight: 600; }
/* 上下篇 */
.ptg-post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}
.ptg-post-nav-item {
  background: var(--ptg-bg);
  border-radius: var(--ptg-radius-sm);
  padding: 14px;
  font-size: 13px;
}
.ptg-post-nav-label { color: var(--ptg-text-light); margin-bottom: 4px; }
.ptg-post-nav-item a {
  color: var(--ptg-text);
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ptg-post-nav-item a:hover { color: var(--ptg-primary); }
/* 底部标签 */
.ptg-single-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--ptg-border); }
.ptg-single-tags a { padding: 4px 12px; background: var(--ptg-bg); border-radius: 20px; font-size: 12px; color: var(--ptg-text-sec); }
.ptg-single-tags a:hover { background: var(--ptg-primary-light); color: var(--ptg-primary); }
/* 评论区 */
.ptg-comments { margin-top: 20px; }

/* ============================================================
   短代码：手风琴
   ============================================================ */
.ptg-accordion { border: 1px solid var(--ptg-border); border-radius: var(--ptg-radius); overflow: hidden; margin: 16px 0; }
.ptg-ac-item { border-bottom: 1px solid var(--ptg-border); }
.ptg-ac-item:last-child { border-bottom: none; }
.ptg-ac-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--ptg-white);
  border: none;
  cursor: pointer;
  font-family: var(--ptg-font);
  font-size: 15px;
  font-weight: 600;
  color: var(--ptg-text);
  text-align: left;
  transition: background .2s;
}
.ptg-ac-btn:hover { background: var(--ptg-bg); }
.ptg-ac-btn .ptg-ac-arrow { font-size: 12px; color: var(--ptg-text-light); transition: transform .3s; flex-shrink: 0; }
.ptg-ac-item.open .ptg-ac-btn .ptg-ac-arrow { transform: rotate(180deg); }
.ptg-ac-body { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.ptg-ac-item.open .ptg-ac-body { max-height: 2000px; }
.ptg-ac-content { padding: 4px 18px 18px; font-size: 14px; color: var(--ptg-text-sec); line-height: 1.7; }

/* 短代码：CTA按钮 */
.ptg-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 26px;
  background: linear-gradient(135deg, var(--ptg-primary) 0%, #7c3aed 100%);
  color: #fff !important;
  border-radius: var(--ptg-radius-sm);
  font-weight: 600;
  font-size: 14px;
  transition: all .3s;
  box-shadow: 0 2px 8px rgba(37,99,235,.3);
  text-decoration: none;
}
.ptg-cta-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(37,99,235,.4); color: #fff !important; }

/* 短代码：优惠码 */
.ptg-promo-block {
  background: linear-gradient(135deg, var(--ptg-accent-light), #fef9ee);
  border: 1px solid rgba(245,158,11,.3);
  border-radius: var(--ptg-radius);
  padding: 14px 18px;
  margin: 16px 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.ptg-promo-code-val {
  font-weight: 700;
  font-size: 16px;
  color: #d97706;
  background: #fff;
  padding: 4px 14px;
  border-radius: 6px;
  font-family: monospace;
  border: 1px dashed #d97706;
  cursor: pointer;
  user-select: all;
  transition: background .2s;
}
.ptg-promo-code-val:hover { background: var(--ptg-accent-light); }
.ptg-copy-tip { font-size: 12px; color: var(--ptg-text-light); }

/* ============================================================
   Footer
   ============================================================ */
.ptg-footer {
  background: var(--ptg-white);
  border-top: 1px solid var(--ptg-border);
  margin-top: 40px;
  padding: 28px 20px;
}
.ptg-footer-inner {
  max-width: var(--ptg-container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ptg-text-light);
  flex-wrap: wrap;
  gap: 12px;
}
.ptg-footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.ptg-footer-links a { color: var(--ptg-text-light); transition: color .2s; }
.ptg-footer-links a:hover { color: var(--ptg-primary); }

/* 回到顶部 */
.ptg-back-top {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--ptg-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  box-shadow: var(--ptg-shadow-md);
  opacity: 0;
  transform: translateY(20px);
  transition: all .3s;
  z-index: 999;
  border: none;
}
.ptg-back-top.show { opacity: 1; transform: translateY(0); }
.ptg-back-top:hover { background: var(--ptg-primary-dark); transform: translateY(-2px); }

/* ============================================================
   面包屑
   ============================================================ */
.ptg-breadcrumb {
  font-size: 12px;
  color: var(--ptg-text-light);
  margin-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.ptg-breadcrumb a { color: var(--ptg-text-sec); }
.ptg-breadcrumb a:hover { color: var(--ptg-primary); }
.ptg-breadcrumb span { color: var(--ptg-text-light); }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 960px) {
  .ptg-layout { grid-template-columns: 1fr; }
  .ptg-sidebar { position: static; }
}
@media (max-width: 768px) {
  .ptg-header-search { display: none; }
  .ptg-menu-toggle { display: block; }
  .ptg-header-inner { height: 56px; }
  .ptg-single { padding: 20px; }
  .ptg-single h1 { font-size: 22px; }
  .ptg-post-nav { grid-template-columns: 1fr; }
  .ptg-footer-inner { flex-direction: column; text-align: center; }
}
/* 快捷入口：手机保持3列但缩小 */


/* ============================================================
   快捷入口：4大板块样式（参考截图）
   ============================================================ */
.ptg-sections-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (min-width: 700px) {
  .ptg-sections-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* 每个板块容器 */
.ptg-sec {
  border-radius: var(--ptg-radius);
  border: 1px solid var(--ptg-border);
  background: var(--ptg-white);
  padding: 12px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow .2s;
}
.ptg-sec:hover { box-shadow: var(--ptg-shadow-md); }

/* 父分类标题块 */
.ptg-sec-head {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  gap: 2px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--ptg-border-light);
}
.ptg-sec-head:hover { opacity: .85; }
.ptg-sec-head.active .ptg-sec-name { font-weight: 800; }
.ptg-sec-name {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}
.ptg-sec-desc {
  font-size: 11px;
  color: var(--ptg-text-light);
  line-height: 1.3;
}

/* 子分类按钮行 */
.ptg-sec-subs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.ptg-sub-btn {
  display: inline-block;
  font-size: 12px;
  color: var(--ptg-text-sec);
  background: var(--ptg-bg);
  border: 1px solid var(--ptg-border);
  border-radius: 5px;
  padding: 2px 8px;
  text-decoration: none;
  transition: all .15s;
  white-space: nowrap;
}
.ptg-sub-btn:hover {
  background: var(--ptg-primary-light);
  color: var(--ptg-primary);
  border-color: var(--ptg-primary);
}
.ptg-sub-btn.active {
  background: var(--ptg-primary);
  color: #fff;
  border-color: var(--ptg-primary);
}

/* 分类筛选标签条（文章列表上方） */
.ptg-cat-tabs {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 8px;
  padding: 14px 16px;
  background: var(--ptg-white);
  border-radius: var(--ptg-radius);
  border: 1px solid var(--ptg-border);
  margin-bottom: 0;
  scrollbar-width: none;
}
.ptg-cat-tabs::-webkit-scrollbar { display: none; }
.ptg-cat-tab {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ptg-text-sec);
  background: var(--ptg-bg);
  white-space: nowrap;
  text-decoration: none;
  transition: all .2s;
  border: none;
  flex-shrink: 0;
}
.ptg-cat-tab:hover { background: var(--ptg-primary-light); color: var(--ptg-primary); }
.ptg-cat-tab.active {
  background: var(--ptg-primary);
  color: #fff;
}

@media (max-width: 500px) {
  .ptg-sections-grid { grid-template-columns: 1fr 1fr; }
  .ptg-sec { padding: 10px 8px 8px; }
  .ptg-sec-name { font-size: 13px; }
  .ptg-sub-btn { font-size: 11px; padding: 2px 6px; }
}

/* ============================================================
   板块页：专属快捷入口 + 最新/最热双栏
   ============================================================ */

/* 6格网格：2行×3列，卡片无副标题，只有大字 */
.ptg-section-grid {
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 12px !important;
}
.ptg-section-grid .ptg-qitem {
  min-height: 100px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 18px 10px 16px;
}
.ptg-section-grid .ptg-qname {
  font-size: 16px;
}

/* 最新/最热双栏容器 */
.ptg-section-posts-wrap {
  max-width: var(--ptg-container);
  margin: 16px auto 0;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 700px) {
  .ptg-section-posts-wrap { grid-template-columns: 1fr; }
}

/* 每个双栏容器 */
.ptg-section-col {
  background: var(--ptg-white);
  border: 1px solid var(--ptg-border);
  border-radius: var(--ptg-radius);
  padding: 16px;
  box-shadow: var(--ptg-shadow);
}
.ptg-section-col-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ptg-text);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ptg-primary);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* 文章行 */
.ptg-spost-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--ptg-border-light);
}
.ptg-spost-item:last-child { border-bottom: none; }

.ptg-spost-rank {
  width: 24px; height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  background: var(--ptg-bg);
  color: var(--ptg-text-light);
  margin-top: 1px;
}
.ptg-rank-1 { background: #fef3c7 !important; color: #d97706 !important; }
.ptg-rank-2 { background: #e2e8f0 !important; color: #475569 !important; }
.ptg-rank-3 { background: #fed7aa !important; color: #c2410c !important; }

.ptg-spost-body { flex: 1; min-width: 0; }
.ptg-spost-title {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--ptg-text);
  line-height: 1.5;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-decoration: none;
}
.ptg-spost-title:hover { color: var(--ptg-primary); }

.ptg-spost-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ptg-text-light);
  flex-wrap: wrap;
}
.ptg-spost-cat {
  background: var(--ptg-primary-light);
  color: var(--ptg-primary);
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.ptg-spost-empty {
  text-align: center;
  padding: 24px;
  color: var(--ptg-text-light);
  font-size: 14px;
}

/* ══ 手机端快捷入口防溢出（600px以下）══ */
@media (max-width: 600px) {
  .ptg-quick-wrap {
    padding: 0 12px;
    width: 100%;
    box-sizing: border-box;
  }
  .ptg-quick-box {
    padding: 12px 10px 16px;
    border-radius: 16px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }
  .ptg-quick-grid {
    gap: 8px;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
  }
  .ptg-qitem {
    padding: 14px 4px 12px;
    min-height: 80px;
    border-radius: 12px;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }
  .ptg-qname {
    font-size: 13px;
    word-break: break-word;
    overflow: hidden;
  }
  .ptg-qdesc {
    font-size: 10px;
    word-break: break-word;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .ptg-section-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  .ptg-section-posts-wrap {
    grid-template-columns: 1fr;
  }
}

/* ── 页眉会员入口按钮 ── */
.ptg-header-divider {
  width: 1px; height: 20px;
  background: var(--ptg-border);
  flex-shrink: 0;
}
.ptg-member-links {
  display: flex; align-items: center; gap: 6px;
  flex-shrink: 0;
}
.ptg-btn-member {
  font-size: 13px; font-weight: 500;
  padding: 5px 13px; border-radius: 16px;
  text-decoration: none; white-space: nowrap;
  transition: all .2s; line-height: 1;
}
.ptg-btn-login {
  color: var(--ptg-primary);
  border: 1px solid var(--ptg-primary);
  background: transparent;
}
.ptg-btn-login:hover { background: var(--ptg-primary); color: #fff; }

.ptg-btn-register {
  color: #fff;
  background: var(--ptg-primary);
  border: 1px solid var(--ptg-primary);
}
.ptg-btn-register:hover { background: var(--ptg-primary-dark); border-color: var(--ptg-primary-dark); color: #fff; }

.ptg-btn-profile {
  color: var(--ptg-primary);
  border: 1px solid var(--ptg-primary);
  background: transparent;
}
.ptg-btn-profile:hover { background: var(--ptg-primary); color: #fff; }

.ptg-btn-logout {
  color: #ef4444;
  border: 1px solid #ef4444;
  background: transparent;
}
.ptg-btn-logout:hover { background: #ef4444; color: #fff; }

/* 手机端：搜索框隐藏时按钮也要显示 */
@media (max-width: 768px) {
  .ptg-btn-member { font-size: 12px; padding: 4px 10px; }
  .ptg-header-divider { display: none; }
}
@media (max-width: 380px) {
  .ptg-member-links { gap: 4px; }
  .ptg-btn-member { font-size: 11px; padding: 4px 8px; }
}
