.for_b3 .comment {
  margin-bottom: 50px;
}

.for_b3 .link {
  display: block;
  font-size: 24px;
  margin-bottom: 25px;
}

.for_b3 details summary {
  list-style: none;
  cursor: pointer;
  position: relative;
  padding-left: 1.5em;
  margin-bottom: 0.5em;
}

.for_b3 details summary::before {
  content: "▶";
  position: absolute;
  left: 0;
  top: 0;
}

.for_b3 details[open] summary::before {
  content: "▶";
  transform: rotate(90deg);
}

/* b3/member ページ */

.member {
  width: 100%;
}

.member .member-item {
  width: 100%;
  font-size: 14px;
}

.member .member-img {
  width: 30%;
  float: left;
  padding-right: 20px;
  padding-top: 10px;
}

.member .name {
  font-size: 24px;
  margin-bottom: 10px;
}

.member .member-content {
  width: 70%;
  float: right;
}

.member .comment {
  margin-top: 10px;
}

.member .subtitle {
  font-size: 20px;
}

.clear {
  clear: both;
  margin-bottom: 50px;
}

.border {
  border-bottom: solid #c0c0c0;
}

.access-container {
  max-width: 500px;
  margin: 0px auto;
}

/* Card & accordion styles for mobile member items */
.member-item.mobile-only.card {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  padding: 2px;
  margin: 2px 0;
  overflow: hidden;
}

.member-item.mobile-only.card .member-content .name {
  font-size: 24px;
  margin-bottom: 0px;
}

.member-item.mobile-only.card .login-name {
  color: #666;
}

@media (max-width: 768px) {
  .desktop-only {
    display: none;
  }

  .member-item.mobile-only.card {
    display: block; /* use block, layout top-row as flex */
  }

  .member-item.mobile-only.card .top-row {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    padding: 0 4px;
  }

  .member-item.mobile-only.card {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
  }

  .member-item.mobile-only.card .member-img {
    padding-top: 0px;
    padding-right: 0px;
    width: 96px;
    height: 96px;
    min-width: 0;
    flex: 0 0 96px; /* prevent shrinking below 96px in flex layout */
    margin-right: 24px;
  }

  .member-item.mobile-only.card .member-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin-right: 6px;
  }

  .member-item.mobile-only.card .member-content {
    order: 2;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
  }

  .member-item.mobile-only.card .name-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  /* Preview block: show first ~2 lines with fade */
  .member-item.mobile-only.card .preview {
    position: relative;
    width: calc(100% - 8px);
    box-sizing: border-box;
    margin: 12px 4px 0 4px; /* top margin increased to 12px as requested */
    padding-bottom: 0;
  }

  /* previously hid preview internals when expanded; removed to keep vertical position stable */

  .member-item.mobile-only.card .preview-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1; /* show 1 line */
    line-clamp: 1;
    overflow: hidden;
    max-height: 1.3em; /* fallback for 1 line */
    transition: max-height 300ms ease, -webkit-line-clamp 0s;
    color: #c0c0c0;
    margin: 0;
  }

  .member-item.mobile-only.card .preview-heading {
    font-size: 16px;
    margin: 0 0 8px 0; /* top margin reduced so pro-item layout remains unchanged when preview top increases */
    font-weight: 600;
    line-height: 1.2;
  }

  .member-item.mobile-only.card .preview-fade {
    pointer-events: none;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 32px; /* sits above the "詳細を見る" button */
    height: 1.2em;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.8) 60%, rgba(255,255,255,1) 100%);
  }

  /* wrapper for transform-based animation (FLIP) */
  .member-item.mobile-only.card .preview .preview-inner {
    transform-origin: top left;
    will-change: transform, opacity;
    transition: transform 300ms ease, opacity 200ms ease;
    display: block;
    box-sizing: border-box;
    padding-bottom: 44px; /* reserve space for the button so text vertical position doesn't shift */
  }

  /* expanded preview: final state (preview-inner at natural transform) */
  .member-item.mobile-only.card .preview.expanded .preview-inner {
    transform: none !important;
    opacity: 1 !important;
  }

  /* when expanded, show full preview-text without clamp so its position matches during FLIP */
  .member-item.mobile-only.card .preview.expanded .preview-text {
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    overflow: visible;
    max-height: none;
    color: inherit;
  }

  .member-item.mobile-only.card .preview.expanded .preview-fade {
    display: none;
  }

  /* place button absolutely so hiding it won't shift text vertically */
  .member-item.mobile-only.card .show-details {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 8px;
    display: inline-block;
    border: none;
    background: transparent;
    color: var(--heading-color);
    padding: 0;
    font-size: 20px;
    text-align: left;
    box-sizing: border-box;
    cursor: pointer;
  }

  .member .member-img img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    max-width: none;
  }
}

@media (min-width: 769px) {
  .mobile-only {
    display: none;
  }
}