/* Agency Forumdisplay 5.0 — isolated board-page styles */
body.pg_forumdisplay{background:#f8f7f7;color:#30282c}
body.pg_forumdisplay #pt{margin-top:16px;border:0;background:transparent}
body.pg_forumdisplay .boardnav>.wp,body.pg_forumdisplay #ct.wp{width:min(1180px,calc(100% - 32px));margin-left:auto!important;margin-right:auto!important}
body.pg_forumdisplay .mn{min-width:0}
body.pg_forumdisplay .agfd-hero{position:relative;min-height:330px;margin:0 0 18px;overflow:hidden;border-radius:26px;background-image:linear-gradient(90deg,rgba(14,8,14,.9),rgba(26,12,24,.56),rgba(26,12,24,.18)),var(--agfd-cover);background-position:center;background-size:cover;box-shadow:0 18px 55px rgba(43,24,34,.16)}
.agfd-hero-shade{position:absolute;inset:0;background:linear-gradient(180deg,transparent 50%,rgba(0,0,0,.2))}
.agfd-hero-content{position:relative;z-index:1;max-width:670px;padding:54px 56px;color:#fff}
.agfd-kicker{margin:0 0 10px;color:#ffd8e3;font-size:13px;font-weight:800;letter-spacing:.12em}
.agfd-hero h1{margin:0 0 16px;color:#fff;font-size:38px;line-height:1.2;font-weight:900;text-shadow:0 3px 16px rgba(0,0,0,.2)}
.agfd-lead{max-width:650px;margin:0;color:rgba(255,255,255,.9);font-size:16px;line-height:1.9}
.agfd-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:24px}
.agfd-btn{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 20px;border-radius:999px;font-weight:800;text-decoration:none!important}
.agfd-btn-primary{background:#e34b77;color:#fff!important;box-shadow:0 10px 24px rgba(227,75,119,.28)}
.agfd-btn-ghost{border:1px solid rgba(255,255,255,.48);background:rgba(255,255,255,.12);color:#fff!important;backdrop-filter:blur(8px)}
.agfd-tags{display:flex;flex-wrap:wrap;gap:8px;margin-top:18px}.agfd-tags span{padding:6px 10px;border:1px solid rgba(255,255,255,.25);border-radius:999px;background:rgba(0,0,0,.18);font-size:12px}
.agfd-overview{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:18px}.agfd-stat{padding:19px 20px;border:1px solid #eee3e7;border-radius:18px;background:#fff;box-shadow:0 8px 24px rgba(45,26,35,.045)}.agfd-stat strong{display:block;color:#d9416c;font-size:25px;line-height:1.1}.agfd-stat span{display:block;margin-top:7px;color:#7d7076;font-size:13px}
.agfd-guide,.agfd-bottom{margin:0 0 20px;padding:28px;border:1px solid #eee3e7;border-radius:24px;background:#fff;box-shadow:0 10px 30px rgba(45,26,35,.05)}
.agfd-section-head p{margin:0 0 5px;color:#d9416c;font-size:12px;font-weight:800;letter-spacing:.12em}.agfd-section-head h2{margin:0 0 18px;color:#2d2529;font-size:23px;line-height:1.35}
.agfd-guide-grid,.agfd-link-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.agfd-guide-grid a,.agfd-link-grid a{display:block;padding:18px;border:1px solid #f0e4e8;border-radius:16px;background:#fffafb;text-decoration:none!important;transition:.2s}.agfd-guide-grid a:hover,.agfd-link-grid a:hover{transform:translateY(-2px);border-color:#e9bdca;box-shadow:0 10px 24px rgba(80,35,50,.07)}.agfd-guide-grid b,.agfd-link-grid b{display:block;margin-bottom:8px;color:#3b3035;font-size:16px}.agfd-guide-grid span,.agfd-link-grid span{color:#766a70;font-size:13px;line-height:1.7}
/* Keep Discuz functions, soften the old forum information panel */
body.pg_forumdisplay .bm.bml.pbn{margin-bottom:18px;border:1px solid #eee3e7;border-radius:20px;background:#fff;overflow:hidden;box-shadow:0 8px 24px rgba(45,26,35,.04)}
body.pg_forumdisplay .bm.bml.pbn>.bm_h{padding:16px 20px;border:0;background:#fff}body.pg_forumdisplay .bm.bml.pbn>.bm_h h1{font-size:20px}body.pg_forumdisplay .bm.bml.pbn>.bm_c{padding:0 20px 18px;border:0}
body.pg_forumdisplay #pgt{margin:18px 0 10px}body.pg_forumdisplay #pgt #newspecial img{border-radius:10px}
body.pg_forumdisplay .ttp{padding:10px 12px;border:1px solid #eee3e7;border-radius:16px;background:#fff}body.pg_forumdisplay .ttp li a{border-radius:999px}
/* Thread list as clean editorial cards, while preserving table semantics */
body.pg_forumdisplay #threadlist{border:0!important;background:transparent!important}body.pg_forumdisplay #threadlist .th{margin-bottom:10px;border:1px solid #eee3e7;border-radius:16px;background:#fff}body.pg_forumdisplay #threadlisttableid{border-collapse:separate;border-spacing:0 10px;background:transparent}body.pg_forumdisplay #threadlisttableid>tbody{display:table-row-group}body.pg_forumdisplay #threadlisttableid>tbody>tr{background:#fff;box-shadow:0 7px 22px rgba(44,25,34,.045)}body.pg_forumdisplay #threadlisttableid>tbody>tr>td,body.pg_forumdisplay #threadlisttableid>tbody>tr>th{padding-top:16px;padding-bottom:16px;border-top:1px solid #eee3e7;border-bottom:1px solid #eee3e7;background:#fff}body.pg_forumdisplay #threadlisttableid>tbody>tr>*:first-child{border-left:1px solid #eee3e7;border-radius:16px 0 0 16px}body.pg_forumdisplay #threadlisttableid>tbody>tr>*:last-child{border-right:1px solid #eee3e7;border-radius:0 16px 16px 0}body.pg_forumdisplay #threadlisttableid .new{font-weight:800}body.pg_forumdisplay #threadlisttableid th a.s.xst,body.pg_forumdisplay #threadlisttableid th a.xst{color:#32282d;font-size:16px;line-height:1.55}body.pg_forumdisplay #threadlisttableid .res-ti{margin-top:7px;color:#978a90;font-size:12px}body.pg_forumdisplay #threadlisttableid .num a{color:#d9416c;font-weight:800}
.agfd-bottom{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(280px,.8fr);gap:26px;margin-top:22px}.agfd-link-grid{grid-template-columns:repeat(2,1fr)}.agfd-faq{padding-left:26px;border-left:1px solid #eee3e7}.agfd-faq h2{margin:0 0 12px;font-size:20px}.agfd-faq details{padding:13px 0;border-bottom:1px solid #f0e6e9}.agfd-faq summary{cursor:pointer;color:#3c3136;font-weight:800}.agfd-faq p{margin:9px 0 0;color:#796d73;line-height:1.75}
@media(max-width:980px){body.pg_forumdisplay .boardnav>.wp,body.pg_forumdisplay #ct.wp{width:min(100% - 24px,1180px)}.agfd-hero{min-height:290px}.agfd-hero-content{padding:38px}.agfd-overview{grid-template-columns:repeat(2,1fr)}.agfd-guide-grid{grid-template-columns:repeat(2,1fr)}.agfd-bottom{grid-template-columns:1fr}.agfd-faq{padding-left:0;border-left:0;border-top:1px solid #eee3e7;padding-top:22px}}
@media(max-width:680px){body.pg_forumdisplay{background:#fff}body.pg_forumdisplay #pt{display:none}body.pg_forumdisplay .boardnav>.wp,body.pg_forumdisplay #ct.wp{width:100%;padding:0 14px;box-sizing:border-box}.agfd-hero{min-height:0;margin-top:12px;border-radius:22px;background-position:center}.agfd-hero-content{padding:32px 24px}.agfd-hero h1{font-size:29px}.agfd-lead{font-size:14px;line-height:1.75}.agfd-actions{display:grid;grid-template-columns:1fr 1fr}.agfd-btn{padding:0 12px}.agfd-overview{gap:8px}.agfd-stat{padding:15px;border-radius:14px}.agfd-stat strong{font-size:21px}.agfd-guide,.agfd-bottom{padding:20px 16px;border-radius:20px}.agfd-section-head h2{font-size:20px}.agfd-guide-grid,.agfd-link-grid{grid-template-columns:1fr}.agfd-guide-grid a,.agfd-link-grid a{padding:16px}.agfd-tags{gap:6px}.agfd-tags span{font-size:11px}.agfd-bottom{gap:20px}body.pg_forumdisplay #threadlisttableid{border-spacing:0 8px}body.pg_forumdisplay #threadlisttableid .by,body.pg_forumdisplay #threadlisttableid .num{display:none}body.pg_forumdisplay #threadlisttableid>tbody>tr>*:first-child,body.pg_forumdisplay #threadlisttableid>tbody>tr>*:last-child{border-radius:14px}body.pg_forumdisplay #threadlisttableid>tbody>tr>th{padding:15px 12px}body.pg_forumdisplay #threadlisttableid th a.s.xst,body.pg_forumdisplay #threadlisttableid th a.xst{font-size:15px}.bm.bml.pbn .bm_h .y{display:none}}


/* Board UI 5.1 — forum rules and thread-list refinement */
body.pg_forumdisplay .agfd-forum-panel{
  position:relative;
  margin:0 0 20px;
  border:1px solid #eadde2;
  border-radius:22px;
  background:linear-gradient(145deg,#fff 0%,#fffafb 100%);
  box-shadow:0 12px 34px rgba(54,30,41,.06);
}
body.pg_forumdisplay .agfd-forum-panel>.bm_h{
  min-height:62px;
  padding:17px 22px;
  border-bottom:1px solid #f0e5e8;
  background:transparent;
}
body.pg_forumdisplay .agfd-forum-title{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
  color:#332a2e;
  font-size:20px;
  font-weight:900;
}
body.pg_forumdisplay .agfd-forum-title>a{color:#332a2e;text-decoration:none}
body.pg_forumdisplay .agfd-forum-title .i{
  display:inline-flex;
  align-items:center;
  gap:4px;
  margin:0;
  padding:6px 10px;
  border-radius:999px;
  background:#fff1f5;
  color:#8b6974;
  font-size:12px;
}
body.pg_forumdisplay .agfd-forum-panel .bm_h .y{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  color:#8a7b82;
}
body.pg_forumdisplay .agfd-forum-panel .bm_h .y .pipe{display:none}
body.pg_forumdisplay .agfd-forum-panel .bm_h .y a{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:0 10px;
  border:1px solid #eee0e5;
  border-radius:999px;
  background:#fff;
  color:#6d5f65;
  text-decoration:none;
}
body.pg_forumdisplay .agfd-forum-meta{padding:0 22px 22px!important}
body.pg_forumdisplay .agfd-rules{
  position:relative;
  padding:18px 20px 18px 52px;
  border:1px solid #f0dce3;
  border-radius:17px;
  background:linear-gradient(135deg,#fff8fa,#fff);
}
body.pg_forumdisplay .agfd-rules:before{
  content:'i';
  position:absolute;
  left:18px;
  top:18px;
  display:grid;
  place-items:center;
  width:24px;
  height:24px;
  border-radius:50%;
  background:#e34b77;
  color:#fff;
  font-weight:900;
  font-family:Georgia,serif;
}
body.pg_forumdisplay .agfd-rules-copy{
  padding:0!important;
  color:#685b61!important;
  font-size:14px;
  line-height:1.9;
}

body.pg_forumdisplay #threadlist .th{
  padding:0;
  overflow:hidden;
  border-color:#eadde2;
  box-shadow:0 7px 20px rgba(48,27,37,.035);
}
body.pg_forumdisplay .agfd-thread-toolbar{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:7px;
  padding:13px 15px;
  color:#85767d;
  font-size:13px;
  line-height:1.5;
}
body.pg_forumdisplay .agfd-thread-toolbar>a{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:0 11px;
  border:1px solid #eee1e5;
  border-radius:999px;
  background:#fff;
  color:#65575e!important;
  font-weight:700!important;
  text-decoration:none;
  transition:.18s ease;
}
body.pg_forumdisplay .agfd-thread-toolbar>a:hover{
  border-color:#e8b7c5;
  background:#fff5f8;
  color:#ce3e68!important;
}
body.pg_forumdisplay #threadlist .th td.by,
body.pg_forumdisplay #threadlist .th td.num{
  color:#85767d;
  font-size:12px;
  font-weight:700;
  text-align:center;
}
body.pg_forumdisplay #threadlist>.bm_c{padding:0;background:transparent}
body.pg_forumdisplay #threadlisttableid{table-layout:fixed}
body.pg_forumdisplay #threadlisttableid>tbody.agfd-thread-card>tr{
  transition:transform .18s ease,box-shadow .18s ease;
}
body.pg_forumdisplay #threadlisttableid>tbody.agfd-thread-card>tr:hover{
  transform:translateY(-2px);
  box-shadow:0 14px 32px rgba(57,31,43,.085);
}
body.pg_forumdisplay #threadlisttableid>tbody.agfd-thread-card>tr>td,
body.pg_forumdisplay #threadlisttableid>tbody.agfd-thread-card>tr>th{
  min-height:82px;
  padding-top:18px;
  padding-bottom:18px;
}
body.pg_forumdisplay #threadlisttableid .icn{width:42px;padding-left:14px;text-align:center}
body.pg_forumdisplay #threadlisttableid .icn img{max-width:22px;max-height:22px}
body.pg_forumdisplay #threadlisttableid th{
  padding-left:10px;
  padding-right:18px;
}
body.pg_forumdisplay #threadlisttableid th a.s.xst,
body.pg_forumdisplay #threadlisttableid th a.xst{
  display:inline;
  color:#30272b;
  font-size:17px;
  font-weight:800;
  line-height:1.55;
  text-decoration:none;
}
body.pg_forumdisplay #threadlisttableid th a.s.xst:hover,
body.pg_forumdisplay #threadlisttableid th a.xst:hover{color:#d6406b}
body.pg_forumdisplay #threadlisttableid .res-ti{
  margin:8px 0 0;
  color:#9a8d93;
  font-size:12px;
}
body.pg_forumdisplay #threadlisttableid td.by{
  width:112px;
  color:#776a70;
  text-align:left;
}
body.pg_forumdisplay #threadlisttableid td.by cite,
body.pg_forumdisplay #threadlisttableid td.by em{display:block;line-height:1.55}
body.pg_forumdisplay #threadlisttableid td.by cite a{color:#594c52}
body.pg_forumdisplay #threadlisttableid td.by em,
body.pg_forumdisplay #threadlisttableid td.by em a{color:#a09499;font-size:11px}
body.pg_forumdisplay #threadlisttableid td.num{
  width:72px;
  text-align:center;
}
body.pg_forumdisplay #threadlisttableid td.num>a{
  display:block;
  color:#d6406b;
  font-size:17px;
  font-weight:900;
}
body.pg_forumdisplay #threadlisttableid td.num>em{display:block;color:#a09499;font-size:11px}
body.pg_forumdisplay .agfd-cell-label{display:none}
body.pg_forumdisplay #threadlisttableid tbody[id="separatorline"],
body.pg_forumdisplay #threadlisttableid tbody.emptb{box-shadow:none}

@media(max-width:800px){
  body.pg_forumdisplay .agfd-forum-panel>.bm_h{padding:15px 16px}
  body.pg_forumdisplay .agfd-forum-meta{padding:0 16px 16px!important}
  body.pg_forumdisplay .agfd-rules{padding:16px 16px 16px 48px}
  body.pg_forumdisplay .agfd-rules:before{left:15px;top:16px}
  body.pg_forumdisplay #threadlist .th table{display:block}
  body.pg_forumdisplay #threadlist .th tbody,
  body.pg_forumdisplay #threadlist .th tr,
  body.pg_forumdisplay #threadlist .th th{display:block;width:100%}
  body.pg_forumdisplay #threadlist .th td{display:none}
  body.pg_forumdisplay .agfd-thread-toolbar{padding:12px}
  body.pg_forumdisplay #threadlisttableid{display:block;width:100%}
  body.pg_forumdisplay #threadlisttableid>tbody.agfd-thread-card{display:block;margin-bottom:10px}
  body.pg_forumdisplay #threadlisttableid>tbody.agfd-thread-card>tr{
    position:relative;
    display:grid;
    grid-template-columns:34px minmax(0,1fr);
    width:100%;
    border:1px solid #eadde2;
    border-radius:16px;
    background:#fff;
    box-sizing:border-box;
    overflow:hidden;
  }
  body.pg_forumdisplay #threadlisttableid>tbody.agfd-thread-card>tr>*{
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
  }
  body.pg_forumdisplay #threadlisttableid>tbody.agfd-thread-card .icn{
    grid-column:1;
    grid-row:1;
    width:auto;
    padding:18px 0 0 12px;
  }
  body.pg_forumdisplay #threadlisttableid>tbody.agfd-thread-card .o{position:absolute;right:10px;top:10px;padding:0}
  body.pg_forumdisplay #threadlisttableid>tbody.agfd-thread-card th{
    grid-column:2;
    grid-row:1;
    display:block;
    padding:15px 14px 13px 4px;
  }
  body.pg_forumdisplay #threadlisttableid th a.s.xst,
  body.pg_forumdisplay #threadlisttableid th a.xst{font-size:15px;line-height:1.5}
  body.pg_forumdisplay #threadlisttableid .agfd-author-cell,
  body.pg_forumdisplay #threadlisttableid .agfd-count-cell,
  body.pg_forumdisplay #threadlisttableid .agfd-lastpost-cell{display:none!important}
  body.pg_forumdisplay #threadlisttableid .res-ti{display:block}
}

/* Board UI 5.2 — consolidated mobile adaptation */
@media (max-width:680px){
  body.pg_forumdisplay{overflow-x:hidden;background:#fff}
  body.pg_forumdisplay .boardnav>.wp,
  body.pg_forumdisplay #ct.wp{width:100%!important;padding:0 12px!important;box-sizing:border-box}

  /* Compact hero: avoid text/button clipping and keep the image visible */
  body.pg_forumdisplay .agfd-hero{
    min-height:0!important;
    margin:10px 0 14px!important;
    border-radius:20px!important;
    background-position:58% center!important;
  }
  body.pg_forumdisplay .agfd-hero-content{
    max-width:none!important;
    padding:28px 20px 26px!important;
  }
  body.pg_forumdisplay .agfd-kicker{margin-bottom:8px;font-size:12px;letter-spacing:.08em}
  body.pg_forumdisplay .agfd-hero h1{margin-bottom:12px;font-size:28px;line-height:1.25}
  body.pg_forumdisplay .agfd-lead{
    display:-webkit-box;
    overflow:hidden;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:4;
    font-size:14px;
    line-height:1.75;
  }
  body.pg_forumdisplay .agfd-actions{grid-template-columns:1fr 1fr;gap:9px;margin-top:18px}
  body.pg_forumdisplay .agfd-btn{min-width:0;min-height:42px;padding:0 8px;font-size:14px;white-space:nowrap}
  body.pg_forumdisplay .agfd-tags{margin-top:15px;gap:6px}
  body.pg_forumdisplay .agfd-tags span{padding:5px 8px;font-size:11px}

  /* Overview remains two columns, but with reduced vertical footprint */
  body.pg_forumdisplay .agfd-overview{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-bottom:14px}
  body.pg_forumdisplay .agfd-stat{min-height:92px;padding:16px 17px;border-radius:16px;box-sizing:border-box}
  body.pg_forumdisplay .agfd-stat strong{font-size:24px}
  body.pg_forumdisplay .agfd-stat span{margin-top:8px;font-size:13px}

  /* Guide cards: compact and readable instead of oversized full-height blocks */
  body.pg_forumdisplay .agfd-guide,
  body.pg_forumdisplay .agfd-bottom{margin-bottom:15px;padding:20px 16px;border-radius:20px}
  body.pg_forumdisplay .agfd-section-head h2{margin-bottom:14px;font-size:20px;line-height:1.4}
  body.pg_forumdisplay .agfd-guide-grid,
  body.pg_forumdisplay .agfd-link-grid{grid-template-columns:1fr;gap:9px}
  body.pg_forumdisplay .agfd-guide-grid a,
  body.pg_forumdisplay .agfd-link-grid a{padding:14px 15px;border-radius:14px}
  body.pg_forumdisplay .agfd-guide-grid b,
  body.pg_forumdisplay .agfd-link-grid b{margin-bottom:5px;font-size:16px}
  body.pg_forumdisplay .agfd-guide-grid span,
  body.pg_forumdisplay .agfd-link-grid span{font-size:13px;line-height:1.65}

  /* Forum rules panel */
  body.pg_forumdisplay .agfd-forum-panel{margin-bottom:15px;border-radius:18px}
  body.pg_forumdisplay .agfd-forum-panel>.bm_h{min-height:0;padding:14px 15px}
  body.pg_forumdisplay .agfd-forum-title{gap:7px;font-size:18px}
  body.pg_forumdisplay .agfd-forum-title .i{padding:5px 8px;font-size:11px}
  body.pg_forumdisplay .agfd-forum-meta{padding:0 14px 14px!important}
  body.pg_forumdisplay .agfd-rules{padding:14px 14px 14px 44px;border-radius:14px}
  body.pg_forumdisplay .agfd-rules:before{left:13px;top:14px;width:22px;height:22px}
  body.pg_forumdisplay .agfd-rules-copy{font-size:13px!important;line-height:1.75}

  /* Thread toolbar becomes horizontally scrollable instead of wrapping into a tall block */
  body.pg_forumdisplay .agfd-thread-toolbar{
    display:flex;
    flex-wrap:nowrap;
    gap:6px;
    overflow-x:auto;
    padding:10px 11px;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
  }
  body.pg_forumdisplay .agfd-thread-toolbar::-webkit-scrollbar{display:none}
  body.pg_forumdisplay .agfd-thread-toolbar>a{flex:0 0 auto;min-height:28px;padding:0 10px;font-size:12px}

  /* Mobile thread cards: compact one-column editorial layout */
  body.pg_forumdisplay #threadlisttableid{display:block;width:100%;border-spacing:0}
  body.pg_forumdisplay #threadlisttableid>tbody.agfd-thread-card{display:block;margin:0 0 9px}
  body.pg_forumdisplay #threadlisttableid>tbody.agfd-thread-card>tr{
    position:relative;
    display:grid;
    grid-template-columns:30px minmax(0,1fr);
    min-height:0;
    width:100%;
    border:1px solid #eadde2;
    border-radius:15px;
    background:#fff;
    box-shadow:0 6px 18px rgba(52,29,40,.04);
    box-sizing:border-box;
    overflow:hidden;
  }
  body.pg_forumdisplay #threadlisttableid>tbody.agfd-thread-card>tr:hover{transform:none;box-shadow:0 6px 18px rgba(52,29,40,.04)}
  body.pg_forumdisplay #threadlisttableid>tbody.agfd-thread-card>tr>*{min-height:0!important;border:0!important;border-radius:0!important;background:transparent!important}
  body.pg_forumdisplay #threadlisttableid>tbody.agfd-thread-card .icn{
    grid-column:1;
    grid-row:1;
    width:30px;
    padding:16px 0 0 9px;
    box-sizing:border-box;
  }
  body.pg_forumdisplay #threadlisttableid>tbody.agfd-thread-card .icn img{max-width:18px;max-height:18px}
  body.pg_forumdisplay #threadlisttableid>tbody.agfd-thread-card .o{position:absolute;right:9px;top:9px;width:auto;padding:0;z-index:2}
  body.pg_forumdisplay #threadlisttableid>tbody.agfd-thread-card th{
    grid-column:2;
    grid-row:1;
    display:block;
    min-width:0;
    padding:14px 30px 13px 5px!important;
    box-sizing:border-box;
  }
  body.pg_forumdisplay #threadlisttableid th a.s.xst,
  body.pg_forumdisplay #threadlisttableid th a.xst{
    display:block;
    overflow-wrap:anywhere;
    word-break:break-word;
    font-size:15px;
    line-height:1.55;
  }
  body.pg_forumdisplay #threadlisttableid th .avt,
  body.pg_forumdisplay #threadlisttableid th img.avatar{width:34px!important;height:34px!important;margin-right:8px!important}
  body.pg_forumdisplay #threadlisttableid .res-ti{
    display:-webkit-box;
    overflow:hidden;
    margin-top:7px;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
    color:#8f8288;
    font-size:12px;
    line-height:1.65;
  }
  body.pg_forumdisplay #threadlisttableid .agfd-author-cell,
  body.pg_forumdisplay #threadlisttableid .agfd-count-cell,
  body.pg_forumdisplay #threadlisttableid .agfd-lastpost-cell{display:none!important}

  /* Announcement row should not inherit awkward table-cell curves */
  body.pg_forumdisplay #threadlisttableid>tbody:not(.agfd-thread-card)>tr>td,
  body.pg_forumdisplay #threadlisttableid>tbody:not(.agfd-thread-card)>tr>th{border-radius:0!important}

  /* Contact buttons: smaller and anchored lower so they do not cover hero/thread titles */
  body.pg_forumdisplay .glow-contact-wrap{
    right:8px!important;
    top:auto!important;
    bottom:92px!important;
    transform:none!important;
    gap:10px!important;
  }
  body.pg_forumdisplay .glow-btn{width:52px!important;height:52px!important;border-width:1px!important}
  body.pg_forumdisplay .glow-label{font-size:11px!important}
  body.pg_forumdisplay .glow-subtext,
  body.pg_forumdisplay .u-subtext{font-size:7px!important}
}

/* Board UI 5.4 — mobile logo, hero text and post button polish */
body.pg_forumdisplay #newspecial{
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  min-width:118px;
  height:42px;
  padding:0 22px;
  border:0;
  border-radius:999px;
  background:linear-gradient(135deg,#ef4f7f,#d83e69);
  box-shadow:0 8px 20px rgba(216,62,105,.22);
  color:#fff;
  font-size:0;
  text-decoration:none;
  box-sizing:border-box;
}
body.pg_forumdisplay #newspecial:after{
  content:"發表主題";
  color:#fff;
  font-size:15px;
  font-weight:800;
  letter-spacing:.04em;
}
body.pg_forumdisplay #newspecial img{display:none!important}
body.pg_forumdisplay #newspecial:hover{
  background:linear-gradient(135deg,#f45c89,#cf355f);
  box-shadow:0 10px 24px rgba(216,62,105,.3);
}

@media(max-width:680px){
  body#nv_forum #hd .wp{padding:0 8px 0 10px!important}
  body#nv_forum #hd .hdc{min-height:88px!important;gap:6px!important}
  body#nv_forum #hd .hdc h2{max-width:calc(100% - 58px)!important;flex:1 1 auto!important}
  body#nv_forum #hd .hdc h2 a{width:100%;display:flex!important;align-items:center}
  body#nv_forum #hd .hdc h2 img{
    width:auto!important;
    max-width:100%!important;
    max-height:72px!important;
    min-height:58px!important;
    object-fit:contain!important;
  }
  body#nv_forum .ag21-menu-toggle{
    flex:0 0 48px!important;
    width:48px!important;
    height:48px!important;
    margin-right:0!important;
  }

  body.pg_forumdisplay .agfd-hero-content{
    padding:26px 18px 24px!important;
  }
  body.pg_forumdisplay .agfd-kicker{
    font-size:12px!important;
    line-height:1.45!important;
  }
  body.pg_forumdisplay .agfd-hero h1{
    font-size:27px!important;
    line-height:1.22!important;
  }
  body.pg_forumdisplay .agfd-lead{
    max-width:100%!important;
    display:-webkit-box!important;
    overflow:hidden!important;
    -webkit-box-orient:vertical!important;
    -webkit-line-clamp:3!important;
    font-size:13px!important;
    line-height:1.72!important;
    overflow-wrap:anywhere!important;
    word-break:break-word!important;
  }
  body.pg_forumdisplay .agfd-actions{
    gap:8px!important;
    margin-top:15px!important;
  }
  body.pg_forumdisplay .agfd-btn{
    min-height:40px!important;
    font-size:13px!important;
  }
  body.pg_forumdisplay .agfd-tags{
    margin-top:12px!important;
  }

  body.pg_forumdisplay #newspecial{
    min-width:108px;
    height:40px;
    padding:0 18px;
  }
  body.pg_forumdisplay #newspecial:after{font-size:14px}
}

/* Board UI 5.5 — definitive mobile toolbar and action-row repair */
@media (max-width:680px){
  body.pg_forumdisplay #pgt{
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    width:100%!important;
    min-height:54px!important;
    margin:14px 0 12px!important;
    padding:0 2px!important;
    box-sizing:border-box!important;
  }
  body.pg_forumdisplay #pgt #fd_page_top:empty{display:none!important}
  body.pg_forumdisplay #pgt .pgb{
    position:static!important;
    float:none!important;
    margin:0 0 0 auto!important;
  }
  body.pg_forumdisplay #pgt .pgb a{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    min-width:78px!important;
    height:40px!important;
    padding:0 14px!important;
    border:1px solid #eadde2!important;
    border-radius:999px!important;
    background:#fff!important;
    color:#5f5258!important;
    font-size:14px!important;
    font-weight:700!important;
    line-height:1!important;
    box-shadow:0 5px 14px rgba(54,31,41,.05)!important;
    box-sizing:border-box!important;
  }
  body.pg_forumdisplay #newspecial{
    flex:0 0 auto!important;
    min-width:116px!important;
    height:42px!important;
    margin:0!important;
    padding:0 20px!important;
  }

  /* Discuz's legacy .th height/overflow was clipping the filter labels. */
  body.pg_forumdisplay #threadlist .th{
    display:block!important;
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    margin:0 0 12px!important;
    padding:0!important;
    overflow:visible!important;
    border:1px solid #eadde2!important;
    border-radius:18px!important;
    background:#fff!important;
    box-sizing:border-box!important;
  }
  body.pg_forumdisplay #threadlist .th table,
  body.pg_forumdisplay #threadlist .th tbody,
  body.pg_forumdisplay #threadlist .th tr,
  body.pg_forumdisplay #threadlist .th th{
    display:block!important;
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
    border:0!important;
    box-sizing:border-box!important;
  }
  body.pg_forumdisplay #threadlist .th td{display:none!important}
  body.pg_forumdisplay .agfd-thread-toolbar{
    display:flex!important;
    align-items:center!important;
    flex-wrap:nowrap!important;
    width:100%!important;
    min-height:48px!important;
    margin:0!important;
    padding:9px 11px!important;
    gap:7px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    white-space:nowrap!important;
    line-height:30px!important;
    border:0!important;
    box-sizing:border-box!important;
    -webkit-overflow-scrolling:touch!important;
  }
  body.pg_forumdisplay .agfd-thread-toolbar>a{
    flex:0 0 auto!important;
    min-height:30px!important;
    padding:0 11px!important;
    line-height:28px!important;
  }
  body.pg_forumdisplay .agfd-thread-toolbar #atarget,
  body.pg_forumdisplay .agfd-thread-toolbar .forumrefresh,
  body.pg_forumdisplay .agfd-thread-toolbar #clearstickthread{
    display:none!important;
  }
  body.pg_forumdisplay #threadlist>.bm_c{
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
  }
}
