/* ベース */
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  background-color: #ffffff;
  color: #222;
  line-height: 1.9;
}

/* ヘッダー */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
  border-bottom: 1px solid #333;

  position: sticky;   /* ← 追加 */
  top: 0;             /* ← 追加 */
  z-index: 1000;      /* ← 追加 */
  background: #000;   /* ← 追加（透け防止） */
}

.header-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 5px 5px;
}

.logo {
  height: 28px;   /* ← 高さ固定が超重要 */
  width: auto;
  display: block;
}

/* メイン */
.main {
  padding: 20px 16px;
}

/* 記事 */
.article {
  max-width: 680px;
  margin: 0 auto;
}

/* タイトル */
.title {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 12px;
}

/* 日付など */
.meta {
  color: #888;
  font-size: 14px;
  margin-bottom: 24px;
}

/* 見出し */
h2 {
  font-size: 20px;
  margin-top: 32px;
  margin-bottom: 12px;
  font-weight: 600;
}

/* 本文 */
p {
  font-size: 16px;
  margin: 16px 0;
  word-break: break-word;
}

/* 画像 */
.blog-img {
  width: 100%;
  height: auto;
  margin: 24px 0;
  border-radius: 6px;
}

/*ユーチューブリンク対応用*/
.youtube {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;   /* 新しいブラウザならこちらがおすすめ */
    margin: 24px 0;
}
.youtube iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 6px;
}

/* スマホ最適化 */
@media (max-width: 600px) {
  .title {
    font-size: 25px;
  }

  p {
    font-size: 15px;
  }
}

/* Footer icons */
.card-footer {
  padding-left: 10px;
  display: flex;
  gap: 20px;
  margin-top: 16px;
}

/* アイコン画像の共通設定 */
.icon-img {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  filter: brightness(0);
  white-space: nowrap;
  cursor: pointer;
}

.icon-img img {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}


.count {
  font-size: 15px;
  margin: 0;
  padding: 0;
}

.card-header {
  display: flex;
  align-items: center;
  padding-bottom: 10px;
  padding-top: 10px;
}

.user-ico {
  width: 40px;
  height: 40px;
  background: #444;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 10px;
}

.username {
  font-size: 16px;
}

/*コメント入力用*/
  .content-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    inset: 0;
    background: rgba(0,0,0,0.5);

    justify-content: center;
    align-items: center;
}

.content-modal-main {
    width: 500px;
    max-width: 90%;
    background: white;
    color: black;
    border-radius: 16px;
    padding: 20px;
    box-sizing: border-box;
}

.content-close {
    float: right;
    cursor: pointer;
    font-size: 24px;
}

.content-textarea {
    width: 100%;
    height: 120px;
    resize: none;
    margin-top: 10px;
    padding: 10px;
    box-sizing: border-box;
}

.content-footer {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comment {
    border: 1px solid rgb(80, 80, 80);
    padding: 20px;
    margin-top: 2.5px;
}

.next-btn {
    width: 100%;
    margin-top: 24px;
    padding: 14px;
    background: rgb(50, 50, 50);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

/*削除ボタン*/
.delete-btn {
  margin-top: 10px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgb(255, 0 ,0);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

.delete-btn:active {
  background: rgb(100, 0, 0);
}