/** STEP2914: public same-site related-article card, not an iframe skin. */
.fpsj-theme.fpsj-reading-mode-light:not(.fpsj-layout-app) .wp-block-post-content .fpsj-related-embed-card,
.fpsj-related-embed-card {
  box-sizing: border-box;
  display: block;
  width: min(100%, 680px);
  max-width: 100%;
  margin: 1.55rem auto;
  padding: 0;
  border: 1px solid #d6e2f0;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  color: #17263c;
  box-shadow: 0 7px 22px rgba(24, 47, 80, .08);
}
.fpsj-related-embed-card__eyebrow {
  display: block;
  margin: 0;
  padding: 9px 15px;
  background: linear-gradient(110deg, #ebf4ff, #f7fbff);
  color: #1858a8;
  border-bottom: 1px solid #dfebfa;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: .015em;
}
.fpsj-theme.fpsj-reading-mode-light:not(.fpsj-layout-app) .wp-block-post-content .fpsj-related-embed-card__link,
.fpsj-related-embed-card__link {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 154px minmax(0, 1fr);
  align-items: center;
  gap: 17px;
  padding: 14px 16px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  outline-offset: -3px;
  transition: background-color .18s ease, box-shadow .18s ease;
}
.fpsj-related-embed-card__link:hover,
.fpsj-related-embed-card__link:focus-visible {
  background: #f5faff;
  box-shadow: inset 3px 0 #2a72ea;
}
.fpsj-related-embed-card__link:focus-visible { outline: 3px solid #2563eb; }
.fpsj-related-embed-card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 112px;
  overflow: hidden;
  border-radius: 9px;
  background: #ecf2fa;
}
.fpsj-related-embed-card__media--empty {
  color: #4874ae;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .03em;
}
.fpsj-related-embed-card__image {
  display: block;
  width: 100%;
  height: 112px;
  object-fit: cover;
  object-position: center;
}
.fpsj-related-embed-card__body {
  min-width: 0;
  display: grid;
  gap: 6px;
  align-content: center;
  color: #17263c;
}
.fpsj-related-embed-card__category {
  color: #386fba;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
}
.fpsj-related-embed-card__title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: #0d1e36;
  font-size: clamp(14px, 2.1vw, 17px);
  font-weight: 800;
  line-height: 1.45;
}
.fpsj-related-embed-card__excerpt {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: #51647e;
  font-size: 12px;
  line-height: 1.5;
}
.fpsj-related-embed-card__cta {
  color: #175dcc;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 800;
}
@media (max-width: 520px) {
  .fpsj-theme.fpsj-reading-mode-light:not(.fpsj-layout-app) .wp-block-post-content .fpsj-related-embed-card__link,
  .fpsj-related-embed-card__link {
    grid-template-columns: 98px minmax(0, 1fr);
    gap: 11px;
    padding: 12px;
  }
  .fpsj-related-embed-card__eyebrow { padding: 8px 12px; }
  .fpsj-related-embed-card__media { min-height: 85px; }
  .fpsj-related-embed-card__image { height: 85px; }
  .fpsj-related-embed-card__title { font-size: 13px; }
  .fpsj-related-embed-card__excerpt { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .fpsj-related-embed-card__link { transition: none; }
}


/*
 * STEP2917 — Single-layer same-site oEmbed presentation.
 * WP's /embed/ HTML has its OWN complete bordered card. Never wrap it in
 * another bordered/shadowed panel: keep the label as a compact tag above
 * the original iframe and let the native iframe own its intrinsic height.
 * The matching iframe is same-site only, front-end only (style enqueue guard),
 * and no saved block / link / iframe attributes are changed.
 */
@supports selector(figure:has(iframe)) {
  figure.wp-block-embed:has(iframe[src^="https://fpsgameimprovement.com/"][src*="/embed/"]):not(:has(.fpsj-related-embed-card__eyebrow)) {
    box-sizing: border-box;
    display: block;
    width: min(100%, 680px);
    max-width: 100%;
    margin: 1.15rem auto;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  figure.wp-block-embed:has(iframe[src^="https://fpsgameimprovement.com/"][src*="/embed/"]):not(:has(.fpsj-related-embed-card__eyebrow))::before {
    content: "合わせて読みたい！";
    box-sizing: border-box;
    display: inline-block;
    width: auto;
    max-width: 100%;
    margin: 0 0 6px 3px;
    padding: 5px 9px;
    border: 0;
    border-left: 3px solid #3478ff;
    border-radius: 5px;
    background: #eaf3ff;
    color: #1858a8;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: .01em;
    text-align: left;
    pointer-events: none;
  }
  figure.wp-block-embed:has(iframe[src^="https://fpsgameimprovement.com/"][src*="/embed/"]):not(:has(.fpsj-related-embed-card__eyebrow)) > .wp-block-embed__wrapper {
    box-sizing: border-box;
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    line-height: 0;
  }
  figure.wp-block-embed:has(iframe[src^="https://fpsgameimprovement.com/"][src*="/embed/"]):not(:has(.fpsj-related-embed-card__eyebrow)) iframe[src*="/embed/"] {
    box-sizing: border-box;
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    /* Do NOT fix iframe height: WordPress resizes oEmbeds to fit content. */
  }
  @media (max-width: 520px) {
    figure.wp-block-embed:has(iframe[src^="https://fpsgameimprovement.com/"][src*="/embed/"]):not(:has(.fpsj-related-embed-card__eyebrow))::before {
      margin-bottom: 5px;
      padding: 4px 8px;
      font-size: 11px;
    }
  }
}
