/* 罗嘉昌 · 力线：一张撒了铁屑的白纸，像法拉第的磁力线图版。黑、白、铁灰，加磁极的红与青灰。 */
body.c-luo-jiachang {
  --tex: .7;
  --bg: #f2f1ec; --paper: #fbfbf8; --ink: #151515; --ink-2: #3c3c3a; --ink-3: #66665f; --rule: rgba(21, 21, 21, .16);
  --acc: #b23a2b; --acc-ink: #fff; --s: #3b5675; --iron: #262626;
  --head: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; --body: "Noto Serif SC", "Songti SC", serif; --lat: "Spectral", "Noto Serif SC", serif;
  --bar-bg: rgba(242, 241, 236, .94); --bar-ink: #151515; --chip-bg: #fbfbf8; --chip-ring: #fbfbf8;
  background-color: var(--bg);
  background-image: url("../img/luo-jiachang/filings.png");
  background-size: 300px 300px;
}
.c-luo-jiachang .dlg { --dlg-bg: #efeee9; --dlg-paper: #ffffff; --dlg-ink: #151515; --dlg-ink-2: #444441; --dlg-ink-3: #6b6b66; --dlg-me: #151515; --dlg-me-ink: #f6f6f2; --dlg-acc: #a2311f; }
.c-luo-jiachang a { text-decoration-color: rgba(21, 21, 21, .35); text-underline-offset: .2em; }
.c-luo-jiachang a:hover { color: var(--acc); text-decoration-color: currentColor; }
.c-luo-jiachang .mk { font-family: var(--head); font-weight: 500; font-size: 12px; letter-spacing: .18em; color: var(--ink-3); }
.c-luo-jiachang .c3bar { border-bottom: 1px solid var(--ink); }
.c-luo-jiachang .c3bar__t a { font-family: var(--head); font-weight: 900; }
.c-luo-jiachang .c3bar__prog { background: var(--acc); }
.c-luo-jiachang .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 目录：每一格是一根铁屑，转向当前的一问 */
.c-luo-jiachang .c3toc a { gap: 10px; font-family: var(--lat); font-size: 13px; color: var(--ink-3); min-height: 26px; }
.c-luo-jiachang .c3toc a span { font-family: var(--body); font-size: 12.5px; }
.c-luo-jiachang .c3toc a b { font-weight: 400; min-width: 2.4em; text-align: right; }
.c-luo-jiachang .c3toc a::after { width: 3px; height: 16px; border: 0; border-radius: 2px; background: var(--iron); transform: rotate(var(--tilt, 0deg)); transition: transform .6s cubic-bezier(.3, .7, .3, 1), background .3s; }
.c-luo-jiachang .c3toc a[aria-current="true"] { color: var(--ink); }
.c-luo-jiachang .c3toc a[aria-current="true"]::after { width: 8px; height: 18px; border-radius: 1px; background: linear-gradient(180deg, var(--acc) 50%, var(--s) 50%); transform: none; }
.c-luo-jiachang .c3toc a:hover { color: var(--acc); }

/* ---------- 图（Fig.）：一块撒了铁屑的纸 ---------- */
.lj-fig { margin: 0; min-width: 0; }
.lj-fn { margin: 0 0 6px; text-align: center; font-family: var(--lat); font-size: 19px; color: var(--ink); letter-spacing: .02em; }
.lj-fn i { font-style: italic; margin-right: 4px; }
.lj-stage { position: relative; aspect-ratio: var(--ar, 16 / 10); background: var(--paper); border: 1px solid var(--ink); overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.lj-cv { position: absolute; inset: 0; width: 100%; height: 100%; }
.lj-mag { position: absolute; left: 0; top: 0; z-index: 2; display: flex; padding: 0; border: 1px solid var(--ink); background: none; overflow: visible; cursor: grab; transform-origin: 50% 50%;
  touch-action: none; font: 600 11px/1 var(--lat); color: #fff; transition: opacity .6s; }
.lj-mag::before { content: ""; position: absolute; inset: -10px; }
.lj-mag:not([data-drag]) { cursor: default; }
.lj-mag.is-dragging { cursor: grabbing; }
.lj-mag__n, .lj-mag__s { flex: 1 1 50%; display: grid; place-items: center; }
.lj-mag__n { background: var(--acc); order: 2; }
.lj-mag__s { background: var(--s); order: 1; }
.lj-mag--disc { border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 1px var(--paper); }
.lj-mag--up { border-radius: 50%; overflow: hidden; }
.lj-mag--up .lj-mag__s { display: none; }
.lj-mag--hand { box-shadow: 0 3px 8px rgba(0, 0, 0, .25); }
.lj-mag--mini { pointer-events: none; border-radius: 50%; overflow: hidden; }
.lj-mag:focus-visible { outline: 2px solid var(--acc); outline-offset: 4px; }
.lj-mag.is-gone { opacity: 0; visibility: hidden; transition: opacity .6s, visibility 0s .6s; }
@media (hover: hover) and (pointer: fine) { .lj-stage--hero, .lj-stage--hero .lj-mag--hand { cursor: none; } }
.no-js .lj-stage { display: none; }

.lj-ctl { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.lj-ctl button { min-height: 40px; padding: 7px 14px; border: 1px solid var(--ink); border-radius: 0; background: var(--paper); color: var(--ink); font: 500 14px/1.3 var(--head); cursor: pointer; transition: background .2s, color .2s; }
.lj-ctl button:hover { background: #e9e8e2; }
.lj-ctl button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.lj-out { margin: 10px 0 0; min-height: 3.4em; font-size: 14.5px; line-height: 1.75; color: var(--ink-2); }
.lj-cap { margin: 10px 0 0; font-size: 13px; line-height: 1.75; color: var(--ink-3); }
.lj-keys { margin: 8px 0 0; padding: 0; list-style: none; font-size: 13.5px; line-height: 1.75; color: var(--ink-2); }
.js .lj-keys { display: none; }
.lj-src { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; align-items: center; margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--rule); }
.lj-src img { display: block; width: 100%; height: auto; }
.lj-src p { margin: 0; font-size: 12.5px; line-height: 1.75; color: var(--ink-3); }
.lj-src--sutra img { border: 1px solid var(--ink); }

/* ---------- 首屏 ---------- */
.c-luo-jiachang .c3hero { padding: calc(var(--bar) + 30px) clamp(16px, 4.5vw, 72px) 40px; }
.lj-hero { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.lj-k { margin: 0; font-family: var(--head); font-weight: 500; font-size: 13px; letter-spacing: .2em; color: var(--acc); }
.lj-hero h1 { margin: 2px 0 0; font-family: var(--head); font-weight: 900; font-size: clamp(64px, 8vw, 116px); line-height: 1.02; letter-spacing: .02em; }
.lj-en { margin: 6px 0 16px; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; font-family: var(--lat); font-size: 22px; }
.lj-en i { font-style: italic; }
.lj-en span { font-size: 16px; color: var(--ink-3); }
.lj-who { margin: 0 0 4px; font-family: var(--head); font-weight: 700; font-size: 20px; line-height: 1.45; }
.lj-now { margin: 0 0 16px; font-size: 13.5px; line-height: 1.7; color: var(--ink-3); }
.lj-rel { margin: 0 0 16px; padding: 10px 0 12px 16px; border-left: 3px solid var(--ink); }
.lj-rel .mk { margin-bottom: 2px; }
.lj-rel p:last-child { margin: 0; font-size: 14.5px; line-height: 1.8; }
.lj-hb { margin: 0 0 14px; }
.lj-hb ul { list-style: none; margin: 0; padding: 0; }
.lj-hb li { display: flex; flex-wrap: wrap; gap: 0 10px; align-items: baseline; padding: 3px 0; border-bottom: 1px solid var(--rule); }
.lj-hb a { text-decoration: none; font-size: 15px; }
.lj-hb a:hover { text-decoration: underline; }
.lj-hb small { font-family: var(--lat); font-size: 13px; color: var(--ink-3); }
.lj-hq { margin: 0 0 16px; }
.lj-qs { list-style: none; margin: 0; padding: 0; }
.lj-qs a { display: grid; grid-template-columns: 3.6em 3.2em minmax(0, 1fr); gap: 6px; align-items: baseline; padding: 5px 0; border-bottom: 1px solid var(--rule); text-decoration: none; font-size: 15px; line-height: 1.5; }
.lj-qs a i { font-family: var(--lat); font-size: 14px; color: var(--ink-3); }
.lj-qs a b { font-family: var(--lat); font-weight: 500; color: var(--acc); }
.lj-qs a:hover span { text-decoration: underline; }
.lj-go { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; }
.c-luo-jiachang .c3-btn { margin: 0; min-height: 42px; border-radius: 0; border-color: var(--ink); font-family: var(--head); font-weight: 500; }
.c-luo-jiachang .c3-btn--go { background: var(--ink); color: var(--paper); }
.c-luo-jiachang .c3-btn--deep { background: var(--paper); color: var(--ink); }
.c-luo-jiachang .c3-btn:hover { background: var(--acc); border-color: var(--acc); color: #fff; }
.lj-fig--hero .lj-stage { aspect-ratio: 4 / 3; }

.lj-band { max-width: 1280px; margin: 44px auto 0; padding-top: 22px; border-top: 1px solid var(--ink); display: grid; grid-template-columns: 1.2fr 1fr 1fr .9fr; gap: 30px; }
.lj-band__c { min-width: 0; }
.lj-facts { margin: 0; font-size: 14.5px; line-height: 1.85; color: var(--ink-2); text-align: justify; }
.c-luo-jiachang .c3-feats { margin: 0; padding: 0; list-style: none; counter-reset: f; }
.c-luo-jiachang .c3-feats li { counter-increment: f; position: relative; padding: 4px 0 4px 24px; font-size: 14px; line-height: 1.65; color: var(--ink-2); border-bottom: 1px solid var(--rule); }
.c-luo-jiachang .c3-feats li::before { content: counter(f) "."; position: absolute; left: 0; top: 4px; font-family: var(--lat); font-style: italic; color: var(--acc); }
.c-luo-jiachang .c3-books li, .c-luo-jiachang .c3-links li { border-bottom: 1px solid var(--rule); font-size: 14px; }
.lj-band__go { margin: 14px 0 0; }

/* ---------- 每一问 ---------- */
.c-luo-jiachang .c3q { display: block; padding: calc(var(--bar) + 36px) clamp(16px, 4.5vw, 72px) 64px; }
.lj-q { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); column-gap: clamp(28px, 4vw, 64px);
  grid-template-rows: auto 1fr; grid-template-areas: "head art" "body art"; }
.lj-head { grid-area: head; }
.lj-art { grid-area: art; align-self: start; min-width: 0; position: sticky; top: calc(var(--bar) + 20px); }
.lj-body { grid-area: body; min-width: 0; }
.c-luo-jiachang .c3q__when { gap: 12px; color: var(--ink-3); }
.c-luo-jiachang .c3q__when b { font-family: var(--lat); font-weight: 500; font-size: 32px; color: var(--acc); }
.c-luo-jiachang .c3q__when span { font-family: var(--head); font-size: 13.5px; }
.c-luo-jiachang .c3q__q { text-wrap: balance; margin: 4px 0 18px; font-family: var(--head); font-weight: 900; font-size: clamp(28px, 3.2vw, 44px); line-height: 1.25; letter-spacing: .01em; }
.c-luo-jiachang .c3q__lede { margin: 0 0 16px; font-size: 16.5px; line-height: 1.95; text-align: justify; }
.c-luo-jiachang .c3-quote { margin: 18px 0; padding: 12px 0 12px 18px; border-left: 3px solid var(--acc); }
.c-luo-jiachang .c3-quote blockquote p { font-family: var(--head); font-weight: 700; font-size: 18px; line-height: 1.7; }
.c-luo-jiachang .c3-tags li { border-radius: 0; border-color: var(--ink); color: var(--ink); background: var(--paper); font-family: var(--head); font-size: 12.5px; }
.c-luo-jiachang .talk { border-radius: 0; border-color: var(--ink); background: var(--paper); }
.c-luo-jiachang .c3-ask { border-color: var(--ink-3); border-radius: 0; }
.c-luo-jiachang .c3-deeplink { color: var(--acc); }

/* 柱头上的螺旋 */
.lj-plate { position: relative; border: 1px solid var(--ink); background: var(--paper); }
.lj-plate img { display: block; width: 100%; height: auto; }
.lj-spiral { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.lj-spiral path { fill: none; stroke: var(--acc); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; }
.is-in .lj-spiral path { animation: lj-draw 3.2s .5s cubic-bezier(.4, .1, .3, 1) forwards; }
@keyframes lj-draw { to { stroke-dashoffset: 0; } }

/* 刻石与示意图并置 */
.lj-two { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.lj-stele img { display: block; width: 100%; height: auto; max-height: 70vh; object-fit: contain; object-position: top; border: 1px solid var(--ink); }
.lj-two__f { min-width: 0; }

/* ---------- 结尾 ---------- */
.c-luo-jiachang .c3end { padding: calc(var(--bar) + 40px) clamp(16px, 4.5vw, 72px) 64px; border-top: 1px solid var(--ink); }
.lj-end { max-width: 1100px; margin: 0 auto; }
.c-luo-jiachang .c3end h2 { font-family: var(--head); font-weight: 900; }
.c-luo-jiachang .c3end h3 { font-family: var(--head); font-weight: 700; }
.c-luo-jiachang .c3-lin li { border-radius: 0; border-color: var(--ink); background: var(--paper); }
.lj-colo { margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--rule); }

/* ---------- 中屏 ---------- */
@media (max-width: 1100px) {
  .lj-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .lj-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lj-src { grid-template-columns: minmax(0, 1fr); gap: 8px; }
}
/* ---------- 手机与竖屏 ---------- */
@media (max-width: 860px) {
  .c-luo-jiachang .c3hero { padding-top: calc(var(--bar) + 20px); }
  .lj-hero { grid-template-columns: minmax(0, 1fr); }
  .lj-hero h1 { font-size: 64px; }
  .lj-band { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .lj-q { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "head" "art" "body"; }
  .lj-art { position: static; margin: 4px 0 22px; }
  .c-luo-jiachang .c3q__q { font-size: 27px; }
  .c-luo-jiachang .c3q__lede { font-size: 16px; }
  .lj-two { grid-template-columns: minmax(0, .7fr) minmax(0, 1fr); gap: 12px; }
  .lj-stele img { max-height: 54vh; }
}
@media (max-width: 420px) {
  .lj-ctl button { padding: 7px 11px; font-size: 13.5px; }
  .lj-qs a { grid-template-columns: 3.3em 3em minmax(0, 1fr); font-size: 14.5px; }
}

/* 没有脚本：铁屑与按钮都藏起来，说明文字全部列出 */
.no-js .lj-ctl, .no-js .lj-out { display: none; }
/* 触控目标 */
.c-luo-jiachang .c3-books a, .c-luo-jiachang .c3-links a, .c-luo-jiachang .c3-works li a { display: inline-block; padding: 8px 0 4px; }
.c-luo-jiachang .c3-books li, .c-luo-jiachang .c3-links li { padding: 0 0 6px; }
.c-luo-jiachang .c3-works li { padding: 0 0 4px; }
.lj-hb a { display: inline-flex; align-items: center; min-height: 40px; }
.lj-hb li { padding: 0; }
.lj-qs a { min-height: 40px; align-items: center; }

.lj-nb { display: inline-block; }
.lj-nw { white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
  .c-luo-jiachang *, .c-luo-jiachang *::before, .c-luo-jiachang *::after { transition-delay: 0s !important; animation-delay: 0s !important; }
}
