/* COMMUNITY：既存の色とカードに合わせる */

.community-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 24px 0;
}

.community-card {
  min-width: 0;
  overflow-wrap: anywhere;
}

.community-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  margin-bottom: 16px;
}

.community-card h3 a {
  text-decoration: none;
}

.community-card h3 a:hover {
  text-decoration: underline;
}

.community-meta {
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
}

.community-meta time {
  display: block;
  color: var(--red);
}

.community-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.community-categories a {
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 14px;
  font-weight: 800;
  text-decoration: none;
}

.community-categories a:hover {
  border-color: var(--red);
}

.community-category {
  scroll-margin-top: 140px;
  border-bottom: 1px solid var(--line);
}

.community-article {
  max-width: 820px;
  overflow-wrap: anywhere;
}

.community-article figure {
  margin: 28px 0;
}

.community-article figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
}

.community-body {
  line-height: 2;
  margin: 28px 0;
}

.community-body p {
  margin: 0 0 24px;
}

.community-categories a:focus-visible,
.community-card a:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 4px;
}

@media (max-width: 1000px) {
  .community-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .community-grid {
    grid-template-columns: 1fr;
  }

  .community-card img {
    height: auto;
    max-height: 340px;
    object-fit: contain;
  }

  .community-category {
    scroll-margin-top: 90px;
  }

  .navlinks.is-open {
    max-height: calc(100dvh - 64px);
    overflow-y: auto;
  }
}
/* 店主の思い：指定した位置で改行 */
.community-article h2.title {
  white-space: pre-line;
  font-size: clamp(20px, 4.5vw, 42px);
  line-height: 1.55;
  letter-spacing: 0;
}

/* 続きを開く操作を分かりやすくする */
.community-article details {
  margin: 24px 0;
}

.community-article details > summary {
  position: relative;
  display: list-item;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
  padding: 14px 20px;
  border: 1px solid var(--navy, #1B3756);
  border-radius: 8px;
  background: #F5F3EE;
  color: var(--navy, #1B3756);
  font-weight: 700;
  line-height: 1.6;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
}

.community-article details > summary:hover {
  background: #EAE7DF;
}

.community-article details > summary:focus-visible {
  outline: 3px solid var(--red, #FF3131);
  outline-offset: 4px;
}

.community-article details[open] > summary {
  margin-bottom: 24px;
}