/* 寄合所・新 ページ（誰でも編集できる Wiki）専用。共通の styles.css の変数・部品を使い、ここは本文と編集画面だけを足す。 */
.wk-page { max-width: 62rem; margin-inline: auto; padding-inline: 1rem; min-width: 0; }
.wk-page * { min-width: 0; }
.wk-nav { display: flex; flex-wrap: wrap; gap: .35rem .9rem; margin: 1rem 0 .75rem; padding: 0 0 .6rem; border-bottom: 1px solid var(--line); font-size: .9rem; }
.wk-nav a { color: var(--accent-2); font-weight: 700; text-decoration: none; padding: .35rem .15rem; min-height: 44px; display: inline-flex; align-items: center; }
.wk-nav a[aria-current="page"] { color: var(--ink); border-bottom: 2px solid var(--accent-2); }
.wk-notice { margin: 0 0 .9rem; padding: .55rem .75rem; border-left: 3px solid var(--accent-2); background: color-mix(in srgb, var(--accent-2) 7%, var(--paper)); color: var(--ink); font-size: .84rem; line-height: 1.7; }
.wk-title-row { display: flex; flex-wrap: wrap; gap: .5rem .8rem; align-items: baseline; margin: .4rem 0 .6rem; }
.wk-title { margin: 0; font-size: 1.6rem; line-height: 1.35; overflow-wrap: anywhere; word-break: break-word; }
.wk-badge { display: inline-block; padding: .05rem .5rem; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--muted); font-size: .72rem; font-weight: 700; }
.wk-toolbar { display: flex; flex-wrap: wrap; gap: .45rem .9rem; align-items: center; margin: .3rem 0 1rem; }
.wk-toolbar a[aria-current="page"] { text-decoration: underline; }
.wk-banner { padding: .5rem .75rem; border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--paper)); font-size: .88rem; }
.wk-body { line-height: 1.85; overflow-wrap: anywhere; word-break: break-word; }
.wk-body h2, .wk-body h3, .wk-body h4 { margin: 1.6rem 0 .6rem; line-height: 1.45; scroll-margin-top: 1rem; }
.wk-body h2 { padding-bottom: .25rem; border-bottom: 2px solid var(--accent-2); font-size: 1.3rem; }
.wk-body h3 { font-size: 1.12rem; border-left: 4px solid var(--accent-2); padding-left: .55rem; }
.wk-body h4 { font-size: 1rem; }
.wk-body p { margin: .6rem 0; }
.wk-body ul, .wk-body ol { margin: .5rem 0 .5rem 1.4rem; padding: 0; }
.wk-body blockquote { margin: .6rem 0; padding: .1rem .9rem; border-left: 3px solid var(--line); color: var(--muted); }
.wk-body dt { font-weight: 800; margin-top: .6rem; }
.wk-body dd { margin: .1rem 0 .4rem 1.2rem; }
.wk-body a.wk-ext { overflow-wrap: anywhere; }
.wk-body a.wk-link { color: var(--accent-2); }
.wk-body a.wk-auto { text-decoration-style: dotted; }
.wk-body a.wk-missing { color: var(--accent); }
.wk-body del { color: var(--muted); }
.wk-pre { margin: .6rem 0; padding: .7rem .85rem; overflow-x: auto; border: 1px solid var(--line); background: var(--bg); font-size: .84rem; line-height: 1.6; white-space: pre; }
.wk-table-wrap { max-width: 100%; margin: .8rem 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.wk-table { border-collapse: collapse; font-size: .88rem; line-height: 1.6; min-width: 100%; }
.wk-table th, .wk-table td { padding: .35rem .6rem; border: 1px solid var(--line); vertical-align: top; text-align: left; }
.wk-table th { background: var(--bg); font-weight: 800; white-space: nowrap; }
.wk-align-center { text-align: center !important; }
.wk-align-right { text-align: right !important; }
.wk-align-left { text-align: left !important; }
.wk-toc { margin: 1rem 0; padding: .7rem .9rem; border: 1px solid var(--line); background: var(--paper); font-size: .88rem; }
.wk-toc ul { margin: .35rem 0 0; padding-left: 1.1rem; }
.wk-toc .wk-toc-3 { margin-left: 1rem; }
.wk-toc .wk-toc-4 { margin-left: 2rem; }
.wk-unsupported, .wk-attach, .wk-muted { color: var(--muted); font-size: .82rem; }
.wk-footnotes { margin-top: 1.6rem; padding-left: 1.4rem; font-size: .84rem; color: var(--muted); }
.wk-meta { margin: 1.2rem 0 0; color: var(--muted); font-size: .8rem; line-height: 1.7; }
.wk-hint { margin: .8rem 0 0; color: var(--muted); font-size: .8rem; line-height: 1.7; }
.wk-login-note { margin: .4rem 0 0; font-size: .86rem; line-height: 1.7; }
.wk-form { display: grid; gap: .5rem; margin-top: .8rem; }
.wk-form textarea, .wk-form input[type="text"], .wk-inline-form input { width: 100%; box-sizing: border-box; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); font: inherit; }
.wk-form textarea { min-height: 18rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Noto Sans Mono CJK JP", monospace; font-size: .9rem; line-height: 1.6; resize: vertical; }
.wk-form input[type="text"], .wk-inline-form input { min-height: 44px; }
.wk-label { font-weight: 800; font-size: .88rem; }
.wk-check { display: flex; gap: .5rem; align-items: flex-start; font-size: .86rem; line-height: 1.6; min-height: 44px; }
.wk-check input { width: 1.1rem; height: 1.1rem; margin-top: .2rem; }
.wk-honey { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.wk-conflict { padding: .7rem .85rem; border: 1px solid var(--accent); background: color-mix(in srgb, var(--accent) 5%, var(--paper)); }
.wk-conflict h3 { margin: 0 0 .5rem; font-size: 1rem; }
.wk-preview { margin-top: 1.4rem; padding-top: .8rem; border-top: 1px dashed var(--line); }
.wk-preview h3 { margin: 0 0 .5rem; font-size: 1rem; }
.wk-inline-form { display: grid; gap: .45rem; margin: .8rem 0; max-width: 32rem; }
.wk-list { margin: .8rem 0; padding-left: 1.2rem; line-height: 1.9; }
.wk-list li { overflow-wrap: anywhere; }
.wk-pager { display: flex; gap: 1rem; align-items: center; margin: 1rem 0; font-size: .9rem; }
.wk-history td, .wk-history th { font-size: .82rem; }
.wk-history .wk-ops { white-space: nowrap; }
.wk-diff { margin: .8rem 0; padding: .6rem 0; overflow-x: auto; border: 1px solid var(--line); background: var(--paper); font-size: .82rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.wk-diff span { display: block; padding: 0 .7rem; }
.wk-diff-add { background: color-mix(in srgb, var(--accent-2) 14%, var(--paper)); }
.wk-diff-del { background: color-mix(in srgb, var(--accent) 12%, var(--paper)); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.wk-diff-ctx { color: var(--muted); }
.wk-diff-gap { color: var(--muted); text-align: center; }
.wk-rules { line-height: 1.85; padding-left: 1.3rem; }
.wk-rules li { margin: .35rem 0; }
@media (max-width: 640px) {
  .wk-page { padding-inline: 16px; }
  .wk-title { font-size: 1.35rem; }
  .wk-form textarea { min-height: 14rem; font-size: 16px; }
  .wk-form input[type="text"], .wk-inline-form input { font-size: 16px; }
  .wk-toolbar .primary-button, .wk-toolbar .secondary-link { min-height: 44px; display: inline-flex; align-items: center; }
}
.wk-toolbar a, .wk-form button, .wk-inline-form button, .records-actions .secondary-link, .records-actions .primary-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 1rem; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--accent-2); font: inherit; font-size: .9rem; font-weight: 700; text-decoration: none; cursor: pointer; box-sizing: border-box; }
.wk-toolbar a.primary-button, .wk-form button.primary-button, .wk-inline-form button.primary-button, .records-actions .primary-button { background: var(--accent-2); border-color: var(--accent-2); color: #fff; font-size: .9rem; width: auto; height: auto; }
.wk-toolbar a[aria-current="page"] { border-color: var(--accent-2); }
.wk-article, .wk-edit { min-width: 0; max-width: 100%; }
.wk-nav { overflow-wrap: anywhere; }
.wk-toc a, .wk-body a.wk-ext { color: var(--accent-2); }

/* 引き継いだ画像（#ref / &ref）。幅・高さの属性で場所を確保し、表示で縦横比を保つ（レイアウトのずれを出さない）。 */
.wk-body { display: flow-root; }
.wk-img { max-width: 100%; height: auto; vertical-align: middle; background: var(--bg); }
.wk-img-link { display: inline-block; max-width: 100%; line-height: 0; }
a.wk-img-link:not(:has(img)) { line-height: inherit; }
.wk-fig { margin: .6rem 0; max-width: 100%; }
.wk-fig-center { text-align: center; }
.wk-fig-right { text-align: right; }
.wk-fig-around, .wk-fig-wrap { float: left; max-width: 48%; margin: .2rem 1rem .6rem 0; }
.wk-table .wk-fig { margin: 0; }
.wk-table td .wk-img { vertical-align: top; }
@media (max-width: 560px) { .wk-fig-around, .wk-fig-wrap { float: none; max-width: 100%; margin-right: 0; } }
/* 旧寄合所ミラーからの出どころ・本人の申告（docs/spec/12-mirror-to-wiki-editing.md） */
.wk-provenance { margin: 1rem 0 0; padding: .55rem .75rem; border: 1px solid var(--line); border-left: 3px solid var(--accent-2); border-radius: 6px; background: var(--paper); font-size: .86rem; line-height: 1.7; overflow-wrap: anywhere; }
.wk-provenance p { margin: .2rem 0; }
.wk-provenance .wk-muted { margin-left: .4rem; }
.wk-edit .wk-provenance { margin: .2rem 0 .8rem; }
.wk-declared .wk-list li { overflow-wrap: anywhere; }
