/* ================================================
   column_post.css  —  Scoped styles for article body
   - reset.css の影響を局所的に打ち消しつつ、記事に必要な要素を整形
   - このファイルは .column_post 内だけに適用される想定
   ================================================ */

/* --------- Design Tokens --------- */
.column_post {
  --cp-font: 'Noto Sans JP', "游ゴシック体", "Yu Gothic", "Hiragino Kaku Gothic Pro", "Meiryo", sans-serif;
  --cp-size: 16px;
  --cp-lh: 1.75;

  --cp-space-1: .5rem;
  --cp-space-2: 1rem;
  --cp-space-3: 1.5rem;
  --cp-space-4: 2rem;

  --cp-maxw: 760px;
  --cp-text: #111;
  --cp-muted: #6b7280;
  --cp-accent: #155eef;
  --cp-bg: transparent;
  --cp-border: #e5e7eb;

  --cp-code-bg: #0b0f19;
  --cp-code-fg: #e5e7eb;
  --cp-inlinecode-bg: #f3f4f6;
  --cp-mark-bg: #fff3a3;
  --cp-ins-bg: #e6ffed;
}

/* --------- Base / Reset (scoped) --------- */
.column_post,
.column_post * { box-sizing: border-box; }

.column_post {
  /* reset.css のセンター寄せなどを確実に打ち消す */
  text-align: left !important;
  font: var(--cp-size)/var(--cp-lh) var(--cp-font);
  color: var(--cp-text);
  background: var(--cp-bg);
  max-width: var(--cp-maxw);
  margin-inline: auto;
  padding: var(--cp-space-3) var(--cp-space-2);
  padding: 0;
  margin-bottom: 80px;
}

/* reset.css 側で要素に text-align:center が入っている場合の保険 */
.column_post :is(p, h1, h2, h3, h4, h5, h6, ul, ol, li, table, th, td, blockquote, figcaption) {
  text-align: left !important;
}

/* 段落 */
.column_post p {
  margin: 0 0 var(--cp-space-2);
}

/* 強調・装飾 */
.column_post strong { font-weight: 700; }
.column_post em { font-style: italic; }
.column_post small { font-size: 0.875em; color: var(--cp-muted); }
.column_post mark { background: var(--cp-mark-bg); padding: 0 .2em; }
.column_post del { opacity: .65; }
.column_post ins { text-decoration: none; background: var(--cp-ins-bg); padding: 0 .2em; }

/* 見出し（h2〜h4想定、他hも整形） */
.column_post :is(h2,h4,h5,h6) {
  line-height: 1.35;
  margin: var(--cp-space-3) 0 var(--cp-space-2);
  font-weight: 700;
  letter-spacing: .01em;
  color: #0f172a;
  scroll-margin-top: 80px; /* 固定ヘッダ対策 */
}
.column_post :is(h3) {
    background-color: #E6E7E5;
    color: #0f172a;
    text-align: left;
    margin: var(--cp-space-3) 0 var(--cp-space-2);
    padding-top: 8px;
    padding-bottom: 8px !important;
    padding-left: 18px;
    padding-right: 18px;
    margin-bottom: 30px;
    font-weight: 700;
    letter-spacing: .01em;
    scroll-margin-top: 80px; /* 固定ヘッダ対策 */
}

.column_post h1 { font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2rem); }
.column_post h2 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.8rem); border-bottom: 2px solid var(--cp-border); padding-bottom: .35rem; }
.column_post h3 { font-size: clamp(1.2rem, 1rem + .6vw, 1.5rem); }
.column_post h4 { font-size: clamp(1.05rem, .95rem + .4vw, 1.25rem); }

/* リンク */
.column_post a {
  color: var(--cp-accent);
  text-decoration: underline;
  text-underline-offset: .15em;
}
.column_post a:hover { opacity: .9; }

/* リスト */
.column_post ul,
.column_post ol {
  margin: 0 0 var(--cp-space-2);
  padding-left: 1.4em;
}
.column_post ul { list-style: disc; }
.column_post ol { list-style: decimal; }
.column_post li { margin: .35rem 0; }
.column_post li > :is(ul,ol) { margin-top: .35rem; }

.column_post ul li {
    list-style: disc;
}

.column_post ol li {
    list-style: numeric;
}

/* 引用 */
.column_post blockquote {
  margin: var(--cp-space-3) 0;
  padding: var(--cp-space-2) var(--cp-space-3);
  border-left: 4px solid var(--cp-accent);
  background: #f8fafc;
  color: #0f172a;
}
.column_post blockquote footer,
.column_post figcaption { color: var(--cp-muted); font-size: .9em; }

/* 画像・メディア */
.column_post video,
.column_post svg,
.column_post canvas {
  display: block;
  max-width: 100%;
  height: auto;
  margin: var(--cp-space-2) auto;
}
.column_post .column_thumb img {
    display: block;
    max-width: 100%;
    width: 100%;
    object-fit: cover;
    height: auto;
    margin: 0 auto;
}

.column_post figure.column_thumb {
    margin-bottom: 1.5em;
}

/* WordPress配置クラス */
.column_post .aligncenter { margin: var(--cp-space-2) auto; display: block; text-align: center; }
.column_post .alignleft { float: left; margin: .25rem var(--cp-space-2) var(--cp-space-2) 0; }
.column_post .alignright { float: right; margin: .25rem 0 var(--cp-space-2) var(--cp-space-2); }

.column_post img.alignright {
	float: right;
	margin: 0 0 1em 1em;
	max-width: 40%;
}

.column_post img.alignleft {
	float: left;
	margin: 0 1em 1em 0;
	max-width: 40%;
}


@media (max-width: 640px){
  .column_post .alignleft,
  .column_post .alignright { float: none; margin: var(--cp-space-2) auto; }
}

/* WPキャプション */
.column_post .wp-caption { max-width: 100%; }
.column_post .wp-caption-text { font-size: .9em; color: var(--cp-muted); text-align: center; margin-top: .4rem; }

/* テーブル */
.column_post .table-wrap { overflow-x: auto; }
.column_post table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--cp-space-3) 0;
  font-variant-numeric: tabular-nums;
}
.column_post thead th {
  background: #f3f4f6;
  font-weight: 700;
}
.column_post th,
.column_post td {
  border: 1px solid var(--cp-border);
  padding: .65rem .8rem;
  vertical-align: top;
}
.column_post table.wide { table-layout: fixed; }

/* コード・等幅 */
.column_post code,
.column_post kbd,
.column_post samp,
.column_post pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: .95em;
}
.column_post code {
  background: var(--cp-inlinecode-bg);
  padding: .1em .35em;
  border-radius: .25rem;
}
.column_post pre {
  background: var(--cp-code-bg);
  color: var(--cp-code-fg);
  padding: var(--cp-space-2);
  border-radius: .5rem;
  overflow: auto;
  white-space: pre;
  margin: var(--cp-space-3) 0;
}
.column_post pre code { background: transparent; padding: 0; color: inherit; }

/* 区切り線 */
.column_post hr {
  border: 0;
  border-top: 1px solid var(--cp-border);
  margin: var(--cp-space-3) 0;
}

/* 詳細・要約 */
.column_post details {
  border: 1px solid var(--cp-border);
  border-radius: .5rem;
  padding: .75rem 1rem;
  background: #fafafa;
  margin: var(--cp-space-2) 0;
}
.column_post summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.column_post summary::-webkit-details-marker { display: none; }

/* 文章内ユーティリティ */
.column_post .note,
.column_post .info,
.column_post .warn {
  border-left: 4px solid;
  padding: .9rem 1rem;
  margin: var(--cp-space-2) 0;
  background: #f8fafc;
}
.column_post .note { border-color: #0ea5e9; }
.column_post .info { border-color: #22c55e; }
.column_post .warn { border-color: #f59e0b; background: #fff7ed; }

/* ボタン風リンク */
.column_post .btn {
  display: inline-block;
  padding: .6rem 1rem;
  border-radius: .5rem;
  border: 1px solid var(--cp-border);
  text-decoration: none;
  background: #fff;
  transition: .15s ease-in-out;
}
.column_post .btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.08); }

/* レスポンシブ埋め込み（YouTube等） */
.column_post .embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  overflow: hidden;
  border-radius: .5rem;
  margin: var(--cp-space-3) 0;
}
.column_post .embed > iframe,
.column_post .embed > video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: 0;
}
.column_post .wp-block-embed__wrapper iframe {
  width: 100%; height: auto; aspect-ratio: 16/9;
}

/* ルビ・略語など */
.column_post abbr[title] { text-decoration: underline dotted; cursor: help; }
.column_post ruby rt { font-size: .75em; color: var(--cp-muted); }

/* targetハイライト（目次からのジャンプ用） */
.column_post :target { outline: 2px dashed var(--cp-accent); outline-offset: 3px; }

/* フォーム（想定タグ） */
.column_post input,
.column_post select,
.column_post textarea,
.column_post button {
  font: inherit;
  color: inherit;
}
.column_post input,
.column_post select,
.column_post textarea {
  width: 100%;
  max-width: 100%;
  padding: .6rem .7rem;
  border: 1px solid var(--cp-border);
  border-radius: .5rem;
  background: #fff;
}
.column_post button,
.column_post input[type="submit"] {
  display: inline-block;
  padding: .6rem 1rem;
  border: 1px solid var(--cp-border);
  background: #fff;
  border-radius: .5rem;
  cursor: pointer;
}
.column_post button:hover,
.column_post input[type="submit"]:hover { background: #f8fafc; }

/* 印刷 */
@media print {
  .column_post {
    color: #000;
    background: #fff;
    max-width: none;
    padding: 0;
  }
  .column_post a { color: #000; text-decoration: underline; }
  .column_post .embed { display: none; }
}

/*コラム個別ページ調整*/
.editorPick ul {
    justify-content: flex-start;
}
.editorPick ul li {
    width: 32.5%;
    margin-right: 1.25%;
}

.editorPick ul li:last-child {
    margin-right: 0;
}

.editorPick ul li figure {
    aspect-ratio: 1.5;
}

.editorPick ul li figure img {
    object-fit: cover;
    height: 100%;
    width: 100%;
}

/* 投稿エディタのカスタマイズ関連CSS　2023/12*/
.boxStyle {
    padding: 1em 1em 1.06em;
    box-sizing: border-box;
    display: block;
    border-radius: 6px;	
	margin-bottom: 1em;
}

.boxStyle h1:first-child ,
.boxStyle h2:first-child ,
.boxStyle h3:first-child ,
.boxStyle h4:first-child ,
.boxStyle h5:first-child ,
.boxStyle h6:first-child ,
.boxStyle p:first-child ,
.boxStyle ul:first-child {
	margin-top: 0;
	padding-top: 0;
}

.boxStyle.exclamation p:last-child,
.boxStyle.hatena p:last-child,
.boxStyle p:last-child ,
.boxStyle ul:last-child {
	padding-bottom:0;
	margin-bottom: 0;
}

.boxStyle h2:first-child {
    margin-top: 0;
}

.pnkBox {
    background-color: #f9e6e6;
}
.blueBox {
    background-color: #dbf1ec;
}
.pnkBorderBox {
    background-color: #fff;
	border: 3px solid #db7f7f;
}
.blueBorderBox {
    background-color: #fff;
	border: 3px solid  #5ebae5;
}

.boxStyle.exclamation {
	background-color: #fff;
    border: 3px solid red;
    position: relative;
    padding-left: 65px;
    padding-right: 1.5em;
}

.boxStyle.exclamation h3 {
    background: none;
    margin-bottom: 0.5em;
    padding: 0;
}

.boxStyle.exclamation p {
    padding-bottom: 0.9em;
}

.exclamation:before {
    content: '!';
    color: #fff;
    background: red;
    border-radius: 50%;
    min-width: 30px;
    width: 30px;
    height: 30px;
    display: block;
    text-align: center;
    font-weight: 600;
    margin-right: 6px;
    position: absolute;
    left: 1em;
	line-height: 1.8em;
}

.boxStyle.hatena {
	background-color: #fff;
	border: 3px solid green;
    position: relative;
    padding-left: 65px;
    padding-right: 1.5em;
}

.boxStyle.hatena h3 {
    background: none;
    margin-bottom: 0.5em;
    padding: 0;
}

.boxStyle.hatena p {
    padding-bottom: 0.9em;
}

.hatena:before {
	content: '?';
    color: #fff;
	background: green;
    border-radius: 50%;
    min-width: 30px;
    width: 30px;
    height: 30px;
    display: block;
    text-align: center;
    font-weight: 600;
    margin-right: 6px;
    position: absolute;
    left: 1em;
}

span.txt_marker {
	background: linear-gradient(transparent 65%, #6f6 50%);
}
