body {
  margin: 0;
  font-family: 'Helvetica Neue',Arial,'Yu Gothic',sans-serif;
  background: #fff;
  color: #262626;
}

.container {
  display: flex;
  min-height: 100vh;
  background: #fff;
}

/* -- SIDEBAR -- */
.sidebar {
  width: 270px;
  background: #f7f7f8;
  color: #262626;
  padding: 2em 1em 1em 1em;
  box-shadow: 2px 0 8px 0 #f2f2f2;
  display: flex;
  flex-direction: column;
  gap: 2em;
}

.sidebar-title {
  font-size: 1.15em;
  font-weight: bold;
  margin-bottom: 0.6em;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.35em;
  letter-spacing: 0.03em;
}

.tag-ranking-list, .ym-ranking-list {
  list-style: none;
  padding-left: 0;
}

.tag-ranking-list li,
.ym-ranking-list li {
  margin-bottom: 0.65em;
  display: flex; align-items: center;
}

.tag {
  font-size: 0.93em;
  padding: 0.3em 1em;
  border-radius: 16px;
  margin-right: .6em;
  border: 1px solid #eee;
  display: inline-block;
  font-weight: bold;
  background: #f3f3f3;
  color: #397ab7;
  transition: background .2s, box-shadow .2s, color .2s;
}

.ym-label {
  font-size: 0.99em;
  color: #228882;
  margin-right: .65em;
  padding: .22em .8em;
  border-radius: 13px;
  background: #e2faf3;
  border: 1px solid #b7e3d2;
  font-weight: 500;
  transition: background .2s, box-shadow .2s;
}

.tag-count {
  background: #ededed;
  color: #888;
  border-radius: 9px;
  font-size: 0.8em;
  padding: 0 0.7em;
  margin-left: 0.1em;
}

/* タグ色分け（例） */
.tag-okunai     { background: #ffe066; color: #837000; border-color: #ffe066;}
.tag-shuchi     { background: #ffd6a3; color: #ad7c0c; border-color: #ffd6a3;}
.tag-osikko     { background: #f5cccc; color: #b42c2c; border-color: #f5cccc;}
.tag-roshutsu   { background: #c2e0ff; color: #236c90; border-color: #c2e0ff;}
.tag-higyaku    { background: #ffe0e0; color: #d34747; border-color: #ffe0e0;}
.tag-sukatoro   { background: #e0e9ff; color: #324fa7; border-color: #e0e9ff;}
.tag-toilet     { background: #e6fad1; color: #497d08; border-color: #e6fad1;}
.tag-other      { background: #edf2ff; color: #274694; border-color: #edf2ff;}

.tag-clickable, .ym-clickable {
  cursor: pointer;
  transition: background .2s, box-shadow .2s;
}
.tag-clickable:hover {
  background: #ececff !important;
}
.ym-clickable:hover {
  background: #c9f5ea !important;
}

/* -- MAIN CONTENT -- */
.main-content {
  flex: 1;
  padding: 2em 4em;
  background: #fff;
}

/* --- FILTER RESET BUTTON --- */
.reset-filter-btn {
  display: inline-block;
  margin-bottom: 1.5em;
  padding: 0.4em 1.2em;
  border-radius: 6px;
  border: 1px solid #bdbdbd;
  background: #f6f6ff;
  color: #397ab7;
  font-size: 1em;
  cursor: pointer;
  transition: background .2s;
}
.reset-filter-btn:hover {
  background: #e8eafe;
}

/* --- 記事一覧カード表示 --- */
.article-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6em;
}

/* カード自体の見た目 */
.article-card {
  background: #fff;
  border: 1px solid #e4e4ef;
  border-radius: 12px;
  padding: 1.5em 1.2em;
  box-shadow: 0 2px 8px rgba(60,64,67,0.07);
  transition: box-shadow .1s;
  display: flex;
  flex-direction: column;
  min-height: 120px;
}
.article-card a {
  text-decoration: none;
  color: #397ab7;
}
.article-card .card-title {
  font-size: 1.07em;
  margin: 0 0 .3em;
  font-weight: bold;
}
.article-card .card-date {
  font-size: .87em;
  color: #aaa;
  margin-bottom: .7em;
}
.article-card .tag-list {
  margin-top: auto;
}
.article-card .tag {
  margin-right: 0.4em;
  margin-bottom: 0.3em;
  font-weight: 500;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .article-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 800px) {
  .container {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    padding: 1em;
    text-align: center;
    box-shadow: none;
    flex-direction: row; justify-content: center; gap:2em;
  }
  .main-content {
    padding: 1em;
  }
}
@media (max-width: 600px) {
  .article-cards {
    grid-template-columns: 1fr;
  }
  .sidebar {
    flex-direction: column;
    gap: 1em;
  }
}

/* --- 小さくなったときの余白調整など細かい調整は必要に応じて --- */

.kadai-banner {
  display: inline-block;
  padding: 0.32em 1.7em;
  background: #a076f2;  /* 紫（背景） */
  border: 2.5px solid #7c3aed; /* 濃い紫（枠） */
  color: #fff;
  border-radius: 20px;
  font-size: 1.2em;
  font-family: 'M PLUS Rounded 1c', 'Kiwi Maru', 'Yusei Magic', 'Yu Gothic', sans-serif;
  font-weight: 700;
  letter-spacing: 0.15em;
  margin-bottom: 1.6em;
  margin-top: 0.3em;
  box-shadow: 0 2px 10px #f2f2ff4d;
}

.simple-banner {
  display: inline-block;
  background: #ede9fe; /* 淡い紫 */
  color: #7157c6;
  border-radius: 8px;
  font-size: 0.92em;
  font-family: 'Nunito', 'M PLUS Rounded 1c', 'Yu Gothic', sans-serif;
  font-weight: 700;
  letter-spacing: 0.07em;
  padding: 0.10em 0.9em;
  min-width: 60px;   /* 横幅の下限（必要に応じて調整） */
  max-width: 100px;  /* 横幅の上限（必要に応じて調整） */
  text-align: center;
  margin-bottom: 1.1em;
  margin-top: 0.6em;
  box-shadow: 0 1px 6px 0 #ececff14;
  border: 1px solid #c7bff7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.article-meta {
  margin: 0.7em 0 0.2em 0;
  font-size: 1.01em;
  display: flex;
  align-items: center;
  gap: 0.7em;
}
.meta-label {
  color: #8c8799;
  margin-right: 0.5em;
  font-weight: bold;
  letter-spacing: 0.06em;
}
.stars {
  font-family: 'Nunito', 'M PLUS Rounded 1c', 'sans-serif';
  font-size: 1.15em;
  color: #f5b700;
  letter-spacing: 0.06em;
  user-select: none;
}
.gender-label {
  color: #888;
  font-size: 0.97em;
  margin-left: 0.08em;
  margin-right: 0.7em;
  vertical-align: middle;
}
/* emoji自体に大きさを合わせる場合はこちらを追加 */
.article-meta .gender-label ~ .gender-label { margin-right: 0; }

.heart-btn {
  outline: none;
  border: none;
  background: transparent;
  font-size: 1.05em;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  margin-top: 0.8em;
  padding: 0.06em 0.3em;
  border-radius: 16px;
  transition: background .15s;
  color: #9873cd;
  font-family: 'M PLUS Rounded 1c', 'Nunito', sans-serif;
  font-weight: 600;
}
.heart-icon {
  font-size: 1.21em;
  margin-right: 0.36em;
  vertical-align: -2px;
  transition: color .15s;
}
.hearted .heart-icon {
  color: #c239be;
  text-shadow: 0 0 3px #db8fff44;
}
.hearted {
  background: #fce8fd;
  color: #c239be;
}
.heart-btn:active {
  filter: brightness(0.96);
}

.footer {
  background: #f6f6fa;
  text-align: center;
  padding: 1.1em 0;
  font-family: 'M PLUS Rounded 1c', 'Nunito', sans-serif;
  border-top: 1px solid #ebeaf4;
  margin-top: 2.5em;
}
.footer-inner {
  display: inline-block;
}
.footer-link {
  color: #7157c6;
  text-decoration: none;
  font-size: 1.07em;
  font-weight: 600;
  letter-spacing: 0.08em;
  border-radius: 8px;
  padding: 0.18em 1.2em;
  transition: background .12s;
}
.footer-link:hover {
  background: #ede9fe;
  text-decoration: underline;
}

/* サイドバー下部に表示されるaboutリンクのスタイル */
.sidebar-bottom {
  margin-top: auto;
  padding-top: 1.7em;
  text-align: center;
}

.sidebar-about-link {
  display: inline-block;
  color: #7157c6;
  text-decoration: none;
  font-size: 1em;
  font-family: 'M PLUS Rounded 1c', 'Nunito', sans-serif;
  font-weight: 600;
  padding: 0.25em 1.3em;
  border-radius: 8px;
  background: #ece7fd;
  transition: background 0.13s, color 0.13s;
  margin-top: 0.9em;
  letter-spacing: 0.08em;
}
.sidebar-about-link:hover {
  background: #ded4fb;
  color: #5938b3;
  text-decoration: underline;
}

.sidebar-search-box {
  padding-bottom: 1.1em;
  text-align: center;
}
.sidebar-search-input {
  width: 85%;
  max-width: 180px;
  font-size: 1em;
  font-family: inherit;
  padding: 0.35em 0.8em;
  border: 1.5px solid #cabafd;
  border-radius: 14px;
  outline: none;
  background: #f7f7fa;
  color: #4c3066;
  margin-bottom: 0.2em;
  transition: border-color 0.16s;
}
.sidebar-search-input:focus {
  border-color: #8e7cf1;
  background: #f4f1fb;
}
