
.m-body .md-strong, .md-strong { font-weight: 600; }
.m-body .md-em, .md-em { font-style: italic; }
.m-body .md-u, .md-u { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.m-body .md-s, .md-s { text-decoration: line-through; text-decoration-thickness: 1px; }
.m-body .md-u.md-s, .md-u .md-s, .md-s .md-u { text-decoration: underline line-through; }

.m-body .md-h { display: block; font-weight: 600; letter-spacing: -0.01em; }
.m-body .md-h1 { font-size: var(--fs-title); line-height: var(--lh-title); }
.m-body .md-h2 { font-size: var(--fs-section); line-height: var(--lh-section); }
.m-body .md-h + p, .m-body .md-h + .md-list, .m-body .md-h + .md-quote, .m-body .md-h + .md-pre { margin-top: var(--s1); }
.m-body .md-list { margin: 0; padding-left: var(--s5); white-space: normal; }
.m-body .md-list li { white-space: pre-wrap; }
.m-body ul.md-list { list-style: disc; }
.m-body ul.md-list ul.md-list { list-style: circle; }
.m-body ol.md-list { list-style: decimal; font-variant-numeric: tabular-nums; }
.m-body .md-list li + li { margin-top: 2px; }
.m-body p + .md-list, .m-body .md-list + p, .m-body .md-quote + p, .m-body p + .md-quote, .m-body .md-list + .md-quote, .m-body .md-quote + .md-list { margin-top: var(--s1); }
.m-body .md-pre[data-lang] code { display: block; }
.m-body .md-quote .md-list { padding-left: var(--s4); }

.m-body .md-raw { white-space: pre-wrap; }

.md-spoiler { border-radius: 4px; padding: 0 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; transition: background-color var(--t-fast) var(--ease-out); }
.md-spoiler[role="button"] { background: var(--control); color: transparent; cursor: pointer; user-select: none; -webkit-user-select: none; }
.md-spoiler[role="button"]:hover { background: var(--control-hover); }
.md-spoiler[role="button"] * { color: transparent !important; text-decoration-color: transparent !important; background: transparent !important; border-color: transparent !important; box-shadow: none !important; }
.md-spoiler[role="button"] img { visibility: hidden; }
.md-spoiler[role="button"]:focus-visible { outline: 2px solid var(--text); outline-offset: 1px; }
.md-spoiler.shown { background: var(--active); }
.m.bad .md-spoiler.shown { color: inherit; }
@media (prefers-reduced-motion: reduce) { .md-spoiler { transition: none; } }

.md-help { margin-top: var(--s4); padding-top: var(--s3); border-top: 1px solid var(--rule); }
.md-help-grid { display: grid; grid-template-columns: max-content 1fr; gap: 2px var(--s3); align-items: baseline; margin-top: var(--s2); }
.md-help-row { display: contents; }
.md-help-src { font-family: var(--mono); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--muted); white-space: nowrap; }
.md-help-out { min-width: 0; font-size: var(--fs-small); line-height: var(--lh-small); white-space: normal; }
.md-help-out p, .md-help-out .md-h { display: inline; margin: 0; font-size: var(--fs-small); line-height: var(--lh-small); }
.md-help-out .md-quote { display: inline-block; margin: 0; padding-left: var(--s2); box-shadow: inset 2px 0 0 var(--control); color: var(--muted); }
.md-help-out .md-list { display: inline-block; margin: 0; padding-left: var(--s4); list-style: disc; }
.md-help-out .md-pre { display: inline-block; margin: 0; padding: 0 var(--s1); border-radius: 4px; background: var(--active); font-family: var(--mono); font-size: var(--fs-small); line-height: var(--lh-small); }
.md-help-out code { padding: 0 4px; border-radius: 4px; background: var(--active); font-family: var(--mono); font-size: var(--fs-small); }
.md-help .hint { margin-top: var(--s2); }

.ch-tools .icon-btn.pins-btn { position: relative; }
.pins-btn .pins-n { position: absolute; right: 2px; top: 2px; min-width: 14px; height: 14px; padding: 0 3px; border-radius: 7px; background: var(--raised); color: var(--muted); font-size: 10px; line-height: 14px; font-variant-numeric: tabular-nums; text-align: center; box-sizing: border-box; }
.pins-btn .pins-n:empty { display: none; }
.pins-btn[aria-expanded="true"] { color: var(--text); }

.m-sys.pin-sys { position: relative; justify-content: flex-start; align-items: baseline; gap: var(--s2); margin: var(--s2) var(--pad-x); padding-left: calc(40px + var(--s4)); text-align: left; }
.m-sys.pin-sys svg { position: absolute; left: 12px; top: 2px; width: 14px; height: 14px; color: var(--faint); }
.m-sys.pin-sys span { flex: 0 1 auto; max-width: none; }
.m-sys.pin-sys b { color: var(--text); font-weight: 500; }
.m-sys.pin-sys .text-btn { padding: 0; font-size: var(--fs-small); line-height: var(--lh-small); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--control); }
.m-sys.pin-sys .text-btn:hover { text-decoration-color: var(--text); }
.m-sys.pin-sys time { flex: none; color: var(--faint); font-variant-numeric: tabular-nums; }

.ctx.panel .pins-sheet { position: relative; }
.ctx.panel:has(.pins-sheet) { background: var(--surface); }
.pins-head { display: flex; align-items: baseline; gap: var(--s2); padding-right: 40px; }
.pins-title { font-size: var(--fs-section); line-height: var(--lh-section); font-weight: 600; }
.pins-of { color: var(--faint); font-size: var(--fs-small); line-height: var(--lh-small); font-variant-numeric: tabular-nums; }
.pins-close { position: absolute; top: -4px; right: -4px; width: 32px; height: 32px; }
.pins-close svg { width: 16px; height: 16px; }
.pins-note { margin-top: var(--s2); color: var(--muted); font-size: var(--fs-small); line-height: var(--lh-small); }
.pins-empty { padding: var(--s4) 0 var(--s2); }
.pins-empty-h { font-weight: 500; }
.pins-list { margin: var(--s3) calc(-1 * var(--s4)) calc(-1 * var(--s4)); padding: 0; list-style: none; max-height: min(64vh, 560px); overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid var(--rule); }
.pin-row { padding: var(--s3) var(--s4); }
.pin-row + .pin-row { border-top: 1px solid var(--rule); }
.pin-h { display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.pin-av img { width: 24px; height: 24px; object-fit: cover; }
.pin-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.pin-name.ok { color: var(--accent); }
.pin-time { flex: none; color: var(--faint); font-size: var(--fs-small); line-height: var(--lh-small); font-variant-numeric: tabular-nums; }
.pin-why { flex: none; color: var(--pill-warning-ink); font-size: var(--fs-small); line-height: var(--lh-small); }
.pin-acts { display: flex; gap: var(--s3); margin-left: auto; flex: none; }
.pin-acts .text-btn { font-size: var(--fs-small); line-height: var(--lh-small); }
.pin-text { margin-top: var(--s1); padding-left: calc(24px + var(--s2)); }
.pin-text.bad { color: var(--pill-warning-ink); }
.pin-files { margin-top: 2px; padding-left: calc(24px + var(--s2)); color: var(--muted); font-size: var(--fs-small); line-height: var(--lh-small); }
@media (max-width: 640px) {
  .pins-list { max-height: 60vh; }
  .pin-text, .pin-files { padding-left: 0; }
}
