body {
  -webkit-appearance: none;   /* --------20250912追加  iPhone8 レイアウト崩れ対策テスト  --------*/
  -webkit-text-size-adjust: 100%;
}

/* 投稿ウィジェット全般のスタイル */
.post-widget__list {
  display: flex;
  flex-wrap: wrap;
  /*  gap: 16px;  */
  justify-content: flex-start;
}

.post-card {
    /*flex: 0 0 calc(33.333% - 11px);*/
    background: #fff;
    border-radius: 00px;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.post-card__body {
  padding: 0.6rem;
}

.post-card__title {
  font-family: var(--font-family-mure);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--rotary-color);
  line-height:1.3rem;
  
}

.post-card__date {
  font-family: var(--font-family-mure);
  color: #888;
  font-size: 0.9em;
  margin-bottom: 12px;
}

.post-card__text {
  font-family: var(--font-family-mure);
  color: #555;
  line-height: 1.6;
  font-size: 0.95em;
  margin-top: 8px;
}

/* ===== 新レイアウト1: 横並びレイアウト（horizontal）修正版 ===== */
.horizontal-container {
  font-family: var(--font-family-mure);
  display: flex;
  flex-direction: column;
  /*  gap: 6px;  */
  width: 100%;
  margin-bottom:6px;
}

.horizontal-layout {
  flex: none;
  width: 100%;
  max-width: none;
  display: flex;
  align-items: stretch;
  min-height: 120px;
  cursor: pointer;
  margin-bottom: 6px;
}

/*左側画像ブロックの幅　flex: 0 0 200px;　*/
.horizontal-image {
  flex: 0 0 40%;
  background-color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* 単一画像の場合 */
.horizontal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

/* 複数画像（Facebook風レイアウト）の場合 */
.horizontal-image .post-card__images {
  width: 100%;
  height: 220px; /* 固定高さ */
  aspect-ratio: auto; /* アスペクト比を無効化 */
}

.horizontal-layout:hover .horizontal-image img {
  transform: scale(1.05);
}

.horizontal-content {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.horizontal-layout .post-card__date {
  font-size: 0.9rem;
  font-weight: 400;
  color: grey;
  margin-bottom: 1.0rem;
}

.horizontal-layout .post-card__title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--rotary-color);
  line-height:1.3rem;
}

.horizontal-layout .post-card__text {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-color);
  line-height:1.3rem;
}

/* ===== 新レイアウト2: コンパクトレイアウト（compact）修正版 ===== */
.compact-container {
  display: flex;
  flex-direction: column;
  /*  gap: 12px;  */
  width: 100%;
  margin-bottom:6px;
}

.compact-layout {
  flex: none;
  width: 100%;
  max-width: none;
  display: flex;
  align-items: center;
  min-height: 80px;
  cursor: pointer;
  padding: 12px 16px;
  margin-bottom: 6px;
}

.compact-content {
  flex: 1;
  /* padding-right: 15px; */ /* ← Remove this line */
  padding-left: 15px;    /* ← Add this line for spacing */
}

.compact-layout .post-card__date {
  font-size: 0.8rem;
  font-weight: 400;
  color: grey;
}

.compact-layout .post-card__title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--rotary-color);
  line-height:1.3rem;
}

.compact-layout .post-card__text {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--text-color);
  line-height:1.0rem;
}

.compact-image-icon {
  order: -1; /* ← Add this line to move the image to the left */
  flex-shrink: 0;
  width: 18%;
  height: 18%;
  border-radius: 00px;
  overflow: hidden;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 150px !important;
  height: 150px !important;
  aspect-ratio: 1 / 1 !important;
  background-size: contain !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  object-fit: contain !important;
}

.compact-image-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.compact-layout:hover .compact-image-icon img {
  transform: scale(1.1);
}

/* ===== 新レイアウト3: テキストオンリーレイアウト（text-only）修正版 ===== */
.text-only-container {
  display: flex;
  flex-direction: column;
  /*  gap: 8px;  */
  width: 100%;
  margin-bottom:6px;
}

.text-only-layout {
  flex: none;
  width: 100%;
  max-width: 100%;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  border-radius: 0;
  background: transparent;
  padding: 0px 0;
  border-bottom: 1px solid #eee;
  transition: transform 0.2s ease;
  margin-bottom: 6px;
  
}

.text-only-layout:hover {
  background-color: #ffffff;
  /*transform: none;*/
  /*box-shadow: none;*/
}

.text-only-layout:last-child {
  border-bottom: none;
}

.text-only-content {
  padding: 0 16px;
}

.text-only-layout .post-card__date {
  font-size: 0.8rem;
  font-weight: 400;
  color: grey;
}

.text-only-layout .post-card__title {
  font-size: 1.0rem;
  font-weight: 700;
  color: var(--rotary-color);
  color: #0067c8;
  line-height:1.3rem;
}

.text-only-layout .post-card__text {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--text-color);
  line-height:1.0rem;
}



/* ============================== グリッド子要素（カード） ============================ */
/* ===== 追加：カード“グリッド”レイアウト（grid） ===== */
.grid-container{
  display: grid;
  gap: var(--gap, 0.25rem);
  width: 100%;
}

@media (min-width: 960px){
  .grid-container{ grid-template-columns: repeat(var(--cols-pc, 3), 1fr); }
}
@media (min-width: 481px) and (max-width: 959px){
  .grid-container{ grid-template-columns: repeat(var(--cols-tablet, 2), 1fr); }
}
@media (max-width: 480px){
  .grid-container{ grid-template-columns: repeat(var(--cols-mobile, 1), 1fr); }
}

/* グリッド配下のカードは横幅100%で並べる（既存flex余白の無効化） */
.grid-container .post-card{
  width: 100%;
  margin: 0;
  margin-bottom: 0.1rem;
  padding: 0.1rem;
}



/* ===== レスポンシブ対応（修正版） ===== */
@media (max-width: 992px) {
  /* === 修正点 === */
  .post-widget__list,
  .horizontal-container,
  .compact-container,
  .text-only-container {
    flex-direction: row;
    flex-wrap: wrap;
  }
  /*.post-card {
    flex: 1 1 calc(50% - 16px);
    max-width: calc(50% - 16px);
  }*/
  .horizontal-container {
    width: 100%;
    align-items: stretch;
  }
  /* === 修正ここまで === */

  .horizontal-layout {
    width: 100%;
    flex-direction: row;
    min-height: 100px;
  }
  .horizontal-image {
    flex: 0 0 45%;
  }
  .horizontal-content {
    flex: 1;
    padding: 15px;
  }
  .horizontal-layout .post-card__title {
    font-size: 1.1em;
  }
  .compact-container {
    width: 100%;
  }
  .compact-layout {
    padding: 10px 12px;
  }
  .compact-content {
    padding-right: 12px;
  }
  .compact-image-icon {
    width: 20%;
    height: auto;
  }
  .text-only-container {
    width: 100%;
  }
}

@media (max-width: 768px) {
  /* モバイル対応 */
  .horizontal-layout {
    flex-direction: column;
    min-height: auto;
  }
  /* === 修正点 === */
  .horizontal-image {
    width: 100%;
    aspect-ratio: 16 / 9; /* 縦横比を指定 */
    flex-basis: auto; /* flex-basisを自動に */
  }
  .horizontal-image .post-card__images {
    height: 100%; /* 親要素に追従 */
  }
  /* === 修正ここまで === */
  .horizontal-content {
    padding: 15px;
  }
  .horizontal-layout .post-card__title {
    font-size: 1.2em;
  }
  .compact-layout {
    padding: 10px 12px;
  }
  .compact-content {
    padding-right: 10px;
  }
  .compact-image-icon {
    width: 100px;
    height: 100px;
  }
  .text-only-content {
    padding: 0 12px;
  }
}

/* 文書ファイル表示スタイル */
.post-card__documents {
  margin: 12px 0;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.post-card__documents-header {
  font-size: 12px;
  color: #666;
  font-weight: bold;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.post-card__document-item {
  display: flex;
  flex-wrap: wrap; /* 画面が狭い場合は折り返す */
  justify-content: space-between;
  align-items: center;
  gap: 12px; /* 要素間のスペース */
  padding: 12px;
  background: #ffffff;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
  margin-bottom: 8px;
  transition: background-color 0.2s ease;
}

/* アイコンとファイル情報をまとめる左側エリア */
.post-card__document-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1; 
  min-width: 0; /* Flexbox 内でのテキスト省略に必要 */
}

.post-card__document-item:hover {
  /*background: #f5f5f5;*/
}

.post-card__document-icon {
  font-size: 24px;
  flex-shrink: 0;
}

/* ファイル情報エリア */
.post-card__document-info {
  display: flex;
  flex-direction: column;
  min-width: 0; /* Flexbox 内でのテキスト省略に必要 */
}

.post-card__document-details {
  flex: 1;
  min-width: 0;
}

.post-card__document-name {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.post-card__document-meta {
  font-size: 12px;
  color: #666;
}

/* アクションボタンエリア */
.post-card__document-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  flex-direction: row-reverse;
  width: 100%;
  justify-content: center;
  margin-top: 4px; /* ボタンエリアの上にマージンを追加 */
}

.post-card__document-download,
.post-card__document-preview-btn {
  flex-shrink: 0;
  padding: 8px 12px;
  font-size: 12px;
  border-radius: 4px;
  text-align: center;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 0.2s ease;
  box-sizing: border-box;
}

/* プレビューボタン（ツールチップ対応） */
.post-card__document-preview-btn {
  background: #28a745;
  color: white;
  border: none;
  cursor: pointer;
  position: relative;
}

.post-card__document-preview-btn:hover {
  background: #218838;
}

.post-card__document-preview-btn.active {
  background: #dc3545;
}

.post-card__document-preview-btn.active:hover {
  background: #c82333;
}

/* ダウンロードボタン */
.post-card__document-download {
  background: #1976d2;
  color: white;
}

.post-card__document-download:hover {
  background: #1565c0;
  text-decoration: none;
  color: white;
}


/* ツールチップスタイル（上側表示版） */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 200px;
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 8px 12px;
  position: absolute;
  z-index: 1000;
  top: -40px;
  right: 0;
  opacity: 0;
  transition: opacity 0.3s, visibility 0.3s;
  font-size: 11px;
  line-height: 1.3;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  white-space: normal;
  pointer-events: none;
}

.tooltip .tooltiptext::after {
  content: "";
  position: absolute;
  bottom: -5px;
  right: 20px;
  border-width: 5px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

/* ツールチップの自動非表示 */
.tooltip .tooltiptext.force-hidden {
  visibility: hidden !important;
  opacity: 0 !important;
}

/* プレビューエリア */
.post-card__document-preview {
  margin-top: 12px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: #ffffff;
  overflow: hidden;
}

.post-card__document-preview-content {
  position: relative;
  min-height: 200px;
}

/* ステータスバー */
.preview-status-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  max-width: 400px;
  width: 90%;
}

.status-message {
  background: #333;
  color: white;
  padding: 12px 20px;
  border-radius: 25px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.status-message.show {
  opacity: 1;
  transform: translateY(0);
}

.status-message.success {
  background: #28a745;
}

.status-message.error {
  background: #dc3545;
}

.status-message.loading {
  background: #007bff;
}

.status-icon {
  font-size: 16px;
  flex-shrink: 0;
}

/* 読み込み中表示 */
.post-card__document-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: #666;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #1976d2;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 12px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 統一PDFプレビュースタイル */
.unified-pdf-preview {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 12px;
  padding: 24px;
  border: 2px solid #dee2e6;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.unified-pdf-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.pdf-preview-icon {
  font-size: 48px;
  line-height: 1;
}

.pdf-preview-info h4 {
  margin: 0 0 4px 0;
  color: #495057;
  font-weight: 600;
  font-size: 18px;
}

.pdf-filename {
  margin: 0;
  color: #6c757d;
  font-size: 14px;
  font-weight: 500;
  word-break: normal !important;
  overflow-wrap: normal !important;
  white-space: nowrap !important;
  text-overflow: ellipsis;
  overflow: hidden;
  display: block;
  max-width: 100%;
}

.pdf-preview-description {
  background: rgba(13, 110, 253, 0.1);
  border-left: 4px solid #0d6efd;
  padding: 12px 16px;
  margin-bottom: 20px;
  border-radius: 0 6px 6px 0;
}

.pdf-preview-description p {
  margin: 0;
  color: #0a58ca;
  font-size: 14px;
  line-height: 1.5;
}

.unified-pdf-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.unified-pdf-btn {
  flex: 1;
  min-width: 140px;
  padding: 12px 20px;
  border-radius: 8px;
  text-decoration: none;
  text-align: center;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.unified-pdf-btn.primary {
  background: linear-gradient(135deg, #0d6efd, #0b5ed7);
  color: white;
}

.unified-pdf-btn.primary:hover {
  background: linear-gradient(135deg, #0b5ed7, #0a58ca);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.unified-pdf-btn.secondary {
  background: linear-gradient(135deg, #6c757d, #5c636a);
  color: white;
}

.unified-pdf-btn.secondary:hover {
  background: linear-gradient(135deg, #5c636a, #495057);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
  text-decoration: none;
  color: white;
}

/* 簡潔なヒント表示 */
.pdf-preview-hint {
  background: rgba(25, 135, 84, 0.1);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #146c43;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pdf-preview-hint .hint-icon {
  font-size: 16px;
  flex-shrink: 0;
}

/* アニメーション */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.unified-pdf-preview {
  animation: fadeInUp 0.3s ease;
}

@media (max-width: 600px) {
  .post-card {
    flex: 1 1 100%; /* モバイル: 1列 */
    max-width: 100%; /* モバイル用の最大幅 */
  }

  .post-widget__list {
    gap: 15px;
  }

  /* モバイルでのドキュメントアイテム調整 */
  .post-card__document-item {
    padding: 10px;
  }

  .post-card__document-name {
    font-size: 14px;
  }

  .post-card__document-meta {
    font-size: 12px;
  }

  .post-card__document-download,
  .post-card__document-preview-btn {
    padding: 10px 12px;
    font-size: 13px;
  }

  /* モバイルでのプレビュー表示調整 */
  .post-card__document-preview-content iframe,
  .post-card__document-preview-content embed {
    height: 300px !important;
  }

  /* モバイルでのツールチップ調整 */
  .tooltip .tooltiptext {
    width: 140px;
    font-size: 10px;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    top: -45px;
  }

  .tooltip .tooltiptext::after {
    right: auto;
    left: 50%;
    margin-left: -5px;
    transform: translateX(-50%);
  }

  /* モバイルでのステータスバー調整 */
  .preview-status-bar {
    bottom: 10px;
    width: 95%;
  }

  .status-message {
    padding: 10px 16px;
    font-size: 13px;
  }

  .unified-pdf-preview {
    padding: 16px;
  }

  .unified-pdf-header {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .pdf-preview-icon {
    font-size: 40px;
  }

  .unified-pdf-actions {
    flex-direction: column;
  }

  .unified-pdf-btn {
    min-width: auto;
  }
}

/* 「続きを読む」ボタンのスタイル */
.read-more-btn {
    display: inline-block;
    margin: 1px;
    padding: 2px 6px;
    color:  #27609e; !important;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.read-more-btn:hover {
  text-decoration:none;
/*    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,123,255,0.3);
    text-decoration: none;
    color: white !important;*/
}

.read-more-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,123,255,0.3);
}

/* 記事カード内の本文スタイル調整 */
.post-content {
    line-height: 1.6;
    margin-bottom: 10px;
    color: #555;
}

/* 記事カード全体のレイアウト調整 */
.post-card {
    padding-top: 3px; /*  */
    padding-bottom: 3px; /*  */
    padding-left: 6px; /*  */
}

/* 文書ファイルのアクション部分の独立性確保 */
.post-card__document-actions {
    position: relative;
    z-index: 10;
}

.post-card__document-actions a,
.post-card__document-actions button {
    position: relative;
    z-index: 11;
    pointer-events: auto; /* 確実にクリック可能にする */
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .read-more-btn {
        display: block;
        text-align: center;
        width: 100%;
        padding: 12px;
        margin-top: 10px;
    }
}

/* W3.CSSとの調和を図るスタイル */
.read-more-btn.w3-style {
    background-color: #000 !important;
    color: white !important;
}

.read-more-btn.w3-style:hover {
    background-color: #757575 !important;
}


/* ===== ファイル名の型崩れ修正 ===== */

/* 
 * 選択肢1: ファイル名を折り返し表示（全文表示）
 * 下記のコメントアウトを外して使用
 */
 
.post-card__document-name {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  line-height: 1.3;
  max-width: 300px;
}

.pdf-filename {
  margin: 0;
  color: #6c757d;
  font-size: 14px;
  font-weight: 500;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  white-space: normal !important;
  line-height: 1.3;
  display: block;
  max-width: 300px;
}

/* 
 * 選択肢2: ファイル名を省略表示（...付き、適度な長さ）
 * このスタイルがデフォルトで適用されます
 */
 
/*  .post-card__document-name {
/*    font-size: 14px;
/*    font-weight: 500;
  color: #333;
  /* 1行に制限 */
/*    white-space: wrap; /*nowrap*/
  /* はみ出した部分を「...」で省略 */
/*    text-overflow: ellipsis;
  /* はみ出した部分を隠す */
/*    overflow: hidden;
  /* 適度な最大幅を設定（元々が短すぎたので調整） */
/*    max-width: 96%;  /*300px;*/
  /* ブロック要素として表示 */
/*    display: block;
}

.pdf-filename {
  margin: 0;
  color: #6c757d;
  font-size: 14px;
  font-weight: 500;
  /* 1行に制限 */
/*    white-space: nowrap !important;
  /* はみ出した部分を「...」で省略 */
/*    text-overflow: ellipsis;
  /* はみ出した部分を隠す */
/*    overflow: hidden;
  /* ブロック要素として表示 */
/*    display: block;
  /* 適度な最大幅を設定 */
/*    max-width: 350px;
}
*/
/* 文書ファイルアイテム全体のレイアウト調整 */
.post-card__document-item {
  display: flex;
  flex-wrap: wrap; /* 必要に応じて折り返し */
  justify-content: space-between;
  align-items: flex-start; /* 上揃えに変更 */
  gap: 12px;
  padding: 12px;
  background: #ffffff;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
  margin-bottom: 8px;
  transition: background-color 0.2s ease;
}

/* ファイル情報エリアの調整 */
.post-card__document-info {
  display: flex;
  flex-direction: column;
  /* 最小幅を設定 */
  min-width: 0;
  /* フレックス成長を許可 */
  flex: 1;
}

/* メイン部分（アイコン + ファイル情報）の調整 */
.post-card__document-main {
  display: flex;
  align-items: flex-start; /* 上揃えに変更 */
  gap: 12px;
  /* フレックス成長を許可 */
  flex: 1;
  /* 最小幅を設定 */
  min-width: 0;
}

/* ボタンエリアの調整 */
.post-card__document-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  /* 横並びに変更 */
  flex-direction: row;
  /* 必要に応じて改行 */
  flex-wrap: wrap;
}

/* モバイル表示での調整 */
@media (max-width: 600px) {
  .post-card__document-name {
    max-width: 96%;   /*220px;*/
    font-size: 13px;
  }
  
  .pdf-filename {
    max-width: 95%;   /*250px;*/
    font-size: 13px;
  }
  
  /* モバイルでは縦並びレイアウト */
  .post-card__document-item {
    flex-direction: column;
    align-items: stretch;
  }
  
  .post-card__document-main {
    align-items: center;
  }
  
  .post-card__document-actions {
    justify-content: center;
    margin-top: 8px;
  }
}


/* ===== grid 用の衝突回避（スマホで左寄せ・細カラムになる対策） ===== */
.post-widget__list.grid-container{
  display: grid !important;        /* flex を確実に打ち消す */
  gap: var(--gap, 16px);
  width: 100%;
  justify-items: stretch;          /* 子要素をグリッドいっぱいに */
}

@media (min-width: 993px){
  .post-widget__list.grid-container{ grid-template-columns: repeat(var(--cols-pc, 3), minmax(0, 1fr)); }
}
@media (min-width: 601px) and (max-width: 992px){
  .post-widget__list.grid-container{ grid-template-columns: repeat(var(--cols-tablet, 2), minmax(0, 1fr)); }
}
@media (max-width: 600px){
  .post-widget__list.grid-container{ grid-template-columns: repeat(var(--cols-mobile, 1), minmax(0, 1fr)); }
}

/* flex 時代の幅指定・折り返し指定を無効化して、グリッドの1frに従わせる */
.post-widget__list.grid-container .post-card{
  box-sizing: border-box;
  width: 100% !important;
  max-width: none !important;
  flex: unset !important;          /* 旧: flex: 1 1 calc(50% - 16px) 等を無効化 */
  margin: 0;                       /* 旧レイアウトの余白があれば打ち消す */
}

/* === tags minimal === */
.post-card__tags {
  margin: 6px 0 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag-chip {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.75rem;
  line-height: 1.6;
  border: 1px solid #ddd;
  border-radius: 999px;
  background: #f9f9f9;
  color: #555;
  white-space: nowrap;
}




