/*
Theme Name: SD N47 制作工坊·工单看板
Author: SD Network
Description: 制作工坊风：米白纸张、粗黑线工单卡片、编号与印章，首页是左侧说明单 + 右侧置顶工单看板。
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: sd-n47
*/

:root {
  --bg: #eee4cf; --surface: #fbf6e8; --ink: #2a2420; --muted: #7b6f60; --line: #cdbd9f;
  --accent: #5b3fd1; --accent-2: #d9622b; --accent-soft: rgba(91, 63, 209, .12); --on-accent: #ffffff;
  --radius: 3px; --wrap: 1200px; --gut: 24px; --scrim: rgba(42, 36, 32, .5);
  --font: "PingFang SC","Hiragino Sans GB","Microsoft YaHei","Noto Sans SC","Source Han Sans SC",system-ui,-apple-system,"Segoe UI",sans-serif; --mono: ui-monospace,"SF Mono","Cascadia Mono","Roboto Mono",Consolas,"Liberation Mono","Courier New","Microsoft YaHei",monospace;
}

/* ==========================================================================
   基础层（结构 / 行为）。变量：--bg --surface --ink --muted --line --accent --accent-2
   --accent-soft --on-accent --radius --wrap --gut --font --scrim
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.7 var(--font); overflow-x: clip; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body.sd-no-scroll { overflow: hidden; }
img, video, iframe, svg { max-width: 100%; }
img { height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.n47-wrap { width: 100%; max-width: var(--wrap, 1240px); margin: 0 auto; padding: 0 var(--gut, 20px); }
.sr-only, .screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 999; padding: 12px 18px; background: var(--ink); color: var(--bg); }
.skip:focus { top: 12px; }

/* 搜索表单 */
.n47-sf { display: flex; gap: 8px; align-items: stretch; }
.n47-sf input[type="search"] { flex: 1 1 auto; min-width: 0; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--radius); -webkit-appearance: none; appearance: none; }
.n47-sf input[type="search"]::placeholder { color: var(--muted); opacity: .85; }
.n47-sf button { flex: 0 0 auto; min-height: 44px; padding: 0 20px; border: 0; border-radius: var(--radius); background: var(--accent); color: var(--on-accent); font-weight: 700; }

/* 搜索面板 / 遮罩 / 抽屉（app.js 以 id 绑定） */
.n47-search { position: fixed; inset: 0; z-index: 200; display: grid; align-items: start; justify-items: center; padding: 12vh 16px 16px; background: var(--scrim, rgba(0,0,0,.55)); opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
.n47-search.is-open { opacity: 1; visibility: visible; }
.n47-search__box { width: min(640px, 100%); max-height: 80vh; overflow: auto; padding: 20px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); }
.n47-search__hint { margin: 18px 0 8px; font-size: 13px; color: var(--muted); }
.n47-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.n47-tags a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 14px; }
.n47-tags a:hover { border-color: var(--accent); color: var(--accent); }
.n47-overlay { position: fixed; inset: 0; z-index: 150; background: var(--scrim, rgba(0,0,0,.55)); opacity: 0; transition: opacity .25s; }
.n47-overlay.is-open { opacity: 1; }
.n47-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 160; width: min(320px, 86vw); padding: 68px 22px 28px; overflow: auto; background: var(--surface); color: var(--ink); border-left: 1px solid var(--line); transform: translateX(100%); visibility: hidden; transition: transform .25s, visibility .25s; }
.n47-drawer.is-open { transform: none; visibility: visible; }
.n47-drawer__close { position: absolute; top: 10px; right: 10px; width: 48px; height: 48px; display: grid; place-items: center; border: 0; background: transparent; font-size: 20px; }
.n47-drawer__list { list-style: none; margin: 0; padding: 0; }
.n47-drawer__list a { display: flex; align-items: center; min-height: 52px; border-bottom: 1px solid var(--line); font-size: 17px; }
.n47-drawer__list [aria-current="page"], .n47-drawer__list .current-menu-item > a { color: var(--accent); font-weight: 700; }

/* 面包屑 */
.sd-crumbs { padding: 14px 0 4px; font-size: 13px; color: var(--muted); }
.sd-crumbs__list { display: flex; flex-wrap: wrap; align-items: center; list-style: none; margin: 0; padding: 0; }
.sd-crumbs li { display: inline-flex; align-items: center; min-width: 0; }
.sd-crumbs li + li::before { content: "/"; margin: 0 8px; opacity: .5; }
.sd-crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
.sd-crumbs a:hover { color: var(--accent); }
.sd-crumbs [aria-current="page"] { color: var(--ink); max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 分页 */
.sd-pagination { margin: 36px 0 8px; }
.sd-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.sd-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-weight: 600; }
.sd-pagination a.page-numbers:hover { border-color: var(--accent); color: var(--accent); }
.sd-pagination .current { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.sd-pagination .dots { background: none; border-color: transparent; }

/* 播放器 / 提示框 */
.n47-player { min-width: 0; }
.sd-player { background: #000; overflow: hidden; }
.sd-player video { display: block; width: 100%; aspect-ratio: 9 / 16; max-height: 78vh; object-fit: contain; background: #000; }
.sd-embed { aspect-ratio: 9 / 16; max-height: 78vh; background: #000; }
.sd-embed iframe { display: block; width: 100%; height: 100%; border: 0; }
.sd-player__fallback { padding: 18px; color: #e5e7eb; font-size: 14px; }
.sd-player__fallback a { text-decoration: underline; }
.sd-callout { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 20px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.sd-callout__body { flex: 1 1 200px; }
.sd-callout__title { font-weight: 800; margin-bottom: 4px; }
.sd-callout__desc { color: var(--muted); font-size: 14px; }
.sd-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px; border: 0; border-radius: var(--radius); background: var(--accent); color: var(--on-accent); font-weight: 700; }

/* 通用部件 */
.n47-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.n47-pill { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; font-size: 13px; border: 1px solid var(--line); border-radius: 999px; }
a.n47-pill { min-height: 44px; }
.n47-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.n47-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--radius); font-weight: 600; }
.n47-btn--fill { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.n47-note { padding: 14px 16px; border: 1px dashed var(--line); color: var(--muted); font-size: 14px; }
.n47-pn { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; }
.n47-pn a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); }
.n47-pn a.is-next { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.n47-side-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 16px; color: var(--accent); font-weight: 600; }
.n47-prose { max-width: 70ch; overflow-wrap: anywhere; }
.n47-prose img { height: auto; }
.n47-faq details { border-bottom: 1px solid var(--line); }
.n47-faq summary { display: flex; align-items: center; min-height: 52px; cursor: pointer; font-weight: 600; }
.n47-faq details p { color: var(--muted); }
.n47-empty, .n47-notfound { padding: 48px 0; }
.n47-empty__title { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.n47-notfound__search { max-width: 520px; margin: 22px 0; }
.n47-notfound__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.n47-notfound__code { margin: 0; font-size: clamp(72px, 16vw, 150px); font-weight: 900; line-height: 1; color: var(--accent); }
.n47-notfound h1 { font-size: clamp(26px, 4vw, 40px); margin: 6px 0 10px; }
.n47-notfound__desc { max-width: 34em; color: var(--muted); }
.n47-results { display: grid; gap: 0; }
.n47-result { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: flex-start; min-width: 0; }
.n47-result__img { width: 72px; flex: 0 0 72px; aspect-ratio: 2 / 3; object-fit: cover; }
.n47-result__body { display: grid; gap: 4px; min-width: 0; }
.n47-result__t { font-weight: 700; overflow-wrap: anywhere; }
.n47-result__m, .n47-result__x { font-size: 13px; color: var(--muted); }
.n47-result:hover .n47-result__t { color: var(--accent); }
.n47-searchbar { max-width: 640px; margin: 4px 0 24px; }
.n47-article { max-width: 860px; }
.n47-pages { margin-top: 24px; }

/* 筛选条：行内滚动，不撑破版面 */
.n47-filter { display: grid; gap: 4px; margin: 0 0 24px; }
.n47-filter__row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.n47-filter__label { flex: 0 0 auto; font-size: 13px; color: var(--muted); }
.n47-filter__list { display: flex; flex: 1 1 auto; gap: 6px; min-width: 0; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.n47-filter__list::-webkit-scrollbar { display: none; }
.n47-filter__list a { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; white-space: nowrap; }
.n47-filter__list [aria-current="page"] { color: var(--accent); font-weight: 700; }

/* 选集 */
[data-eps] { position: relative; }
.n47-eps { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 8px; max-height: 440px; overflow: auto; padding: 2px; }
.n47-ep { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 48px; padding: 4px 2px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); line-height: 1.2; }
.n47-ep b { font-weight: 700; }
.n47-ep i { font-style: normal; font-size: 11px; color: var(--muted); }
a.n47-ep:hover { border-color: var(--accent); color: var(--accent); }
.n47-ep.is-current { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.n47-ep.is-current i { color: inherit; opacity: .8; }
.n47-ep.is-off { opacity: .45; }
.n47-eps--row { grid-template-columns: minmax(0, 1fr); gap: 0; }
.n47-eps--row .n47-ep { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 8px 12px; border-width: 0 0 1px; border-radius: 0; text-align: left; }
.n47-eps--row .n47-ep b { flex: 0 0 2.6em; }
.n47-eps--row .n47-ep__t { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.n47-eps--row .n47-ep i { flex: 0 0 auto; }

/* 资料表 / 文字块 */
.n47-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); column-gap: 28px; margin: 0; }
.n47-facts__r { padding: 12px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.n47-facts dt { font-size: 12.5px; color: var(--muted); }
.n47-facts dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.n47-eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.n47-g { display: inline-flex; align-items: center; min-height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--ink); }
.n47-g:hover { border-color: var(--accent); color: var(--accent); }
.n47-detail__t, .n47-dhead h1 { font-size: clamp(26px, 4vw, 42px); overflow-wrap: anywhere; }
.n47-detail__meta { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.n47-detail__syn { margin: 16px 0 0; font-size: 16px; line-height: 1.9; overflow-wrap: anywhere; }
.n47-h2 { font-size: 20px; margin: 0 0 14px; }
.n47-h2 small { margin-left: 8px; font-size: 13px; font-weight: 500; color: var(--muted); }
.n47-block { margin-top: clamp(36px, 6vw, 68px); }
.n47-block--tight { margin-top: 28px; }
.n47-dhead { padding: 8px 0 22px; }
.n47-ph { padding: 26px 0 20px; }
.n47-ph__k { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.n47-ph__t { font-size: clamp(28px, 4vw, 44px); overflow-wrap: anywhere; }
.n47-ph__d { margin: 10px 0 0; color: var(--muted); }
.n47-sec { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; margin: 0 0 18px; }
.n47-sec__t { font-size: clamp(20px, 2.6vw, 28px); }
.n47-sec__k { flex: 0 0 100%; font-size: 12px; color: var(--muted); }
.n47-sec__more { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-weight: 600; white-space: nowrap; }
.n47-main { min-width: 0; }
.n47-main > .n47-wrap, .n47-main > section { min-width: 0; }

.n47-grid { display: grid; gap: 22px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 960px) { .n47-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .n47-grid { grid-template-columns: repeat(1, minmax(0, 1fr)); } }

.n47-head { position: sticky; top: 0; z-index: 100; background: var(--bg); padding: 10px 0; }
.n47-ledger { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; border: 1px solid var(--ink); background: var(--surface); }
.n47-ledger > * { min-width: 0; }
.n47-ledger__brand { display: flex; align-items: center; padding: 0 18px; border-right: 1px solid var(--ink); }
.n47-brand { font-weight: 800; font-size: 20px; line-height: 1.2; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.n47-brand img { max-height: 36px; width: auto; }
.n47-nav { min-width: 0; }
.n47-nav__list { display: flex; list-style: none; margin: 0; padding: 0; height: 100%; overflow: hidden; }
.n47-nav__list li { border-right: 1px solid var(--line); }
.n47-nav__list a { display: flex; align-items: center; height: 100%; min-height: 52px; padding: 0 18px; white-space: nowrap; }
.n47-nav__list [aria-current="page"], .n47-nav__list .current-menu-item > a { background: var(--accent); color: var(--on-accent); }
.n47-ledger__tools { display: flex; align-items: stretch; border-left: 1px solid var(--ink); }
.n47-tools { display: flex; }
.n47-tool { min-height: 52px; padding: 0 16px; border: 0; border-right: 1px solid var(--line); background: transparent; }
.n47-tool:last-child { border-right: 0; }
#sd-menu-open { display: none; }
@media (max-width: 960px) { .n47-ledger { grid-template-columns: minmax(0, 1fr) auto; } .n47-nav { display: none; } #sd-menu-open { display: inline-flex; align-items: center; } .n47-brand { max-width: 56vw; } }

.n47-foot { margin-top: clamp(48px, 8vw, 96px); padding: 0 0 28px; }
.n47-foot__cells { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; border: 1px solid var(--ink); }
.n47-foot__cell { min-width: 0; padding: 20px; border-right: 1px solid var(--line); }
.n47-foot__cell:last-child { border-right: 0; }
.n47-foot__cell a { display: flex; align-items: center; min-height: 44px; font-size: 14px; }
.n47-foot__brand { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.n47-foot__desc { font-size: 13px; color: var(--muted); }
.n47-foot__h { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.n47-foot__num { margin: 0; font-size: 44px; font-weight: 900; line-height: 1; }
.n47-foot__menu { list-style: none; }
.n47-foot__bar { margin: 14px 0 0; font-size: 13px; color: var(--muted); }
@media (max-width: 760px) { .n47-foot__cells { grid-template-columns: repeat(2, minmax(0, 1fr)); } .n47-foot__cell { border-bottom: 1px solid var(--line); } }

.n47-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 420px); gap: 40px; align-items: start; padding-top: 8px; }
.n47-detail__l, .n47-detail__r { min-width: 0; }
.n47-detail__r { position: sticky; top: 88px; }
.n47-watch { margin-bottom: 28px; }
@media (max-width: 900px) { .n47-detail { grid-template-columns: minmax(0, 1fr); gap: 24px; } .n47-detail__r { position: static; } .n47-detail__r .sd-player { max-width: 420px; margin-inline: auto; } }

.n47-dgrid { display: grid; grid-template-columns: minmax(280px, 400px) minmax(0, 1fr); gap: 32px; align-items: start; }
.n47-dgrid__l, .n47-dgrid__r { min-width: 0; }
@media (max-width: 900px) { .n47-dgrid { grid-template-columns: minmax(0, 1fr); gap: 22px; } .n47-dgrid__l .sd-player { max-width: 420px; margin-inline: auto; } }

@media (max-width: 560px) { :root { --gut: 16px; } .n47-filter__row { gap: 8px; } .sd-crumbs [aria-current="page"] { max-width: 48vw; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

/* ==== 主题皮肤：SD N47 制作工坊·工单看板 ==== */

body { background: var(--bg) repeating-linear-gradient(0deg, transparent 0 31px, rgba(60, 40, 10, .045) 31px 32px); }
h1, h2, h3 { letter-spacing: .01em; }

/* 表头 */
.n47-head { background: transparent; padding: 14px 0 6px; }
.n47-ledger { border-width: 2px; box-shadow: 5px 5px 0 var(--ink); }
.n47-ledger__brand { background: var(--ink); color: var(--surface); border-right-width: 2px; }
.n47-ledger__tools { border-left-width: 2px; }
.n47-brand { font-size: 19px; letter-spacing: .03em; }
.n47-nav__list a { font: 600 14px var(--mono); }
.n47-tool { font: 600 13px var(--mono); }
.n47-nav__list [aria-current="page"] { background: var(--accent); color: var(--on-accent); }
.n47-search__box { border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); }
.n47-drawer { border-left: 2px solid var(--ink); }

/* 页面头 / 区块头 */
.n47-ph { position: relative; margin-top: 16px; padding: 20px 22px; background: var(--surface); border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); }
.n47-ph__k { display: inline-block; margin: 0 0 8px; padding: 2px 10px; background: var(--accent); color: var(--on-accent); font: 700 12px var(--mono); letter-spacing: .12em; }
.n47-ph__t { font-size: clamp(26px, 4vw, 40px); }
.n47-sec { padding-bottom: 8px; border-bottom: 2px solid var(--ink); }
.n47-sec__k { font: 700 12px var(--mono); letter-spacing: .12em; color: var(--accent); }
.n47-block { margin-top: clamp(40px, 6vw, 70px); }

/* 首页：说明单 + 看板 */
.n47-board { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 34px; margin-top: 26px; align-items: start; }
.n47-slip { position: relative; padding: 30px 26px 24px; background: var(--surface); border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); }
.n47-slip::before { content: ""; position: absolute; top: -11px; left: 26px; width: 88px; height: 22px; background: var(--accent-2); opacity: .8; transform: rotate(-3deg); }
.n47-slip__k { margin: 0; font: 700 12px var(--mono); letter-spacing: .14em; color: var(--accent); }
.n47-slip__t { margin: 10px 0 12px; font-size: clamp(30px, 4.4vw, 52px); line-height: 1.1; overflow-wrap: anywhere; }
.n47-slip__tag { margin: 0 0 6px; font-weight: 700; }
.n47-slip__desc { margin: 0; color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.n47-stamps { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 20px 0; }
.n47-stamps li { padding: 4px 10px; border: 2px solid var(--accent); color: var(--accent); border-radius: 3px; font-size: 12px; transform: rotate(-2deg); }
.n47-stamps li:nth-child(2) { transform: rotate(1.5deg); border-color: var(--accent-2); color: var(--accent-2); }
.n47-stamps b { font: 800 16px var(--mono); }
.n47-slip__form input[type="search"] { border: 2px solid var(--ink); background: var(--bg); }
.n47-slip__form button { border: 2px solid var(--ink); }
.n47-pinned__t { margin: 0 0 14px; font: 800 14px var(--mono); letter-spacing: .14em; color: var(--accent-2); }
.n47-pinned .n47-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.n47-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; margin-top: clamp(40px, 6vw, 70px); }
.n47-duo > section { min-width: 0; }
.n47-idx { list-style: none; background: var(--surface); border: 2px solid var(--ink); }
.n47-idx a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px; border-bottom: 1px dashed var(--line); }
.n47-idx li:last-child a { border-bottom: 0; }
.n47-idx a:hover { background: var(--accent-soft); }
.n47-idx__n { font: 800 13px var(--mono); color: var(--accent); }
.n47-idx__t { flex: 1 1 auto; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.n47-idx__c { font: 600 12px var(--mono); color: var(--muted); white-space: nowrap; }

/* 工单卡 */
.n47-tk { position: relative; background: var(--surface); border: 1.5px solid var(--ink); border-radius: var(--radius); transition: transform .15s, box-shadow .15s; }
.n47-tk:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
.n47-tk::before, .n47-tk::after { content: ""; position: absolute; top: 33px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--ink); }
.n47-tk::before { left: -7px; }
.n47-tk::after { right: -7px; }
.n47-tk__link { display: block; }
.n47-tk__head { display: flex; justify-content: space-between; gap: 8px; padding: 9px 14px; border-bottom: 1.5px dashed var(--ink); font: 700 12px/1.4 var(--mono); }
.n47-tk__st { color: var(--accent-2); white-space: nowrap; }
.n47-tk__fig { display: block; padding: 12px 12px 0; }
.n47-tk__fig img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border: 1.5px solid var(--ink); background: var(--bg); }
.n47-tk__body { display: grid; gap: 2px; padding: 10px 12px 8px; }
.n47-tk__t { font-weight: 800; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.n47-tk__m { font-size: 12px; color: var(--muted); }
.n47-tk__foot { display: block; margin: 0 12px 12px; padding-top: 8px; border-top: 1px dotted var(--line); font: 600 11px var(--mono); color: var(--accent); }

/* 按钮 / 选集 / 详情 */
.n47-btn { border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); font-weight: 700; }
.n47-btn--fill { background: var(--accent); border-color: var(--ink); }
.n47-pill { border-color: var(--ink); background: var(--surface); }
.n47-ep { border: 1.5px solid var(--ink); font-family: var(--mono); }
.n47-ep.is-current { background: var(--accent); }
.n47-g { border: 1.5px solid var(--ink); border-radius: 3px; background: var(--surface); font-family: var(--mono); }
.n47-eyebrow { font-family: var(--mono); letter-spacing: .08em; }
.n47-detail__r .n47-watch, .n47-selects { padding: 16px; background: var(--surface); border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); }
.n47-detail__r .n47-watch { margin-bottom: 26px; }
.n47-detail__r .n47-watch .n47-h2, .n47-selects .n47-h2 { font: 800 13px var(--mono); letter-spacing: .14em; color: var(--accent); }
.n47-facts__r { border-bottom: 1px dashed var(--line); }
.n47-facts dt { font-family: var(--mono); }
.sd-player { border: 2px solid var(--ink); }
.sd-crumbs { font-family: var(--mono); }
.n47-pagination .page-numbers { border: 1.5px solid var(--ink); border-radius: 0; color: var(--ink); }
.n47-filter__list a { border: 1.5px solid transparent; font-size: 14px; }
.n47-filter__list a:hover, .n47-filter__list [aria-current="page"] { border-color: var(--ink); background: var(--surface); }
.n47-result { padding: 14px; margin-bottom: 12px; background: var(--surface); border: 1.5px solid var(--ink); }
.n47-foot__cells { background: var(--surface); border-width: 2px; box-shadow: 5px 5px 0 var(--ink); }
.n47-foot__cell a:hover { color: var(--accent); }

@media (max-width: 900px) {
  .n47-board { grid-template-columns: minmax(0, 1fr); }
  .n47-duo { grid-template-columns: minmax(0, 1fr); gap: 30px; }
}
@media (max-width: 560px) {
  .n47-pinned .n47-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .n47-tk__fig { padding: 8px 8px 0; }
  .n47-tk__head { padding: 7px 8px; font-size: 11px; }
  .n47-tk__body { padding: 8px; }
  .n47-tk::before, .n47-tk::after { display: none; }
  .n47-slip { padding: 26px 18px 20px; }
}
