/* ----------------------------- */
/*  共通セット */
/* ----------------------------- */

html {
  overflow-y: scroll;
}

body, button, .tab-button {
  margin: 0 auto;
  padding: 0 15px;
  font-family: sans-serif;
  max-width: 800px;
  font-size: 0.9rem;
  box-sizing: border-box;
}

.header-fixed {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: inherit;
}

a {
  text-decoration: none;
}

footer {
  display: flex;
  justify-content: center;
}

.rss-meta {
  color: #999;
  font-size: 0.68rem;
  border-bottom: 1px solid;
  padding-bottom: 6px;
  margin-bottom: 6px;
}

#rss-area {
  opacity: 1;
  transition: opacity 0.03s ease;
}

#rss-area.fade-out {
  opacity: 0;
}

/* ----------------------------- */
/*  タイトル */
/* ----------------------------- */

h1 {
  text-align: center;
  margin: 0 0 2px 0;
  font-size: 1.5rem;
}

h2 {
  text-align: center;
  font-size: 1.3rem;
}

/* ----------------------------- */
/*  タブボタン配置 */
/* ----------------------------- */

.tab-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px;
  max-width: 800px;
  margin: 0 0 3px 0;
  padding: 0;
}

.tab-button {
  flex: 1 1 calc((100% - 12px) / 4);
  padding: 1px 1px;
  border: 1px solid;
  cursor: pointer;
  font-size: 0.87rem;
  font-weight: bold;
  border-radius: 7px;
  transition: 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* ----------------------------- */
/* 個別記事用（post-link） */
/* ----------------------------- */

.post-content {
  margin-top: 20px;
  line-height: 2;
}

.post-link {
  display: block;
  margin-bottom: 2px;
  font-size: 0.9rem;
}

.post-link::before {
  content: '・';
  margin-right: 5px;
}

/* 個別記事内の見出し調整 */
#rss-area h2 {
  font-size: 1.2rem;
  border-bottom: 2px solid #555;
  padding-bottom: 10px;
  margin-bottom: 20px;
  text-align: center;
}

/* ----------------------------- */
/*  ライトモード */
/* ----------------------------- */

body {
  background-color: #fff;
  color: #393939;
}

a {
  color: #191919;
}

a:hover {
  color: #a9a9a9;
}

h1 a {
  color: #393939;
}

.tab-button {
  background-color: #fff;
  color: #555;
  border-color: #bbb;
}

.tab-button:hover {
  background: #ddd;
}

.tab-button.active {
  background-color: #555;
  color: #fff;
}

/* ----------------------------- */
/*  ダークモード */
/* ----------------------------- */

@media (prefers-color-scheme: dark) {

  body {
    background-color: #333;
    color: #fff;
  }

  a {
    color: #fff;
  }

  a:hover {
    color: #a9a9a9;
  }

  h1 a {
    color: #fff;
  }

  .tab-button {
    background-color: #333;
    color: #bbb;
    border-color: #777;
  }

  .tab-button:hover {
    background: #777;
  }

  .tab-button.active {
    background-color: #bbb;
    color: #333;
  }

}

/* ----------------------------- */
/*  レイアウト調整 */
/* ----------------------------- */

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

/* タブを1行に強制（PC : 751px以上） */
  .tab-container {
    flex-wrap: nowrap;
    gap: 6px;
  }

  .tab-button {
    flex: 1 1 calc((100% - 28px) / 8);
    white-space: nowrap;
  }
}