/* Gutenberg responsive visibility controls */
@media (max-width: 767px) {
  .best-hide-mobile { display: none !important; }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .best-hide-tablet { display: none !important; }
}

@media (min-width: 1025px) {
  .best-hide-desktop { display: none !important; }
}

/* Author block: one structure that adapts naturally to mobile */
.best-author-box .wp-block-columns { gap: 24px; }
.best-author-box a { font-weight: 700; }
@media (max-width: 781px) {
  .best-author-box { text-align: center; }
  .best-author-box .wp-block-columns { gap: 12px; }
  .best-author-box .wp-block-column:first-child { flex-basis: auto !important; }
  .best-author-box .wp-block-image { margin-bottom: 4px; }
}

/* Core Gutenberg replacement for the old Spectra icon list. */
.best-icon-list { list-style: none; padding-left: 0; }
.best-icon-list li { position: relative; padding-left: 1.8em; margin-bottom: .55em; }
.best-icon-list li::before { content: "✓"; position: absolute; left: 0; top: 0; font-weight: 700; color: #223070; }

/* Related article card — JIN:R / hitodeblog-style basic blog card. */
.best-related-card {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  margin: 36px 0 !important;
  padding: 24px 20px 20px !important;
  border: 1px solid #d2a901 !important;
  border-radius: 9px !important;
  background: #fafafa !important;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.best-related-card:hover,
.best-related-card:focus-within {
  transform: translateY(-2px);
  border-color: #c39a00 !important;
  box-shadow: 0 8px 18px rgba(34, 48, 112, .10);
}
.best-related-card .best-related-label {
  position: absolute;
  top: -12px;
  left: 18px;
  z-index: 2;
  display: inline-block;
  width: auto;
  margin: 0 !important;
  padding: 0 8px !important;
  background: #fafafa !important;
  color: #223070 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.7 !important;
  white-space: nowrap;
}
.best-related-card .best-related-inner {
  display: grid !important;
  grid-template-columns: 154px minmax(0, 1fr) 24px;
  gap: 20px !important;
  align-items: center !important;
  margin: 0 !important;
}
.best-related-card .best-related-inner > .wp-block-column {
  min-width: 0;
  flex-basis: auto !important;
}
.best-related-card .best-related-thumb {
  margin: 0 !important;
  overflow: hidden;
  border-radius: 2px;
}
.best-related-card .best-related-thumb a,
.best-related-card .best-related-thumb img {
  display: block;
  width: 100%;
}
.best-related-card .best-related-thumb img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.best-related-card .best-related-title {
  margin: 0 !important;
  color: #223070 !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  line-height: 1.55 !important;
  overflow-wrap: anywhere;
}
.best-related-card .best-related-title a {
  color: inherit !important;
  text-decoration: none !important;
}
.best-related-card .best-related-title a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: 9px;
}
.best-related-card .best-related-title a:focus-visible {
  outline: 2px solid #223070;
  outline-offset: 3px;
}
.best-related-card:hover .best-related-title a {
  opacity: .78;
}
.best-related-card .best-related-arrow-column {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
}
.best-related-card .best-related-arrow {
  margin: 0 !important;
  color: #d2a901 !important;
  font-size: 31px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  transition: transform .18s ease;
}
.best-related-card:hover .best-related-arrow,
.best-related-card:focus-within .best-related-arrow {
  transform: translateX(3px);
}

/* Speech balloon — JIN:R / hitodeblog-style left avatar + compact speech body. */
.best-speech-balloon {
  display: grid !important;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 18px !important;
  align-items: center !important;
  margin: 36px 0 !important;
}
.best-speech-balloon > .wp-block-column {
  min-width: 0;
  flex-basis: auto !important;
}
.best-speech-profile {
  margin: 0 !important;
  text-align: center;
}
.best-speech-profile .wp-block-image {
  margin: 0 auto 5px !important;
}
.best-speech-profile img {
  display: block;
  width: 78px !important;
  height: 78px !important;
  margin: 0 auto;
  object-fit: cover;
  border-radius: 50%;
}
.best-speech-name {
  margin: 0 !important;
  color: #5a5a5a !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
}
.best-speech-body {
  position: relative;
  box-sizing: border-box;
  margin: 0 !important;
  padding: 24px 30px !important;
  border-radius: 7px !important;
  background: #fff !important;
}
.best-speech-body::before {
  content: "";
  position: absolute;
  left: -15px;
  top: 28px;
  width: 0;
  height: 0;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-right: 15px solid #fff;
}
.best-speech-body p {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  color: #555 !important;
  font-size: 17px !important;
  line-height: 1.9 !important;
}

@media (max-width: 767px) {
  .best-related-card {
    margin: 30px 0 !important;
    padding: 19px 12px 14px !important;
    border-radius: 7px !important;
  }
  .best-related-card .best-related-label {
    top: -10px;
    left: 12px;
    padding: 0 6px !important;
    font-size: 11px !important;
  }
  .best-related-card .best-related-inner {
    grid-template-columns: 88px minmax(0, 1fr) 16px;
    gap: 10px !important;
  }
  .best-related-card .best-related-title {
    font-size: 13.5px !important;
    line-height: 1.5 !important;
  }
  .best-related-card .best-related-arrow {
    font-size: 23px !important;
  }

  .best-speech-balloon {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 11px !important;
    margin: 28px 0 !important;
  }
  .best-speech-profile img {
    width: 54px !important;
    height: 54px !important;
  }
  .best-speech-name {
    font-size: 10px !important;
  }
  .best-speech-body {
    padding: 15px 16px !important;
    border-radius: 6px !important;
  }
  .best-speech-body::before {
    left: -9px;
    top: 18px;
    border-top-width: 8px;
    border-bottom-width: 8px;
    border-right-width: 9px;
  }
  .best-speech-body p {
    font-size: 14px !important;
    line-height: 1.75 !important;
  }
}
