/* Agency Thread Build 3.0 — scoped to thread pages only */
body.pg_viewthread {
  background:#faf8f8;
  color:#30282c;
}
body.pg_viewthread *,
body.pg_viewthread *:before,
body.pg_viewthread *:after {
  box-sizing:border-box;
}
body.pg_viewthread .agvt-page {
  width:min(1180px,calc(100% - 32px));
  margin-left:auto;
  margin-right:auto;
}

/* Breadcrumb and top actions */
body.pg_viewthread #pt {
  margin-top:14px;
  border:0;
  background:transparent;
}
body.pg_viewthread .agvt-top-actions,
body.pg_viewthread .agvt-bottom-actions {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
  min-height:52px;
  margin:14px 0;
  padding:0;
  border:0!important;
}
body.pg_viewthread .agvt-top-actions .pgt,
body.pg_viewthread .agvt-bottom-actions .pg {
  margin-right:auto;
}
body.pg_viewthread .agvt-top-actions .pgb,
body.pg_viewthread .agvt-bottom-actions .pgb {
  float:none;
  order:4;
}
body.pg_viewthread .agvt-top-actions .pgb a,
body.pg_viewthread .agvt-bottom-actions .pgb a {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:104px;
  height:42px;
  padding:0 17px;
  border:1px solid #e8dce1;
  border-radius:999px;
  background:#fff;
  color:#62555b;
  font-weight:800;
  text-decoration:none;
  box-shadow:0 6px 16px rgba(57,32,43,.045);
}
body.pg_viewthread .agvt-top-actions #newspecial,
body.pg_viewthread .agvt-top-actions #post_reply,
body.pg_viewthread .agvt-bottom-actions #newspecialtmp,
body.pg_viewthread .agvt-bottom-actions #post_replytmp {
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  min-width:118px;
  height:42px;
  padding:0 19px;
  border-radius:999px;
  text-decoration:none;
  box-shadow:0 8px 20px rgba(215,61,103,.16);
}
body.pg_viewthread .agvt-top-actions #newspecial,
body.pg_viewthread .agvt-bottom-actions #newspecialtmp {
  background:linear-gradient(135deg,#ef4f7f,#d83e69);
}
body.pg_viewthread .agvt-top-actions #post_reply,
body.pg_viewthread .agvt-bottom-actions #post_replytmp {
  border:1px solid #e6b7c5;
  background:#fff;
}
body.pg_viewthread .agvt-top-actions #newspecial img,
body.pg_viewthread .agvt-top-actions #post_reply img,
body.pg_viewthread .agvt-bottom-actions #newspecialtmp img,
body.pg_viewthread .agvt-bottom-actions #post_replytmp img {
  display:none;
}
body.pg_viewthread .agvt-top-actions #newspecial:after,
body.pg_viewthread .agvt-bottom-actions #newspecialtmp:after {
  content:"發表主題";
  color:#fff;
  font-size:14px;
  font-weight:900;
}
body.pg_viewthread .agvt-top-actions #post_reply:after,
body.pg_viewthread .agvt-bottom-actions #post_replytmp:after {
  content:"回覆文章";
  color:#ce3f68;
  font-size:14px;
  font-weight:900;
}

/* Moderator controls */
body.pg_viewthread .agvt-modmenu {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:5px 0;
  margin:0 0 14px;
  padding:10px 14px!important;
  overflow-x:auto;
  border:1px solid #eee2e6;
  border-radius:14px;
  background:#fff;
  color:#84767c;
  line-height:1.7;
  scrollbar-width:none;
}
body.pg_viewthread .agvt-modmenu::-webkit-scrollbar {display:none}
body.pg_viewthread .agvt-modmenu a {
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:0 8px;
  border-radius:8px;
  color:#776970;
  text-decoration:none;
}
body.pg_viewthread .agvt-modmenu a:hover {
  background:#fff2f6;
  color:#ce3f68;
}

/* Main thread card */
body.pg_viewthread .agvt-postlist {
  overflow:hidden;
  border:1px solid #eadfe3;
  border-radius:24px;
  background:#fff;
  box-shadow:0 14px 38px rgba(52,30,40,.06);
}
body.pg_viewthread .agvt-postlist>table:first-child {
  border-bottom:1px solid #eee3e7;
  background:linear-gradient(135deg,#fff8fa,#fff);
}
body.pg_viewthread .agvt-postlist>table:first-child .pls {
  width:120px;
  border:0;
  background:transparent;
}
body.pg_viewthread .agvt-thread-head {
  padding:27px 28px 25px!important;
  border:0!important;
}
body.pg_viewthread .agvt-thread-head h1.ts {
  margin:0;
  color:#292125;
  font-size:30px;
  font-weight:900;
  line-height:1.38;
  letter-spacing:-.02em;
}
body.pg_viewthread .agvt-thread-head h1.ts a {
  color:inherit;
  text-decoration:none;
}
body.pg_viewthread .agvt-postlist .plhin {
  border:0;
}
body.pg_viewthread .agvt-postlist .plhin .pls {
  border-color:#eee3e7;
  background:#fffafa;
}
body.pg_viewthread .agvt-postlist .plhin .plc {
  border-color:#eee3e7;
  background:#fff;
}
body.pg_viewthread .agvt-postlist .pi {
  min-height:46px;
  margin:0 0 16px;
  padding:0 0 13px;
  border-bottom:1px solid #f0e7ea;
}
body.pg_viewthread .agvt-postlist .pct {
  padding:0 28px 18px;
}

/* Readable article body; no moving or extracting images */
body.pg_viewthread .agvt-postlist .res-postfirst .pct > .pcb {
  width:100%;
  max-width:900px;
  margin-right:auto;
  margin-left:auto;
}
body.pg_viewthread .agvt-postlist .res-postfirst .pcb,
body.pg_viewthread .agvt-postlist .res-postfirst .t_fsz,
body.pg_viewthread .agvt-postlist .res-postfirst .t_f {
  color:#352d31;
  font-size:17px;
  line-height:1.95;
}
body.pg_viewthread .agvt-postlist .res-postfirst .t_f {
  overflow-wrap:anywhere;
  word-break:break-word;
}
body.pg_viewthread .agvt-postlist .res-postfirst .t_f p {
  margin:0 0 1.15em;
}
body.pg_viewthread .agvt-postlist .res-postfirst .t_f h2,
body.pg_viewthread .agvt-postlist .res-postfirst .t_f h3 {
  margin:1.65em 0 .7em;
  color:#2e2529;
  line-height:1.45;
}
body.pg_viewthread .agvt-postlist .t_f img:not([smilieid]),
body.pg_viewthread .agvt-postlist .tattl img {
  display:block;
  max-width:100%!important;
  height:auto!important;
  margin:20px auto;
  border-radius:14px;
}
body.pg_viewthread .agvt-postlist .t_f img[smilieid] {
  display:inline;
  width:auto;
  max-width:none;
  margin:0;
  border-radius:0;
}
body.pg_viewthread .agvt-postlist .quote {
  margin:20px 0;
  padding:17px 20px;
  border-left:4px solid #e55079;
  border-radius:0 14px 14px 0;
  background:#fff6f8;
}
body.pg_viewthread .agvt-postlist .ptg {
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin-top:24px!important;
  padding-top:17px;
  border-top:1px solid #f0e6e9;
}
body.pg_viewthread .agvt-postlist .ptg a {
  display:inline-flex;
  padding:5px 10px;
  border-radius:999px;
  background:#fff0f4;
  color:#bd3f63;
  text-decoration:none;
}

/* Favorite, share and article actions */
body.pg_viewthread #p_btn {
  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  gap:9px;
  margin:18px 0 8px!important;
  padding:0!important;
}
body.pg_viewthread #p_btn a {
  float:none;
  margin:0;
}
body.pg_viewthread #p_btn a i {
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:0 15px;
  border:1px solid #eadde2;
  border-radius:999px;
  background:#fff;
  color:#65585e;
  font-style:normal;
}

/* Build 3.7: denser desktop article layout */
@media(min-width:981px) {
  body.pg_viewthread .agvt-page {
    width:min(1180px,calc(100% - 40px));
  }
  body.pg_viewthread #pt {
    margin-top:10px;
  }
  body.pg_viewthread .agvt-top-actions {
    min-height:46px;
    margin:8px 0 10px;
  }
  body.pg_viewthread .agvt-modmenu {
    margin-bottom:10px;
    padding:6px 12px!important;
    border-radius:12px;
  }
  body.pg_viewthread .agvt-modmenu a {
    min-height:24px;
    padding:0 7px;
    font-size:12px;
  }
  body.pg_viewthread .agvt-thread-head {
    padding:20px 28px 18px!important;
  }
  body.pg_viewthread .agvt-thread-head h1.ts {
    font-size:27px;
    line-height:1.34;
  }
  body.pg_viewthread .agvt-postlist .pi {
    min-height:40px;
    margin-bottom:10px;
    padding-bottom:9px;
  }
  body.pg_viewthread .agvt-postlist .pct {
    padding:0 28px 10px;
  }
  body.pg_viewthread .agvt-postlist .res-postfirst .pct > .pcb {
    max-width:860px;
  }
  body.pg_viewthread .agvt-postlist .res-postfirst .pcb,
  body.pg_viewthread .agvt-postlist .res-postfirst .t_fsz,
  body.pg_viewthread .agvt-postlist .res-postfirst .t_f {
    font-size:17px;
    line-height:1.9;
  }
  body.pg_viewthread .agvt-postlist .res-postfirst .t_f p {
    margin-bottom:1em;
  }
  body.pg_viewthread .agvt-postlist .t_f img:not([smilieid]),
  body.pg_viewthread .agvt-postlist .tattl img {
    margin-top:18px;
    margin-bottom:24px;
  }
  body.pg_viewthread .agvt-postlist .ptg {
    margin-top:18px!important;
    padding-top:14px;
  }
  body.pg_viewthread .agvt-postlist td.plc.plm {
    height:auto!important;
    min-height:0!important;
    padding-top:0!important;
    padding-bottom:0!important;
    vertical-align:top!important;
  }
  body.pg_viewthread .agvt-related {
    margin-top:22px;
  }
}

/* Related recommendation cards */
body.pg_viewthread .agvt-related {
  clear:both;
  margin:34px 0 12px;
  padding:26px;
  border:1px solid #eddfe4;
  border-radius:22px;
  background:#fff;
}
body.pg_viewthread .agvt-section-title {
  margin:0 0 21px;
  padding:0 0 13px 16px;
  border-bottom:1px solid #eee2e6;
  border-left:5px solid #eb4d79;
}
body.pg_viewthread .agvt-section-title h2 {
  margin:0;
  color:#332a2e;
  font-size:22px;
  font-weight:900;
  line-height:1.35;
}
body.pg_viewthread .agvt-related-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px 18px;
}
body.pg_viewthread .agvt-related-card {
  display:grid;
  grid-template-columns:42% minmax(0,1fr);
  height:190px;
  min-width:0;
  overflow:hidden;
  border:1px solid #efdfe4;
  border-radius:17px;
  background:#fff;
  transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;
}
body.pg_viewthread .agvt-related-card:hover {
  transform:translateY(-2px);
  border-color:#e8bdca;
  box-shadow:0 12px 28px rgba(66,35,48,.08);
}
body.pg_viewthread .agvt-related-media {
  display:block;
  height:190px;
  min-height:0;
  overflow:hidden;
  background:#f4ecef;
}
body.pg_viewthread .agvt-related-media img {
  display:block;
  width:100%;
  height:100%;
  min-height:0;
  margin:0!important;
  border-radius:0!important;
  object-fit:cover;
  transition:transform .3s ease;
}
body.pg_viewthread .agvt-related-blur {
  display:none!important;
}
body.pg_viewthread .agvt-related-card:hover .agvt-related-media img {
  transform:scale(1.035);
}
body.pg_viewthread .agvt-related-copy {
  display:flex;
  flex-direction:column;
  min-width:0;
  padding:17px 18px 15px;
}
body.pg_viewthread .agvt-related-copy h3 {
  display:-webkit-box;
  overflow:hidden;
  margin:0;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  color:#31282c;
  font-size:16px;
  font-weight:900;
  line-height:1.55;
}
body.pg_viewthread .agvt-related-copy h3 a {
  color:inherit;
  text-decoration:none;
}
body.pg_viewthread .agvt-related-copy p {
  display:-webkit-box;
  overflow:hidden;
  margin:9px 0 13px;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  color:#83767c;
  font-size:13px;
  line-height:1.7;
}
body.pg_viewthread .agvt-related-meta {
  display:flex;
  align-items:center;
  gap:7px;
  min-width:0;
  margin-top:auto;
  overflow:hidden;
  color:#9a777f;
  font-size:12px;
  white-space:nowrap;
}
body.pg_viewthread .agvt-related-meta>span:not(.agvt-related-badge),
body.pg_viewthread .agvt-related-meta time {
  overflow:hidden;
  text-overflow:ellipsis;
}
body.pg_viewthread .agvt-related-badge {
  flex:0 0 auto;
  padding:5px 9px;
  border-radius:999px;
  background:#fff0f4;
  color:#df4a74;
  font-weight:900;
}

@media(max-width:980px) {
  body.pg_viewthread .agvt-page {
    width:min(100% - 24px,1180px);
  }
  body.pg_viewthread .agvt-thread-head h1.ts {
    font-size:26px;
  }
  body.pg_viewthread .agvt-related-card {
    grid-template-columns:40% minmax(0,1fr);
    height:178px;
  }
  body.pg_viewthread .agvt-related-media,
  body.pg_viewthread .agvt-related-media img {
    height:178px;
    min-height:0;
  }
}

@media(max-width:760px) {
  body.pg_viewthread .agvt-related {
    padding:20px 16px;
  }
  body.pg_viewthread .agvt-related-grid {
    grid-template-columns:1fr;
    gap:12px;
  }
  body.pg_viewthread .agvt-related-card {
    grid-template-columns:38% minmax(0,1fr);
    height:158px;
  }
  body.pg_viewthread .agvt-related-media,
  body.pg_viewthread .agvt-related-media img {
    height:158px;
  }
}

@media(max-width:650px) {
  body.pg_viewthread {
    overflow-x:hidden;
    background:#fff;
  }
  body.pg_viewthread .agvt-page {
    width:100%;
    padding:0 11px;
  }
  body.pg_viewthread .agvt-top-actions,
  body.pg_viewthread .agvt-bottom-actions {
    gap:8px;
    padding:0!important;
  }
  body.pg_viewthread .agvt-top-actions #newspecial,
  body.pg_viewthread .agvt-top-actions #post_reply,
  body.pg_viewthread .agvt-bottom-actions #newspecialtmp,
  body.pg_viewthread .agvt-bottom-actions #post_replytmp {
    display:inline-flex!important;
    min-width:108px;
    height:40px;
  }
  body.pg_viewthread .agvt-top-actions .pgb a,
  body.pg_viewthread .agvt-bottom-actions .pgb a {
    min-width:92px;
    height:40px;
  }
  body.pg_viewthread .agvt-modmenu {
    flex-wrap:nowrap;
    white-space:nowrap;
  }
  body.pg_viewthread .agvt-postlist {
    border-radius:18px;
  }
  body.pg_viewthread .agvt-postlist>table:first-child .pls {
    display:none;
  }
  body.pg_viewthread .agvt-thread-head {
    padding:19px 17px!important;
  }
  body.pg_viewthread .agvt-thread-head h1.ts {
    font-size:22px!important;
    line-height:1.45;
  }
  body.pg_viewthread .agvt-postlist .pct {
    padding:0 15px 14px;
  }
  body.pg_viewthread .agvt-postlist .res-postfirst .pcb,
  body.pg_viewthread .agvt-postlist .res-postfirst .t_fsz,
  body.pg_viewthread .agvt-postlist .res-postfirst .t_f {
    font-size:16px;
    line-height:1.9;
  }
  body.pg_viewthread .agvt-postlist .quote {
    margin:16px 0!important;
    padding:14px 15px!important;
  }
  body.pg_viewthread .agvt-postlist td.plc.plm {
    height:auto!important;
    min-height:0!important;
    padding-top:0!important;
    padding-bottom:0!important;
    vertical-align:top!important;
  }
  body.pg_viewthread .agvt-postlist td.plc.plm #p_btn {
    margin:12px 0 14px!important;
  }
  body.pg_viewthread .agvt-related {
    margin:14px 0 8px;
    padding:18px 13px;
    border-radius:18px;
  }
  body.pg_viewthread .agvt-section-title {
    margin-bottom:15px;
  }
  body.pg_viewthread .agvt-section-title h2 {
    font-size:19px;
  }
  body.pg_viewthread .agvt-related-card {
    display:block;
    height:auto;
    border-radius:14px;
  }
  body.pg_viewthread .agvt-related-media,
  body.pg_viewthread .agvt-related-media img {
    width:100%;
    height:auto;
    min-height:0;
    max-height:none;
  }
  body.pg_viewthread .agvt-related-media {
    position:relative;
    height:clamp(190px,60vw,250px);
    min-height:0;
    overflow:hidden;
    background:#eee6e9;
  }
  body.pg_viewthread .agvt-related-media .agvt-related-blur {
    display:block!important;
    position:absolute;
    z-index:0;
    top:-18px;
    right:-18px;
    bottom:-18px;
    left:-18px;
    width:calc(100% + 36px);
    height:calc(100% + 36px)!important;
    max-width:none;
    margin:0!important;
    opacity:.42;
    filter:blur(16px) saturate(.88);
    object-fit:cover;
    transform:scale(1.06);
  }
  body.pg_viewthread .agvt-related-media .agvt-related-image {
    position:relative;
    z-index:1;
    display:block;
    width:100%;
    height:100%!important;
    max-width:100%;
    margin:0!important;
    object-fit:contain;
    object-position:center;
    vertical-align:top;
    filter:none;
    transform:none;
  }
  body.pg_viewthread .agvt-related-copy {
    padding:13px 13px 11px;
  }
  body.pg_viewthread .agvt-related-copy h3 {
    font-size:14px;
    line-height:1.5;
  }
  body.pg_viewthread .agvt-related-copy p {
    margin:6px 0 9px;
    font-size:12px;
    line-height:1.55;
    -webkit-line-clamp:2;
  }
  body.pg_viewthread .agvt-related-meta>span:not(.agvt-related-badge),
  body.pg_viewthread .agvt-related-meta time {
    display:none;
  }
}

/* Build 4.2: reply floors and quick reply */
body.pg_viewthread .agvt-postlist .plhin:not(.res-postfirst) {
  border-top:12px solid #faf8f8;
}
body.pg_viewthread .agvt-postlist .plhin:not(.res-postfirst) .pls,
body.pg_viewthread .agvt-postlist .plhin:not(.res-postfirst) .plc {
  background:#fff;
}
body.pg_viewthread .agvt-postlist .plhin:not(.res-postfirst) .pi {
  margin-bottom:13px;
  padding:11px 0 10px;
  border-bottom:1px solid #f0e7ea;
}
body.pg_viewthread .agvt-postlist .plhin:not(.res-postfirst) .pct {
  padding:0 24px 18px;
}
body.pg_viewthread .agvt-postlist .plhin:not(.res-postfirst) .pcb,
body.pg_viewthread .agvt-postlist .plhin:not(.res-postfirst) .t_fsz,
body.pg_viewthread .agvt-postlist .plhin:not(.res-postfirst) .t_f {
  color:#41363b;
  font-size:15px;
  line-height:1.85;
}
body.pg_viewthread .agvt-postlist .plhin:not(.res-postfirst) .po {
  margin-top:12px;
  padding:9px 0 5px;
  border-top:1px solid #f3e9ec;
}
body.pg_viewthread .agvt-postlist .plhin:not(.res-postfirst) .po a {
  border-radius:8px;
}

body.pg_viewthread #f_pst {
  margin:20px 0 8px;
  overflow:hidden;
  border:1px solid #eadfe3;
  border-radius:22px;
  background:#fff;
  box-shadow:0 12px 30px rgba(52,30,40,.05);
}
body.pg_viewthread #f_pst form>table {
  border:0;
}
body.pg_viewthread #f_pst .pls {
  width:112px;
  padding:26px 12px;
  border:0;
  background:#fff8fa;
  text-align:center;
}
body.pg_viewthread #f_pst .pls .avatar {
  margin:0 auto;
}
body.pg_viewthread #f_pst .pls .avatar img {
  width:64px;
  height:64px;
  padding:0;
  border:3px solid #fff;
  border-radius:50%;
  background:none;
  object-fit:cover;
  box-shadow:0 5px 16px rgba(69,41,52,.1);
}
body.pg_viewthread #f_pst .plc {
  position:relative;
  padding:64px 24px 22px;
  border:0;
  background:#fff;
}
body.pg_viewthread #f_pst .plc:before {
  content:"快速回覆";
  position:absolute;
  top:21px;
  left:24px;
  color:#332a2e;
  font-size:20px;
  font-weight:900;
  line-height:1.4;
}
body.pg_viewthread #f_pst .plc:after {
  content:"";
  position:absolute;
  top:23px;
  left:12px;
  width:4px;
  height:27px;
  border-radius:999px;
  background:#eb4d79;
}
body.pg_viewthread #f_pst #fastposteditor {
  width:100%;
}
body.pg_viewthread #f_pst #fastposteditor.hasfsl {
  margin-right:0;
}
body.pg_viewthread #f_pst .tedt {
  overflow:hidden;
  border:1px solid #e9dce1;
  border-radius:14px;
  background:#fff;
}
body.pg_viewthread #f_pst .tedt .bar {
  min-height:38px;
  padding:6px 10px;
  border-bottom:1px solid #eee3e7;
  background:#fff8fa;
}
body.pg_viewthread #f_pst .tedt .area {
  padding:0;
}
body.pg_viewthread #f_pst #fastpostmessage {
  width:100%!important;
  min-height:150px;
  padding:14px 15px;
  border:0;
  background:#fff!important;
  color:#3f3439;
  font-size:15px;
  line-height:1.75;
  resize:vertical;
  outline:0;
}
body.pg_viewthread #f_pst #fastpostmessage:focus {
  box-shadow:inset 0 0 0 2px rgba(235,77,121,.13);
}
body.pg_viewthread #f_pst .pnpost {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px 12px;
  margin:0;
  padding-top:14px;
}
body.pg_viewthread #f_pst #fastpostsubmit {
  min-width:112px;
  height:40px;
  padding:0 20px;
  border:0;
  border-radius:999px;
  background:linear-gradient(135deg,#ef4f7f,#d83e69);
  color:#fff;
  box-shadow:0 8px 18px rgba(215,61,103,.16);
}
body.pg_viewthread #f_pst #fastpostsubmit strong {
  color:#fff;
  font-size:14px;
}
body.pg_viewthread #f_pst .pnpost>a.y {
  order:9;
  margin-left:auto;
  color:#9a8d92;
}

@media(max-width:650px) {
  body.pg_viewthread .agvt-postlist .plhin:not(.res-postfirst) {
    border-top-width:8px;
  }
  body.pg_viewthread .agvt-postlist .plhin:not(.res-postfirst) .pls {
    width:42px;
  }
  body.pg_viewthread .agvt-postlist .plhin:not(.res-postfirst) .pct {
    padding:0 13px 13px;
  }
  body.pg_viewthread .agvt-postlist .plhin:not(.res-postfirst) .pcb,
  body.pg_viewthread .agvt-postlist .plhin:not(.res-postfirst) .t_fsz,
  body.pg_viewthread .agvt-postlist .plhin:not(.res-postfirst) .t_f {
    font-size:14px;
    line-height:1.8;
  }
  body.pg_viewthread #f_pst {
    margin:13px 0 6px;
    border-radius:17px;
  }
  body.pg_viewthread #f_pst .pls {
    display:none;
  }
  body.pg_viewthread #f_pst .plc {
    display:block;
    width:100%;
    padding:58px 13px 15px;
  }
  body.pg_viewthread #f_pst .plc:before {
    top:17px;
    left:24px;
    font-size:18px;
  }
  body.pg_viewthread #f_pst .plc:after {
    top:19px;
    left:13px;
    height:24px;
  }
  body.pg_viewthread #f_pst #fastsmiliesdiv {
    display:none;
  }
  body.pg_viewthread #f_pst #fastpostmessage {
    min-height:125px;
    padding:12px;
    font-size:14px;
  }
  body.pg_viewthread #f_pst .pnpost {
    gap:8px;
    padding-top:11px;
  }
  body.pg_viewthread #f_pst #fastpostsubmit {
    min-width:104px;
    height:38px;
    padding:0 16px;
  }
  body.pg_viewthread #f_pst .pnpost label {
    font-size:11px;
  }
  body.pg_viewthread #f_pst .pnpost>a.y {
    display:none;
  }
}

@media(max-width:360px) {
  body.pg_viewthread .agvt-related-card {
    display:block;
    height:auto;
  }
  body.pg_viewthread .agvt-related-media,
  body.pg_viewthread .agvt-related-media img {
    width:100%;
    min-height:0;
  }
  body.pg_viewthread .agvt-related-media {
    height:clamp(175px,60vw,225px);
  }
  body.pg_viewthread .agvt-related-media .agvt-related-image {
    height:100%!important;
    margin:0!important;
    object-fit:contain;
    object-position:center;
    vertical-align:top;
  }
}

/* Build 3.6: compact mobile news cards; desktop layout remains unchanged */
@media(max-width:650px) {
  body.pg_viewthread .agvt-related {
    margin:14px 0 8px;
    padding:17px 11px;
  }
  body.pg_viewthread .agvt-related-grid {
    display:grid;
    grid-template-columns:1fr;
    gap:11px;
  }
  body.pg_viewthread .agvt-related-card {
    display:grid;
    grid-template-columns:minmax(112px,38%) minmax(0,1fr);
    width:100%;
    height:154px;
    min-height:154px;
    overflow:hidden;
    border-radius:14px;
    background:#fff;
  }
  body.pg_viewthread .agvt-related-media {
    position:relative;
    width:100%;
    height:154px;
    min-height:154px;
    overflow:hidden;
    background:#f3edef;
  }
  body.pg_viewthread .agvt-related-media .agvt-related-blur {
    display:none!important;
  }
  body.pg_viewthread .agvt-related-media .agvt-related-image {
    position:absolute;
    z-index:1;
    inset:0;
    display:block;
    width:100%;
    height:100%!important;
    max-width:none;
    margin:0!important;
    border-radius:0!important;
    object-fit:cover;
    object-position:center 35%;
    filter:none;
    transform:none;
  }
  body.pg_viewthread .agvt-related-copy {
    display:flex;
    min-width:0;
    padding:12px 12px 10px;
  }
  body.pg_viewthread .agvt-related-copy h3 {
    display:-webkit-box;
    margin:0;
    overflow:hidden;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
    color:#31282c;
    font-size:14px;
    line-height:1.48;
  }
  body.pg_viewthread .agvt-related-copy p {
    display:-webkit-box;
    margin:6px 0 8px;
    overflow:hidden;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
    color:#887a80;
    font-size:11px;
    line-height:1.5;
  }
  body.pg_viewthread .agvt-related-meta {
    margin-top:auto;
    font-size:11px;
  }
  body.pg_viewthread .agvt-related-badge {
    padding:4px 8px;
  }
}

@media(min-width:651px) and (max-width:900px) {
  body.pg_viewthread .agvt-related-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
  }
  body.pg_viewthread .agvt-related-card {
    grid-template-columns:40% minmax(0,1fr);
    height:164px;
  }
  body.pg_viewthread .agvt-related-media,
  body.pg_viewthread .agvt-related-media img {
    height:164px;
  }
}

@media(max-width:380px) {
  body.pg_viewthread .agvt-related-card {
    grid-template-columns:108px minmax(0,1fr);
    height:146px;
    min-height:146px;
  }
  body.pg_viewthread .agvt-related-media {
    height:146px;
    min-height:146px;
  }
  body.pg_viewthread .agvt-related-copy {
    padding:10px 10px 9px;
  }
  body.pg_viewthread .agvt-related-copy h3 {
    font-size:13px;
  }
  body.pg_viewthread .agvt-related-copy p {
    -webkit-line-clamp:1;
  }
}

/* Build 3.9: adaptive tags, previous/next and favorite area */
body.pg_viewthread .agvt-postlist .ptg {
  align-items:center;
  font-size:0;
}
body.pg_viewthread .agvt-postlist .ptg:before {
  content:"標籤";
  display:inline-flex;
  align-items:center;
  align-self:center;
  min-height:30px;
  padding:0 10px;
  border-radius:999px;
  background:#e94d78;
  color:#fff;
  font-size:12px;
  font-weight:900;
  line-height:30px;
}
body.pg_viewthread .agvt-postlist .ptg a {
  align-items:center;
  min-height:30px;
  font-size:14px;
  line-height:20px;
}
body.pg_viewthread .agvt-postlist .ptg>span,
body.pg_viewthread .agvt-postlist .ptg>span a {
  font-size:14px;
}

body.pg_viewthread .agvt-postlist .ptg>span.agvt-pager {
  display:grid;
  flex:0 0 100%;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  width:100%;
  margin-top:10px;
  color:#81747a;
  font-size:13px;
  line-height:1.65;
}
body.pg_viewthread .agvt-pager-card {
  min-width:0;
  padding:15px 17px;
  overflow:hidden;
  border:1px solid #eee1e5;
  border-radius:15px;
  background:#fffafa;
}
body.pg_viewthread .agvt-pager-card a {
  color:#463a40!important;
  font-weight:800;
  text-decoration:none;
}
body.pg_viewthread .agvt-pager-card a:hover {
  color:#d9406c!important;
}

body.pg_viewthread .agvt-post-extras {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin:18px 0 8px;
  color:#81747a;
  font-size:13px;
  line-height:1.65;
}
body.pg_viewthread .agvt-post-extras:empty {
  display:none;
}
body.pg_viewthread .agvt-post-extras>div,
body.pg_viewthread .agvt-post-extras>p {
  min-width:0;
  margin:0!important;
  padding:15px 17px!important;
  overflow:hidden;
  border:1px solid #eee1e5;
  border-radius:15px;
  background:#fffafa;
}
body.pg_viewthread .agvt-post-extras a {
  color:#463a40;
  font-weight:800;
  text-decoration:none;
}
body.pg_viewthread .agvt-post-extras a:hover {
  color:#d9406c;
}

body.pg_viewthread #p_btn a,
body.pg_viewthread #p_btn a:hover,
body.pg_viewthread #p_btn a i {
  background-image:none!important;
}
body.pg_viewthread #p_btn>a {
  padding:0!important;
  border:0!important;
  border-radius:999px;
  background:#fff!important;
}
body.pg_viewthread #p_btn>a i {
  gap:5px;
  min-height:42px;
  padding:0 17px;
  box-shadow:0 5px 14px rgba(65,39,50,.05);
}
body.pg_viewthread #p_btn img {
  float:none;
  width:16px;
  height:16px;
  margin:0!important;
  object-fit:contain;
}

body.pg_viewthread #nv {
  background:rgba(255,255,255,.97);
  box-shadow:0 5px 16px rgba(52,31,41,.045);
  backdrop-filter:saturate(130%) blur(8px);
  -webkit-backdrop-filter:saturate(130%) blur(8px);
}

@media(min-width:981px) {
  body.pg_viewthread .agvt-post-extras,
  body.pg_viewthread .agvt-postlist .ptg,
  body.pg_viewthread #p_btn {
    width:100%;
    max-width:860px;
    margin-right:auto!important;
    margin-left:auto!important;
  }
  body.pg_viewthread .agvt-post-extras {
    margin-top:18px!important;
    margin-bottom:8px!important;
  }
  body.pg_viewthread #p_btn {
    margin-top:12px!important;
    margin-bottom:4px!important;
  }
  body.pg_viewthread .agvt-related {
    margin-top:18px;
  }
}

@media(max-width:650px) {
  body.pg_viewthread .agvt-postlist .ptg {
    gap:6px;
    margin-top:15px!important;
    padding-top:13px;
  }
  body.pg_viewthread .agvt-postlist .ptg:before {
    min-height:28px;
    padding:0 9px;
    line-height:28px;
  }
  body.pg_viewthread .agvt-postlist .ptg a {
    min-height:28px;
    padding:4px 9px;
    font-size:12px;
  }
  body.pg_viewthread .agvt-postlist .ptg>span.agvt-pager {
    grid-template-columns:1fr;
    gap:8px;
    margin-top:7px;
  }
  body.pg_viewthread .agvt-pager-card {
    padding:12px 13px;
    border-radius:12px;
    font-size:12px;
  }
  body.pg_viewthread .agvt-post-extras {
    grid-template-columns:1fr;
    gap:8px;
    margin:14px 0 6px;
  }
  body.pg_viewthread .agvt-post-extras>div,
  body.pg_viewthread .agvt-post-extras>p {
    padding:12px 13px!important;
    border-radius:12px;
    font-size:12px;
  }
  body.pg_viewthread #p_btn {
    margin:10px 0 4px!important;
  }
  body.pg_viewthread #p_btn>a i {
    min-height:38px;
    padding:0 13px;
    font-size:12px;
  }
}

/* Build 4.1: actual previous/next markup from the related-keywords plugin */
body.pg_viewthread .mickey_zz,
body.pg_viewthread .mickey_yy {
  display:inline-flex!important;
  flex-direction:column;
  align-items:flex-start;
  width:calc(50% - 7px);
  min-height:142px;
  margin:18px 0 8px!important;
  padding:17px 18px!important;
  overflow:hidden!important;
  white-space:normal!important;
  text-overflow:clip!important;
  vertical-align:top;
  border:1px solid #eee1e5;
  border-radius:16px;
  background:#fffafa;
  box-shadow:0 6px 18px rgba(62,37,48,.035);
}
body.pg_viewthread .mickey_zz {
  margin-right:10px!important;
}
body.pg_viewthread .mickey_zz em,
body.pg_viewthread .mickey_yy em {
  display:inline-flex;
  align-items:center;
  min-height:27px;
  margin:0 0 9px!important;
  padding:0 10px!important;
  border-radius:999px!important;
  background:#3da2c2!important;
  color:#fff!important;
  font-size:12px!important;
  font-weight:800;
  line-height:27px;
  text-shadow:none!important;
}
body.pg_viewthread .mickey_zz a.mickey_z,
body.pg_viewthread .mickey_yy a.mickey_y {
  display:-webkit-box;
  width:100%;
  overflow:hidden;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  color:#3f3439!important;
  font-size:15px!important;
  font-weight:900;
  line-height:1.55;
  white-space:normal;
}
body.pg_viewthread .mickey_zz span,
body.pg_viewthread .mickey_yy span {
  display:-webkit-box;
  width:100%;
  margin:7px 0 0!important;
  overflow:hidden;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  color:#91848a!important;
  font-size:12px!important;
  line-height:1.6;
  white-space:normal;
}
body.pg_viewthread .mickey_zz a:hover,
body.pg_viewthread .mickey_yy a:hover {
  color:#d9406c!important;
}

@media(max-width:650px) {
  body.pg_viewthread .mickey_zz,
  body.pg_viewthread .mickey_yy {
    display:flex!important;
    width:100%;
    min-height:0;
    margin:10px 0 0!important;
    padding:13px 14px!important;
    border-radius:13px;
  }
  body.pg_viewthread .mickey_yy {
    margin-top:8px!important;
    margin-bottom:5px!important;
  }
  body.pg_viewthread .mickey_zz em,
  body.pg_viewthread .mickey_yy em {
    min-height:24px;
    margin-bottom:7px!important;
    padding:0 8px!important;
    line-height:24px;
  }
  body.pg_viewthread .mickey_zz a.mickey_z,
  body.pg_viewthread .mickey_yy a.mickey_y {
    font-size:14px!important;
  }
  body.pg_viewthread .mickey_zz span,
  body.pg_viewthread .mickey_yy span {
    margin-top:5px!important;
    font-size:11px!important;
  }
}

/* AGENCY_POST_IMAGE_RESPONSIVE_BUILD45N2
   桌机限制正文图片尺寸；手机维持满宽自适应 */
body.pg_viewthread .agvt-postlist .res-postfirst .t_f ignore_js_op {
  display:block;
  width:100%;
}

@media screen and (min-width:769px) {
  body.pg_viewthread .agvt-postlist .res-postfirst .t_f img:not([smilieid]) {
    display:block!important;
    width:auto!important;
    max-width:760px!important;
    height:auto!important;
    margin:20px 0!important;
    object-fit:contain!important;
  }
}

@media screen and (max-width:768px) {
  body.pg_viewthread .agvt-postlist .res-postfirst .t_f img:not([smilieid]) {
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    height:auto!important;
    margin:16px 0 22px!important;
    object-fit:contain!important;
    border-radius:12px;
  }
}
