body {
  font-family: sans-serif;
  margin: 0;
  padding: 0;
  background: #f9f9f9;
}

.site-topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #000;
  padding: 10px;
  position: relative;
}

.topbar-left {
  position: absolute;
  left: 10px;
  top: 1.25em;
}

.back-button {
  font-size: 1.4em;
  padding: 0.2em 0.5em;
  border: none;
  background: #000;
  color: white;
  text-decoration: none;
  border-radius: 6px;
}

.topbar-center {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.site-name {
  font-size: 1.5em;
  font-weight: bold;
  color: white;
  text-align: center;
  margin-top: 0.5em;
  position: relative;
  left: 0%;
  transform: none;
}

.site-name-link,
.site-name-link:visited {
  color: white;
  text-decoration: none;
}

.search-form {
  display: flex;
  justify-content: center;
  align-items: center;
  background: white;
  padding: 0.3em 0.5em;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  width: 75vw;
  max-width: 800px;
}

.search-input {
  -webkit-appearance: none;
  appearance: none;
  background-color: white !important;
  color: black;
  font-size: 1em;
  padding: 0.4em;
  border: none;
  outline: none;
  width: 100%;
  box-shadow: none !important;   /* ←青い影を除去 */
}

.search-input:focus {
  outline: none;
  box-shadow: none;
  background-color: white;
}

.search-button {
  font-size: 1.2em;
  background: none;
  border: none;
  cursor: pointer;
  color: black;
}

.page-header {
  padding: 10px;
  padding-bottom: 0;
  background: #f9f9f9;
  margin-bottom: 0;
  margin-top: 0;
}

.header-box {
  max-width: clamp(320px, 90vw, 800px);
  margin: 0 auto;
  padding: 0.5em;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  text-align: center;
}

.description {
  font-size: clamp(0.5em, 3.8vw, 0.65em);
  color: #555;
  line-height: 1.4;
}

.description p {
  margin: 0.2em 0;
}

.grid-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1em;
  padding: 0 20px 20px 20px;
}

.main-content {
  display: flex;
  flex-direction: column;
  gap: 0;
}

h2 {
  font-size: 1.4em;
  font-weight: 600;
  color: #333;
  margin: 24px 0 12px;
  padding-bottom: 4px;
  border-bottom: 1px solid #ccc;  /* うっすら区切り線のみ */
}

.card-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5em;
}

@media (min-width: 768px) {
  .card-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .card-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1400px) {
  .card-container {
    grid-template-columns: repeat(4, 1fr);
  }
}

input:-webkit-autofill {
  box-shadow: 0 0 0px 1000px white inset !important;
  -webkit-box-shadow: 0 0 0px 1000px white inset !important;
  -webkit-text-fill-color: black !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* 🧱 セクション全体を横並び（PC時）に並べるグリッド */
.section-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding: 0 1em 1em 1em; /* 上:0, 右:1em, 下:1em, 左:1em */
}

@media (min-width: 768px) {
  .section-grid {
    /*padding: 1em;*/
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }
}

/* 📦 各ジャンルのエリア（1ブロック） */
.section-box {
  background-color: white; /* ← 追加 */
  padding: 1em;
  border-radius: 8px;
}

/* 🧭 見出しと「もっと見る」 */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.3em;
  flex-wrap: nowrap;
  gap: 0.5em;
}

.section-header h2 {
  font-size: 0.8em;
  font-weight: bold;
  margin: 0;
  background: none;     /* ← オレンジ帯削除 */
  padding: 0;
  border: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
}

.more-link {
  font-size: 0.7em;
  white-space: nowrap;
  text-decoration: none;
  color: #0077cc;
  flex-shrink: 0;
}

.more-link:hover {
  text-decoration: underline;
}

/* 🖼️ 各ジャンル内のカード表示：2×2固定グリッド */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

/* 🧩 商品カード本体 */
.card {
  background: white;
  border-radius: 6px;
  padding: 0.5em;
  text-align: center;
  font-size: 0.5em;
}

.card img {
  width: 100%;
  max-width: 120px;
  max-height: 120px;
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
  object-fit: contain;
}

.card p {
  margin-top: 0.1em;   /* ← 画像とテキストの間を狭く */
  margin-bottom: 0;    /* ← 下余白を無くす */
  font-weight: bold;
  font-size: 0.5em;
  color: #333;
}

.card a {
  text-decoration: none;  /* ← 下線を消す */
  color: inherit;         /* ← テキスト色も継承（お好みで） */
}

.load-more-btn {
  display: block;
  margin: 1em auto;
  padding: 0.6em 1.5em;
  background-color: #0077cc;
  color: white;
  font-size: 0.8em;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  max-width: 250px;
}

.load-more-btn:hover {
  background-color: #005fa3;
}

.category-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 1em;
  background-color: white; /* ← 追加 */
  border-radius: 8px;
}

@media (min-width: 768px) {
  .category-card-grid {
    grid-template-columns: repeat(8, 1fr);
  }
}

.breadcrumb {
  font-size: 0.8em;
}

.category-header {
  padding: 0.5em 0;
}

.subcategory-toggle-box {
  background: white;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 0.5em 1em;
  max-width: 250px;         /* ✅ 最大幅を制限 */
  margin-top: 0.5em;
}

.toggle-button {
  all: unset;
  cursor: pointer;
  font-size: 0.8em;
  display: inline-flex;
  align-items: center;
}

.toggle-button span {
  margin-left: 0.5em;
}

.subcategory-list {
  margin-top: 0.5em;
  font-size: 0.75em;
  padding-left: 1em;
}

.category-card-grid-title {
  grid-column: 1 / -1;
  font-size: 0.8em;
  font-weight: bold;
  margin-bottom: 0.5em;
  text-align: left;
}

.commento-wrapper {
  width: auto; /* 画面いっぱいを防ぐ */
  max-width: 800px;
  margin: 0 auto;
  padding: 0.5em;
  border: 1px solid #ddd;
  background-color: #fdfdfd;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  margin-bottom: 1em; /* 👈 これを追加 */
}

/* スマホ（幅が600px以下）のときだけ左右に余白をつける */
@media screen and (max-width: 600px) {
  .commento-wrapper {
    margin-left: 1em;
    margin-right: 1em;
  }
}

.commento-title {
  font-size: 1.4em;
  font-weight: bold;
  margin-bottom: 10px;
  color: #333;
  text-align: center;
}

/* コメント送信ボタンのサイズ・位置修正 */
.commento-submit-button {
  padding: 4px 12px !important;
  font-size: 14px !important;
  height: auto !important;
  margin: 8px 0 0 8px !important;
  line-height: 1.2 !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
  max-width: 120px !important;
}

/* Replyボタンを右端に寄せる */
.commento-option-reply {
  right: 0px !important;
}

/* Reply cancelボタンを右端に寄せる */
.commento-option-cancel {
  right: 0px !important;
}

/* 他のボタンが非表示なので、container幅を縮小しても良い */
.commento-options {
  width: 40px !important;
}

.commento-markdown-button {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.commento-anonymous-checkbox-container {
  display: none !important;
}

/* 「Upvotes」タブ */
a#commento-sort-policy-score-desc {
  display: none !important;
}

/* コメント折りたたみボタン */
.commento-option-collapse {
  display: none !important;
}

/* 投票ボタン（Upvote / Downvote） */
.commento-option-upvote,
.commento-option-downvote {
  display: none !important;
}

/* 🛠️ 返信用コメント欄の構造を整える */
.commento-card .commento-button-margin {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  gap: 8px !important;
  margin-top: 8px;
}

/* 📦 テキストエリアの見た目を維持 */
.commento-card .commento-textarea-container {
  width: 100% !important;
}

/* ✉️ コメントするボタンの調整（右下寄せ＋サイズ調整） */
.commento-card .commento-submit-button {
  padding: 4px 12px !important;
  font-size: 14px !important;
  height: auto !important;
  line-height: 1.2 !important;
  box-sizing: border-box !important;
  max-width: 120px !important;
  align-self: flex-end !important;
}

.footer {
  background-color: #000;
  color: white;
  padding: 10px 0;
  text-align: center;
  font-size: 0.6em;
}

.footer a {
  color: #ccc;
  text-decoration: none;
  margin: 0 4px;
  font-weight: bold; /* ← 追加で太字にする */
}

.footer a:hover {
  text-decoration: underline;
}

.footer-note p {
  margin-top: 10px;
  color: #ddd;
  font-size: 0.8em; /* ← 追加：少し大きめに */
  font-weight: bold; /* ← 必要に応じて太字も可 */
}


.page-content {
  padding: 0 0 40px 0; /* 上:0, 右:0, 下:40px, 左:0 */
}

.content-box {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
  line-height: 1.7;
  font-size: 16px;
}

h1 {
  font-size: 1.8em;
  font-weight: bold;
  color: #222;
  margin: 20px 0 10px;
  border-bottom: 2px solid #ddd; /* 下にうっすら線だけ */
  padding-bottom: 6px;
}

.faq-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 1em;
  background-color: #f9f9f9;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.faq-section h2 {
  font-size: 1.5em;
  margin-top: 0;
  padding-top: 0;
  margin-bottom: 0.5em;
  text-align: center;
  color: #333;
}

h3.accordion-heading {
  margin: 0;
  font-size: 1em;
  font-weight: normal;
}

.accordion-item {
  margin-bottom: 0.5em;
  border: 1px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.accordion-header {
  width: 100%;
  padding: 1em;
  text-align: left;
  background-color: #f0f0f0;
  border: none;
  outline: none;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s ease;
  font-size: 1em; /* ← Qの文字サイズ */
  color: #000; /* ← テキストを常に黒に固定 */
  -webkit-text-fill-color: #000; /* ← iOS Safari対策 */
  background-color: #f0f0f0;
  -webkit-tap-highlight-color: transparent; /* タップ時の青枠も防止 */
}

.accordion-header:hover {
  background-color: #e0e0e0;
}

.accordion-content {
  display: none;
  padding: 0.25em 1em; /* ← 上下余白を約1/4に */
  border-top: 1px solid #ddd;
  font-size: 0.8em; /* ← Qと同じ文字サイズに */
  color: #444;
  background-color: #fff;
}

.feature-accordion-card {
  border-radius: 6px;
  padding: 0rem 0rem;
  color: white;
  text-align: center;
  /*line-height: 1.5;*/
  position: relative; /* この中で絶対位置を取る */
  overflow: visible;  /* contentがはみ出ても見えるように */
  flex: 0 0 100%; /* デフォルト：全幅 */
}

@media (max-width: 767px) {
  .feature-accordion-card {
    flex: 0 0 49%; /* スマホで2列 */
  }
}

@media (min-width: 768px) {
  .feature-accordion-card {
    flex: 0 0 24.5%; /* PCで4列 */
  }
}
@media (min-width: 768px) {
  .feature-accordion-card .feature-accordion-content{
    font-size: 0.8rem;
  }
}

.feature-accordion-card p {
  margin-top: 0rem;
  margin-bottom: 0.5rem;
}


/* グラデーションカラー（画像の見た目を再現） */
.feature-accordion-card.blue {
  background: linear-gradient(to right, #42d0f5, #2176e8); /* 青〜水色 */
}

.feature-accordion-card.pink {
  background: linear-gradient(to right, #fc6cbb, #feb960); /* ピンク〜オレンジ */
}

.feature-accordion-card.purple {
  background: linear-gradient(to right, #b266ff, #3d5afe); /* 紫〜青紫 */
}

.feature-accordion-card.green {
  background: linear-gradient(to right, #1ec9c5, #60d937); /* 緑〜黄緑 */
}

.feature-accordion-title {
  cursor: pointer;
  padding: 0.25rem;
  margin: 0;
  font-size: 0.8rem;
  /*margin-top: 0.5rem;*/
  margin-bottom: 0rem;
  font-weight: bold;
  display: block;
}

.feature-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  padding: 0 0.5rem;
  font-size: 0.6rem;
}

.feature-accordion-card.active .feature-accordion-content {
  max-height: 300px;
}

/* 共通：グリッド配置 */
.feature-accordion-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.5rem;
  align-items: flex-start; /* ← これが重要！ */
  justify-content: center; /* ← これが中央揃えの鍵！ */
}
