/* ========== article.css ==========
   記事ページ専用CSS
   ・読むための余白
   ・見出し強調
   ・本文テーブル
================================ */

/* ベース */
html,
body {
  margin: 0;
  padding: 0;
  padding-top: 2rem;
  width: 100%;
  height: 100%;
  font-family: 'M PLUS 1p', sans-serif;
}

html {
  scroll-behavior: smooth;
}

/* コンテナ */
.container {
  font-size: 1.2rem;
  max-width: 70%;
  margin: auto;
  background-color: #ffffff;
  border-radius: 0.5rem;
  position: relative;
  padding-bottom: 3.5rem;
}

/* h1：記事タイトル */
.container > h1 {
  text-align: center;
  margin-bottom: 0.5rem;
  font-size: 1.6rem;
}

/* h2：本文見出し（マーカー・スマホ対応） */
.container h2 {
  display: inline;
  font-size: 1.5rem;
  font-weight: bold;
  color: #0175d8;

  background: linear-gradient(
    transparent 60%,
    yellow 0
  );

  line-height: 1.6;
  letter-spacing: 0.08em;
  padding: 0.1em 0.2em;
  margin: 1.6rem 0 0.8rem;

  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* 本文 */
p {
  text-align: left;
  line-height: 1.8;
  margin: 0.8rem 0;
}

/* ---------- スライダー ---------- */
.slider {
  width: 100%;
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  border: 0.3rem solid #c0c0c0;
}

.slide {
  flex: 0 0 auto;
  width: 50rem;
  box-sizing: border-box;
}

.slider img {
  width: 100%;
  height: auto;
  display: block;
  border: 0.1rem solid blue;
  border-radius: 0.4rem;
}

.slide p {
  color: blue;
  text-align: center;
}

/* 矢印テキスト */
.yaji-text {
  color: #898989;
  text-align: center;
  margin-bottom: 0.2rem;
  font-weight: bold;
}

/* ---------- スクロール行 ---------- */
.scroll-row {
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
  height: 3rem;
  background-color: #fff;
  position: relative;
  padding: 0;
  margin: 0;
  line-height: 0;
}

.scroll-track {
  display: inline-block;
  white-space: nowrap;
  animation: scroll-sync 15s linear infinite;
}

.scroll-track.reverse {
  animation-name: scroll-sync-reverse;
}

/* ---------- アンカー位置調整 ---------- */
.anchor-offset {
  position: relative;
  top: -5rem;
  height: 0;
}

/* ---------- ユーザー情報 ---------- */
#user-info {
  position: absolute;
  bottom: -1.6rem;
  left: 4rem;
  background: rgba(212, 212, 212, 0.8);
  padding: 0.3rem 0.6rem;
  border-radius: 0.2rem;
}

#user-info a {
  font-size: 0.9rem;
  color: #818181;
  text-decoration: none;
}

/* ---------- 記事用テーブル ---------- */
table.simple {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 1rem;
}

table.simple th,
table.simple td {
  border: 1px solid #999;
  padding: 0.4rem 0.6rem;
  text-align: left;
}

table.simple thead {
  background: #e8e8e8;
  font-weight: bold;
}

/* ボタン共通スタイル */
.btn {
  background-color: #9e9e9e;
  color: white;
  border: none;
  padding: 0.3rem 0.3rem;
  text-decoration: none;
  cursor: pointer;
  border-radius: 0.25rem;
  font-size: 0.9rem;
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  white-space: nowrap;
}

.btn:hover {
  background-color: #5e5e5e;
}

/* ===== コラム：戻るボタン配置 ===== */
.column-back {
  text-align: right;
  margin-top: 1rem;
}

/* ---------- モバイル ---------- */
@media (max-width: 600px) {
  .container {
    max-width: 95%;
    padding: 1.5rem 0;
  }

  .container > h1 {
    font-size: 1.4rem;
  }

  .container h2 {
    font-size: 1.3rem;
  }

  p {
    font-size: 1rem;
  }

  #user-info {
    left: 0.5rem;
    bottom: -2rem;
  }
}
