/* Gutenbergの保存構造だけを調整。採用版styles.cssは変更しない。 */
.tn-v2 .wp-block-group { box-sizing: border-box; }
.tn-v2 .wp-block-group > .wp-block-group__inner-container { max-width: none; }
.tn-v2 .wp-block-table { overflow-x: auto; margin: 8px 0 20px; }
.tn-v2 .wp-block-table:focus-visible { outline: 3px solid var(--orange-ink); outline-offset: 3px; }
.tn-v2 .wp-block-post-template.card-grid { display: grid; padding: 0; list-style: none; margin-block: 24px 0; }
.tn-v2 .card-grid > li { margin: 0; }
.tn-v2 .card .wp-block-post-featured-image img { display: block; width: 100%; height: auto; }
.tn-v2 .card-meta .wp-block-post-terms a { color: inherit; text-decoration: none; }
.tn-v2-thumb-placeholder { aspect-ratio: 480 / 260; display: grid; place-items: center; padding: 24px; background: var(--band); position: relative; line-height: 1.4; font-size: clamp(20px, 2.1vw, 30px); font-weight: 900; }
.tn-v2-thumb-placeholder::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 6px; background: var(--split); }
@media (min-width: 783px) { body.admin-bar .site-header { top: 32px; } }

/* 既存記事はSWELLの保存本文・ブロックと目次機能を残し、v2の文字組みに揃える。 */
.tn-v2-legacy { --color_main: var(--navy); --color_text: var(--ink); --color_link: var(--orange-ink); background: var(--paper); color: var(--ink); font-family: var(--font); }
.tn-v2-legacy #body_wrap { overflow: visible; }
.tn-v2-legacy #content { padding: 0; margin: 0; }
.tn-v2-legacy .article { width: 100%; min-width: 0; padding: 0; }
.tn-v2-legacy .article-head { margin-bottom: 32px; }
.tn-v2-legacy .post_content { font-family: var(--font); font-size: 17px; line-height: 1.95; counter-reset: tn-legacy-chapter; }
.tn-v2-legacy .post_content h2 { position: relative; counter-increment: tn-legacy-chapter; margin: 72px 0 24px; padding: 22px 0 0 48px; border: 0; border-top: 2px solid var(--ink); background: none; color: var(--ink); border-radius: 0; font-size: clamp(22px, 3vw, 27px); font-weight: 900; line-height: 1.45; box-shadow: none; }
.tn-v2-legacy .post_content h2::before { content: counter(tn-legacy-chapter); position: absolute; inset: 22px auto auto 0; width: auto; height: auto; border: 0; background: none; color: var(--orange-ink); font-family: var(--font); font-size: 32px; line-height: 1.2; }
.tn-v2-legacy .post_content h2::after { display: none; }
.tn-v2-legacy .post_content h3 { margin: 48px 0 16px; padding: 0; border: 0; background: none; color: var(--ink); font-size: 20.5px; line-height: 1.5; box-shadow: none; }
.tn-v2-legacy .post_content h3::before, .tn-v2-legacy .post_content h3::after { display: none; }
.tn-v2-legacy .post_content h4 { color: var(--ink); }
.tn-v2-legacy .post_content :is(h2,h3,h4) { scroll-margin-top: 80px; }
.tn-v2-legacy .post_content .p-toc { width: 100%; max-width: none; margin: 32px 0; padding: 22px 24px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--ink); font-size: 15px; }
.tn-v2-legacy .post_content .p-toc__ttl { color: var(--ink); font-size: 15px; font-weight: 700; }
.tn-v2-legacy .post_content table { max-width: 100%; }
.tn-v2-legacy .post_content :is(.wp-block-table,.swell-block-table) { overflow-x: auto; }
.tn-v2-legacy .post_content .c-balloon__text p:last-child { margin-bottom: 0; }
.tn-v2-legacy .p-articleThumb { margin: 28px 0 36px; }
.tn-v2-legacy .p-articleThumb img { display: block; width: 100%; height: auto; border-radius: 6px; }
.tn-v2-legacy .l-articleBottom { margin-top: 64px; }
.tn-v2-legacy #sidebar { float: none; width: 100%; max-width: none; margin: 64px 0 0; padding: 0; }
.tn-v2-legacy .site-footer { margin-top: 0; }
@media (max-width: 767px) {
  .tn-v2-legacy .post_content { font-size: 16px; }
  .tn-v2-legacy .post_content h2 { padding-left: 38px; }
  .tn-v2-legacy .post_content .p-toc { padding: 20px 16px; }
}
