/* ==========================================================================
   NP Theme v8 — 旧页面归一化
   把 NexusPHP 原本的表格皮肤统一到新设计语言（面板 / 发丝线 / 琥珀强调）
   ========================================================================== */

.n8-content{padding:0;min-width:0;max-width:100%;overflow-x:auto}
.n8-content table{max-width:100%;border-collapse:collapse}
.n8-content table[width]{width:100%!important}
/* 旧主题给所有 td 都画了 1px 边，这里统一清掉，后续按需再画 */
.n8-content table td,.n8-content table th{border:0}
.n8-content td.text{border:0!important}
.n8-content i,.n8-content em{font-style:normal}
.n8-content td.text{padding:10px 2px}
.n8-content td,.n8-content th{vertical-align:middle}
.n8-content a:not([class*="_Name"]){color:var(--text-2);transition:color .14s}
.n8-content a:not([class*="_Name"]):hover{color:var(--amber)}
.n8-content a b{font-weight:600}
.n8-content .text{font-size:12.5px;color:var(--text-2);line-height:1.7}
.n8-content .small,.n8-content font.small{font-size:10.5px;color:var(--text-3);font-weight:400}
.n8-content .medium{font-size:12.5px}
.n8-content .nowrap{white-space:nowrap}
.n8-content .striking,.n8-content .striking a{color:var(--amber)!important}
.n8-content .gray,.n8-content .gray a{color:var(--text-3)!important}
.n8-content hr{border:0;border-top:1px solid var(--line);margin:14px 0}

/* ---------- 区块卡片：NP 的 table.main ---------- */
.n8-content table.main{
  display:table;width:100%!important;background:var(--panel);
  border:1px solid var(--line);border-radius:var(--r);border-collapse:separate;
  border-spacing:0;margin:0 0 14px;overflow:hidden;min-width:0!important;
}
.n8-content table.main > tbody > tr > td.embedded,
.n8-content table.main > tr > td.embedded{padding:0 18px 16px}
.n8-content table.main > tbody > tr:first-child > td.embedded:first-child:last-child{padding-top:0}

/* 面板标题（NP 用 <h2> 表示区块名） */
.n8-content td.embedded > h2,
.n8-content td.embedded > h2:first-child{
  display:flex;align-items:center;gap:9px;
  margin:0 -18px 14px!important;padding:0 18px;height:48px;
  border-bottom:1px solid var(--line);border-top:0;
  font-family:var(--sans);font-size:13.5px;font-weight:600;letter-spacing:.04em;
  color:var(--text);background:transparent;
}
.n8-content td.embedded > h2:not(:first-child){margin-top:18px!important}
.n8-content td.embedded > h2 a{color:var(--text-3);font-size:11px}
.n8-content td.embedded > h2 a:hover{color:var(--amber)}
.n8-content td.embedded > h2 img{max-height:14px}

/* 嵌套的 table.main 不重复卡片化 */
.n8-content table.main table.main{
  background:transparent;border:0;border-radius:0;box-shadow:none;margin:0;
}
.n8-content table.main table.main > tbody > tr > td.embedded{padding:0}

/* ---------- 表头 / 行 ---------- */
.n8-content .colhead,.n8-content td.colhead,.n8-content th{
  background:transparent!important;color:var(--text-3)!important;
  font-size:10.5px;font-weight:500;letter-spacing:.14em;text-transform:uppercase;
  padding:10px 8px;border-bottom:1px solid var(--line);border-top:0;white-space:nowrap;
  text-align:left;
}
.n8-content .colhead a{color:var(--text-3)}
.n8-content .colhead a:hover{color:var(--amber)}
.n8-content .colhead img{max-height:12px;opacity:.55}
/* 首页等 n8-raw 面板（不在 .n8-content 内）的表头：同款主题化，压过站点浅灰白底 */
.n8-raw td.colhead,.n8-raw th{
  background:transparent!important;color:var(--text-3)!important;
  font-size:10.5px;font-weight:500;letter-spacing:.14em;text-transform:uppercase;
  padding:10px 8px;border-bottom:1px solid var(--line);border-top:0;white-space:nowrap;
  text-align:left;
}
.n8-raw .colhead a{color:var(--text-3)}
.n8-raw .colhead a:hover{color:var(--amber)}
.n8-raw .colhead img{max-height:12px;opacity:.55}
/* 最多上传的「最近30天 / 全部时间」切换 tab：保持可点的视觉反馈 */
.n8-raw td.colhead[data-table]{cursor:pointer;transition:color .15s}
.n8-raw td.colhead[data-table]:hover{color:var(--amber)!important}
/* 「最多上传(种子数)」时间范围切换 → 分段胶囊（激活=琥珀底，未激活=暗底描边） */
.n8-raw table:has(.tr-top-uploader-tab){
  border-collapse:separate!important;border-spacing:6px 0!important;
  width:100%!important;margin:4px 0 10px;background:transparent!important;
}
.n8-raw tr.tr-top-uploader-tab td{
  width:50%;text-align:center!important;padding:6px 10px!important;
  border:1px solid var(--line-2)!important;border-radius:999px;
  background:var(--panel-2)!important;color:var(--text-2)!important;
  font-size:11.5px;font-weight:500;letter-spacing:.06em;text-transform:none;
  cursor:pointer;white-space:nowrap;
  transition:color .15s,background .15s,border-color .15s;
}
.n8-raw tr.tr-top-uploader-tab td:hover{color:var(--text)!important;border-color:rgba(231,178,92,.4)!important}
.n8-raw tr.tr-top-uploader-tab td.colhead{
  background:var(--amber-soft)!important;color:var(--amber)!important;
  border-color:rgba(231,178,92,.55)!important;font-weight:600;
}

.n8-content .rowhead{
  background:transparent!important;color:var(--text-3)!important;
  font-size:12px;font-weight:400;text-align:right;padding:9px 14px 9px 8px;
  border-bottom:1px solid var(--line);border-right:0;white-space:nowrap;width:1%;
}
.n8-content .rowfollow{
  background:transparent!important;color:var(--text)!important;
  font-size:12.5px;padding:9px 8px 9px 14px;border-bottom:1px solid var(--line);
  line-height:1.6;
}
.n8-content tr:last-child > .rowfollow,.n8-content tr:last-child > .rowhead{border-bottom:0}
.n8-content table.main tr:hover > .rowfollow{background:var(--hover)!important}

/* 登录页那种裸表单 */
.n8-content table.main > tbody > tr > td.colhead:first-child{padding-left:18px}
.n8-content td.embedded > table[width="100%"] > tbody > tr > td.text{padding:2px 0}

/* ---------- 表单控件 ---------- */
.n8-content input[type=text],.n8-content input[type=password],.n8-content input[type=email],
.n8-content input[type=number],.n8-content input[type=file],.n8-content select,
.n8-content textarea{
  background:var(--in);border:1px solid var(--line);border-radius:8px;color:var(--text);
  font-size:12.5px;height:32px;padding:0 10px;outline:none;transition:border-color .16s,background .16s;
  max-width:100%;
}
.n8-content textarea{height:auto;padding:8px 10px;line-height:1.6}
.n8-content input[type=text]:focus,.n8-content input[type=password]:focus,
.n8-content input[type=email]:focus,.n8-content input[type=number]:focus,
.n8-content select:focus,.n8-content textarea:focus{
  border-color:var(--amber-line);background:var(--amber-soft);
}
.n8-content input::placeholder,.n8-content textarea::placeholder{color:var(--text-3)}
.n8-content select{appearance:none;padding-right:26px;
  background-image:linear-gradient(45deg,transparent 50%,var(--text-3) 50%),
    linear-gradient(135deg,var(--text-3) 50%,transparent 50%);
  background-position:calc(100% - 15px) 14px,calc(100% - 10px) 14px;
  background-size:5px 5px,5px 5px;background-repeat:no-repeat}
/* 原生下拉弹层（option 列表）跟随主题色调，避免浅色弹层+深色文字看不清 */
.n8-content select option,.n8-content select optgroup{
  background:var(--panel-2);color:var(--text);
}
.n8-content select option:checked{background:var(--panel-3);color:var(--amber-hi)}
.n8-content input[type=checkbox],.n8-content input[type=radio]{accent-color:var(--amber);margin:0 5px 0 0}
/* 文件选择框：Chromium 默认「选择文件」按钮贴着框顶，改 flex 垂直居中 + 按钮主题化 */
.n8-content input[type=file]{padding:3px 8px 3px 3px;display:inline-flex;align-items:center}
.n8-content input[type=file]::file-selector-button{font-family:inherit;font-size:12px;height:24px;padding:0 12px;margin:0 9px 0 0;
  border:1px solid var(--amber-line);border-radius:6px;background:var(--amber-soft);color:var(--amber-hi);cursor:pointer}
.n8-content input[type=submit],.n8-content input[type=button],.n8-content input[type=reset],
.n8-content button,.n8-content .btn{
  height:32px;padding:0 14px;border-radius:8px;border:1px solid var(--amber-line);
  background:var(--amber-soft);color:var(--amber-hi);font-size:12px;font-weight:500;
  letter-spacing:.03em;cursor:pointer;transition:.16s;white-space:nowrap;
}
.n8-content input[type=submit]:hover,.n8-content input[type=button]:hover,
.n8-content input[type=reset]:hover,.n8-content button:hover,.n8-content .btn:hover{
  background:linear-gradient(160deg,#f0c77c,#cf8f42);color:#20160a;border-color:transparent;
}
[data-theme="light"] .n8-content input[type=submit],
[data-theme="light"] .n8-content .btn{color:var(--amber-hi)}
.n8-content input[type=submit]:disabled,.n8-content .btn:disabled{opacity:.45;cursor:not-allowed}
.n8-content table.main td input[type=submit]{margin:2px 0}

/* ---------- 分页 ---------- */
.n8-content .nexus-pagination,.n8-content p.nexus-pagination{
  display:flex;align-items:center;justify-content:center;gap:6px;flex-wrap:wrap;
  padding:14px 0;font-size:11.5px;color:var(--text-3);
}
.n8-content .nexus-pagination a,.n8-content .nexus-pagination b{
  display:inline-flex;align-items:center;height:26px;padding:0 9px;border-radius:7px;
  border:1px solid var(--line);color:var(--text-2);font-weight:500;
}
.n8-content .nexus-pagination a:hover{border-color:var(--amber-line);color:var(--amber-hi);background:var(--amber-soft)}

/* ---------- 种子列表 ---------- */
/* 注意：表头 td.colhead 用了 position:sticky 吸顶，容器 overflow:hidden 会让 sticky 相对
   表格自身滚动口计算而错位（表头「掉」进行中间），必须保持 visible */
.n8-content table.torrents{
  background:var(--panel);border:1px solid var(--line);border-radius:var(--r);
  border-collapse:separate;border-spacing:0;overflow:visible;margin:0 0 14px;
}
.n8-content table.torrents td{padding:8px;font-size:12px;border-bottom:1px solid var(--line)}
/* 四角圆角：单元格自带背景会盖住容器圆角，四角单元格自身补圆角 */
.n8-content table.torrents > tbody > tr:first-child > td:first-child{border-top-left-radius:var(--r)}
.n8-content table.torrents > tbody > tr:first-child > td:last-child{border-top-right-radius:var(--r)}
.n8-content table.torrents > tbody > tr:last-child > td:first-child{border-bottom-left-radius:var(--r)}
.n8-content table.torrents > tbody > tr:last-child > td:last-child{border-bottom-right-radius:var(--r)}
.n8-content table.torrents > tbody > tr:last-child > td{border-bottom:0}
.n8-content table.torrents > tbody > tr:hover > td{background:var(--hover)}
.n8-content table.torrents td.colhead{
  position:sticky;top:96px;z-index:5;background:var(--panel)!important;
  backdrop-filter:blur(8px);padding:10px 8px;text-align:center;
}
.n8-content table.torrents .torrentname{width:100%;background:transparent}
.n8-content table.torrents .torrentname td.embedded{padding:0;border:0;background:transparent!important}
.n8-content table.torrents .torrentname img{max-height:46px;max-width:46px;border-radius:6px;object-fit:cover}
.n8-content table.torrents .torrentname b{font-size:12.5px;font-weight:600;color:var(--text);letter-spacing:.01em}
.n8-content table.torrents .torrentname a:hover b{color:var(--amber-hi)}
/* 标签样式（背景色/字色/字号/外边距/内边距/圆角）由后台（nexusph → 标签）内联控制，
   主题不得用 !important/opacity/filter 覆盖，否则后台改参数前台不生效 */
.n8-content table.torrents td font{font-size:11px}
.n8-content table.torrents .rowfollow{color:var(--text-2)}
.n8-content table.torrents .rowfollow a:not([class*="_Name"]){color:var(--text)}
.n8-content .pro_free,.n8-content img.pro_free{max-height:12px;opacity:.8}
.n8-content img.arrowup,.n8-content img.arrowdown{max-height:11px;opacity:.75}

/* 热门 / 最新 海报条 */
.n8-content table.main td.text.nowrap img[alt=poster]{border-radius:8px;
  transition:transform .18s,box-shadow .18s}
.n8-content table.main td.text.nowrap img[alt=poster]:hover{transform:translateY(-2px);
  box-shadow:0 10px 24px -12px rgba(0,0,0,.8)}

/* ---------- 论坛 ---------- */
.n8-content .forumtable td,.n8-content table.forums td{padding:10px 8px}
/* 引用块 / 未读消息行；排除 img.unreadpm（站内信列表的信封 sprite 图标，不能套引用样式） */
.n8-content .postquote,.n8-content .unreadpm:not(img){border-left:2px solid var(--amber-line);
  background:var(--amber-soft);padding:8px 12px;border-radius:0 8px 8px 0}
/* sprite 图标（src=trans.gif 占位 + CSS 背景图）不允许被 max-width:100% 压扁 */
.n8-content img[src$="trans.gif"]{max-width:none}

/* ---------- 其它零散元素 ---------- */
.n8-content font[color]{color:inherit}
.n8-content font[color="red"]{color:var(--red)}
.n8-content font[color="green"]{color:var(--green)}
.n8-content font[color="blue"]{color:var(--blue)}
.n8-content .color_bonus,.n8-content .color_uploaded{color:var(--amber)!important}
.n8-content .color_downloaded{color:var(--blue)!important}
.n8-content .color_ratio{color:var(--text-3)!important}
.n8-content .color_active,.n8-content .color_connectable{color:var(--text-3)!important}
.n8-content .color_invite{color:var(--green)!important}
.n8-content .color_slots{color:var(--text-3)!important}
.n8-content #outer,.n8-content .outer{padding:0!important;background:transparent!important;border:0!important}

/* 帖子正文里的图片/引用 */
.n8-content .postbody img{max-width:100%;height:auto;border-radius:8px}
.n8-content .postbody{font-size:13px;line-height:1.85;color:var(--text-2)}

/* 表格里的提示块 */
.n8-content table.main td.text h1,.n8-content .text h1{
  font-family:var(--serif);font-size:22px;font-weight:600;letter-spacing:.02em;color:var(--text)}

/* 让窄屏下的宽表格可以横向滚动，而不是把整页撑破 */
@media(max-width:900px){
  .n8-content{overflow-x:auto}
  .n8-content table.torrents td.colhead{position:static}
  .n8-content table.torrents td{padding:7px 6px}
  .n8-content table.main > tbody > tr > td.embedded{padding:0 13px 13px}
  .n8-content td.embedded > h2{margin:0 -13px 12px!important;padding:0 13px;height:44px}
}

/* ==========================================================================
   第二轮：NP 专有控件
   ========================================================================== */

/* 原版「全站 Free 生效中」绿块 —— 状态已经在顶栏状态条里，正文里不再重复 */
.n8-content table:has(td[style*="background: green"]){display:none!important}

/* 表格去边框（NP 大量使用 border="1"） */
.n8-content table[border]{border:0!important}
.n8-content table[border="1"] > tbody > tr > td{border:0}

/* 直接挂在内容区的「标签-值」表：卡片化 */
.n8-content > table:has(> tbody > tr > td.rowhead),
.n8-content > table:has(> tr > td.rowhead){
  background:var(--panel);border:1px solid var(--line);border-radius:var(--r);
  border-collapse:separate;border-spacing:0;overflow:hidden;margin:0 0 14px;
}

/* 内容区里独立成块的列表表（站内信、日志、候选…） */
.n8-content > table:has(> tbody > tr > td.colhead){
  background:var(--panel);border:1px solid var(--line);border-radius:var(--r);
  border-collapse:separate;border-spacing:0;overflow:hidden;margin:0 0 14px;
}

/* 子标题条（NP 的 tabletitle 单格表） */
.n8-content td.tabletitle{
  background:transparent!important;color:var(--text-3);font-size:10.5px;font-weight:500;
  letter-spacing:.16em;text-transform:uppercase;padding:18px 0 8px;border-bottom:1px solid var(--line);
  text-align:left!important;
}
.n8-content table:has(> tbody > tr > td.tabletitle){background:transparent;border:0;margin:0}

/* 次级导航（控制面板 / 论坛 / 用户详情 那排按钮） */
.n8-content #usercpnav,.n8-content #usernav,.n8-content .submenu-wrap{background:transparent}
.n8-content ul.menu{display:flex;gap:6px;list-style:none;margin:0;padding:14px 0 4px;flex-wrap:wrap}
.n8-content ul.menu li{background:none;border:0;padding:0;margin:0}
.n8-content ul.menu li a{
  display:inline-flex;align-items:center;height:32px;padding:0 14px;border-radius:8px;
  border:1px solid var(--line);color:var(--text-2);font-size:12.5px;letter-spacing:.02em;
  transition:.16s;white-space:nowrap;
}
.n8-content ul.menu li a:hover{border-color:var(--amber-line);color:var(--amber-hi);background:var(--amber-soft)}
.n8-content ul.menu li.selected a{
  background:var(--amber-soft);border-color:var(--amber-line);color:var(--amber-hi);font-weight:500;
}
.n8-content table.main:has(#usercpnav),
.n8-content table.main:has(ul.menu){background:transparent;border:0;margin:0}
.n8-content table.main:has(ul.menu) > tbody > tr > td.embedded{padding:0}

/* 页面大标题 */
.n8-content td.embedded > h1,.n8-content .text h1{
  font-family:var(--serif);font-size:26px;font-weight:600;letter-spacing:.04em;color:var(--text);
  margin:22px 0 14px;text-align:center;
}
.n8-content td.embedded > h1 + p{text-align:center;color:var(--text-3);font-size:11.5px}

/* 论坛 / 列表：最后一列（版主等）不竖排 */
.n8-content td.colhead:last-child,.n8-content td.rowfollow:last-child{white-space:nowrap}
.n8-content td.rowfollow table td.embedded{padding:0}
.n8-content font.big,.n8-content .big{font-size:13px}

/* 种子页筛选表单 */
.n8-content td.bottom{color:var(--text-3);font-size:12px}
.n8-content form table td{padding:4px 6px}
.n8-content #searchinput{width:240px!important}

/* 详情页 / 帖子页里的引用块 */
.n8-content table.main td.text > table{border:0}

@media(max-width:720px){
  .n8-content ul.menu li a{height:29px;padding:0 11px;font-size:11.5px}
}

/* ---------- 第三轮：细节打磨 ---------- */
/* fieldset（NP 的引用/字幕/描述框）默认是 2px 白边，最扎眼 */
.n8-content fieldset{border:1px solid var(--line);border-radius:12px;padding:12px 14px;margin:0 0 12px;min-width:0}
.n8-content legend{color:var(--text-3);font-size:11px;letter-spacing:.12em;padding:0 6px}
.n8-content h1,.n8-content h1 a{color:var(--text);font-family:var(--serif);letter-spacing:.03em}
/* 站点 theme.css 给 h1/h2 通配的亮白下边线，在暗色面板上像两根白条——统一改为主题分隔线 */
.n8-content h1,.n8-content h2{border-bottom-color:var(--line)}

/* 行内彩色标签（分类/属性等）：颜色、字号、边距、圆角全部由后台内联样式控制，主题只做垂直对齐 */
.n8-content span[style*="background-color"]{vertical-align:1px}

/* ---------- 用户名等级颜色 ----------
   站点 theme.css 的等级色多按浅底设计：站长 #8b0000、管理 #4b0082、终极 #006400、
   老兵 #483D8B…，普通用户更是 #34495E 深蓝灰，落在暗色面板上几乎看不见（像没上色）。
   这里给一套暗底高对比版本；切到浅色主题时回落站点原色。 */
:root{
  --uc-peasant:#7c8290; --uc-user:#b9c0cc; --uc-power:#e7b25c; --uc-elite:#4fd6d6;
  --uc-crazy:#4fc3ff;   --uc-insane:#e06ae0; --uc-veteran:#a99bf5; --uc-extreme:#ffa54a;
  --uc-ultimate:#3ddc84;--uc-master:#5cc0f8; --uc-vip:#4ade80;     --uc-uploader:#ff4d6a;
  --uc-retiree:#3fd3e3; --uc-forummod:#3fd3e3;--uc-mod:#8ab4ff;    --uc-admin:#b28dff;
  --uc-sysop:#e39a6b;   --uc-leader:#ff6b6b;
}
[data-theme="light"]{
  --uc-peasant:#6b7280; --uc-user:#34495E; --uc-power:#DAA520; --uc-elite:#008B8B;
  --uc-crazy:#00BFFF;   --uc-insane:#8B008B; --uc-veteran:#483D8B; --uc-extreme:#FF8C00;
  --uc-ultimate:#006400;--uc-master:#38ACEC; --uc-vip:#009F00;     --uc-uploader:#DC143C;
  --uc-retiree:#1cc6d5; --uc-forummod:#1cc6d5;--uc-mod:#6495ED;    --uc-admin:#4b0082;
  --uc-sysop:#a0522d;   --uc-leader:#8b0000;
}
/* 一条类选择器即可压过站点的 a.Xxx_Name:link / a.Xxx_Name:visited（同特异性、主题后加载） */
body .n8-wrap .Peasant_Name{color:var(--uc-peasant)}
body .n8-wrap .User_Name{color:var(--uc-user)}
body .n8-wrap .PowerUser_Name{color:var(--uc-power)}
body .n8-wrap .EliteUser_Name{color:var(--uc-elite)}
body .n8-wrap .CrazyUser_Name{color:var(--uc-crazy)}
body .n8-wrap .InsaneUser_Name{color:var(--uc-insane)}
body .n8-wrap .VeteranUser_Name{color:var(--uc-veteran)}
body .n8-wrap .ExtremeUser_Name{color:var(--uc-extreme)}
body .n8-wrap .UltimateUser_Name{color:var(--uc-ultimate)}
body .n8-wrap .NexusMaster_Name{color:var(--uc-master)}
body .n8-wrap .VIP_Name{color:var(--uc-vip)}
body .n8-wrap .Uploader_Name{color:var(--uc-uploader)}
body .n8-wrap .Retiree_Name{color:var(--uc-retiree)}
body .n8-wrap .ForumModerator_Name{color:var(--uc-forummod)}
body .n8-wrap .Moderator_Name{color:var(--uc-mod)}
body .n8-wrap .Administrator_Name{color:var(--uc-admin)}
body .n8-wrap .SysOp_Name{color:var(--uc-sysop)}
body .n8-wrap .StaffLeader_Name{color:var(--uc-leader)}

/* 种子列表：数字列不折行 + 行高更从容 */
.n8-content table.torrents{margin-top:6px}
.n8-content table.torrents td{padding:10px}
.n8-content table.torrents td.rowfollow{white-space:nowrap;font-variant-numeric:tabular-nums;
  font-size:11.5px;color:var(--text-3);vertical-align:middle}
.n8-content table.torrents .torrentname td{white-space:normal;padding:0}
.n8-content table.torrents .torrentname b{line-height:1.5}
.n8-content table.torrents td:nth-child(2){padding-left:4px}
.n8-content table.torrents td.colhead{padding:9px 10px}

/* 统计引导点线更清楚一点 */
.n8-st s{border-bottom-color:var(--line-2)}

/* 宽版转盘：两列铺开 */
.n8-lk-wide{display:grid;grid-template-columns:repeat(3,1fr);
  grid-template-rows:repeat(5,auto);grid-auto-flow:column;column-gap:26px;padding:8px 16px 12px}
.n8-lk-wide li{padding:9px 2px}
@media(max-width:1200px){.n8-lk-wide{grid-template-columns:repeat(2,1fr);grid-template-rows:repeat(8,auto)}}
@media(max-width:900px){.n8-lk-wide{grid-template-columns:1fr;grid-template-rows:none;grid-auto-flow:row}
  /* 单排时只显示前 5 条抽奖结果 */
  .n8-lk li:nth-child(n+6){display:none}}

/* 种子行里的强制换行（15天<br>3时 / 14.29<br>GB）收成一行，行高更紧凑 */
.n8-content table.torrents td.rowfollow br{display:none}
.n8-content table.torrents td.rowfollow{font-size:11.5px}
/* 表头小图标是黑色 sprite，深色底上要反相才看得见 */
.n8-content td.colhead img{filter:invert(1) brightness(1.4);opacity:.7;max-height:13px}
.n8-content td.colhead img.arrowup,.n8-content td.colhead img.arrowdown{filter:none}
/* 表头/行内 sprite 图标是 trans.gif+背景图（原始 16x16），被 max-width/max-height 压缩会裁掉背景图 */
.n8-content img.comments,.n8-content img.time,.n8-content img.size,
.n8-content img.seeders,.n8-content img.leechers,.n8-content img.snatched,
.n8-content img.files,.n8-content img.download,.n8-content img.delbookmark,
.n8-content img.dt_download,.n8-content img.staff_delete,.n8-content img.staff_edit{max-width:none!important;max-height:none!important;width:16px;height:16px}
/* sprite 修正：x=91 列是相邻图标边框，会切进 leechers 右缘/snatched 左缘（反相后成亮竖线），窗口各避让 1px */
.n8-content td.colhead img.leechers{background-position:-75px -25px!important}
.n8-content td.colhead img.snatched{background-position:-90px -25px!important}
/* 行为列（删除/编辑）：恢复 br 换行，上下排列（rowfollow 的 br{display:none} 是为收窄「15天<br>3时」数字列的） */
.n8-content table.torrents > tbody > tr > td.rowfollow:last-child br{display:inline}

/* 粘性表头：给个实底，滚动时不被内容和导航糊在一起 */
.n8-content table.torrents td.colhead{
  background:var(--panel-2)!important;box-shadow:0 1px 0 var(--line);z-index:6;
}
.n8-content table.torrents td.colhead a{color:var(--text-3)}

/* 详情页标题统一为亮色 */
.n8-content h1,.n8-content h1 b,.n8-content h1 font,.n8-content h1 a,.n8-content h1 a b{color:var(--text)}

/* 窄屏：种子列表不再隐藏任何列（用户要求缩小窗口也不丢内容），改为整表横向滚动 */
@media(max-width:900px){
  .n8-content table.torrents{min-width:760px}
  .n8-content table.torrents td{padding:8px 7px}
  .n8-content table.torrents td.rowfollow{font-size:11px}
  .n8-content table.torrents td.colhead{padding:9px 7px}
}

/* 种子行三段式（v8.js 重排）：主标题 / 副标题 / 标签 各占一行；标题、副标题超长单行省略（悬浮 title 看全文） */
.n8-tl-title,.n8-tl-sub{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.n8-tl-tags{white-space:nowrap;overflow:hidden}
.n8-tl-sub{margin-top:2px;font-size:11px;line-height:1.55;color:var(--text-3)}
.n8-tl-tags{margin-top:4px;line-height:1.8}
/* 标题列不被长内容撑宽（max-width:0 让列吃剩余空间而不是内容宽），文字在内部省略 */
.n8-content table.torrents td.rowfollow:has(table.torrentname){max-width:0}
/* 嵌套标题表固定布局：否则 nowrap 内容的最小宽度会把表撑出列边界（盖住右侧评分列） */
.n8-content table.torrentname{width:100%;table-layout:fixed}
.n8-content table.torrentname td.embedded{overflow:hidden}

/* 窄屏：收起种子页的高级筛选（区间输入那几列），否则整表最小宽度被它顶到 900+ */
@media(max-width:760px){
  .n8-content td.bottom{display:none}
  .n8-content form table{width:100%!important}
}

/* 窄屏：搜索/筛选控件（table.searchbox）改成纵向堆叠，别用 nowrap 顶着整页 */
@media(max-width:760px){
  .n8-content td.nowrap,.n8-content .nowrap{white-space:normal}
  .n8-content table.searchbox{width:100%!important;display:block}
  .n8-content table.searchbox > tbody,.n8-content table.searchbox > tbody > tr{display:block}
  .n8-content table.searchbox td{display:block;width:auto!important;text-align:left}
  .n8-content table.searchbox td:empty{display:none}
  .n8-content table.searchbox input[type=text],.n8-content table.searchbox select{width:100%!important}
}

/* 旧主题给 table.main 写死了 min-width:920px，窄屏会把整页顶开 */
.n8-content table.main{min-width:0!important;width:100%!important}
.n8-content table.head{display:none}

/* ==========================================================================
   认证页（login.php / 注册跳转页）
   站点旧主题 `styles/Tey/theme.css` 里有一整套「星空玻璃」登录皮肤：
     body:has(#login-form){display:flex;height:100vh;overflow:hidden;...}
   :has(#id) 带 id 特异性，比 body.n8 高，会把我们的 header/main 变成并排 flex 项
   （表现为导航被挤到左侧中间、表单跑到右半边）。这里用 body.n8:has(...) 前缀
   统一压回去，并重做成 v8 的居中认证卡。
   ========================================================================== */

/* 1) 复位 body 骨架 */
body.n8:has(#login-form){
  display:block;height:auto;min-height:100vh;overflow:visible;
  background:var(--bg);color:var(--text);font-family:var(--sans);
}
/* 旧皮肤的星空画布与轨道装饰 */
body.n8:has(#login-form) #starfield,
body.n8:has(#login-form) .planet-orbit{display:none!important}

/* 2) 居中认证卡 */
body.n8:has(#login-form) .n8-content{
  width:min(100% - 32px,452px);
  margin:44px auto 76px;
  padding:30px 32px 26px;
  border-radius:22px;
  background:var(--panel);
  border:1px solid var(--line);
  box-shadow:var(--shadow);
  text-align:center;
  color:var(--text);
}

/* 3) 顶部「登录 / 注册」切换 —— 已移到顶栏右上角，隐藏 */
body.n8:has(#login-form) .n8-content > a{display:none}

/* 4) 品牌字（旧皮肤是彩虹渐变 TEY，这里换回宋体琥珀） */
body.n8:has(#login-form) .login-logo{
  background:none!important;
  background-image:none!important;
  -webkit-text-fill-color:currentColor!important;
  -webkit-background-clip:border-box;background-clip:border-box;
  filter:none;
  font-family:var(--serif);
  font-size:34px;font-weight:600;line-height:1.1;
  letter-spacing:.24em;text-transform:none;
  text-indent:.24em;
  color:var(--amber);
  padding:0;margin:12px 0 18px;
}

/* 5) 语言选择行（align="right" 的 div）——action 用前缀匹配：
   切换语言后 action 会带 query（/login.php?secret=&site_language=6） */
body.n8:has(#login-form) .n8-content form[action^="/login.php"]{margin:0 0 10px;text-align:center}
body.n8:has(#login-form) .n8-content form[action^="/login.php"] > div{
  text-align:center!important;font-size:11.5px;color:var(--text-2);
  display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;
}
body.n8:has(#login-form) .n8-content select{
  width:auto;padding:5px 8px;border-radius:8px;font-size:12px;
  background:var(--panel-2);border:1px solid var(--line-2);color:var(--text);
}

/* 6) 提示文案 */
body.n8:has(#login-form) #login-form > p{
  margin:0 0 10px;font-size:11.5px;line-height:1.7;color:var(--text-2);text-align:center;
}
body.n8:has(#login-form) #login-form > p b{color:var(--text);font-weight:600}

/* 7) 表单表格 → 两列标签行 */
body.n8:has(#login-form) #login-form table{
  width:100%!important;margin:14px 0 6px;border-collapse:separate;border-spacing:0 8px;
  table-layout:fixed;
}
body.n8:has(#login-form) #login-form table td{
  border:0!important;background:transparent!important;padding:0;text-align:left;
  vertical-align:middle;
}
body.n8:has(#login-form) #login-form td.rowhead{
  width:88px;text-align:right!important;padding-right:12px!important;
  font-size:12px;font-weight:400;letter-spacing:0;text-transform:none;
  color:var(--text-2);white-space:nowrap;
}
body.n8:has(#login-form) #login-form td.rowfollow{font-size:12px;color:var(--text-2)}

/* 8) 输入框 */
body.n8:has(#login-form) #login-form input[type=text],
body.n8:has(#login-form) #login-form input[type=password]{
  width:100%!important;min-width:0!important;
  padding:10px 12px!important;margin:0;
  border:1px solid var(--line-2)!important;border-radius:10px;
  background:var(--panel-2)!important;color:var(--text);
  font-size:13px;line-height:1.4;opacity:1;
  box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;
  transition:border-color .18s,box-shadow .18s,background .18s;
}
body.n8:has(#login-form) #login-form input[type=text]::placeholder,
body.n8:has(#login-form) #login-form input[type=password]::placeholder{color:var(--text-3)}
body.n8:has(#login-form) #login-form input[type=text]:focus,
body.n8:has(#login-form) #login-form input[type=password]:focus{
  outline:none;border-color:rgba(231,178,92,.55)!important;
  box-shadow:0 0 0 3px rgba(231,178,92,.14);background:var(--panel-3)!important;
  color:var(--text);
}

/* 9) 验证码图片 */
body.n8:has(#login-form) #login-form img[alt=CAPTCHA],
body.n8:has(#login-form) #login-form img[src*="image.php"]{
  height:36px;width:auto;border-radius:8px;display:block;
  border:1px solid var(--line-2);cursor:pointer;
}

/* 10) 高级选项 / 复选框 */
body.n8:has(#login-form) #login-form td.toolbox{
  font-size:11px;color:var(--text-3);padding:2px 0!important;text-align:left!important;
  letter-spacing:.04em;
}
body.n8:has(#login-form) #login-form td.toolbox[colspan]{
  border-top:1px solid var(--line)!important;padding-top:14px!important;
}
/* 自绘复选框：默认 accent-color 在深色底上会渲染成一块白方块 */
body.n8:has(#login-form) #login-form input[type=checkbox]{
  -webkit-appearance:none;appearance:none;
  width:15px;height:15px;border-radius:4px;
  border:1px solid var(--line-2);background:var(--panel-2);
  vertical-align:-3px;margin:0 8px 0 0;position:relative;cursor:pointer;
  transition:background .15s,border-color .15s;
}
body.n8:has(#login-form) #login-form input[type=checkbox]:checked{
  background:var(--amber);border-color:var(--amber);
}
body.n8:has(#login-form) #login-form input[type=checkbox]:checked::after{
  content:"";position:absolute;left:4.5px;top:1.5px;width:4px;height:8px;
  border:solid #1c1408;border-width:0 2px 2px 0;transform:rotate(42deg);
}

/* 11) 主按钮 + 重置按钮 */
/* 注意：这张表里每个 td 都是所在 tr 的 :last-child，别用 :last-child 选按钮行 */
body.n8:has(#login-form) #login-form td.toolbox[align=right]{
  text-align:center!important;padding-top:10px!important;
}
body.n8:has(#login-form) #login-form .btn{
  width:100%;padding:11px 14px;margin:0;border-radius:11px;border:0;
  background:linear-gradient(180deg,var(--amber-hi),var(--amber));
  color:#1c1408;font-size:14px;font-weight:600;letter-spacing:.02em;text-transform:none;
  box-shadow:0 12px 26px -14px rgba(231,178,92,.85);
  opacity:1;backdrop-filter:none;-webkit-backdrop-filter:none;
  transition:filter .18s,transform .12s,box-shadow .18s;
}
body.n8:has(#login-form) #login-form .btn:hover{
  filter:brightness(1.05);box-shadow:0 14px 30px -14px rgba(231,178,92,.95);
  background:linear-gradient(180deg,var(--amber-hi),var(--amber));
  color:#1c1408;border-color:transparent;
}
body.n8:has(#login-form) #login-form .btn:active{transform:translateY(1px)}
body.n8:has(#login-form) #login-form input[type=reset]{display:none!important}

/* 12) 通行密钥按钮（原结构是 img + <br> + 文字，容器有固定高度，纵向排会溢出重叠） */
body.n8:has(#login-form) #passkey_box{margin:14px 0 6px;text-align:center}
body.n8:has(#login-form) #passkey_login{
  display:inline-flex;flex-direction:row;align-items:center;gap:7px;
  height:auto!important;min-height:0;
  padding:7px 13px;border-radius:9px;
  background:var(--panel-2);border:1px solid var(--line-2);color:var(--text-2);
  font-size:11.5px;line-height:1;white-space:nowrap;opacity:1;transition:.18s;
}
body.n8:has(#login-form) #passkey_login br{display:none}
body.n8:has(#login-form) #passkey_login:hover{
  color:var(--text);border-color:rgba(231,178,92,.4);background:var(--panel-3)
}
body.n8:has(#login-form) #passkey_login img{width:22px!important;height:22px;opacity:.65}
body.n8:has(#login-form) #passkey_login:hover img{opacity:.9}

/* 13) 底部辅助链接组 */
body.n8:has(#login-form) .n8-content > p{
  margin:0;padding:3px 0;font-size:11.5px;line-height:1.7;color:var(--text-2);
  text-align:center;
}
body.n8:has(#login-form) .n8-content > p:first-of-type{margin-top:10px}
body.n8:has(#login-form) .n8-content > p b{font-weight:500}
body.n8:has(#login-form) .n8-content a{color:var(--text-2);transition:color .18s}
body.n8:has(#login-form) .n8-content a:hover{color:var(--amber)}
/* 旧皮肤把「还没有账号? 马上注册」这条隐藏了（因为它把注册放顶部），这里恢复 */
body.n8:has(#login-form) p:has(a[href="signup.php"]){display:block}

/* 14) 窄屏 */
@media(max-width:560px){
  body.n8:has(#login-form) .n8-content{
    width:min(100% - 20px,452px);margin:20px auto 48px;padding:22px 18px 20px;border-radius:18px;
  }
  body.n8:has(#login-form) .login-logo{font-size:28px;margin:10px 0 14px}
  body.n8:has(#login-form) #login-form td.rowhead{width:70px;padding-right:8px!important;font-size:11.5px}
  body.n8:has(#login-form) #login-form input[type=text],
  body.n8:has(#login-form) #login-form input[type=password]{font-size:16px}
}

/* 15) 浅色主题：琥珀按钮在浅色下是深棕底，文字必须转白，输入框要靠边框立起来 */
html[data-theme=light] body.n8:has(#login-form) .n8-content{
  background:var(--panel);border-color:var(--line-2);
  box-shadow:0 30px 60px -34px rgba(90,64,20,.34),0 1px 0 rgba(255,255,255,.7) inset;
}
html[data-theme=light] body.n8:has(#login-form) #login-form input[type=text],
html[data-theme=light] body.n8:has(#login-form) #login-form input[type=password]{
  background:#fff!important;border-color:rgba(24,20,14,.22)!important;
}
html[data-theme=light] body.n8:has(#login-form) #login-form input[type=text]:focus,
html[data-theme=light] body.n8:has(#login-form) #login-form input[type=password]:focus{
  background:#fff!important;border-color:var(--amber-line)!important;
  box-shadow:0 0 0 3px rgba(169,118,42,.13);
}
html[data-theme=light] body.n8:has(#login-form) #login-form .btn{
  background:linear-gradient(180deg,#bb8733,#9d6b1e);
  color:#fff8ec;box-shadow:0 14px 26px -16px rgba(120,80,20,.75);
}
html[data-theme=light] body.n8:has(#login-form) #login-form .btn:hover{
  background:linear-gradient(180deg,#c48f38,#a5711f);color:#fff8ec;
}
html[data-theme=light] body.n8:has(#login-form) #login-form input[type=checkbox]:checked::after{
  border-color:#fff8ec;
}

/* ==========================================================================
   注册页（signup.php）：结构与登录页同源，但表单是 #signup-form + table[border=1]，
   且多出 font.small 说明文字 / 单选 / 复选 / 红色警示。单独补一段。
   ========================================================================== */
body.n8:has(#signup-form){
  display:block;height:auto;min-height:100vh;overflow:visible;
  background:var(--bg);color:var(--text);font-family:var(--sans);
}
body.n8:has(#signup-form) #starfield,
body.n8:has(#signup-form) .planet-orbit{display:none!important}

body.n8:has(#signup-form) .n8-content{
  width:min(100% - 32px,880px);
  margin:44px auto 76px;
  padding:30px 32px 26px;
  border-radius:22px;
  background:var(--panel);
  border:1px solid var(--line);
  box-shadow:var(--shadow);
  color:var(--text);
  /* 与登录页同构：品牌/语言行占左列，表单跨两列（内部再分 1.2fr/1fr） */
  display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);column-gap:30px;text-align:left;
}
body.n8:has(#signup-form) .n8-content > *{grid-column:1;min-width:0}
body.n8:has(#signup-form) .n8-content > #signup-form{grid-column:1/-1}
body.n8:has(#signup-form) .n8-content > .login-logo{text-align:center}
/* 注册卡两列化（与登录页同构 1.2fr/1fr）：左列 = 注意+用户名+密码+再次密码，
   右列 = 邮箱地址以下（国家/性别/确认）+ 提交行；Theme.php 已拆表并包 .n8-signup-col。
   minmax(0,·) + div 容器防止英文长内容把列撑爆重叠溢出 */
body.n8:has(#signup-form) #signup-form{
  display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);column-gap:30px;align-items:stretch;
}
body.n8:has(#signup-form) #signup-form > input[type=hidden]{display:none}
/* 「注意」行（已挪出表格）：与上方 Tey/语言切换行同在左列、居中对齐 */
body.n8:has(#signup-form) #signup-form > .n8-signup-note{
  grid-column:1;grid-row:1;
  font-size:11.5px;color:var(--text-2);text-align:center;line-height:1.5;
}
body.n8:has(#signup-form) #signup-form > .n8-signup-col{min-width:0}
body.n8:has(#signup-form) #signup-form > .n8-signup-col:first-of-type{grid-column:1;grid-row:2}
body.n8:has(#signup-form) #signup-form > .n8-signup-col:last-of-type{
  grid-column:2;grid-row:1/span 2;
  padding-left:30px; /* 与分割线留距；分割线由下方伪元素统一绘制 */
}
/* 中央分割线：卡片伪元素绘制——上下与卡片边缘等距、通贯整卡，列间居中（列宽 1.2fr:1fr + 30px 间隙的中点） */
body.n8:has(#signup-form) .n8-content{position:relative}
body.n8:has(#signup-form) .n8-content::before{
  content:'';position:absolute;top:26px;bottom:26px;
  left:calc(47px + (100% - 94px)*6/11);
  width:1px;background:var(--line);pointer-events:none;
}
/* 提交按钮文字长（英文 SIGN UP! PRESS ONLY ONCE）时允许换行，避免撑破列宽 */
body.n8:has(#signup-form) #signup-form td.toolbox .btn{white-space:normal}
/* 确认行勾选项（Theme.php 包 .n8-ck）：悬挂缩进，折行文字与首行文字对齐 */
body.n8:has(#signup-form) #signup-form .n8-ck{
  position:relative;padding-left:22px;margin:2px 0;text-align:left;
}
body.n8:has(#signup-form) #signup-form .n8-ck > input[type=checkbox]{
  position:absolute;left:0;top:2px;margin:0;
}
/* 输入框与登录页统一：占满所在列（压过内联 min(100%,320px)） */
body.n8:has(#signup-form) #signup-form input[type=text],
body.n8:has(#signup-form) #signup-form input[type=password],
body.n8:has(#signup-form) #signup-form input[type=email]{width:100%!important}
body.n8:has(#signup-form) .n8-content > a{display:none}
body.n8:has(#signup-form) .login-logo{
  background:none!important;background-image:none!important;
  -webkit-text-fill-color:currentColor!important;
  -webkit-background-clip:border-box;background-clip:border-box;filter:none;
  font-family:var(--serif);font-size:34px;font-weight:600;line-height:1.1;
  letter-spacing:.24em;text-indent:.24em;text-transform:none;
  color:var(--amber);padding:0;margin:12px 0 18px;
}
body.n8:has(#signup-form) .n8-content form[action^="/signup.php"],
body.n8:has(#signup-form) .n8-content form[action^='/signup.php']{margin:0 0 6px;text-align:center}
body.n8:has(#signup-form) .n8-content form[action^="/signup.php"] > div,
body.n8:has(#signup-form) .n8-content form[action^='/signup.php'] > div{
  text-align:center!important;font-size:11.5px;color:var(--text-2);
  display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;
}
body.n8:has(#signup-form) .n8-content select{
  width:auto;padding:5px 8px;border-radius:8px;font-size:12px;
  background:var(--panel-2);border:1px solid var(--line-2);color:var(--text);
}
body.n8:has(#signup-form) .n8-content > p{margin:0;padding:0;font-size:0}

/* 首行是 colspan=2 的「注意」行，fixed 布局会按首行把两列硬分成对半，必须用 auto */
body.n8:has(#signup-form) #signup-form table{
  width:100%!important;margin:6px 0 0;border-collapse:separate;border-spacing:0 10px;
  /* fixed：列宽只看首行（rowhead 96px + 内容列），彻底不受英文长选项/长文本撑爆
     （「注意」行已由 Theme.php 挪出表外，首行即普通字段行） */
  table-layout:fixed;border:0!important;
}
body.n8:has(#signup-form) #signup-form table td{
  border:0!important;background:transparent!important;padding:0;text-align:left;vertical-align:middle;
}
body.n8:has(#signup-form) #signup-form td.rowfollow select{width:100%}
/* 顶部「注意」行 */
body.n8:has(#signup-form) #signup-form td.text{
  text-align:center!important;font-size:11.5px;color:var(--text-2);padding-bottom:4px!important;
}
body.n8:has(#signup-form) #signup-form td.rowhead{
  /* 标签列按列宽百分比（英文 VERIFICATION 等长标签 96px 装不下会撑出滚动条） */
  width:30%;text-align:right!important;padding-right:12px!important;
  font-size:12px;color:var(--text-2);
  white-space:normal;overflow-wrap:break-word; /* 压过旧主题 rowhead 的 nowrap；长单词（Verification）窄列可断词 */
  /* 标签与 32px 高的输入框垂直居中：td 内提示文字/嵌套表会把 middle 撑偏，改为顶部对齐+定量 padding */
  vertical-align:top;padding-top:8px!important;
}
/* 复选/单选等多行内容行恢复垂直居中 */
body.n8:has(#signup-form) #signup-form tr:has(input[type=checkbox]) td.rowhead,
body.n8:has(#signup-form) #signup-form tr:has(input[type=radio]) td.rowhead{
  vertical-align:middle;padding-top:0!important;
}
body.n8:has(#signup-form) #signup-form td.rowfollow{font-size:12px;color:var(--text-2);white-space:normal}
body.n8:has(#signup-form) #signup-form td.rowfollow font.small{
  display:block;margin-top:5px;font-size:11px;color:var(--text-3);line-height:1.5;
}
body.n8:has(#signup-form) #signup-form input[type=text],
body.n8:has(#signup-form) #signup-form input[type=password],
body.n8:has(#signup-form) #signup-form input[type=email]{
  width:100%!important;min-width:0!important;
  padding:10px 12px!important;border:1px solid var(--line-2)!important;border-radius:10px;
  background:var(--panel-2)!important;color:var(--text);
  font-size:13px;line-height:1.4;opacity:1;box-shadow:none;
  backdrop-filter:none;-webkit-backdrop-filter:none;
  transition:border-color .18s,box-shadow .18s,background .18s;
}
body.n8:has(#signup-form) #signup-form input[type=text]:focus,
body.n8:has(#signup-form) #signup-form input[type=password]:focus,
body.n8:has(#signup-form) #signup-form input[type=email]:focus{
  outline:none;border-color:rgba(231,178,92,.55)!important;
  box-shadow:0 0 0 3px rgba(231,178,92,.14);background:var(--panel-3)!important;color:var(--text);
}
body.n8:has(#signup-form) #signup-form select{
  width:100%;padding:9px 10px;border-radius:10px;font-size:12.5px;
  background:var(--panel-2);border:1px solid var(--line-2);color:var(--text);
}
body.n8:has(#signup-form) #signup-form img[src*="image.php"]{
  height:36px;width:auto;border-radius:8px;display:block;
  border:1px solid var(--line-2);cursor:pointer;
}
/* 复选 / 单选：自绘，避免深色底上的白方块 */
body.n8:has(#signup-form) #signup-form input[type=checkbox],
body.n8:has(#signup-form) #signup-form input[type=radio]{
  -webkit-appearance:none;appearance:none;
  width:15px;height:15px;border-radius:4px;border:1px solid var(--line-2);
  background:var(--panel-2);vertical-align:-3px;margin:0 7px 0 0;
  position:relative;cursor:pointer;transition:.15s;flex:none;
}
body.n8:has(#signup-form) #signup-form input[type=radio]{border-radius:50%}
body.n8:has(#signup-form) #signup-form input[type=checkbox]:checked,
body.n8:has(#signup-form) #signup-form input[type=radio]:checked{
  background:var(--amber);border-color:var(--amber);
}
body.n8:has(#signup-form) #signup-form input[type=checkbox]:checked::after{
  content:"";position:absolute;left:4.5px;top:1.5px;width:4px;height:8px;
  border:solid #1c1408;border-width:0 2px 2px 0;transform:rotate(42deg);
}
body.n8:has(#signup-form) #signup-form input[type=radio]:checked::after{
  content:"";position:absolute;left:4px;top:4px;width:5px;height:5px;
  border-radius:50%;background:#1c1408;
}
/* 提交行 */
body.n8:has(#signup-form) #signup-form td.toolbox{
  text-align:center!important;padding-top:14px!important;font-size:12px;color:var(--red);
}
body.n8:has(#signup-form) #signup-form td.toolbox font{color:var(--red)!important}
body.n8:has(#signup-form) #signup-form td.toolbox font b{font-weight:600}
body.n8:has(#signup-form) #signup-form td.toolbox p{margin:6px 0 0;font-size:0}
body.n8:has(#signup-form) #signup-form .btn{
  width:100%;padding:11px 14px;margin:10px 0 0;border-radius:11px;border:0;
  background:linear-gradient(180deg,var(--amber-hi),var(--amber));
  color:#1c1408;font-size:14px;font-weight:600;
  box-shadow:0 12px 26px -14px rgba(231,178,92,.85);opacity:1;
  transition:filter .18s,transform .12s;
}
body.n8:has(#signup-form) #signup-form .btn:hover{
  filter:brightness(1.05);background:linear-gradient(180deg,var(--amber-hi),var(--amber));color:#1c1408;
}
body.n8:has(#signup-form) #signup-form .btn:active{transform:translateY(1px)}

/* 浅色 */
html[data-theme=light] body.n8:has(#signup-form) #signup-form input[type=text],
html[data-theme=light] body.n8:has(#signup-form) #signup-form input[type=password],
html[data-theme=light] body.n8:has(#signup-form) #signup-form input[type=email]{
  background:#fff!important;border-color:rgba(24,20,14,.22)!important;
}
html[data-theme=light] body.n8:has(#signup-form) #signup-form input[type=text]:focus,
html[data-theme=light] body.n8:has(#signup-form) #signup-form input[type=password]:focus,
html[data-theme=light] body.n8:has(#signup-form) #signup-form input[type=email]:focus{
  background:#fff!important;border-color:var(--amber-line)!important;
}
html[data-theme=light] body.n8:has(#signup-form) #signup-form .btn{
  background:linear-gradient(180deg,#bb8733,#9d6b1e);color:#fff8ec;
  box-shadow:0 14px 26px -16px rgba(120,80,20,.75);
}
html[data-theme=light] body.n8:has(#signup-form) #signup-form input[type=checkbox]:checked::after,
html[data-theme=light] body.n8:has(#signup-form) #signup-form input[type=radio]:checked::after{
  border-color:#fff8ec;background:#fff8ec;
}

/* 窄屏 */
@media(max-width:560px){
  body.n8:has(#signup-form) .n8-content{
    width:min(100% - 20px,520px);margin:20px auto 48px;padding:22px 18px 20px;border-radius:18px;
  }
  body.n8:has(#signup-form) .login-logo{font-size:28px;margin:10px 0 14px}
  body.n8:has(#signup-form) #signup-form td.rowhead{width:74px;padding-right:8px!important;font-size:11.5px}
  body.n8:has(#signup-form) #signup-form input[type=text],
  body.n8:has(#signup-form) #signup-form input[type=password],
  body.n8:has(#signup-form) #signup-form input[type=email]{font-size:16px}
}

/* 认证页搜索框为空，按钮组需自行推到右缘与 LOGO 对称；
   同时去掉 .n8-actions 的左边框——空菜单下它会悬空成一条竖杠 */
body.n8:has(#login-form) .n8-actions,
body.n8:has(#signup-form) .n8-actions,
body.n8-pg-signup .n8-actions{margin-left:auto;border-left:0;padding-left:0}
/* 注册页（含仅邀请的「对不起」提示页，无 #signup-form）：右侧操作区与登录页一致靠右 */
body.n8-pg-signup .n8-actions{margin-left:auto}

/* ==========================================================================
   登录卡三栏化：左 = 求助区（到发送按钮），中 = 登录表单，右 = 通行密钥 + 快捷入口
   （Theme.php 把 </form> 后的 <p> 包成 .n8-auth-side，求助区整块包成 .n8-auth-help）
   ========================================================================== */
body.n8:has(#login-form) .n8-content{
  width:min(100% - 32px,1280px);
  /* 左栏求助区 : 中栏登录表单（固定 384px 不变）: 右栏通行密钥+快捷入口
     卡宽加大，多出来的宽度都给左右两栏 */
  display:grid;grid-template-columns:1fr 384px 1fr;column-gap:30px;
  min-height:536px; /* 与原版（两栏 536px）等高，避免三栏后卡片变矮 */
  text-align:left;padding:30px 32px 26px;
}
body.n8:has(#login-form) .n8-content > *{grid-column:2;min-width:0}
/* 品牌字横跨三栏，保持整张卡居中 */
body.n8:has(#login-form) .n8-content > .login-logo{grid-column:1 / -1;grid-row:1;text-align:center}
body.n8:has(#login-form) .n8-content > form[action^="/login.php"]{grid-column:2;grid-row:2}
body.n8:has(#login-form) .n8-content > #login-form{grid-column:2;grid-row:3}
body.n8:has(#login-form) .n8-content > .n8-auth-side{grid-column:3;grid-row:2 / span 2}
body.n8:has(#login-form) .n8-content > .n8-auth-help{grid-column:1;grid-row:2 / span 2}

body.n8:has(#login-form) .n8-auth-side{
  display:flex;flex-direction:column;justify-content:flex-start;padding-top:14px;
  border-left:1px solid var(--line);padding:14px 0 6px 30px;min-width:0;
}
body.n8:has(#login-form) .n8-auth-head{
  font-size:10px;letter-spacing:.18em;color:var(--text-3);
  padding-bottom:9px;margin-bottom:3px;border-bottom:1px solid var(--line);
}
body.n8:has(#login-form) .n8-auth-side > p{
  display:block;text-align:left;font-size:12px;line-height:1.6;color:var(--text-2);
  margin:0;padding:10px 2px;border-bottom:1px dashed var(--line);
}
body.n8:has(#login-form) .n8-auth-side > p:last-child{border-bottom:0;padding-bottom:2px}
body.n8:has(#login-form) .n8-auth-side > p a{color:var(--amber-hi);font-weight:500}
body.n8:has(#login-form) .n8-auth-side > p a:hover{color:var(--amber);text-decoration:underline}
body.n8:has(#login-form) .n8-auth-side > p b{font-weight:500}

/* 求助区并入右栏（Theme.php 包成 .n8-auth-help，位于快捷入口下方） */
body.n8:has(#login-form) .n8-content > .n8-auth-help{
  border-right:1px solid var(--line);padding:12px 30px 2px 0;min-width:0;
}
/* 求助区标题：压过全局 td.embedded>h2 的 flex/负边距/48px 卡头样式
   （否则 h2 被 -18px 拉出卡片左缘、窄屏下 flex 挤压导致「求助区」竖排被裁剪） */
body.n8:has(#login-form) .n8-auth-help td.embedded > h2{
  display:block;margin:0 0 10px!important;padding:0!important;height:auto;
  border-bottom:0;font-size:12.5px;font-weight:600;letter-spacing:.02em;
  color:var(--text);line-height:1.5;white-space:normal;
}
body.n8:has(#login-form) .n8-auth-help h2 font.small{color:var(--text-3);font-weight:400;font-size:11px}
/* 外层 table.main 继承了卡片圆角(16px)+overflow:hidden，标题「求」的左上角和
   发送按钮的右下角正好压在圆角裁切区上被削掉——求助区内一律直角不裁切 */
body.n8:has(#login-form) .n8-auth-help table{border:0!important;width:100%!important;min-width:0!important;background:transparent!important;border-radius:0!important;overflow:visible!important}
body.n8:has(#login-form) .n8-auth-help td{border:0!important;background:transparent!important;padding:0!important}
body.n8:has(#login-form) .n8-auth-help td.text > br{display:none}
/* iframe 不加圆角：Chrome 会把 iframe 内容按 border-radius 裁切，四角留言/滚动条会被切掉 */
body.n8:has(#login-form) .n8-auth-help iframe[name=sbox]{
  width:100%!important;height:360px!important;display:block;
  border-radius:0;border:1px solid var(--line-2);background:var(--panel-2);
}
body.n8:has(#login-form) .n8-auth-help form > div:not(#sbword){
  display:flex!important;align-items:center;gap:8px;flex-wrap:nowrap;
  margin:10px 0 0;font-size:12px;color:var(--text-2);white-space:nowrap;
}
body.n8:has(#login-form) .n8-auth-help input[type=text]{
  flex:1 1 0; /* basis=0：窄屏下输入框主动收缩，保证「留言：+ 输入框 + 发送/倒计时」整行不溢出卡片 */
  width:auto!important;min-width:0;max-width:none;
  padding:8px 10px;border:1px solid var(--line-2)!important;border-radius:9px;
  background:var(--panel-2)!important;color:var(--text);font-size:12px;opacity:1;
}
body.n8:has(#login-form) .n8-auth-help input[type=text]:focus{
  outline:none;border-color:rgba(231,178,92,.55)!important;
  box-shadow:0 0 0 3px rgba(231,178,92,.14);background:var(--panel-3)!important;
}
/* 发送/倒计时按钮：清掉全局 submit 的上 12px / 下 2px 外边距，否则比输入框低 5px（看着没对齐） */
body.n8:has(#login-form) .n8-auth-help .btn{
  width:auto;padding:8px 14px;font-size:12px;letter-spacing:0;text-transform:none;
  margin:0!important;height:32px;line-height:1;flex:none;vertical-align:middle;
}
/* 浅色 */
html[data-theme=light] body.n8:has(#login-form) .n8-auth-help{border-color:var(--line-2)}
html[data-theme=light] body.n8:has(#login-form) .n8-auth-help input[type=text]{background:#fff!important;border-color:rgba(24,20,14,.22)!important}
html[data-theme=light] body.n8:has(#login-form) .n8-auth-help iframe[name=sbox]{background:#fff;border-color:rgba(24,20,14,.22)}

@media(max-width:1080px){
  body.n8:has(#login-form) .n8-content > .n8-auth-help{
    grid-column:1;grid-row:auto;border-right:0;border-top:1px solid var(--line);
    padding:14px 0 0;margin-top:16px;
  }
}

@media(max-width:1080px){
  body.n8:has(#login-form) .n8-content{
    grid-template-columns:1fr;column-gap:0;width:min(100% - 20px,880px);
    min-height:0;padding:22px 18px 20px;
  }
  /* 窄屏回到单列：显式行列全部复位，按 DOM 顺序（Logo → 语言表单 → 登录表单 → 通行密钥+快捷入口 → 求助区）纵向排列 */
  body.n8:has(#login-form) .n8-content > *,
  body.n8:has(#login-form) .n8-content > .login-logo,
  body.n8:has(#login-form) .n8-content > form[action^="/login.php"],
  body.n8:has(#login-form) .n8-content > #login-form{grid-column:1;grid-row:auto}
  body.n8:has(#login-form) .n8-content > .n8-auth-side{grid-column:1;grid-row:auto;margin-top:16px}
  body.n8:has(#login-form) .n8-auth-side{border-left:0;border-top:1px solid var(--line);padding:14px 0 0}
}

/* 浅色 */
html[data-theme=light] body.n8:has(#login-form) .n8-auth-side{border-color:var(--line-2)}
/* ==========================================================================
   认证页一屏自适应 v3：文字尺寸不变——矮宽屏注册表单双栏重排 + 间距分档收紧兜底
   ========================================================================== */

/* 骨架：body 纵向 flex（补 align-items:stretch 抵御旧主题残留 align-items:center，
   否则顶栏背景会被缩成内容宽）；main 把卡片+页脚垂直居中，safe center 防极端溢出 */
body.n8:has(#login-form),
body.n8:has(#signup-form){
  display:flex;flex-direction:column;align-items:stretch;min-height:100vh;overflow:visible;
}
body.n8:has(#login-form) main.n8-wrap,
body.n8:has(#signup-form) main.n8-wrap{
  width:100%; /* flex 列方向下 margin:0 auto 会阻止拉伸，须显式全宽 */
  flex:1;justify-content:safe center;gap:6px;
  padding-top:10px!important;padding-bottom:46px!important; /* 给底部固定页脚留位 */
}
/* 页脚固定在视口底部：容器度量与顶栏一致（maxw + pad），左组对齐 LOGO、右组对齐登录/注册按钮 */
body.n8:has(#login-form) .n8-foot,
body.n8:has(#signup-form) .n8-foot{
  position:fixed;left:0;right:0;bottom:0;z-index:60;
  max-width:var(--maxw);margin:0 auto;
  padding:8px var(--pad) 14px;
  pointer-events:none; /* 中段空白不挡卡片点击 */
}
body.n8:has(#login-form) .n8-foot > *,
body.n8:has(#signup-form) .n8-foot > *{pointer-events:auto}

/* 卡片水平居中 */
body.n8:has(#login-form) .n8-content,
body.n8:has(#signup-form) .n8-content{margin:0 auto}
/* 认证卡继承的 overflow-x:auto 会在内容临界时冒出横向滚动条，认证页一律关掉 */
body.n8:has(#login-form) .n8-content,
body.n8:has(#signup-form) .n8-content{overflow:visible}

/* 基础收紧：只收间距，文字与输入框字号一律不动 */
body.n8:has(#login-form) .login-logo,
body.n8:has(#signup-form) .login-logo{font-size:26px;margin:4px 0 12px}
body.n8:has(#login-form) #login-form table{margin:8px 0 4px;border-spacing:0 6px}
body.n8:has(#signup-form) #signup-form table{margin:4px 0 0;border-spacing:0 5px}
body.n8:has(#login-form) #login-form input[type=text],
body.n8:has(#login-form) #login-form input[type=password]{padding:7px 11px!important}
body.n8:has(#signup-form) #signup-form input[type=text],
body.n8:has(#signup-form) #signup-form input[type=password],
body.n8:has(#signup-form) #signup-form input[type=email]{padding:6px 10px!important}
body.n8:has(#signup-form) #signup-form td.rowfollow font.small{margin-top:2px;font-size:10.5px}
body.n8:has(#signup-form) #signup-form td.rowfollow > table{display:none!important}
body.n8:has(#signup-form) #signup-form .btn{padding:6px 16px!important}
body.n8:has(#signup-form) #signup-form td.toolbox p{margin:2px 0 0}
body.n8:has(#login-form) #login-form > p{margin:0 0 8px;line-height:1.55}
body.n8:has(#login-form) #passkey_box{margin:6px 0 0}

/* （旧「矮宽屏表格内双栏重排」已由注册卡固定两列化取代） */

/* 分档收紧 */
@media (max-height:760px){
  body.n8:has(#login-form) .n8-content,
  body.n8:has(#signup-form) .n8-content{padding:14px 24px 12px}
  body.n8:has(#login-form) .login-logo,
  body.n8:has(#signup-form) .login-logo{font-size:22px;margin:2px 0 8px}
  body.n8:has(#login-form) #login-form table{border-spacing:0 5px;margin:6px 0 2px}
  body.n8:has(#signup-form) #signup-form table{border-spacing:0 3px}
  body.n8:has(#login-form) #login-form input[type=text],
  body.n8:has(#login-form) #login-form input[type=password]{padding:6px 10px!important}
  body.n8:has(#signup-form) #signup-form input[type=text],
  body.n8:has(#signup-form) #signup-form input[type=password],
  body.n8:has(#signup-form) #signup-form input[type=email]{padding:5px 10px!important}
  body.n8:has(#signup-form) #signup-form td.rowhead{padding-top:7px!important}
}
@media (max-height:620px){
  body.n8:has(#login-form) .n8-content,
  body.n8:has(#signup-form) .n8-content{padding:10px 18px 10px}
  body.n8:has(#login-form) .login-logo,
  body.n8:has(#signup-form) .login-logo{font-size:20px;margin:2px 0 6px}
  body.n8:has(#login-form) #login-form table,
  body.n8:has(#signup-form) #signup-form table{border-spacing:0 3px}
  body.n8:has(#signup-form) #signup-form td.rowhead{padding-top:6px!important}
  body.n8:has(#login-form) #login-form > p{margin:0 0 5px}
  body.n8:has(#login-form) .n8-foot,
  body.n8:has(#signup-form) .n8-foot{display:none}
  /* 页脚隐藏时收回为其预留的底部空间 */
  body.n8:has(#login-form) main.n8-wrap,
  body.n8:has(#signup-form) main.n8-wrap{padding-bottom:0!important}
}
@media (max-height:580px){
  body.n8:has(#signup-form) #signup-form td.rowfollow font.small{display:none}
}

/* 手机端登录卡压缩（快捷入口行距、输入框内边距、表单行距） */
@media (max-width:780px){
  body.n8:has(#login-form) .n8-auth-side > p{padding:5px 2px}
  body.n8:has(#login-form) #login-form table{border-spacing:0 5px}
  body.n8:has(#login-form) #login-form input[type=text],
  body.n8:has(#login-form) #login-form input[type=password]{padding:7px 11px!important}
}
/* 手机且偏矮：提示文案收起 */
@media (max-width:780px) and (max-height:720px){
  body.n8:has(#login-form) #login-form > p{display:none}
  body.n8:has(#login-form) .login-logo{margin:2px 0 8px}
}

/* 手机端认证页：收起页脚 + 卡片/行距再收紧（文字字号不动） */
@media (max-width:780px){
  /* 注册卡两列折叠为单列 */
  body.n8:has(#signup-form) .n8-content{display:block}
  body.n8:has(#signup-form) #signup-form{display:block}
  body.n8:has(#signup-form) #signup-form > .n8-signup-col + .n8-signup-col{margin-top:6px;border-left:0;padding-left:0}
  body.n8:has(#signup-form) .n8-content::before{display:none}
  body.n8:has(#login-form) .n8-foot,
  body.n8:has(#signup-form) .n8-foot{display:none}
  body.n8:has(#login-form) main.n8-wrap,
  body.n8:has(#signup-form) main.n8-wrap{padding-bottom:0!important}
  body.n8:has(#login-form) .n8-content,
  body.n8:has(#signup-form) .n8-content{padding:14px 16px 12px}
  body.n8:has(#login-form) .n8-auth-side > p{padding:3px 2px}
  body.n8:has(#login-form) .n8-auth-passkey{padding:2px 0 8px;margin:0 0 6px}
  body.n8:has(#login-form) .n8-auth-head{padding-bottom:6px;margin-bottom:2px}
  body.n8:has(#login-form) #passkey_login{padding:5px 12px}
  body.n8:has(#login-form) #login-form table{border-spacing:0 4px}
  body.n8:has(#login-form) #login-form input[type=text],
  body.n8:has(#login-form) #login-form input[type=password]{padding:6px 10px!important}
}
/* 手机且矮：极限收紧 */
@media (max-width:780px) and (max-height:640px){
  body.n8:has(#login-form) .n8-content{padding:10px 14px 10px}
  body.n8:has(#login-form) .n8-auth-side > p{padding:2px 2px;font-size:11px}
  body.n8:has(#login-form) #login-form table{border-spacing:0 3px}
}

/* ==========================================================================
   旧认证皮肤把整页链接染成星空浅蓝（--primary-color:#b3e0ff）：浅色白底不可读，
   深色下也不符合 v8 语言 → 高特异性统一接管，再逐项保住既定样式
   ========================================================================== */
body.n8:has(#login-form) main a,
body.n8:has(#signup-form) main a{color:var(--text-2)}
body.n8:has(#login-form) main a:hover,
body.n8:has(#signup-form) main a:hover{color:var(--amber)}
/* 顶栏登录/注册按钮 */
body.n8:has(#login-form) header .n8-cta,
body.n8:has(#signup-form) header .n8-cta{color:var(--text-2)}
body.n8:has(#login-form) header .n8-cta.primary,
body.n8:has(#signup-form) header .n8-cta.primary{color:#20160a}
body.n8:has(#login-form) header .n8-cta:hover,
body.n8:has(#signup-form) header .n8-cta:hover{color:var(--text)}
body.n8:has(#login-form) header .n8-cta.primary:hover,
body.n8:has(#signup-form) header .n8-cta.primary:hover{color:#20160a}
/* 顶栏品牌 */
body.n8:has(#login-form) header .n8-brand,
body.n8:has(#signup-form) header .n8-brand{color:var(--text)}
/* 抽屉里的菜单链接 */
body.n8:has(#login-form) header .n8-drawer a,
body.n8:has(#signup-form) header .n8-drawer a{color:var(--text-2)}
body.n8:has(#login-form) header .n8-drawer a:hover,
body.n8:has(#signup-form) header .n8-drawer a:hover{color:var(--text)}
/* 登录卡右栏快捷入口：琥珀高亮（原有风格，特异性压回） */
body.n8:has(#login-form) main .n8-auth-side p a{color:var(--amber-hi);font-weight:500}
body.n8:has(#login-form) main .n8-auth-side p a:hover{color:var(--amber);text-decoration:underline}
/* 通行密钥块：右栏顶部居中（快捷入口之前），与下方列表用细线隔开 */
body.n8:has(#login-form) .n8-auth-passkey{
  text-align:center;padding:2px 0 12px;margin:0 0 10px;
  border-bottom:1px solid var(--line);
}
body.n8:has(#login-form) .n8-auth-passkey #passkey_box{margin:0}

/* ============================================================
   种子详情页（body.n8-pg-details）
   ============================================================ */
/* 主标题与信息表之间留出呼吸感 */
body.n8-pg-details .n8-content h1{margin:6px 0 16px;font-size:22px}

/* 信息表：标签列左对齐置顶，内容行放宽行距 */
body.n8-pg-details .n8-content > table > tbody > tr > td.rowhead{
  width:96px;padding:13px 12px 13px 18px;vertical-align:top;text-align:left;
}
body.n8-pg-details .n8-content > table > tbody > tr > td.rowfollow,
body.n8-pg-details .n8-content > table > tbody > tr > td.text{
  padding:13px 18px;font-size:12.5px;line-height:1.9;vertical-align:top;
}

/* MediaInfo / IMDb / 其它版本：内嵌键值表 */
body.n8-pg-details .n8-content table table td{font-size:12px;line-height:1.8;vertical-align:top}
body.n8-pg-details .n8-content table table td b{color:var(--text-2);font-weight:600}

/* 简介：正文 13px、行距宽松，图片圆角 */
body.n8-pg-details #kdescr{font-size:13px;line-height:1.85;color:var(--text-2)}
body.n8-pg-details #kdescr img{border-radius:8px;margin:8px 0}
body.n8-pg-details #kdescr fieldset{background:var(--panel-2)}

/* NFO 等等宽文本块 */
body.n8-pg-details .n8-content pre{
  font-size:11px;line-height:1.55;overflow-x:auto;background:var(--panel-2);
  padding:12px 14px;border-radius:10px;border:1px solid var(--line);
}

/* 快捷评论表单：整宽居中，输入框撑满 */
body.n8-pg-details .n8-content > table:has(form#compose){width:100%}
body.n8-pg-details form#compose{max-width:880px;margin:0 auto}
body.n8-pg-details form#compose textarea[name="body"]{
  width:100%!important;min-height:110px;resize:vertical;
}

/* 详情页评论区：分割线画在整条评论（内容行+工具行）底部，而不是内容行底（那样线会卡在头像下面） */
body.n8-pg-details .n8-content tr:has(+ tr > td.toolbox > .n8-strip) > td.rowfollow{border-bottom:0}
body.n8-pg-details .n8-content tr:has(> td.toolbox > .n8-strip) > td.toolbox{border-bottom:1px solid var(--line)}
body.n8-pg-details .n8-content tr:last-child > td.toolbox{border-bottom:0}

/* BBCode 编辑窗口（评论编辑/完整回复共用）：与论坛快速回复一致——居中窄版、隐藏「正文」左列 */
body.n8 table.main:has(#editorouter){max-width:940px;margin:0 auto;width:auto;table-layout:fixed}
/* 固定布局下「主题」行是首行：标签列定宽，输入框吃满剩余宽度（auto 布局会把 99% 宽的输入框挤成几十像素） */
body.n8 table.main:has(#editorouter) > tbody > tr:first-child > td.rowhead{width:96px}
body.n8 table.main tr:has(#editorouter) > td.rowhead{display:none}
body.n8 #editorouter table{width:100%!important}
body.n8 #editorouter textarea{width:100%!important;min-height:180px;resize:vertical}

/* 发短讯/联系管理组/发布公告页：编辑行标签「正文」不能隐藏——隐藏后编辑单元格掉进第一列（96px 窄条=竖形阴影块） */
body.n8-pg-sendmessage table.main tr:has(#editorouter) > td.rowhead,
body.n8-pg-contactstaff table.main tr:has(#editorouter) > td.rowhead,
body.n8-pg-news table.main tr:has(#editorouter) > td.rowhead,
body.n8-pg-fun table.main tr:has(#editorouter) > td.rowhead,
body.n8-pg-forums:has(#editorouter) table.main tr:has(#editorouter) > td.rowhead{display:table-cell;width:96px;padding-right:10px;vertical-align:top}
/* 标签字号与右侧输入框一致、靠左更明显 */
body.n8-pg-sendmessage table.main td.rowhead,
body.n8-pg-contactstaff table.main td.rowhead,
body.n8-pg-news table.main td.rowhead,
body.n8-pg-fun table.main td.rowhead,
body.n8-pg-forums:has(#editorouter) table.main td.rowhead{font-size:12.5px;color:var(--text-2);text-align:left}

/* ── userdetails 发布种子/做种/下载 AJAX 列表（div#ka1~3）：13 列被 nowrap 锁死总宽 ~1750px，窄容器溢出裁切 ── */
/* ── 遗留 HTML border="1" 属性边框清零（如首页"服务器负载"白框）──
   注意：首页这类表格被主题包进 .n8-raw/.n8-panel，不在 .n8-content 内，
   必须用 body.n8 全局作用域才能命中（实测 td.text 仍带 1px 浅灰框） */
body.n8 table[border="1"],
body.n8 table[border="1"] > tbody > tr > td,
body.n8 table[border="1"] > tr > td{border:0!important}

/* 表头行（colhead）恢复居中：原始 align="center" 属性被主题全局左对齐覆盖 */
body.n8-pg-userdetails div[id^="ka"] table tr:first-child td,
body.n8-pg-userdetails div[id^="ka"] table tr:first-child th{text-align:center!important}

body.n8-pg-userdetails div[id^="ka"] table{width:100%!important;max-width:100%}
body.n8-pg-userdetails div[id^="ka"] table td,
body.n8-pg-userdetails div[id^="ka"] table th{white-space:normal!important}
/* 数值列（做种/下载/评论计数、上传/下载/分享率、操作）保持单行不折 */
body.n8-pg-userdetails div[id^="ka"] table td:nth-child(n+4):nth-child(-n+9),
body.n8-pg-userdetails div[id^="ka"] table td:nth-child(13){white-space:nowrap!important}
/* 标题列允许收缩换行，长链接/文件名也能断 */
body.n8-pg-userdetails div[id^="ka"] table td:nth-child(2){overflow-wrap:anywhere;word-break:break-word;min-width:160px}
/* 客户端/IP 列封顶省略号截断（单行），宽度稳定让给标题；做种时间随内容自然换行 */
body.n8-pg-userdetails div[id^="ka"] table td:nth-child(11),
body.n8-pg-userdetails div[id^="ka"] table td:nth-child(12){max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap!important}
/* 操作列不许被压缩（否则 flex 按钮文字竖排），按钮文字强制单行 */
body.n8-pg-userdetails div[id^="ka"] table td:last-child{min-width:88px}
body.n8-pg-userdetails div[id^="ka"] table td:last-child button{white-space:nowrap;flex-wrap:nowrap}
/* 标题 / 副标题：各占一行，超长省略。用 line-clamp 而非 nowrap——nowrap 会把最小宽度
   算成整串文字宽，auto 表格布局下又把表格撑出容器 */
body.n8-pg-userdetails div[id^="ka"] table .n8-tl-title,
body.n8-pg-userdetails div[id^="ka"] table .n8-tl-sub{
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;
  white-space:normal!important;overflow:hidden;overflow-wrap:anywhere;word-break:break-word;
  line-height:1.45}
body.n8-pg-userdetails div[id^="ka"] table .n8-tl-title{font-weight:600;color:var(--text)}
body.n8-pg-userdetails div[id^="ka"] table .n8-tl-title a{color:inherit}
body.n8-pg-userdetails div[id^="ka"] table .n8-tl-sub{margin-top:2px;font-size:11.5px;color:var(--text-3)}
/* 省略后鼠标悬停由 td 的 title 属性显示全文（见 v8.js splitTitles），给个指针提示 */
body.n8-pg-userdetails div[id^="ka"] table td:nth-child(2){cursor:default}
/* PM/举报：老式雪碧图按钮（f_pm/f_report）换成主题化图标按钮（v8.js 注入 .n8-ud-action） */
.n8-ud-action{display:inline-flex;align-items:center;gap:6px;margin:0 6px;padding:7px 14px;border-radius:9px;
  background:var(--panel-2);border:1px solid var(--line-2);color:var(--text-2);font-size:12.5px;line-height:1;
  text-decoration:none!important;transition:color .15s,background .15s,border-color .15s}
.n8-ud-action svg{width:14px;height:14px;flex:none}
.n8-ud-action:hover{color:var(--amber);background:var(--amber-soft);border-color:var(--amber-line)}
/* 编辑用户表单：radio/checkbox 选项之间留间距——「低 普通 高」「是 否」原本贴成一团 */
body.n8-pg-userdetails td.rowfollow input[type="radio"],
body.n8-pg-userdetails td.rowfollow input[type="checkbox"]{margin:0 6px 0 16px!important;vertical-align:-2px}
body.n8-pg-userdetails td.rowfollow input[type="radio"]:first-child,
body.n8-pg-userdetails td.rowfollow input[type="checkbox"]:first-child{margin-left:2px!important}

/* 发布页（upload.php）：label 包裹的单选/复选（H&R 的 NO/YES、标签行 官方/完结…）原本贴成一团 */
body.n8-pg-upload td.rowfollow label{display:inline-flex;align-items:center;gap:6px;margin-right:18px;vertical-align:middle;cursor:pointer}
body.n8-pg-upload td.rowfollow label:first-child{margin-left:2px}
body.n8-pg-upload td.rowfollow label:last-child{margin-right:0}
body.n8-pg-upload td.rowfollow label input[type="radio"],
body.n8-pg-upload td.rowfollow label input[type="checkbox"]{margin:0!important}
/* 发布页：带说明文字的行（标题/副标题/IMDb/NFO…），说明把单元格撑高导致 middle 对齐的标签
   比输入框中心低 ~10px；改为顶部对齐 + padding 使标签中心与输入框中心重合 */
body.n8-pg-upload td.rowhead{vertical-align:top!important;padding-top:16px}
/* 例外：匿名发布行只有 13px 复选框，居中即可 */
body.n8-pg-upload tr:has(td.rowfollow input[name=uplver]) td.rowhead{vertical-align:middle!important;padding-top:9px}
/* 附件 iframe 与正文框同宽 */
body.n8-pg-sendmessage iframe[src*="attachment"],
body.n8-pg-contactstaff iframe[src*="attachment"],
body.n8-pg-news iframe[src*="attachment"],
body.n8-pg-fun iframe[src*="attachment"]{width:100%!important}
/* 内层编辑表固定到编辑区宽度：cols 属性让正文框把表撑到 878 溢出面板，固定布局+允许换行解决 */
body.n8-pg-sendmessage #editorouter > table,
body.n8-pg-contactstaff #editorouter > table,
body.n8-pg-news #editorouter > table,
body.n8-pg-fun #editorouter > table,
body.n8-pg-forums:has(#editorouter) #editorouter > table{table-layout:fixed!important}
body.n8-pg-sendmessage #editorouter td,
body.n8-pg-contactstaff #editorouter td,
body.n8-pg-news #editorouter td,
body.n8-pg-fun #editorouter td,
body.n8-pg-forums:has(#editorouter) #editorouter td{white-space:normal}
/* 工具栏嵌套表（每键一格）转块级流，按钮在窄容器里自动换行不再溢出 */
body.n8-pg-sendmessage #editorouter table table,
body.n8-pg-contactstaff #editorouter table table,
body.n8-pg-news #editorouter table table,
body.n8-pg-fun #editorouter table table,
body.n8-pg-forums:has(#editorouter) #editorouter table table{display:block;width:100%!important;border-spacing:0}
body.n8-pg-sendmessage #editorouter table table tbody,
body.n8-pg-contactstaff #editorouter table table tbody,
body.n8-pg-news #editorouter table table tbody,
body.n8-pg-fun #editorouter table table tbody,
body.n8-pg-forums:has(#editorouter) #editorouter table table tbody,
body.n8-pg-sendmessage #editorouter table table tr,
body.n8-pg-forums:has(#editorouter) #editorouter table table tr,
body.n8-pg-contactstaff #editorouter table table tr,
body.n8-pg-news #editorouter table table tr,
body.n8-pg-fun #editorouter table table tr{display:block}
body.n8-pg-sendmessage #editorouter table table td,
body.n8-pg-contactstaff #editorouter table table td,
body.n8-pg-news #editorouter table table td,
body.n8-pg-fun #editorouter table table td,
body.n8-pg-forums:has(#editorouter) #editorouter table table td{display:inline-block;padding:2px 3px!important;border:0!important}
/* 正文框默认高度 170px（覆盖通用 min-height:180px）
   注意：height / min-height 不能加 !important —— 右下角拖拽改的是内联 height，
   一旦这里 !important 就会把拖拽结果压回去，表现为「把手拖不动」 */
body.n8-pg-sendmessage #editorouter textarea,
body.n8-pg-contactstaff #editorouter textarea,
body.n8-pg-news #editorouter textarea,
body.n8-pg-fun #editorouter textarea,
body.n8-pg-forums:has(#editorouter) #editorouter textarea{height:170px;min-height:110px;max-height:none}

/* 字幕/搜索那一行的按钮间距 */
body.n8-pg-details .n8-content .btn{margin-right:6px}

/* 站内提示条（未达标提醒=红 / 管理组信息=蓝）：原版大色块收敛为主题通知条 */
.n8-content table:has(td[style*="background: red"]),
.n8-content table:has(td[style*="background: blue"]){
  background:var(--panel);border:1px solid var(--line);border-radius:var(--r);
  margin:0 0 14px;border-collapse:separate;border-spacing:0;
}
.n8-content td[style*="background: red"]{background:rgba(224,90,90,.14)!important;padding:10px 16px!important;text-align:center}
.n8-content td[style*="background: red"],.n8-content td[style*="background: red"] font{color:#e8a1a1!important}
.n8-content td[style*="background: red"] a{color:#e8a1a1!important;font-weight:600}
.n8-content td[style*="background: blue"]{background:rgba(90,140,224,.14)!important;padding:10px 16px!important;text-align:center}
.n8-content td[style*="background: blue"],.n8-content td[style*="background: blue"] font{color:#9db9e8!important}
.n8-content td[style*="background: blue"] a{color:#9db9e8!important;font-weight:600}

/* 魔力值奖励胶囊（#listNumber.magic）：原版 huise.png 浅灰 sprite + 浅灰字在深色主题下看不清，
   重绘为主题胶囊，数字完整可读（保留点击赠送行为） */
body.n8 #listNumber{list-style:none;display:inline-flex;flex-wrap:wrap;gap:6px;margin:0;padding:0;vertical-align:middle}
body.n8 #listNumber li{
  background:var(--panel-3);background-image:none;border:1px solid var(--amber-line);
  border-radius:999px;color:var(--amber-hi);font-size:11px;font-weight:600;
  line-height:20px;height:auto;min-height:21px;padding:0 12px;cursor:pointer;width:auto;
}
body.n8 #listNumber li:hover{background:var(--amber-soft)}
body.n8 #listNumber li font{font-size:11px!important;color:inherit!important;padding:0!important}

/* ============================================================
   论坛帖子页（body.n8-pg-forums）
   ============================================================ */
/* 帖子主表：行间距 + 圆角面板 */
body.n8-pg-forums .n8-content > table > tbody > tr > td.text > div > table#pid2,
body.n8-pg-forums .n8-content td.text table[id^="pid"]{
  margin:2px 0 10px;
}
body.n8-pg-forums .n8-content td.text table[id^="pid"] td{font-size:12px;color:var(--text-2);padding:4px 6px}
body.n8-pg-forums .n8-content td.text table[id^="pid"] a{color:var(--text-2)}
body.n8-pg-forums .n8-content td.text table[id^="pid"] a:hover{color:var(--amber)}

/* 用户信息面板（左列）：头像圆角、统计行距、整体留白 */
body.n8-pg-forums .n8-content td.rowfollow[width="150"]{
  font-size:12px;line-height:2;color:var(--text-2);white-space:nowrap;
}
body.n8-pg-forums .n8-content td.rowfollow[width="150"] img[src*="avatar"]{
  display:block;width:150px;height:auto;border-radius:10px;
}
body.n8-pg-forums .n8-content td.rowfollow[width="150"] b{color:var(--text)}

/* 帖子正文：宽行距 */
body.n8-pg-forums .n8-content div[id$="body"]{font-size:13px;line-height:1.9;color:var(--text-2)}
body.n8-pg-forums .n8-content div[id$="body"] img{max-width:100%;border-radius:8px}

/* 顶/踩/奖励 按钮：主题胶囊，完整显示图标和文字 */
body.n8-pg-forums .btn-post-like,
body.n8-pg-forums .btn-post-reward{
  display:inline-flex!important;align-items:center;gap:5px;
  padding:4px 12px;border-radius:999px;cursor:pointer;
  background:var(--panel-3);border:1px solid var(--line);
  font-size:12px;color:var(--text-2);
  transition:border-color .14s,color .14s,background .14s;
}
/* 奖励按钮保持原有 float:left，与顶/踩同排靠左 */
body.n8-pg-forums .btn-post-reward{float:left!important;margin-top:2px!important}
body.n8-pg-forums .btn-post-like svg,
body.n8-pg-forums .btn-post-reward svg{flex-shrink:0}
body.n8-pg-forums .btn-post-like:hover,
body.n8-pg-forums .btn-post-reward:hover{border-color:var(--amber-line);color:var(--amber-hi);background:var(--amber-soft)}

/* 工具条行：左按钮组内间距（右侧行为链接保持原右对齐浮动布局） */
body.n8-pg-forums td.toolbox > div:first-child{display:flex!important;align-items:center;gap:10px;float:left!important;width:max-content}
body.n8-pg-forums td.toolbox > div:first-child > .btn-post-like,
body.n8-pg-forums td.toolbox > div:first-child > .btn-post-reward{margin-right:0!important}
body.n8-pg-forums td.toolbox{padding:9px 12px;vertical-align:middle}
body.n8-pg-forums td.toolbox a img{vertical-align:middle;margin-left:6px}

/* 帖子底部楼层面板间距 */
body.n8-pg-forums .n8-content table.main{margin:10px 0}

/* 顶/踩/奖三按钮：完全统一尺寸与间距 */
body.n8-pg-forums .btn-post-like,
body.n8-pg-forums .btn-post-reward{
  height:28px;padding:0 13px;font-size:12px;line-height:28px;margin-top:0!important;
}
body.n8-pg-forums .btn-post-like svg,
body.n8-pg-forums .btn-post-reward svg{width:14px;height:14px}
/* 插件原 SVG 硬编码深色填充，压成 currentColor 才能在深色主题显示 */
body.n8-pg-forums .btn-post-like svg path,
body.n8-pg-forums .btn-post-reward svg path{fill:currentColor}

/* 引用/删除/编辑/回复：主题文字按钮（论坛+详情页评论共用） */
body.n8 a.n8-act{
  display:inline-flex;align-items:center;gap:5px;margin-left:8px;
  padding:0 13px;height:28px;border-radius:999px;font-size:12px;color:var(--text-2);
  background:var(--panel-3);border:1px solid var(--line);
  transition:border-color .14s,color .14s,background .14s;
}
body.n8 a.n8-act:hover{border-color:var(--amber-line);color:var(--amber-hi);background:var(--amber-soft)}
body.n8 a.n8-act span{line-height:28px}
/* 独立按钮所在单元格（版块页新主题/主题页回复）：去掉底 padding 让按钮垂直居中 */
body.n8 td.embedded.nowrap:has(> a.n8-act){padding:6px 18px;vertical-align:middle}

/* 表头排序图标居中（与数据列的居中值对齐），文字表头不受影响 */
.n8-content td.colhead img{display:block;margin:0 auto}

/* 左列在线/私信/举报图标条（论坛+详情页评论共用，作用域放宽到全站） */
body.n8 .n8-strip{display:flex;align-items:center;gap:6px;justify-content:flex-start;flex-wrap:nowrap}
body.n8 .n8-strip > *{flex-shrink:0}
/* svg 是 flex 子项会被循环收缩到 2px，显式固定尺寸 */
body.n8 .n8-fic svg,
body.n8 .n8-act svg,
body.n8 .btn-post-like svg,
body.n8 .btn-post-reward svg{width:14px;height:14px;max-width:none;flex-shrink:0;display:block}
body.n8 .n8-on{width:10px;height:10px;border-radius:50%;background:#5fbf6f;display:inline-block;box-shadow:0 0 6px rgba(95,191,111,.5);margin:0 3px;cursor:default}
body.n8 .n8-off{width:10px;height:10px;border-radius:50%;background:#5a6270;display:inline-block;margin:0 3px;cursor:default}
body.n8 .n8-fic{
  display:inline-flex;align-items:center;gap:4px;padding:0 10px!important;height:24px;border-radius:999px;white-space:nowrap;
  background:var(--panel-3);border:1px solid var(--line);color:var(--text-2);font-size:11px;
  transition:border-color .14s,color .14s;
}
body.n8 .n8-fic:hover{border-color:var(--amber-line);color:var(--amber-hi)}

/* 全站优惠提示：NP 原生绿色 msgalert 转成主题横幅（内容由 Theme.php 重写为 .n8-promo） */
body.n8 .n8-promo{
  background:rgba(63,191,111,.10);border:1px solid rgba(63,191,111,.35);border-radius:12px;
  padding:10px 20px;margin:0 auto 16px;text-align:center;font-size:13px;line-height:1.7;
  color:var(--text);max-width:960px;
}
body.n8 .n8-promo::before{
  content:'';display:inline-block;width:8px;height:8px;border-radius:50%;background:#3fbf6f;
  box-shadow:0 0 6px rgba(63,191,111,.6);margin-right:8px;vertical-align:0;
}
body.n8 .n8-promo font{color:var(--text)!important;font-size:inherit}
body.n8 .n8-promo a{color:var(--text);text-decoration:none;cursor:pointer}
body.n8 .n8-promo a:hover{color:var(--amber-hi)}
body.n8 .n8-promo b{font-weight:600}

/* 版主操作：独立模块（版主行从帖子表抽离后的容器） */
body.n8-pg-forums .n8-modbar{
  display:flex;align-items:center;gap:10px;flex-wrap:wrap;
  background:var(--panel);border:1px solid var(--line);border-radius:var(--r);
  padding:10px 16px;margin:12px 0 16px;
}
body.n8-pg-forums .n8-modbar-t{color:var(--amber-hi);font-size:12px;font-weight:600;letter-spacing:.05em}
body.n8-pg-forums .n8-modbar table,body.n8-pg-forums .n8-modbar tbody,body.n8-pg-forums .n8-modbar tr{display:contents}
body.n8-pg-forums .n8-modbar td{border:0!important;padding:0!important;background:transparent!important;font-size:12px;color:var(--text-2);display:inline-flex;align-items:center;gap:6px}
body.n8-pg-forums .n8-modbar input[type=submit]{
  background:var(--panel-3);border:1px solid var(--line);border-radius:999px;color:var(--text-2);
  font-size:12px;padding:0 13px;height:28px;cursor:pointer;transition:border-color .14s,color .14s;
}
body.n8-pg-forums .n8-modbar input[type=submit]:hover{border-color:var(--amber-line);color:var(--amber-hi)}
body.n8-pg-forums .n8-modbar select{
  background:var(--panel-3);border:1px solid var(--line);border-radius:8px;color:var(--text);
  font-size:12px;padding:4px 8px;outline:none;
}

/* 楼层之间分割线 */
body.n8-pg-forums .n8-content > table > tbody > tr > td.text{border-bottom:1px solid var(--line)!important;padding-bottom:14px!important}
body.n8-pg-forums .n8-content > table > tbody > tr:last-child > td.text{border-bottom:0}
/* 楼层分割线：每层楼是 td.text 里的「div(楼层头)+table.main(内容)」，给楼层头加上边线 */
body.n8-pg-forums table.main td.text > div{border-top:1px solid var(--line);padding-top:14px;margin-top:6px}
body.n8-pg-forums table.main td.text > div:first-child{border-top:0;padding-top:0;margin-top:0}

/* 快速回复：与种子回复框一致（整宽居中、textarea 撑满） */
body.n8-pg-forums .n8-content > table:has(textarea[name="body"]){width:100%!important;margin:16px 0 20px}
body.n8-pg-forums form:has(textarea[name="body"]):not(:has(#editorouter)){max-width:880px;margin:0 auto}
body.n8-pg-forums textarea[name="body"]{
  width:100%!important;min-height:120px;resize:vertical;
  background:var(--panel-2);border:1px solid var(--line);border-radius:10px;
  color:var(--text);padding:10px 12px;font-size:13px;line-height:1.7;outline:none;
}
body.n8-pg-forums textarea[name="body"]:focus{border-color:var(--amber-line)}
body.n8-pg-forums form:has(textarea[name="body"]):not(:has(#editorouter)) input[type=submit]{
  background:var(--panel-3);border:1px solid var(--amber-line);border-radius:999px;color:var(--amber-hi);
  font-size:12px;padding:0 22px;height:30px;cursor:pointer;margin-top:8px;
}
body.n8-pg-forums form:has(textarea[name="body"]):not(:has(#editorouter)) input[type=submit]:hover{background:var(--amber-soft)}

/* ===== 论坛首页 + 分区页美化（标题 / 导航 / 分类头 / 版块行 / 统计卡） ===== */
/* 大标题：宋体标题字 + 琥珀竖条；"-->" 由 JS 换成 › 面包屑分隔；下方不再画分割线 */
body.n8-pg-forums .n8-content td.embedded > h1{
  font-family:var(--serif);font-size:20px;font-weight:600;letter-spacing:.08em;color:var(--text);
  text-align:left;margin:0 0 18px;padding:4px 0 6px 14px;line-height:1.4;
  border-left:3px solid var(--amber);border-bottom:0;
}
body.n8-pg-forums .n8-content td.embedded > h1 .n8-crumb{color:var(--text-3);font-weight:400;margin:0 7px}
/* 「数据」等面板小标题：与大标题同字体体系 */
body.n8-pg-forums .n8-content td.embedded > h2{
  font-family:var(--serif);font-size:14.5px;letter-spacing:.08em;
}
body.n8-pg-forums .n8-content td.embedded > h1 a{color:var(--text);font-family:inherit;font-size:inherit}
body.n8-pg-forums .n8-content td.embedded > h1 a:hover{color:var(--amber-hi)}
/* 首页导航行（搜索/查看未读/全部设置已读/论坛管理）：竖线分隔 → 胶囊按钮组 */
body.n8-pg-forums .n8-content td.embedded > p:has(> a[href*="action=search"]){
  text-align:left;font-size:0;margin:0 0 20px;
}
body.n8-pg-forums .n8-content td.embedded > p:has(> a[href*="action=search"]) > a{
  display:inline-flex;align-items:center;font-size:12px;height:30px;padding:0 15px;margin-right:8px;
  border-radius:999px;color:var(--text-2);background:var(--panel-3);border:1px solid var(--line);
  transition:border-color .14s,color .14s;
}
body.n8-pg-forums .n8-content td.embedded > p:has(> a[href*="action=search"]) > a:hover{
  border-color:var(--amber-line);color:var(--amber-hi);
}
/* 分类头行 + 列表头 */
body.n8-pg-forums .n8-content td.colhead{
  background:var(--panel-2);color:var(--text-3);font-size:11px;letter-spacing:.4px;padding:8px 10px;
}
body.n8-pg-forums .n8-content td.colhead[width="99%"]{
  color:var(--amber-hi);font-size:12px;font-weight:600;letter-spacing:.5px;
  padding:10px 14px;border-left:2px solid var(--amber);text-align:left;
}
/* 分类头英文段（"站务 . depot" 的 depot）：由 JS 拆出，弱化为辅助字 */
body.n8-pg-forums .n8-content td.colhead[width="99%"] .n8-cat-en{
  color:var(--text-3);font-weight:400;font-size:11px;letter-spacing:1.2px;margin-left:8px;
}
/* 大区之间：只留间距，不画线（第一个大区不需要额外间距） */
body.n8-pg-forums .n8-content td.embedded > table > tbody > tr:not(:first-child) > td.colhead{
  padding-top:16px;
}
body.n8-pg-forums .n8-content td.embedded > table > tbody > tr:has(+ tr > td.colhead) > td.rowfollow{padding-bottom:14px}
/* 大区标题行下方：通栏发丝线，往下压（贴近版块行、远离标题文字） */
body.n8-pg-forums .n8-content td.embedded > table > tbody > tr:has(> td.colhead[width="99%"]) > td.colhead{
  border-bottom:1px solid var(--line);padding-bottom:16px;
}
/* 版块行之间：内缩发丝线（不到边），下一个仍是版块行时才画（大区标题行除外） */
body.n8-pg-forums .n8-content td.embedded > table > tbody > tr:has(+ tr > td.rowfollow):not(:has(> td.colhead)){
  background-image:linear-gradient(var(--line),var(--line));
  background-repeat:no-repeat;background-position:center bottom;
  background-size:calc(100% - 32px) 1px;
}
/* 版块行：悬浮 + 名称/描述层级 */
body.n8-pg-forums .n8-content td.rowfollow{vertical-align:middle;font-variant-numeric:tabular-nums}
body.n8-pg-forums .n8-content td.rowfollow:hover{background:var(--hover)}
body.n8-pg-forums .n8-content td.rowfollow font.big{
  font-family:var(--serif);font-size:15px;font-weight:600;color:var(--text);letter-spacing:.04em;
}
/* 版块名英文段（"公告区 . Announcement" 的 Announcement）：由 JS 拆出，弱化 */
body.n8-pg-forums .n8-content font.big .n8-b-en{
  color:var(--text-3);font-weight:500;font-size:12.5px;letter-spacing:.5px;margin-left:7px;font-family:var(--sans);
}
body.n8-pg-forums .n8-content td.rowfollow a:hover font.big{color:var(--amber-hi)}
body.n8-pg-forums .n8-content td.rowfollow td.embedded{font-size:12px;color:var(--text-3);line-height:1.6}
/* 统计卡（底部 用户共发布…）：JS 加 .n8-fstats */
body.n8-pg-forums .n8-content td.n8-fstats{
  background:var(--panel-2);border:1px solid var(--line);border-radius:12px;
  padding:14px 18px;margin:6px 0;font-size:12px;color:var(--text-3);line-height:2;
}
body.n8-pg-forums .n8-content td.n8-fstats b{color:var(--amber-hi);margin:0 2px}
/* 分区页：快速搜索输入框 */
body.n8-pg-forums .n8-content input[type="text"]{
  background:var(--in);border:1px solid var(--line);border-radius:8px;color:var(--text);
  padding:6px 12px;font-size:12px;
}
body.n8-pg-forums .n8-content input[type="text"]:focus{outline:none;border-color:var(--amber-line)}

/* ===== 论坛搜索页：旧浅色搜索组件主题化 ===== */
body.n8-pg-forums .n8-content div.search{
  background:var(--panel-2);border:1px solid var(--line);border-radius:14px;
  width:600px;max-width:100%;height:auto;margin:70px auto;padding:24px 28px 28px;
  box-shadow:var(--shadow);
}
body.n8-pg-forums .n8-content div.search > div{margin:0!important}
body.n8-pg-forums .n8-content .search_title{
  background:transparent!important;color:var(--amber-hi);font-size:13px;letter-spacing:.5px;
  padding:0 0 0 12px!important;border-left:3px solid var(--amber);margin-bottom:16px;
}
body.n8-pg-forums .n8-content .search_table{background:transparent!important;border:none!important}
body.n8-pg-forums .n8-content .search_table td{border:0!important;color:var(--text-2);font-size:12px;padding:4px 0}
body.n8-pg-forums .n8-content #search_form input[type="text"]{height:36px;width:100%!important;border-radius:9px}
body.n8-pg-forums .n8-content #search_form input[name="keywords"]{width:100%!important}
body.n8-pg-forums .n8-content #search_form button[type="submit"]{
  height:36px;padding:0 26px;border-radius:999px;border:1px solid var(--amber-line);
  background:var(--amber-soft);color:var(--amber-hi);font-size:12px;cursor:pointer;margin-left:10px;
}
body.n8-pg-forums .n8-content #search_form button[type="submit"]:hover{background:rgba(231,178,92,.22)}

/* ===== 搜索结果列表打磨 ===== */
body.n8-pg-forums .n8-content table:has(> tbody > tr > td.colhead[width="70%"]) td.colhead{text-align:left;padding:9px 12px}
body.n8-pg-forums .n8-content table:has(> tbody > tr > td.colhead[width="70%"]) td.rowfollow{
  padding:10px 12px;font-size:13px;
}
body.n8-pg-forums .n8-content table:has(> tbody > tr > td.colhead[width="70%"]) td.rowfollow > a{color:var(--text)}
body.n8-pg-forums .n8-content table:has(> tbody > tr > td.colhead[width="70%"]) td.rowfollow > a:hover{color:var(--amber-hi)}
body.n8-pg-forums .n8-content table:has(> tbody > tr > td.colhead[width="70%"]) td.rowfollow > a b{font-weight:600}
/* 匹配关键词高亮保持琥珀色 */
body.n8-pg-forums .n8-content font.striking{color:var(--amber-hi)!important}
body.n8-pg-forums .n8-content table:has(> tbody > tr > td.colhead[width="70%"]) td.rowfollow[width="1%"]{color:var(--text-3);font-size:12px}

/* ==================== 列表页码条 + 无限滚动（参考 Those 站交互） ==================== */
body.n8 .n8-pager{
  display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap;
  margin:16px auto 6px;padding:10px 18px;max-width:960px;
  background:var(--panel);border:1px solid var(--line);border-radius:12px;
}
body.n8 .n8-pg-total,body.n8 .n8-pager .n8-pg-loaded{font-size:12px;color:var(--text-2);white-space:nowrap;font-variant-numeric:tabular-nums}
@media(max-width:1100px){body.n8 .n8-pager .n8-pg-loaded{display:none}}
body.n8 .n8-pg-btns{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:center}
body.n8 .n8-pg-btns .pbtn{
  min-width:30px;height:30px;padding:0 9px;border-radius:8px;cursor:pointer;
  border:1px solid var(--line-2);background:transparent;color:var(--text-2);
  font-size:12.5px;font-variant-numeric:tabular-nums;transition:border-color .14s,color .14s,background .14s;
}
body.n8 .n8-pg-btns .pbtn:hover:not(:disabled){border-color:var(--amber-line);color:var(--amber-hi);background:var(--amber-soft)}
body.n8 .n8-pg-btns .pbtn.cur{background:var(--amber-soft);border-color:var(--amber-line);color:var(--amber-hi);font-weight:600;cursor:default}
body.n8 .n8-pg-btns .pbtn:disabled:not(.cur){opacity:.38;cursor:default}
body.n8 .n8-pg-btns .pdots{color:var(--text-3);font-size:12px;padding:0 2px}
body.n8 .n8-pg-jump{display:flex;align-items:center;gap:7px;font-size:12px;color:var(--text-3)}
body.n8 .n8-pg-jump input{
  width:54px;height:30px;background:var(--in);border:1px solid var(--line);border-radius:8px;
  color:var(--text);text-align:center;font-size:12.5px;outline:0;transition:border-color .14s;
}
body.n8 .n8-pg-jump input:focus{border-color:var(--amber-line)}
body.n8 .n8-pg-jump button{
  height:30px;padding:0 12px;border-radius:8px;border:1px solid var(--line-2);
  background:transparent;color:var(--text-2);font-size:12px;cursor:pointer;transition:border-color .14s,color .14s;
}
body.n8 .n8-pg-jump button:hover{border-color:var(--amber-line);color:var(--amber-hi)}
body.n8 .n8-more{display:block;visibility:hidden;text-align:center;padding:12px 0 4px;color:var(--text-3);font-size:12px;letter-spacing:.04em;min-height:18px}
body.n8 .n8-more.show{visibility:visible}
body.n8 .n8-more.done{color:var(--text-3);opacity:.75}
body.n8 .n8-more:not(.done){cursor:progress}
body.n8 .n8-more.show:not(.done)::before{
  content:'';display:inline-block;width:12px;height:12px;margin-right:8px;vertical-align:-2px;
  border:2px solid var(--line-2);border-top-color:var(--amber);border-radius:50%;
  animation:n8spin .7s linear infinite;
}
/* 浮动分页（两种形态，参考 Those 站）：
   默认 = 底部居中迷你胶囊（‹ x / y ›，带上一页/下一页）；点击中间 → 展开底部悬浮完整分页条（含 停止/开始滚动 开关）；
   滚回页面顶部或真实分页条可见时自动隐藏；居中放置以避开站点右下角自带的返回顶部按钮 */
body.n8 .n8-float-mini{
  position:fixed;left:50%;bottom:16px;z-index:900;
  display:flex;align-items:center;gap:2px;padding:4px 6px;border-radius:999px;
  background:color-mix(in srgb,var(--panel) 90%,transparent);backdrop-filter:blur(12px);
  border:1px solid var(--line-2);box-shadow:0 6px 20px rgba(0,0,0,.35);
  transform:translateX(-50%) translateY(46px);
  opacity:0;pointer-events:none;
  transition:transform .22s ease,opacity .22s ease;
}
body.n8 .n8-float-mini.show{transform:translateX(-50%) translateY(0);opacity:1;pointer-events:auto}
body.n8 .n8-float-mini .fm-btn{
  width:24px;height:24px;border-radius:999px;cursor:pointer;flex:none;
  border:0;background:transparent;color:var(--text-3);font-size:14px;line-height:1;
  transition:color .14s,background .14s;
}
body.n8 .n8-float-mini .fm-btn:hover:not(:disabled){color:var(--amber-hi);background:var(--amber-soft)}
body.n8 .n8-float-mini .fm-btn:disabled{opacity:.35;cursor:default}
body.n8 .n8-float-mini .fm-cur{
  padding:0 8px;cursor:pointer;white-space:nowrap;
  color:var(--text);font-size:12px;font-variant-numeric:tabular-nums;
}
body.n8 .n8-float-mini:hover .fm-cur{color:var(--amber-hi)}
body.n8 .n8-float-bar{
  position:fixed;left:50%;bottom:14px;transform:translate(-50%,86px);z-index:900;
  display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:nowrap;
  width:min(920px,calc(100vw - 24px));padding:9px 12px;
  background:color-mix(in srgb,var(--panel) 92%,transparent);backdrop-filter:blur(16px);
  border:1px solid var(--line-2);border-radius:12px;box-shadow:0 12px 36px rgba(0,0,0,.45);
  opacity:0;pointer-events:none;transition:transform .24s ease,opacity .24s ease;
}
body.n8 .n8-float-bar.show{transform:translate(-50%,0);opacity:1;pointer-events:auto}
body.n8 .n8-float-bar .n8-pg-total,body.n8 .n8-float-bar .n8-pg-loaded{
  white-space:nowrap;flex:none;font-size:12px;color:var(--text-2);
  font-variant-numeric:tabular-nums;
}
body.n8 .n8-float-bar .n8-pg-btns{flex-wrap:nowrap;flex:none}
body.n8 .n8-float-bar .n8-pg-btns .pbtn{flex:none}
body.n8 .n8-float-bar .n8-pg-jump{flex:none}
body.n8 .n8-float-bar .fbar-close{
  width:26px;height:26px;border-radius:8px;cursor:pointer;flex:none;
  border:1px solid var(--line-2);background:transparent;color:var(--text-3);
  font-size:12px;line-height:1;transition:border-color .14s,color .14s;
}
body.n8 .n8-float-bar .fbar-close:hover{border-color:var(--amber-line);color:var(--amber-hi)}
/* 停止/开始滚动开关：真实分页条/悬浮条/迷你胶囊共用同款样式（胶囊上为纯图标） */
body.n8 .n8-pager .fbar-auto,
body.n8 .n8-float-bar .fbar-auto{
  height:30px;padding:0 12px;border-radius:8px;cursor:pointer;flex:none;white-space:nowrap;
  border:1px solid var(--line-2);background:transparent;color:var(--text-2);
  font-size:12px;line-height:1;font-variant-numeric:tabular-nums;
  transition:border-color .14s,color .14s,background .14s;
}
body.n8 .n8-pager .fbar-auto:hover:not(:disabled),
body.n8 .n8-float-bar .fbar-auto:hover:not(:disabled){border-color:var(--amber-line);color:var(--amber-hi)}
body.n8 .n8-pager .fbar-auto.off,
body.n8 .n8-float-bar .fbar-auto.off{
  background:var(--amber-soft);border-color:var(--amber-line);color:var(--amber-hi);
}
body.n8 .n8-pager .fbar-auto:disabled,
body.n8 .n8-float-bar .fbar-auto:disabled{opacity:.38;cursor:default}
/* 迷你胶囊上的开关：纯图标小圆钮 */
body.n8 .n8-float-mini .fm-auto{
  width:26px;height:26px;padding:0;border-radius:999px;cursor:pointer;flex:none;
  border:1px solid var(--line-2);background:transparent;color:var(--text-2);
  font-size:12px;line-height:1;transition:border-color .14s,color .14s,background .14s;
}
body.n8 .n8-float-mini .fm-auto:hover:not(:disabled){border-color:var(--amber-line);color:var(--amber-hi)}
body.n8 .n8-float-mini .fm-auto.off{
  background:var(--amber-soft);border-color:var(--amber-line);color:var(--amber-hi);
}
body.n8 .n8-float-mini .fm-auto:disabled{opacity:.38;cursor:default}
@media(max-width:1100px){body.n8 .n8-float-bar .n8-pg-loaded{display:none}}
@media(max-width:960px){body.n8 .n8-float-bar .n8-pg-jump{display:none}}
@media(max-width:760px){
  body.n8 .n8-float-mini{bottom:12px}
  body.n8 .n8-float-bar{gap:8px;padding:8px 10px}
}

@keyframes n8spin{to{transform:rotate(360deg)}}

/* ==================== 给管理组发短讯（contactstaff.php）/ 发布公告（news.php?action=new）/ 趣味内容（fun.php?action=new） ==================== */
body.n8-pg-contactstaff .n8-content h1,
body.n8-pg-news .n8-content h1,
body.n8-pg-fun  .n8-content h1,
body.n8-pg-forums:has(#editorouter) .n8-content h1{
  font-family:var(--serif);font-size:20px;font-weight:600;letter-spacing:.1em;text-align:center;
  color:var(--text);margin:8px 0 20px;
}
body.n8-pg-contactstaff .n8-content h2,
body.n8-pg-news .n8-content h2,
body.n8-pg-fun  .n8-content h2,
body.n8-pg-forums:has(#editorouter) .n8-content h2{
  font-family:var(--serif);font-size:15px;font-weight:600;color:var(--text);
  border-left:3px solid var(--amber);padding-left:12px;margin:4px 0 14px;text-align:left;
}
/* BBCode 工具条按钮：胶囊化统一 */
body.n8-pg-contactstaff .n8-content input[type=button]:not(#previewbutton):not(#unpreviewbutton),
body.n8-pg-news .n8-content input[type=button]:not(#previewbutton):not(#unpreviewbutton),
body.n8-pg-fun  .n8-content input[type=button]:not(#previewbutton):not(#unpreviewbutton),
body.n8-pg-forums:has(#editorouter) .n8-content input[type=button]:not(#previewbutton):not(#unpreviewbutton){
  background:var(--amber-soft);border:1px solid var(--line-2);color:var(--amber-hi);
  border-radius:999px;padding:4px 12px;font-size:11px;cursor:pointer;
  transition:border-color .14s,background .14s;
}
body.n8-pg-contactstaff .n8-content input[type=button]:not(#previewbutton):not(#unpreviewbutton):hover,
body.n8-pg-news .n8-content input[type=button]:not(#previewbutton):not(#unpreviewbutton):hover,
body.n8-pg-fun  .n8-content input[type=button]:not(#previewbutton):not(#unpreviewbutton):hover,
body.n8-pg-forums:has(#editorouter) .n8-content input[type=button]:not(#previewbutton):not(#unpreviewbutton):hover{border-color:var(--amber-line);background:var(--panel-3)}
/* 正文编辑区：撑满、暗色、保留右下角拖拽改大小 */
body.n8-pg-contactstaff #editorouter textarea,
body.n8-pg-news #editorouter textarea,
body.n8-pg-fun  #editorouter textarea,
body.n8-pg-forums:has(#editorouter) #editorouter textarea{
  width:100%!important;min-height:110px;resize:vertical;background:var(--in);
  font-size:13px;line-height:1.7;
}
/* 附件上传条 iframe 行 */
body.n8-pg-contactstaff iframe[src*="attachment.php"],
body.n8-pg-news iframe[src*="attachment.php"],
body.n8-pg-fun  iframe[src*="attachment.php"],
body.n8-pg-forums:has(#editorouter) iframe[src*="attachment.php"]{border-radius:8px}
/* 表情面板：卡片化 */
body.n8-pg-contactstaff td.embedded:has(> a[href^="javascript: SmileIT"]),
body.n8-pg-news td.embedded:has(> a[href^="javascript: SmileIT"]),
body.n8-pg-fun  td.embedded:has(> a[href^="javascript: SmileIT"]),
body.n8-pg-forums:has(#editorouter) td.embedded:has(> a[href^="javascript: SmileIT"]){
  background:var(--panel-2);border:1px solid var(--line);border-radius:10px;padding:10px!important;
}
body.n8-pg-contactstaff a[href^="javascript: SmileIT"] img,
body.n8-pg-news a[href^="javascript: SmileIT"] img,
body.n8-pg-fun  a[href^="javascript: SmileIT"] img,
body.n8-pg-forums:has(#editorouter) a[href^="javascript: SmileIT"] img{border-radius:4px;transition:transform .12s}
body.n8-pg-contactstaff a[href^="javascript: SmileIT"]:hover img,
body.n8-pg-news a[href^="javascript: SmileIT"]:hover img,
body.n8-pg-fun  a[href^="javascript: SmileIT"]:hover img,
body.n8-pg-forums:has(#editorouter) a[href^="javascript: SmileIT"]:hover img{transform:scale(1.15)}
/* 提交/预览按钮组 */
body.n8-pg-contactstaff p[align="center"],
body.n8-pg-news p[align="center"],
body.n8-pg-fun  p[align="center"],
body.n8-pg-forums:has(#editorouter) p[align="center"]{margin:16px 0 6px}


/* 预览 / 编辑 按钮：与「提交」按钮完全一致（btn2 原生灰样式压掉） */
.n8-content input#previewbutton,
.n8-content input#unpreviewbutton{
  height:32px;padding:0 14px;border-radius:8px;border:1px solid var(--amber-line);
  background:var(--amber-soft);color:var(--amber-hi);font-size:12px;font-weight:500;
  letter-spacing:.03em;cursor:pointer;transition:.16s;white-space:nowrap;margin-left:8px;
}
.n8-content input#previewbutton:hover,
.n8-content input#unpreviewbutton:hover{
  background:linear-gradient(160deg,#f0c77c,#cf8f42);color:#20160a;border-color:transparent;
}

/* 发布/回复编辑页：行悬浮不再给白色透明底（鼠标扫过正文时不闪灰块） */
body.n8-pg-contactstaff .n8-content table.main tr:hover > td.rowfollow,
body.n8-pg-news .n8-content table.main tr:hover > td.rowfollow,
body.n8-pg-fun .n8-content table.main tr:hover > td.rowfollow,
body.n8-pg-forums:has(#editorouter) .n8-content table.main tr:hover > td.rowfollow,
body.n8-pg-contactstaff .n8-content td.rowfollow:hover,
body.n8-pg-news .n8-content td.rowfollow:hover,
body.n8-pg-fun .n8-content td.rowfollow:hover,
body.n8-pg-forums:has(#editorouter) .n8-content td.rowfollow:hover{background:transparent!important}
/* ==================== 签到页（attendance.php） ==================== */
/* 面板标题（签到成功）：居中、金色主题字（选择器压过全局 .n8-content td.embedded > h2） */
body.n8-pg-attendance .n8-content td.embedded > h2,
body.n8-pg-attendance .n8-content h2{
  font-family:var(--serif);font-size:16px;font-weight:600;color:var(--amber-hi);
  border-left:0;padding-left:0;margin:6px 0 14px;
  justify-content:center;text-align:center;
}
body.n8-pg-attendance .n8-content > table.main:has(td.text){
  background:var(--panel);border:1px solid var(--line);border-radius:12px;max-width:860px;
  margin:0 auto; /* 整页收窄成统一纵向栏（旧 DOM width=1200 默认左对齐，右侧留一大条空白） */
}
/* 左右布局：左=日历（457），右=统计卡片+补签提示+规则说明 */
body.n8-pg-attendance .n8-att-cols{display:flex;gap:0;align-items:stretch;justify-content:center}
body.n8-pg-attendance .n8-att-left{flex:none;max-width:457px}
body.n8-pg-attendance .n8-att-right{flex:1;min-width:0;max-width:386px;
  margin-left:8px;padding-left:8px;border-left:1px solid var(--line);
  display:flex;flex-direction:column}
body.n8-pg-attendance .n8-att-right .n8-att-stats{flex-direction:row;flex-wrap:nowrap;gap:6px;margin:2px 0 10px}
body.n8-pg-attendance .n8-att-right .n8-att-stats .st{
  flex:1 1 0;min-width:0;max-width:none;
  flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:9px 2px;border-radius:10px;
}
body.n8-pg-attendance .n8-att-right .n8-att-stats .st .v{font-size:21px;white-space:nowrap}
body.n8-pg-attendance .n8-att-right .n8-att-stats .st .v i{font-size:12px}
body.n8-pg-attendance .n8-att-right .n8-att-stats .st .k{margin-top:4px;font-size:12.5px;letter-spacing:0;white-space:nowrap}
body.n8-pg-attendance .n8-att-right .n8-att-note{text-align:left;margin:0 0 4px;line-height:1.7}
body.n8-pg-attendance .n8-att-right ul{max-width:none;margin:10px 0 12px!important;padding:12px 14px 12px 28px!important;font-size:11.5px;line-height:1.8}
/* 广告位×3：整组贴右栏底部，每个与日历一行同高平行 */
body.n8-pg-attendance .n8-att-ads{margin-top:auto;display:flex;flex-direction:column;gap:3px;flex:none}
body.n8-pg-attendance .n8-att-ad{
  height:65px;min-height:0;flex:none;
  border:1px dashed var(--line);border-radius:10px;
  display:flex;align-items:center;justify-content:center;
  color:var(--text-3);font-size:12px;letter-spacing:.25em;
}
/* 窄屏回退为上下堆叠 */
@media (max-width:760px){
  body.n8-pg-attendance .n8-att-cols{flex-direction:column;align-items:center}
  body.n8-pg-attendance .n8-att-right{max-width:457px;width:100%;
    margin-left:0;padding-left:0;border-left:0;margin-top:14px;padding-top:14px;border-top:1px solid var(--line)}
  body.n8-pg-attendance .n8-att-ads{margin-top:12px}
  body.n8-pg-attendance .n8-att-ad{height:auto;min-height:80px}
}
/* 签到统计：数字卡片行 */
body.n8-pg-attendance .n8-att-stats{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin:4px 0 2px}
body.n8-pg-attendance .n8-att-stats .st{
  flex:1;min-width:108px;max-width:150px;padding:14px 8px 12px;border-radius:12px;text-align:center;
  background:var(--panel-2);border:1px solid var(--line);
}
body.n8-pg-attendance .n8-att-stats .st .v{
  display:block;font-family:var(--serif);font-size:24px;font-weight:600;color:var(--amber-hi);
  line-height:1.15;font-variant-numeric:tabular-nums;
}
body.n8-pg-attendance .n8-att-stats .st .v i{font-style:normal;font-size:12px;color:var(--text-3);margin-left:2px;font-weight:400}
body.n8-pg-attendance .n8-att-stats .st .k{display:block;margin-top:5px;font-size:11.5px;color:var(--text-3);letter-spacing:.05em}
body.n8-pg-attendance .n8-att-note{margin:2px 0 2px;text-align:center;font-size:12px;color:var(--text-3)}
body.n8-pg-attendance .n8-att-note b{color:var(--amber-hi)}
/* 日历容器：7×65 正方形格子 + 2px 外框 = 457px */
body.n8-pg-attendance #calendar{width:min(457px,100%)!important}
body.n8-pg-attendance .n8-content td.embedded div[style*="justify-content: center"]{padding:4px 0!important}
/* 提示行到日历标题之间的夹层 padding 一并收窄 */
body.n8-pg-attendance .n8-content > table.main:has(td.text) td.embedded{padding-bottom:4px!important}
body.n8-pg-attendance .n8-content td.text p{font-size:13px;line-height:1.9;color:var(--text-2);margin:2px 0}
body.n8-pg-attendance .n8-content td.text b{color:var(--amber-hi);font-weight:600}
/* FullCalendar 主题变量 + 控件 */
body.n8-pg-attendance .fc{
  --fc-border-color:var(--line);
  --fc-page-bg-color:transparent;
  --fc-neutral-bg-color:transparent;
  --fc-today-bg-color:rgba(231,178,92,.10);
  --fc-event-border-color:#3fbf6f;
  --fc-event-bg-color:transparent;
  --fc-button-bg-color:transparent;
  --fc-button-border-color:var(--line-2);
  --fc-button-text-color:var(--text-2);
  --fc-button-hover-bg-color:var(--amber-soft);
  --fc-button-hover-border-color:var(--amber-line);
  --fc-button-hover-text-color:var(--amber-hi);
  --fc-button-active-bg-color:var(--amber-soft);
  --fc-button-active-border-color:var(--amber-line);
  --fc-button-active-text-color:var(--amber-hi);
  max-width:457px;margin:5px auto 10px;
}
body.n8-pg-attendance .fc .fc-toolbar-title{
  font-family:var(--serif);font-size:15px;font-weight:600;letter-spacing:.06em;color:var(--text);
  border-bottom:0;padding-bottom:0; /* 站点 theme.css 的 h1,h2 通配下边线，去掉 */
}
/* 对齐：星期表头 / 日期数字 / 魔力数字 / 绿点 / 补字 全部落在格子竖直中轴上 */
body.n8-pg-attendance .fc .fc-daygrid-day-top{display:flex;justify-content:center;flex-direction:row;margin:0 2px!important}
body.n8-pg-attendance .fc .fc-daygrid-day-bottom{display:none!important}
/* 补签标记：左绿点、右"补"字，整体水平居中；空标题（纯绿点日）隐藏占位文字 */
body.n8-pg-attendance .fc .fc-daygrid-dot-event{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:4px}
body.n8-pg-attendance .fc .fc-daygrid-event-dot{margin:0}
body.n8-pg-attendance .fc .fc-daygrid-dot-event .fc-event-title{flex:none}
body.n8-pg-attendance .fc .fc-event-title:empty{display:none}
/* 魔力数字胶囊：文字水平居中 */
body.n8-pg-attendance .fc .fc-daygrid-block-event .fc-event-main{display:flex;justify-content:center}
body.n8-pg-attendance .fc .fc-daygrid-block-event .fc-event-title{text-align:center}
/* 表头错位的真正根源：FC 把星期行做成嵌套内表，其外层 .fc-scroller 被写死成 439px（主体 455px），
   导致表头呈渐变式错位（首列偏右、末列偏左）；连同内表一起强制铺满，再让 th 文字居中 */
body.n8-pg-attendance .fc .fc-scrollgrid{border-collapse:collapse!important;border-spacing:0!important}
body.n8-pg-attendance .fc .fc-scrollgrid-section-header .fc-scroller{width:100%!important}
body.n8-pg-attendance .fc .fc-scrollgrid-section-header > th{padding:0!important}
body.n8-pg-attendance .fc table.fc-col-header{width:100%!important}
body.n8-pg-attendance .fc .fc-col-header-cell{padding:2px 0!important;text-align:center!important}
/* 标题行与表头之间统一收窄到 8px */
body.n8-pg-attendance .fc .fc-toolbar{margin-bottom:8px}
/* 签到日底色统一：所有已签到日同款绿（含今日），不再受 fc-event-past/today 类名影响 */
body.n8-pg-attendance .fc .fc-bg-event{background:#8fdf82!important;opacity:.3!important}
/* 绿底块必须铺满整个格子：FC 的 bg-harness 只给了 left/right，5/6 等只有胶囊没有补点的日子色块上头被削掉一截 */
body.n8-pg-attendance .fc .fc-daygrid-bg-harness{position:absolute!important;inset:0!important}
body.n8-pg-attendance .fc .fc-bg-event{position:absolute!important;top:0!important;bottom:0!important;left:0!important;right:0!important;width:100%!important;height:100%!important;border-radius:0}
body.n8-pg-attendance .fc .fc-day-today{--fc-today-bg-color:transparent}
/* 日历外框补全：FC 默认把右/下外边交给单元格画，但主题全局清零了 td 边框，导致只剩上/左两条外边 */
body.n8-pg-attendance .fc .fc-scrollgrid{border:1px solid var(--fc-border-color)!important;border-radius:8px;overflow:hidden}
body.n8-pg-attendance .fc .fc-button{border-radius:7px;font-size:11px;padding:3px 8px;text-transform:none;box-shadow:none}
body.n8-pg-attendance .fc .fc-button:disabled{opacity:.35;background:transparent;border-color:var(--line);color:var(--text-3)}
body.n8-pg-attendance .fc .fc-col-header-cell-cushion{color:var(--text-3);font-size:11px;padding:2px 2px;text-decoration:none}
body.n8-pg-attendance .fc .fc-daygrid-day-number{color:var(--text-2);font-size:11.5px;line-height:1;padding:3px 4px;text-decoration:none;transition:color .12s}
body.n8-pg-attendance .fc .fc-daygrid-day-number:hover{color:var(--amber-hi)}
body.n8-pg-attendance .fc .fc-day-today .fc-daygrid-day-number{color:var(--amber-hi);font-weight:600}
body.n8-pg-attendance .fc .fc-daygrid-event-dot{border-color:#3fbf6f}
/* 65×65 正方形格子：统一行高、frame 撑满、事件列竖排居中 */
body.n8-pg-attendance .fc td.fc-daygrid-day{height:65px;padding:0!important}
body.n8-pg-attendance .fc .fc-daygrid-day-frame{height:100%;overflow:hidden}
body.n8-pg-attendance .fc .fc-daygrid-day-events{display:flex;flex-direction:column;align-items:center;min-height:0!important;margin-top:0!important;padding:0 2px 2px}
body.n8-pg-attendance .fc .fc-daygrid-event-harness{margin-top:1px}
body.n8-pg-attendance .fc .fc-event-title{font-size:11px;line-height:1.25}
body.n8-pg-attendance .fc .fc-daygrid-event{padding:0 4px;border-radius:4px}
/* 签到获得魔力值的当日格子（站点内联绿色/蓝色块）统一成主题绿 */
body.n8-pg-attendance .fc .fc-daygrid-day[style*="background"]{border-radius:8px}
/* 页尾签到规则列表 */
body.n8-pg-attendance .n8-content ul{
  max-width:640px;margin:16px auto 6px;padding:14px 18px 14px 34px;
  background:var(--panel-2);border:1px solid var(--line);border-radius:12px;
  font-size:12.5px;line-height:1.9;color:var(--text-2);
}
body.n8-pg-attendance .n8-content ul li{margin:3px 0}
body.n8-pg-attendance .n8-content ul li::marker{color:var(--amber)}
body.n8-pg-attendance .n8-content ul ol{margin:4px 0 0;padding-left:18px}

/* ══════════════════════════════════════════════════════════════════════════
   iframe 面板页（attachment.php 编辑器附件条等，body.inframe，CSS-only 注入）
   深色编辑器里不能嵌原始浅色控件条；控件配色与主题表单一致
   ══════════════════════════════════════════════════════════════════════════ */
body.inframe{background:transparent;color:var(--text);font-family:var(--sans);font-size:12px;line-height:1.7;margin:0;padding:0 4px}
body.inframe input[type=file]{height:26px;padding:2px 8px 2px 2px;background:var(--in);border:1px solid var(--line);
  border-radius:7px;color:var(--text);font-size:11.5px;display:inline-flex;align-items:center;max-width:240px;box-sizing:border-box}
body.inframe input[type=file]::file-selector-button{font-family:inherit;font-size:11.5px;height:20px;padding:0 10px;margin:0 8px 0 0;
  border:1px solid var(--amber-line);border-radius:5px;background:var(--amber-soft);color:var(--amber-hi);cursor:pointer}
body.inframe input[type=checkbox],body.inframe input[type=radio]{accent-color:var(--amber);margin:0 4px 0 0;vertical-align:-2px}
body.inframe input[type=submit]{height:26px;padding:0 12px;border:1px solid var(--amber-line);border-radius:7px;
  background:var(--amber-soft);color:var(--amber-hi);font-size:11.5px;font-family:inherit;cursor:pointer}
body.inframe b{color:var(--text-2);font-weight:500}
body.inframe font[color=red],body.inframe .striking{color:var(--red)}
body.inframe i{color:var(--text-3);font-style:normal}

/* ══════════════════════════════════════════════════════════════════════════
   种子列表/专题页 搜索箱（table.searchbox）：单行排版 + 联想下拉主题化
   ══════════════════════════════════════════════════════════════════════════ */
body.n8-pg-torrents table.searchbox td.embedded,
body.n8-pg-special table.searchbox td.embedded{color:var(--text-2);font-size:12.5px;vertical-align:middle;white-space:nowrap}
body.n8-pg-torrents table.searchbox #searchinput,
body.n8-pg-special table.searchbox #searchinput{width:300px!important;height:32px;margin:0}
body.n8-pg-torrents table.searchbox #searchinput::placeholder,
body.n8-pg-special table.searchbox #searchinput::placeholder{color:var(--text-3)}
body.n8-pg-torrents table.searchbox select,
body.n8-pg-special table.searchbox select{margin:0 4px}
body.n8-pg-torrents table.searchbox .n8-sb-go,
body.n8-pg-special table.searchbox .n8-sb-go{margin-left:10px!important}
/* 搜索联想下拉（原白底内联样式，作用于全站用到 suggest 的页面） */
body.n8 #suggestions{width:310px!important;background:var(--panel-2)!important;border:1px solid var(--line-2)!important;
  border-radius:9px;box-shadow:0 10px 26px rgba(0,0,0,.35);padding:4px;box-sizing:border-box;z-index:60;overflow:hidden}
body.n8 #suggestions > div{border-radius:5px;color:var(--text)!important}
body.n8 #suggestions > div.n8-sug-on{background:var(--amber-soft)!important;color:var(--amber-hi)!important}
body.n8 #suggestions table td{border:0!important;background:transparent!important;color:inherit!important;font-size:12px}
body.n8 #suggestions td[align="right"]{color:var(--text-3)!important;font-size:11px}

/* ── 搜索箱展开筛选面板（#ksearchboxmain）：选项间距/颜色/对齐 ── */
#ksearchboxmain td.bottom{padding:3px 14px 3px 0!important}
#ksearchboxmain label{display:inline-flex;align-items:center;gap:5px;white-space:nowrap;margin:0}
#ksearchboxmain label a{color:var(--text-2)!important;text-decoration:none}
#ksearchboxmain label a:hover{color:var(--amber-hi)!important}
#ksearchboxmain input[type=checkbox]{margin:0!important;vertical-align:-2px}
#ksearchboxmain td[colspan] > b:first-child,
#ksearchboxmain tr td:first-child b{color:var(--text);font-weight:600;font-size:12.5px}

/* ── 搜索箱筛选面板：全部分组展开（无折叠交互），选项超宽自动换行 ── */
/* 分组标题行：覆盖站点 theme.css 强制的 tr:flex（那会把行高撑到 58px） */
#ksearchboxmain tr.n8-fg-head{display:table-row!important}
#ksearchboxmain tr.n8-fg-head > td{
  width:100%;white-space:nowrap;padding:11px 10px 6px!important;line-height:1.4;
  color:var(--text-2);font-size:12px;letter-spacing:.02em;
  border-bottom:1px solid var(--line);background:transparent!important;
}
/* 选项行：flex 换行——一行放不下就整块折到下一行，不再挤成上下错位 */
#ksearchboxmain tr.n8-fg-body{
  position:relative;display:flex!important;flex-wrap:wrap;align-items:center;
  padding:7px 10px 9px!important;
}
#ksearchboxmain tr.n8-fg-body > td{
  flex:0 0 auto;display:block!important;width:auto!important;max-width:100%;
  padding:2px 18px 2px 0!important;border:0!important;background:transparent!important;
}
#ksearchboxmain tr.n8-fg-body label{max-width:100%}
/* 全选按钮固定在行尾右侧：选项行预留按钮宽度，选项越过按钮左缘前就整块换行 */
#ksearchboxmain tr.n8-fg-body.n8-fg-has-sel{padding-right:104px!important}
#ksearchboxmain tr.n8-fg-body > td.n8-fg-sel{
  position:absolute;right:12px;top:50%;transform:translateY(-50%);
  padding:0!important;white-space:nowrap;
}
/* 按钮宽度固定，切换「全选/全不选」时不挤压选项 */
#ksearchboxmain tr.n8-fg-body > td.n8-fg-sel input{width:86px!important;box-sizing:border-box}
/* 右侧条件列：加宽并左移靠近左侧模块，选择框/输入框同步加长
   （站点 theme.css 把该行强制成 flex 且两列 flex:5/1 比例，需整体覆盖） */
#ksearchboxmain > tr{display:flex!important;flex-wrap:nowrap;align-items:stretch}
#ksearchboxmain > tr > td.n8-sb-left{flex:1 1 auto!important;width:auto!important;min-width:0!important}
#ksearchboxmain > tr > td.n8-sb-right{flex:0 0 272px!important;width:272px!important;min-width:0!important;padding-left:16px!important}
#ksearchboxmain td.n8-sb-left > table,
#ksearchboxmain td.n8-sb-right > table{width:100%!important}
/* 筛选面板：去掉鼠标悬停时整块出现的半透明高亮背景 */
#ksearchboxmain td.rowfollow:hover,
#ksearchboxmain tr:hover > td.rowfollow,
#ksearchboxmain td.n8-sb-left:hover,
#ksearchboxmain td.n8-sb-right:hover{background-color:transparent!important;background-image:none!important}
/* 右侧条件：标题与控件合并成一行，内容整体靠模块左侧边缘显示 */
#ksearchboxmain td.n8-fr-line{white-space:nowrap;padding:6px 0!important;text-align:left}
#ksearchboxmain td.n8-fr-line font.medium{display:inline-block;min-width:90px;margin-right:10px;vertical-align:middle;color:var(--text-2)}
#ksearchboxmain td.n8-fr-line select{width:140px!important;height:28px!important;vertical-align:middle;margin:0!important}
#ksearchboxmain td.n8-fr-line input[type=number],
#ksearchboxmain td.n8-fr-line input[type=text]{width:66px!important;height:28px!important;vertical-align:middle;margin:0 3px!important}
/* 搜索箱内按钮：去掉站点 .btn:hover 的上浮阴影 */
body.n8-pg-torrents table.searchbox .btn:hover,
body.n8-pg-special table.searchbox .btn:hover,
#ksearchboxmain .btn:hover{transform:none!important;box-shadow:none!important}

/* ==========================================================================
   广告位容器（Theme.php cutAdZones 兜回来的 header / belownav / footer）
   主题重建外壳后，这三个位置原本输出在旧版 table.head / #footer 里会被丢掉；
   现统一补在内容区顶部（header+belownav）与底部（footer），位于 .n8-content 之外。
   ========================================================================== */
body.n8 .n8-ad-zone{
  min-width:0;max-width:100%;text-align:center;
  display:flex;flex-direction:column;align-items:center;gap:8px;
}
body.n8 .n8-ad-zone > *{max-width:100%;margin:0 auto}
body.n8 .n8-ad-zone img{max-width:100%;height:auto;border-radius:10px}
body.n8 .n8-ad-bottom{padding-top:6px}

/* ==========================================================================
   首页面板长标题：最多两行 + 省略号（悬停由 title 属性给出全文）
   ========================================================================== */
.n8-raw .n8-clamp{
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;
  overflow:hidden;line-height:1.55;word-break:break-word;overflow-wrap:anywhere;
}
.n8-raw .n8-clamp b{font-weight:inherit}
/* 收缩标题列：nowrap 省略内容会把 auto 表格撑出面板，max-width:0 强制列宽由其它列决定 */
.n8-raw td:has(> a.n8-one-row),.n8-raw td:has(> a.n8-two-row){width:100%;max-width:0}
/* 论坛最新帖子：标题单行省略（悬停 title 给出全名） */
.n8-raw .n8-one-row{
  display:block!important;max-width:100%;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
/* 「最近N个上传种子」：标题一行、副标题一行，各自单行省略；悬停 title 给出两行全文 */
.n8-raw .n8-two-row{display:block!important;line-height:1.55}
.n8-raw .n8-two-row > br{display:none}
.n8-raw .n8-two-row > b,
.n8-raw .n8-two-row > .n8-subrow{
  display:block;max-width:100%;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.n8-raw .n8-two-row > b{font-weight:inherit}

/* ==========================================================================
   广告管理（admanage.php）：广告位对照表 + 位置列标注
   ========================================================================== */
.n8-admap{margin:12px 0 6px;border:1px solid var(--line);border-radius:13px;background:var(--panel-2);overflow:hidden}
.n8-admap-hd{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;
  padding:11px 14px;border-bottom:1px solid var(--line);font-size:12.5px;font-weight:600;color:var(--text)}
.n8-admap-hd span{font-size:11px;font-weight:400;color:var(--text-3)}
.n8-admap-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
.n8-admap-row{display:grid;grid-template-columns:82px 74px minmax(0,1fr) auto;align-items:center;gap:10px;
  padding:9px 14px;border-bottom:1px solid var(--line);font-size:12px;color:var(--text-2);min-width:0}
.n8-admap-row:nth-last-child(-n+2){border-bottom:0}
.n8-admap-row:nth-child(odd){border-right:1px solid var(--line)}
.n8-admap-row code{font:10.5px/1 ui-monospace,SFMono-Regular,Consolas,monospace;color:var(--amber-hi);
  background:var(--amber-soft);border-radius:5px;padding:4px 6px;justify-self:start}
.n8-admap-row b{font-weight:500;color:var(--text);font-size:12px}
.n8-admap-where{font-size:11px;line-height:1.55;color:var(--text-3);min-width:0}
.n8-admap-where i{display:block;font-style:normal;color:var(--amber-line);opacity:.95}
.n8-admap-row em{font-style:normal;font-size:10px;padding:2px 7px;border-radius:999px;
  border:1px solid var(--line-2);color:var(--text-3);white-space:nowrap}
.n8-admap-row em.on{color:#7fd4a0;border-color:rgba(127,212,160,.4);background:rgba(127,212,160,.1)}
@media(max-width:900px){
  .n8-admap-list{grid-template-columns:1fr}
  .n8-admap-row:nth-child(odd){border-right:0}
  .n8-admap-row:nth-last-child(-n+2){border-bottom:1px solid var(--line)}
  .n8-admap-row:last-child{border-bottom:0}
}

/* 列表「位置」列：位置名 + 机器名 + 出现位置 */
.n8-content td .n8-adpos-name{display:block;color:var(--text);font-size:12px}
.n8-content td .n8-adpos-key{display:block;font:10px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace;
  color:var(--text-3);letter-spacing:.04em}
.n8-content td .n8-adpos-where{display:block;margin-top:2px;font-size:10.5px;line-height:1.5;color:var(--text-3)}
/* 「添加广告」下拉：每项补一行位置说明 */
#addadlist a b{font-weight:500}
#addadlist a i{display:block;font-style:normal;font-size:10px;line-height:1.4;color:var(--text-3);margin-top:1px}

/* ==================== 首页·趣味盒面板（table+iframe+投票行） ==================== */
/* 原 td.text 带站点浅灰白边框（1px #e8ecfb）+ 内边距，暗色下是一条生硬白框 */
.n8-raw:has(iframe[name=funbox]) td.text{
  border:0!important;background:transparent!important;padding:0!important;
}
.n8-raw:has(iframe[name=funbox]) td.text > br{display:none} /* 去掉 iframe 与投票行之间的空行 */
/* 内容框：统一面板内的圆角描边风格 */
.n8-raw iframe[name=funbox]{
  width:100%!important;height:300px;display:block;
  border:1px solid var(--line-2);border-radius:12px;background:var(--panel-2);
}
/* 投票行：文字弱化、数字与「你觉得呢？」点亮，按钮胶囊化 */
.n8-raw #funvote{
  display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px;
  margin:12px 0 2px;font-size:12.5px;color:var(--text-2);line-height:1.6;
}
.n8-raw #funvote b{color:var(--amber-hi);font-weight:600;font-variant-numeric:tabular-nums}
.n8-raw #funvote font.striking{color:var(--amber)!important;font-weight:500}
.n8-raw #funvote input[type=button]{
  height:auto;background:var(--amber-soft);border:1px solid var(--line-2);color:var(--amber-hi);
  border-radius:999px;padding:5px 16px;font-size:12px;line-height:1.4;cursor:pointer;
  transition:border-color .14s,background .14s,color .14s;
}
.n8-raw #funvote input[type=button]:hover{border-color:var(--amber-line);background:var(--panel-3);color:var(--amber-hi)}
/* 投票成功提示（JS 显示时） */
.n8-raw #voteaccept{color:var(--amber-hi)!important;font-size:12px}

/* ==================== 趣味盒 iframe（fun.php?action=view，body.inframe） ==================== */
/* 正文/标题里的长串（连续字母数字无空格）不会自动换行，溢出被 iframe 裁掉 */
body.inframe td.shoutrow{overflow-wrap:anywhere;word-break:break-word;max-width:100%}
/* 标题行（含 font.big）居中，正文行左对齐 */
body.inframe td.shoutrow:has(font.big),
body.inframe td.shoutrow.n8-fun-title{text-align:center!important}
body.inframe td.shoutrow:not(:has(font.big)){text-align:left}
body.inframe td.shoutrow font.big{overflow-wrap:anywhere;word-break:break-all}
/* 趣味盒投票行：发布者/时间金色小字放行首（原在 iframe 标题行，JS 跨 iframe 挪入） */
.n8-raw .n8-funby{color:var(--amber);font-size:12px;display:inline-flex;align-items:center;flex-wrap:wrap;gap:1px 4px}
.n8-raw .n8-funby a{color:var(--amber-hi)!important;font-weight:500}
.n8-raw .n8-funby span{color:var(--amber)}
.n8-raw .n8-fundot{color:var(--text-3);font-size:11px;flex:none}
