/* === 有料記事のペイウォール・いいね・コメント ===
   記事ページ末尾の <div class="cm-article"> に article-paywall.js が組み立てる。
   色は style.css の変数に乗せているので、サイト全体の配色を変えればここも追従する。 */

.cm-article {
  margin-top: 64px;
}

/* 読み込み中に高さが跳ねないよう、最初から少し場所を取っておく */
.cm-article:empty {
  min-height: 120px;
}

/* ===== 買った人・無料記事に出る本文 ===== */
.cm-paid-body {
  margin-top: 8px;
}

/* ===== ペイウォール本体 ===== */
.cm-paywall {
  margin: 56px 0 24px;
  text-align: center;
}

/* 「ここから先は」の両脇に伸びる点線 */
.cm-paywall-head {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 18px;
}

.cm-paywall-head::before,
.cm-paywall-head::after {
  content: "";
  flex: 1;
  border-top: 1px dotted var(--line, #262b3a);
}

.cm-paywall-head h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: .02em;
  /* 記事本文の h2 が持つ装飾（背景・影・余白）を打ち消す */
  background: none;
  box-shadow: none;
  padding: 0;
}

.cm-paywall-stats {
  color: var(--muted, #a7a8b3);
  font-size: .95rem;
  margin-bottom: 6px;
}

.cm-paywall-lead {
  color: var(--muted, #a7a8b3);
  font-size: .95rem;
  line-height: 1.7;
  margin: 10px auto 0;
  max-width: 34em;
}

.cm-paywall-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 560px;
  margin: 22px auto 0;
}

.cm-buy {
  display: block;
  width: 100%;
  padding: 16px 20px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 800;
  font-family: inherit;
  text-align: center;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

/* 拡散して応援するほう。安いので、こちらを目立たせる */
.cm-buy.primary {
  background: #e9eaee;
  color: #14161d;
  border: 1px solid #e9eaee;
}

.cm-buy.primary:hover:not(:disabled) {
  background: #fff;
  transform: translateY(-1px);
}

/* 定価で買うほう */
.cm-buy.secondary {
  background: transparent;
  color: var(--ink, #e6e6eb);
  border: 1px solid var(--line, #262b3a);
}

.cm-buy.secondary:hover:not(:disabled) {
  border-color: var(--muted, #a7a8b3);
  transform: translateY(-1px);
}

/* 購読で読ませるとき */
.cm-buy.subscribe {
  background: transparent;
  color: var(--acc, #7aa2ff);
  border: 1px dashed rgba(122, 162, 255, .5);
  font-size: .95rem;
  padding: 13px 20px;
}

.cm-buy.subscribe:hover:not(:disabled) {
  border-style: solid;
  background: rgba(122, 162, 255, .08);
}

.cm-buy:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}

.cm-paywall-note {
  color: var(--muted, #a7a8b3);
  font-size: .8rem;
  margin-top: 14px;
  line-height: 1.7;
}

.cm-paywall-note a {
  color: var(--acc, #7aa2ff);
}

/* ===== いいね ===== */
.cm-reaction {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 40px 0;
  padding: 28px 20px;
  border-top: 1px dotted var(--line, #262b3a);
  border-bottom: 1px dotted var(--line, #262b3a);
}

.cm-like {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  border-radius: 999px;
  border: 1px solid var(--line, #262b3a);
  background: transparent;
  color: var(--ink, #e6e6eb);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

.cm-like:hover:not(:disabled) {
  border-color: #ff6b81;
  background: rgba(255, 107, 129, .08);
  transform: translateY(-1px);
}

.cm-like.is-liked {
  border-color: #ff4757;
  background: rgba(255, 71, 87, .14);
  color: #ff8e9b;
}

.cm-like:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.cm-like-heart {
  font-size: 1.15rem;
  line-height: 1;
}

/* 顔ぶれを少しずつ重ねて並べる */
.cm-likers {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted, #a7a8b3);
  font-size: .9rem;
}

.cm-liker-avatars {
  display: flex;
}

.cm-liker-avatars span {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 800;
  color: #10131a;
  border: 2px solid var(--bg, #0b0c10);
  margin-left: -8px;
}

.cm-liker-avatars span:first-child {
  margin-left: 0;
}

/* ===== コメント ===== */
.cm-comments {
  margin: 40px 0 0;
}

.cm-comments h2 {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 0 18px;
  /* 記事本文の h2 装飾を打ち消す */
  background: none;
  box-shadow: none;
  padding: 0;
}

.cm-comment-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.cm-comment-form textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line, #262b3a);
  background: var(--panel, #11131a);
  color: var(--ink, #e6e6eb);
  font-family: inherit;
  font-size: .95rem;
  line-height: 1.7;
}

.cm-comment-form textarea:focus {
  outline: none;
  border-color: var(--acc, #7aa2ff);
}

.cm-comment-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cm-comment-count {
  color: var(--muted, #a7a8b3);
  font-size: .8rem;
}

.cm-comment-submit {
  padding: 10px 22px;
  border-radius: 10px;
  border: none;
  background: var(--acc, #7aa2ff);
  color: #fff;
  font-family: inherit;
  font-weight: 800;
  cursor: pointer;
}

.cm-comment-submit:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.cm-comment-signin {
  padding: 16px 18px;
  border: 1px dashed var(--line, #262b3a);
  border-radius: 10px;
  color: var(--muted, #a7a8b3);
  font-size: .9rem;
  margin-bottom: 24px;
}

.cm-comment-signin a {
  color: var(--acc, #7aa2ff);
}

.cm-comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cm-comment {
  display: flex;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line, #262b3a);
}

.cm-comment:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.cm-comment-avatar {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: .9rem;
  color: #10131a;
}

.cm-comment-main {
  flex: 1;
  min-width: 0;
}

.cm-comment-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.cm-comment-name {
  font-weight: 700;
  font-size: .92rem;
}

.cm-comment-time {
  color: var(--muted, #a7a8b3);
  font-size: .78rem;
}

.cm-comment-delete {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--muted, #a7a8b3);
  font-family: inherit;
  font-size: .78rem;
  cursor: pointer;
  padding: 2px 4px;
}

.cm-comment-delete:hover {
  color: #ff6b81;
}

/* 投稿内容は textContent で入れるので、改行だけ活かす */
.cm-comment-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.8;
  font-size: .95rem;
  margin: 0;
}

.cm-comment-empty {
  color: var(--muted, #a7a8b3);
  font-size: .9rem;
}

.cm-error {
  color: #ff8e9b;
  font-size: .85rem;
  min-height: 1.2em;
}

/* 購入直後などに出す短い知らせ */
.cm-flash {
  margin: 24px 0;
  padding: 14px 18px;
  border-radius: 10px;
  border: 1px solid rgba(122, 162, 255, .4);
  background: rgba(122, 162, 255, .1);
  color: var(--ink, #e6e6eb);
  font-size: .92rem;
  text-align: center;
}

.cm-flash.is-error {
  border-color: rgba(255, 71, 87, .45);
  background: rgba(255, 71, 87, .1);
}

@media (max-width: 600px) {
  .cm-paywall-head {
    gap: 12px;
  }

  .cm-paywall-head h2 {
    font-size: 1.1rem;
  }

  .cm-buy {
    padding: 14px 16px;
    font-size: .95rem;
  }

  .cm-reaction {
    padding: 24px 0;
  }

  .cm-comment-form-row {
    flex-direction: column;
    align-items: stretch;
  }

  .cm-comment-submit {
    width: 100%;
  }
}
