/* =========================================================
 * post-row.css
 * SP向け「post-row」一覧行（v1.5 draft / clampなし）
 * - カード世界観はSPでは必須にしない（可読性・安定性優先）
 * - 出力：template-parts/components/post-row.php に準拠
 * ========================================================= */

@media (max-width: 768px) {

  /* 一覧（親）側がgridのままだと事故りやすいのでSPは縦積みに固定 */
  .nephilim-home-grid{
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
  }

  /* 1記事：区切りだけ強く、箱感は出さない */
  .nephilim-post-row{
    padding: 18px 14px 20px;
    border-bottom: 2px dotted rgba(0,0,0,0.35);
    width: 100%;
  }

  /* 行全体リンク：サムネ列 + 本文列 */
  .nephilim-post-row__link{
    display: grid;
    grid-template-columns: 86px 1fr;
    column-gap: 12px;
    align-items: start;

    width: 100%;
    text-decoration: none;
    color: inherit;
  }

  /* サムネ（円） */
  .nephilim-post-row__thumb{
    width: 86px;
    height: 86px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255,255,255,0.25); /* 無画像時の逃げ */
  }

  .nephilim-post-row__thumb img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  /* 本文：折返し崩れ防止 */
  .nephilim-post-row__body{
    min-width: 0; /* 長文タイトルで崩れないための要点 */
    width: 100%;
  }

  /* タイトル：clampなし（自然に伸びる）。横溢れだけ潰す */
  .nephilim-post-row__title{
    margin: 0;
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.35;
    letter-spacing: 0.01em;

    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
  }

  /* メタ：帯（スクショの“情報の塊”） */
  .nephilim-post-row__meta{
    margin-top: 10px;
    padding: 6px 10px;

    font-size: 0.85rem;
    line-height: 1.2;

    background: rgba(255,255,255,0.55);
    border-radius: 6px;

    overflow-wrap: anywhere;
    word-break: break-word;

    /* date / brand を横並びに整える */
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
  }

  .nephilim-post-row__date{
    opacity: 0.85;
  }

  .nephilim-post-row__brand{
    opacity: 0.75;
  }

  /* 抜粋：伸びてOK。読みやすさだけ担保 */
  .nephilim-post-row__excerpt{
    margin: 10px 0 0;
    font-size: 0.92rem;
    line-height: 1.7;
    color: rgba(0,0,0,0.75);

    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
  }

  /* “続きを読む”ボタン風（リンクは親aが担当） */
  .nephilim-post-row__cta{
    margin-top: 12px;
  }

  .nephilim-post-row__cta-btn{
    display: block;
    width: 100%;
    padding: 12px 12px;

    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.25);
    background: rgba(255,255,255,0.85);

    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    color: rgba(0,0,0,0.85);
  }

  /* サムネ無し：1列化＆サムネ枠を消す */
  .nephilim-post-row.is-no-thumb .nephilim-post-row__link{
    grid-template-columns: 1fr;
  }

  .nephilim-post-row.is-no-thumb .nephilim-post-row__thumb{
    display: none;
  }
}

@media (max-width: 768px) {

  /* 余分が大きい対策：row側の左右paddingを撤去して inner に揃える */
  .nephilim-post-row{
    padding-left: 0;
    padding-right: 0;
  }

  /* 中央寄り継承の事故対策：row内は左寄せに固定 */
  .nephilim-post-row__link,
  .nephilim-post-row__body{
    text-align: left;
  }

  /* （任意）詰めたい場合：サムネを少し小さく */
  /* 86pxが大きく感じるなら 76px に */
  /*
  .nephilim-post-row__link{
    grid-template-columns: 76px 1fr;
    column-gap: 10px;
  }
  .nephilim-post-row__thumb{
    width: 76px;
    height: 76px;
  }
  */
}
/* =========================================
   SP: width full + row-driven spacing
   ====================================== */
@media (max-width: 768px) {

  /* SPでは inner を“箱”にしない：幅いっぱい */
  .nephilim-front-two-inner{
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    width: 100%;
  }

  /* 念のため：縦積み時の幅事故を根絶（前回の教訓） */
  .nephilim-front-two-main,
  .nephilim-front-two-sidebar{
    width: 100%;
  }

  /* wrapper：余白/幅を握らせない（主犯対策） */
  .nephilim-front-top-posts .nephilim-home-wrapper{
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  /* row：SPの余白はここに集約する */
  .nephilim-post-row{
    width: 100%;

    /* 横：端ベタ防止（ここは好みで 12〜16） */
    padding-left: 8px;
    padding-right: 8px;

    /* 縦：0pxは詰みすぎるので、rowのリズムとして最低限入れる */
    padding-top: 0px;
    padding-bottom: 18px;
  }
}
