/* RoiKib Author Card v1.2.9 — targeted refinements to approved v1.2.8 desktop styles.
   Matched against template.zip (2026-10-26), default/forum/viewthread_node.htm.
   No HTML, JS, URLs, backend permissions, dynamic counts or native table widths changed.
   IMPORTANT: Do not load v1.2.4/v1.2.5/v1.2.6 author-card stylesheets together.
*/
@media screen and (min-width: 761px) {
  /* Keep native author column width untouched. */
  body.rk-v3.pg_viewthread #postlist table.plhin td.pls .favatar > .pi {
    height:auto;
    min-height:0;
    padding:6px 3px 10px;
    margin:0 0 10px;
    text-align:center;
    background:transparent;
    border-bottom:1px solid #dfe6f2;
  }
  body.rk-v3.pg_viewthread #postlist table.plhin td.pls .favatar > .pi .authi {
    text-align:center;
    line-height:1.5;
    font-weight:750;
    overflow-wrap:anywhere;
  }
  /* Avatar is in the normal author column; do not affect the #userinfo hover card. */
  body.rk-v3.pg_viewthread #postlist table.plhin td.pls .favatar > div:not(.p_pop) > .avatar {
    margin:8px auto 12px;
    width:max-content!important;
    max-width:100%!important;
    height:auto!important;
    background:transparent;
    border:0;
    box-shadow:none;
  }
  body.rk-v3.pg_viewthread #postlist table.plhin td.pls .favatar > div:not(.p_pop) > .avatar img {
    display:block;
    width:auto!important;
    height:auto!important;
    max-width:108px!important;
    max-height:108px!important;
    object-fit:contain;
    border:3px solid #fff;
    border-radius:13px;
    box-shadow:0 3px 11px rgba(32,56,97,.12);
  }
  /* Native table continues to own the actual post/reply/credit values. */
  body.rk-v3.pg_viewthread #postlist table.plhin td.pls .favatar > .tns {
    box-sizing:border-box;
    margin:11px 0 13px;
    padding:7px 3px!important;
    border:1px solid #dfe6f1;
    border-radius:11px;
    background:#fff;
    max-width:100%;
  }
  body.rk-v3.pg_viewthread #postlist table.plhin td.pls .favatar > .tns table {
    width:100%!important;
    table-layout:fixed!important;
    border-collapse:collapse;
  }
  body.rk-v3.pg_viewthread #postlist table.plhin td.pls .favatar > .tns :is(th,td) {
    text-align:center;
    vertical-align:middle;
    line-height:1.4;
    padding:2px 1px;
    font-size:11px;
  }
  body.rk-v3.pg_viewthread #postlist table.plhin td.pls .favatar > .tns :is(th,td) p {
    margin:0 0 3px;
    line-height:1.4;
  }
  body.rk-v3.pg_viewthread #postlist table.plhin td.pls .favatar > .tns tr > :first-child {
    border-right:1px solid #e5ebf5;
  }
  /* 1.2.9: Native Discuz .tns th has a right border on EVERY th. When the third
     abbreviated credit cell is hidden, the second th is the last visible
     column and must lose its right border. Do not alter native data or counts. */
  body.rk-v3.pg_viewthread #postlist table.plhin td.pls .favatar:has(> .pil dt) > .tns tr > th:nth-child(2) {
    border-right:0!important;
  }
  /* Hide shorthand credits only when an actual profile detail row is visible.
     If there is no .pil detail block, keep the native three-value summary. */
  body.rk-v3.pg_viewthread #postlist table.plhin td.pls .favatar:has(> .pil dt):has(> .tns tr > td:nth-child(3)) > .tns tr > td:nth-child(3) {
    display:none;
  }
  /* Native detailed credit block: no injected numbers or duplicate wrappers. */
  body.rk-v3.pg_viewthread #postlist table.plhin td.pls .favatar > .pil:not(:empty) {
    box-sizing:border-box;
    display:flow-root;
    padding:8px 9px;
    margin:10px 0;
    border:1px solid #e2e8f1;
    border-radius:10px;
    background:#fff;
    max-width:100%;
    font-size:11px;
  }
  body.rk-v3.pg_viewthread #postlist table.plhin td.pls .favatar > .pil dd {
    color:#3058c4;
    font-weight:700;
    overflow-wrap:anywhere;
  }
  /* Existing rank, stars, medal imagery and links retain their native order. */
  body.rk-v3.pg_viewthread #postlist table.plhin td.pls .favatar > p:not(.cp_pls) {
    margin:7px 0;
    line-height:1.5;
  }
  body.rk-v3.pg_viewthread #postlist table.plhin td.pls .favatar > .md_ctrl {
    margin:9px 0 12px;
    text-align:center;
  }
  body.rk-v3.pg_viewthread #postlist table.plhin td.pls .favatar > .md_ctrl img {
    width:auto;
    height:auto;
    max-width:29px;
    max-height:35px;
    vertical-align:middle;
  }
  /* 1.2.9: The thin pink strip is the native member-level progress indicator,
     not a decorative separator. Keep its actual percentage and hover handler.
     Change its harsh pink/white colors to the subdued RoiKib blue palette. */
  body.rk-v3.pg_viewthread #postlist table.plhin td.pls .favatar > .pbg2,
  body.rk-v3.pg_viewthread #postlist table.plhin td.pls .favatar > div:not(.p_pop) > .pbg2,
  body.rk-v3.pg_viewthread #postlist table.plhin td.pls .favatar > p > .pbg2 {
    box-sizing:border-box;
    display:block;
    width:130px;
    max-width:100%;
    height:7px;
    margin:8px auto 11px;
    background:#e5ecf8;
    border-radius:999px;
    overflow:hidden;
  }
  body.rk-v3.pg_viewthread #postlist table.plhin td.pls .favatar .pbg2 > .pbr2 {
    display:block;
    height:100%;
    background:#6d99e2;
    border-radius:inherit;
  }
  /* FOLLOW / PM — fix Discuz's native .xl2 li {height:1.5em;overflow:hidden}.
     Scope EXACTLY to the existing two controls; preserve all handlers and links. */
  body.rk-v3.pg_viewthread #postlist table.plhin td.pls .favatar > ul.xl.xl2.o {
    box-sizing:border-box;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:6px;
    width:100%;
    padding:0;
    margin:12px 0 0;
    list-style:none;
    background:transparent;
    border:0;
  }
  body.rk-v3.pg_viewthread #postlist table.plhin td.pls .favatar > ul.xl.xl2.o > li.addflw,
  body.rk-v3.pg_viewthread #postlist table.plhin td.pls .favatar > ul.xl.xl2.o > li.pm2 {
    box-sizing:border-box!important;
    display:block;
    position:relative;
    float:none!important;
    clear:none;
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow:visible!important;
    margin:0!important;
    padding:0!important;
    line-height:normal;
  }
  body.rk-v3.pg_viewthread #postlist table.plhin td.pls .favatar > ul.xl.xl2.o > li:only-child {
    grid-column:1 / -1;
  }
  body.rk-v3.pg_viewthread #postlist table.plhin td.pls .favatar > ul.xl.xl2.o > li:is(.addflw,.pm2) > a {
    box-sizing:border-box!important;
    display:flex!important;
    align-items:center;
    justify-content:center;
    width:100%!important;
    min-height:34px;
    height:auto!important;
    margin:0;
    padding:6px 2px 6px 21px!important;
    border:1px solid #dae3f0;
    border-radius:9px;
    background-color:#fff;
    color:#315ac6;
    font-size:11px!important;
    font-weight:650;
    line-height:1.3!important;
    text-align:center;
    white-space:normal;
    overflow:visible!important;
    overflow-wrap:anywhere;
    text-decoration:none;
  }
  body.rk-v3.pg_viewthread #postlist table.plhin td.pls .favatar > ul.xl.xl2.o > li:is(.addflw,.pm2) > a:hover,
  body.rk-v3.pg_viewthread #postlist table.plhin td.pls .favatar > ul.xl.xl2.o > li:is(.addflw,.pm2) > a:focus-visible {
    background-color:#eff5ff;
    border-color:#acc0e8;
  }
  /* 1.2.9: Discuz places follow/PM icons on <li>::before, outside the <a>.
     Position those ORIGINAL glyphs inside the existing button. No HTML/JS edits. */
  body.rk-v3.pg_viewthread #postlist table.plhin td.pls .favatar > ul.xl.xl2.o > li:is(.addflw,.pm2)::before {
    position:absolute!important;
    display:block;
    float:none!important;
    left:6px;
    top:50%;
    transform:translateY(-50%);
    margin:0!important;
    padding:0!important;
    line-height:1!important;
    font-size:15px;
    color:#7d9ac5;
    pointer-events:none;
    z-index:1;
  }
  /* Native administrative actions: no new controls or permission changes. */
  body.rk-v3.pg_viewthread #postlist table.plhin td.pls .favatar > .cp_pls {
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:5px 8px;
    margin:13px 0 0;
    padding:10px 0 0;
    border-top:1px dashed #dfe5ef;
    line-height:1.5;
  }
  body.rk-v3.pg_viewthread #postlist table.plhin td.pls .favatar > .cp_pls a {
    display:inline;
    font-size:11px;
    white-space:nowrap;
  }
}
