/* ===================================
   基本設定
=================================== */
html {
  overflow-y: scroll;
}

body {
    margin: 0;
    font-family: sans-serif;
    background-color: #fff;
    color: #111;
}

a {
  text-decoration: none;
  color: #111;
}

/* ===================================
   RSSエリアグリッド（列数可変）
=================================== */
#rss-area {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 6px;
    padding: 6px;
}

/* ===================================
   admtm-item カード
=================================== */
.admtm-item {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 220px;         /* カード高さ */
    margin: 0 auto;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.admtm-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

/* ===================================
   サムネイル
=================================== */
.admtm-item img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    display: block;
}

/* ===================================
   タイトル
=================================== */
.admtm-title {
    font-size: 14px;
    padding: 4px 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;   /* 最大2行表示 */
    -webkit-box-orient: vertical;
    word-break: break-word;
    flex-grow: 1;
}

/* ===================================
   ヘッダー
=================================== */
.header-fixed {
    position: sticky;
    top: 0;
    width: 100%;
    height: 50px;
    box-sizing: border-box;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    background-color: #fff;  /* 透過防止で意図的に書いている */
    border-bottom: 1px solid #ddd;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.header-fixed h1 a {
    color: #ff80c1;
    font-size: 18px;
    line-height: 60px;
}

.header-fixed h1 a:hover {
    opacity: 0.7;
}

/* ===================================
   タブボタン
=================================== */
.tab-container {
    display: flex;
    gap: 6px;
}

.tab-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  font-size: 14px;
  font-weight: bold;
  flex: 1 1 auto; /* 画面幅に応じて自動縮小 */
  box-sizing: border-box;
  border: 1px solid #ff80c1;
  border-radius: 6px;
  color: #ff80c1;
}

.tab-button:hover {
  background-color: #ff80c1;
  color: #fff;
}

/* ===================================
   広告エリア
=================================== */
@media (min-width: 751px) {
/* 忍者Admax（PC : 751px以上） */
  .admax {
    text-align: center;
  }
}

/* ===================================
   個別記事エリア
=================================== */
.post-article {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.post-article h1 {
  font-size: 18px;
  text-align: left;
}

.post-article img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.post-article a:hover {
  color: #ff80c1;
}

@media (max-width: 750px) {
  .post-article {
    max-width: 100%;
    padding: 0 12px;
    box-sizing: border-box;
  }

  .post-article h1 {
    font-size: 16px;
    line-height: 1.4;
  }
}

/* ===================================
   aboutページ
=================================== */
.about-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 12px;
    box-sizing: border-box;
    line-height: 1.0;
}

.about-container a:hover {
  color: #ff80c1;
}

.about-container .about-box h3 {
  padding-bottom: 6px;
  margin-bottom: 12px;
  border-bottom: 2px solid #ff80c1;
}

.about-support p {
  display: flex;
  align-items: center;
  gap: 8px;
}

.about-container .about-box {
  margin-bottom: 36px;
}

/* ===================================
   フッター
=================================== */
footer {
    text-align: center;
    padding: 10px;
    font-size: 12px;
}

footer a:hover {
    color: #ff80c1;
}

/* ===================================
   ライト/ダークモード対応
=================================== */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #121212;
        color: #e0e0e0;
    }

    a {
        color: #e0e0e0;
    }

    .admtm-item {
        background-color: #1e1e1e;
        border: 1px solid #333;
        box-shadow: 0 1px 4px rgba(0,0,0,0.6);
    }

    .admtm-item:hover {
        box-shadow: 0 3px 8px rgba(0,0,0,0.8);
    }

    .header-fixed {
        background-color: #121212;
        border-bottom: 1px solid #444;
    }

    .tab-button:hover {
        background-color: #ff80c1;
        color: #121212;
    }
}