/* ------------ CSS切替ボタン ------------*/
.css-switch {
  display: flex;
  gap: 6px;
  margin-left: 8px;
}

.css-switch button {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
}

body.beta-mode .css-switch [data-mode="beta"] {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

/* ------------ CSS切替ボタン ------------*/

--- START OF FILE style.css ---

/*枠からのはみだし防止*/
*, *::before, *::after {
  box-sizing: border-box;
}

/* フォントサイズ */
html {
  font-size: 16px; /* PC基準 */
}

/*「標準エラーを拾う」共通処理のCSS*/
.global-form-error{
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 84px;              /* bottom-navがあるので少し上 */
  z-index: 99999;
  display: none;
  padding: 12px 14px;
  background: #ffeaea;
  color: #b00020;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  font-size: 0.95rem;
  line-height: 1.4;
}

.global-form-error.is-show{
  display: block;
}


/* ===== 全ページ共通：スマホ表示最適化（修正版：重複排除） ===== */
@media (max-width: 768px) {

  /* 全体の基準文字サイズ */
  html, body {
     overflow-x: hidden;
     font-size: 10px;  
 }
  *, *::before, *::after { box-sizing: border-box; }
  img, input, select, textarea, button { max-width: 100%; }


  
  /* 行間をスマホ向けに */
  body { line-height: 1.2; }

  /* 左右の余白をなくす（端まで使いたい要素用） */
  .full-width {
    margin-left: -12px;
    margin-right: -12px;
  }

  /* メイン領域：左右余白をなくす */
  .app-body {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* PC用メニューは非表示 */
  .pc-only { display: none !important; }

  /* 各ページが container / content を使っていても強制的に詰める */
  .container,
  .content,
  .page-content {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  /* 見出しを少しだけ小さく */
  h1 { font-size: 1.2rem; }
  h2 { font-size: 1.0rem; }
  h3 { font-size: 0.9rem; }

  /* ===== 投稿詳細：イベント情報 + MAP（スマホは必ず1列） ===== */
  .info-map-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 10px;
  }

  .info-map-container .post-meta,
  .info-map-container .map-container {
    flex: 0 0 auto !important;  /* 47% を無効化 */
    width: 100% !important;     /* 1列で全幅 */
    max-width: 100% !important;
    min-width: 0 !important;    /* Safariのはみ出し対策 */
  }

  /* （任意）地図の高さをスマホ用に調整 */
  #detailMap {
    width: 100% !important;
    height: 180px;              /* お好みで240〜320 */
  }

  /* テーブルが横幅を押し広げないように（Safari対策） */
  .post-infotable {
    width: 100%;
    max-width: 100%;
    table-layout: fixed;
  }
  .post-infotable th,
  .post-infotable td {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  /* ===== OGP（スマホ用：カードは共通、サムネ小さめ・高さも小さく） ===== */

  /* カード全体：横幅に収める */
  .ogp-card,
  .chat-ogp-card {
    max-width: 100%;
  }

  .ogp-link,
  .chat-ogp-link {
    display: flex;
    align-items: stretch;
    gap: 10px;
    max-width: 100%;
    text-decoration: none;
    color: inherit;
  }

  /* サムネ枠（スマホ用サイズ）※ここだけ定義：二重定義しない */
  .ogp-thumb,
  .chat-ogp-thumb {
    flex: 0 0 72px !important;
    width: 72px !important;
    height: 54px !important;    /* ← 高さを小さく（横長） */
    overflow: hidden;
    border-radius: 10px;
    background: #f3f3f3;
  }

  /* 画像は枠にフィット */
  .ogp-thumb img,
  .chat-ogp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  /* テキスト側（Safari対策） */
  .ogp-info,
  .chat-ogp-info {
    flex: 1 1 auto;
    min-width: 0;
  }

  /* タイトル：1行固定（省略 …） */
  .ogp-info h3,
  .chat-ogp-info h3 {
    font-size: 13px;          /* 10pxは小さすぎるので推奨13前後 */
    line-height: 1.3;
    margin: 0 0 4px;

    white-space: nowrap;     /* ← 1行にする決定打 */
    overflow: hidden;
    text-overflow: ellipsis; /* … を出す */
  }

  /* 説明：2行まで */
  .ogp-info p,
  .chat-ogp-info p {
    font-size: 8px;
    margin: 0;
    color: #555;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* （任意）チャット内の親flexで縮まない問題があれば効く */
  .chat-message,
  .chat-bubble,
  .message-content {
    min-width: 0;
  }
}

/* ===== chat base ===== */
.chat-row{
  display: flex;
  align-items: flex-start;
  gap: 1px;
  margin: 10px 0;
  max-width: 100%;
}

/* 左右の寄せ */
.chat-row.left { justify-content: flex-start; }
.chat-row.right { justify-content: flex-end; }

/* アイコン */
.chat-icon{
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}

/* 吹き出し */
.bubble{
  padding: 3px 5px;
/*  border-radius: 16px;*/
/*  max-width: min(72%, 520px);*/
/*  word-break: break-word;*/
/*  overflow-wrap: anywhere;*/
display: inline-block;           /* ← 横幅が内容に追随 */
max-width: min(78%, 520px);      /* ← 取りすぎ防止 */
width: auto;                     /* ← 100%禁止 */
margin: 0;
}

/* 左吹き出し */
.bubble.left{
  background: #f2f2f2;
  color: #111;
}

/* 右吹き出し */
.bubble.right{
  background: #2f80ff; /* 既存の青に合わせて調整可 */
  color: #fff;
}

/* 時刻の見た目（text-muted復活） */
.text-muted{
  color: #888;
}



/* ===== スマホ最適化 ===== */
/* 共通ヘッダー */
header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #ffffff;
  padding: 4px 2px;
  border-bottom: 1px solid #ddd;
  font-family: 'Segoe UI', sans-serif;
}

header nav a {
  color: #333;
  text-decoration: none;
  margin-left: 2rem;
  font-size: 1rem;
  transition: color 0.3s ease;
}

header nav a:first-of-type {
  margin-left: 0;
}

header nav a:hover {
  color: #3478f6;
}

.site-logo {
  width: 400px;
  height: auto;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-title {
  font-size: 22px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
}
/*読み取り専用欄を灰色*/
/*input[disabled],*/
/*input[readonly] {*/
/*  border: 1px solid #ccc;*/
/*  background-color: rgb(128, 128, 128);*/
/*  color: #666;*/
/*}*/

/* ヘッダーを左寄せにする */
.navbar {
  background-color: #3478f6; /* 青背景 */
  color: white;
  padding: 10px 20px;
}

/* ロゴとナビゲーションを左寄せ */
.navbar__left {
    display: flex;
    align-items: center;
}

/* ロゴの装飾を白文字・リンク感を消す */
.navbar__logo {
    font-size: 16px;
    font-weight: bold;
    color: white;
    text-decoration: none;
    margin-right: 30px;
}

/* ナビゲーション全体 */
.navbar__menu a {
    color: white;
    text-decoration: none;
    margin-right: 20px;
    font-weight: bold;
    font-size: 16px;
}

/* ホバー時の装飾 */
.navbar__menu a:hover {
    text-decoration: underline;
}
.navbar__menu nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 5px;
}

.navbar__menu nav a,
.navbar__menu nav button {
  color: white;
  text-decoration: none;
  font-weight: bold;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1em;

  /* 👇 以下を追加・調整 */
  padding: 0px 0px;         /* 縮めたパディング */
  min-width: auto;          /* 固定幅があれば解除 */
  flex: 0 0 auto;           /* 幅が勝手に広がらないように */
}


.navbar__menu nav form {
  display: inline;
}

/*スマホ時だけヘッダーを圧縮*/
@media (max-width: 768px) {
  header {
    padding: 8px 6px;
  }
  .logo-wrap {
    display: flex;
    flex-direction: column;   /* ← 縦並び */
    align-items: flex-start;  /* ← 左寄せ */
    gap: 4px;
  }

  .site-logo {
    width: 110%;
    height: auto;
  }

  .site-title {
    font-size: 10px;
    line-height: 1.3;
  }

}

/*フローティングメニューのCSS*/
.fab-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

/* 共通ボタン */
.fab-container .fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #ff9800;
  color: white;
  font-size: 20px;
  display: flex;
  flex-direction: row-reverse; /* ＋ → メニュー の順で横並び */
  justify-content: center;
  align-items: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

/* 横展開メニュー */
.fab-container .fab-menu {
    display: flex;
    flex-direction: row; /* 左に並べる */
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateX(-50px); /* 左にオフセット */
    transition: all 0.3s ease;
    pointer-events: none;
}

.fab-container .fab-menu.show {
  opacity: 1;
  transform: translateX(0);
  pointer-events: all;
}

.fab-container .main-fab {
  background: #f44336; /* 赤 */
}

.fab-container .top-fab {
  background: #4CAF50; /* 緑 */
}


/*共通ボタン(青)*/
.common-blue-submit-button {
  background-color: #2196F3;
  color: white;                /* 白文字 */
  padding: 8px 16px;           /* 上下8px・左右16pxの余白 */
  border: none;                /* ボーダーなし */
  border-radius: 6px;          /* 丸み */
  font-size: 16px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.2s ease;
}

.common-blue-submit-button:hover  {
  background-color: rgb(106, 184, 247);      /* hover時に少し濃い緑 */
}

/*共通ボタン(グレー)*/
.common-gray-submit-button {
  background-color: rgb(201, 201, 201);
  color: black;                /* 黒文字 */
  padding: 8px 16px;           /* 上下8px・左右16pxの余白 */
  border: none;                /* ボーダーなし */
  border-radius: 6px;          /* 丸み */
  font-size: 16px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.2s ease;
}

.common-gray-submit-button:hover  {
  background-color: rgb(155, 155, 155);      /* hover時に少し濃い緑 */
}

/*共通ボタン(緑)*/
.common-green-submit-button {
  background-color: rgb(11, 170, 6);
  color: white;                /* 白文字 */
  padding: 8px 16px;           /* 上下8px・左右16pxの余白 */
  border: none;                /* ボーダーなし */
  border-radius: 6px;          /* 丸み */
  font-size: 16px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.2s ease;
}

.common-green-submit-button:hover  {
  background-color: rgb(7, 113, 4);      /* hover時に少し濃い緑 */
}
/*共通ボタン(Disabled)*/
.common-disabled-button {
  background-color: #ccc;      /*グレー */
  cursor: not-allowed;
  color: black;                /* 黒文字 */
  padding: 8px 16px;           /* 上下8px・左右16pxの余白 */
  border: none;                /* ボーダーなし */
  border-radius: 6px;          /* 丸み */
  font-size: 16px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.2s ease;
  
}

/*共通ヘッダーのログアウトボタンをリンクのように表示*/
.navbar__menu a,
.logout-button {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    margin: 0 10px;
    text-decoration: none;
    font-weight: bold;
}

.logout-button:hover {
    text-decoration: underline;
}

/* ログアウトボタンも他リンクと統一 */
.logout-button {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    margin: 0 10px;
    text-decoration: none;
    font-weight: bold;
}

.logout-button:hover {
    text-decoration: underline;
}
/*共通ヘッダーのログアウトボタンをリンクのように表示*/

/* 共通フッター */
/* ===== 共通フッター（AdSense対策） ===== */
.site-footer {
  font-size: 10px;
  margin-top: 40px;
  padding: 16px 8px;
  border-top: 1px solid #e5e5e5;
  text-align: center;
  color: #666;
  background: #fafafa;
}

.footer-links {
  margin-bottom: 6px;
}

.footer-links a {
  font-size: 10px;
  color: #666;
  text-decoration: none;
  margin: 0 4px;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-copy {
  font-size: 11px;
  color: #999;
}


/* スマホ用フッター */
footer nav {
  display: flex;
  justify-content: space-around;
  padding: 0.8rem;
  background-color: #f8f8f8;
  border-top: 1px solid #ccc;
}

footer nav a {
  font-size: 1.4rem;
  color: #333;
  text-decoration: none;
}

/*-------シンプルテーブル-------*/
.common-simple-table {
  width: 100%;
  border-collapse: collapse;
  font-family: sans-serif;
}

.common-simple-table th,
.common-simple-table td {
  border: 1px solid #000; /* 黒線 */
  padding: 8px 12px;
  text-align: left;
}

.common-simple-table th {
  background-color: #f5f5f5; /* 薄いグレー背景 */
  font-weight: bold;
}


/* デフォルトでは非表示 */
.bottom-nav {
  display: none;
}

/*スマホ下部のナビボタン*/
@media (max-width: 768px) {
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: #fff;
    border-top: 1px solid #ddd;
    z-index: 1000;
  }

  .bottom-nav .nav-item {
    flex: 1;
    text-align: center;
    font-size: 20px;
    text-decoration: none;
    color: #333;
    line-height: 56px;
  }
}



/*-------シンプルテーブル-------*/
/*-------投稿一覧レイアウト-------*/

/*　---カテゴリスライドダー ---　*/
/* ロゴ下の帯 */
.catbar-wrap{
  width: 100%;
/*  background: #f2c200; */
/*  overflow: hidden;*/
background: #2f4a7c;  /* ヘッダーブルー */
color: rgba(255,255,255,.6);

}

/* 横スクロール */
.catbar{
  display: flex;
  gap: 18px;                     /* ← 間隔はここで調整 */
  padding: 10px 14px;

  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;         /* Firefox */
}

.catbar::-webkit-scrollbar{
  display: none;                 /* Chrome/Safari */
}

/* テキストだけ */
.catitem{
  flex: 0 0 auto;
  white-space: nowrap;

  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,.75);  /* 非アクティブは薄く */
  cursor: pointer;
}

/* アクティブ表示 */
.catitem.is-active{
  color: #fff;
  position: relative;
}

/* 下線（ボタン感を出さないため borderは使わない） */
.catitem.is-active::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

/* ===== Mobile only (<=640px) ===== */
@media (max-width: 640px) {

  /* ===== カテゴリ横スライダー ===== */
  .catbar{
    padding: 6px 10px;
    gap: 12px;
  }

  .catitem{
    font-size: 10px;          /* ★カテゴリ文字を10px */
    font-weight: 600;
  }

  .catitem.is-active::after{
    bottom: -4px;
    height: 2px;
  }

  /* ===== 検索パネル全体 ===== */
  .search-panel{
    padding: 10px 8px;
  }

  /* ラベル文字 */
  .search-row label{
    font-size: 10px;          /* ★ラベル10px */
    line-height: 1.2;
  }

  /* 説明文・補足 */
  .search-panel small,
  .search-panel .help-text{
    font-size: 10px;
  }

  /* ===== 入力欄 ===== */
  /* ※ input/select は 16px以上にしないと iOS でズームされる */
  .search-row input,
  .search-row select,
  .search-row textarea{
    font-size: 16px !important;  /* ★ズーム防止 */
    height: 42px;
  }

  /* placeholder は見た目だけ小さく */
  .search-row input::placeholder{
    font-size: 10px;
  }

  /* ===== ボタン ===== */
  .search-actions button,
  .search-actions a{
    font-size: 12px;
    height: 40px;
  }

}


/*　---カテゴリスライドダー ---　*/


.post-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  padding: 1rem;
}

.post-card:hover {
  transform: translateY(-3px);
}

.post-thumbnail {
    width: 100%;
    max-width: 800px;        /* ← 最大幅を800pxに制限 */
    aspect-ratio: 2 / 1;     /* ← 800 : 400 = 2 : 1 */
    height: auto;

    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    display: block;
}

/* トップページの投稿一覧に適用されるスタイル */
.post-content h2,
.post-content p {
  color: #000; /* ✅ 明示的に黒に */
  text-decoration: none;
}

.post-content p {
  font-size: 0.9rem;
  color: #333;
  margin: 0.2rem 0;
}

.post-content h2 {
    color: #000;
    /* 以下のpaddingとborder-radiusを削除またはコメントアウトします */
    /* padding: 8px; */
    /* border-radius: 4px; */
}
.post-content h3 {

      background-color: white;
      color: #000;
      padding: 6px;
      border-radius: 4px;
      border-bottom: 4px solid rgb(206, 252, 255);  好みの色
}

.post-card {
  display: block;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 1rem;
  background-color: #fff;
  color: #000; /* ✅ 黒字 */
  text-decoration: none; /* ✅ アンダーライン削除 */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease;
  max-width: 100%;
}
.post-card img {
  width: 100%;
  height: auto;
  border-radius: 10px;
}
/* アンダーライン削除 ブラウザによって効かないことがあるため、important設定*/
/* .post-card a h2,
.post-card a p {
  text-decoration: none !important;
} */
/* 投稿カード内のリンク全体にアンダーラインを適用しないように追加 */
.post-card a {
  text-decoration: none !important;
}
/* トップページの投稿一覧に適用されるスタイル */


.detail-link {
  display: none; /* 枠全体がリンクなので非表示にしてもOK */
}


.detail-link:hover {
  text-decoration: underline;
}

/* ページネーション */
.pagination {
  text-align: center;
  margin-top: 1.5rem;
}

.pagination a {
  margin: 0 1rem;
  color: #333;
  text-decoration: none;
  font-weight: bold;
}

main, section {
  max-width: 960px;
  margin: 0 auto;
}

/* レスポンシブ対応 */
@media screen and (max-width: 600px) {
  .post-grid {
    grid-template-columns: 1fr;
  }
}

/*通常のh2用*/
.h2 {
  background-color: #007bff;
  color: #fff;
  padding: 4px 12px;     /* ← 縦方向を小さく（上4px・下4px） */
  border-radius: 4px;
  line-height: 1.2;       /* ← テキストの高さを抑える */
  margin: 0 0 8px 0;      /* ← 上下のマージンも最小限に */
}

/*-------投稿一覧レイアウト-------*/
/*-------投稿詳細-------*/
.post-detail {
/*  padding: 2rem;*/
}
.post-content-textarea{
    height: 700px;
}
/*-------SNSボタン-------*/
.sns-share-buttons {
  display: flex;
  gap: 10px;
  margin-top: 1rem;
  width: 100%;
}


/* 各ボタン（aタグとbutton）を均等に4分割 */
.sns-share-buttons a,
.sns-share-buttons button {
  flex: 1; /* ← これで等分 */
  height: 40px;
  border: none;
  border-radius: 0; /* 角丸をなくしたければ */
  color: white;
  font-size: 20px;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
/* 各ボタンごとの背景色 */
.btn-x { background-color: #000000; }
.btn-facebook { background-color: #3b5998; }
.btn-line { background-color: #06c755; }
.btn-copy { background-color: #666666; }


.post-detail-thumbnail {
    width: 100%;
    max-width: 800px;        /* ← 最大幅を800pxに制限 */
    aspect-ratio: 2 / 1;     /* ← 800 : 400 = 2 : 1 */
    height: auto;

    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    display: block;
}

/*投稿情報のテーブル用(カテゴリ、場所など)*/
.info-map-container {
  display: flex;
  flex-wrap: wrap; /* スマホ時折返し可 */
  gap: 2rem;
  margin-top: 1.5rem;
}


/* テーブル側 */
.info-map-container .post-meta {
  flex: 0 0 47%;
    min-width: 300px;
}

/* 地図側 */
.info-map-container .map-container {
  flex: 0 0 47%;
    min-width: 300px;
}
#detailMap {
  width: 100%;
  height: 200px; /* ← 高さを必ず指定 */
  border: 1px solid #ccc;
  border-radius: 6px;
}
#map {
  width: 100%;
  height: 200px;
  border: 1px solid #ccc;
  flex-shrink: 0;
}


.post-infotable {
  border-collapse: collapse;
  width: 50%;
  max-width: 400px;
}
.post-infotable th, .post-infotable td {
  border: 2px solid #fff;
  background-color: rgb(219, 248, 255);
  padding: 1em;
}
.post-infotable th {
  background-color: rgb(164, 225, 255);
  color: white;
  font-weight: bold;
  text-align: center;
  width: 30%;
  min-width: 4em;
}
/*投稿エリアのスマホ表示*/
@media (max-width: 768px) {

 /*タイトル*/
/*.post-input-title {*/
/*  font-size: 16px;*/
/*  transform: scale(0.625);*/
/*  transform-origin: left top;*/
/*  width: 200%;*/
/*}*/
    
   /*投稿内容*/
  .post-content-textarea {
    font-size: 16px;       /* iOSズーム防止 */
    line-height: 1.6;

    transform: scale(0.625);
    transform-origin: left top;
    width: 160%;
    height: 500px;         /* 既存維持 */
  }
  
  
}


/*投稿情報のテーブル用(カテゴリ、場所など)*/

/*投稿編集ボタン*/
.edit-button {
    display: inline-block;
    background-color: #007bff;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 10px;
}
.edit-button:hover {
    background-color: rgb(106, 184, 247);      /* hover時に少し濃い緑 */
}

/* 投稿詳細ページだけに適用されるスタイル */
.post-detail-content h2 {
    background-color: #007bff;
    color: #fff;
    padding: 8px;
    border-radius: 4px;
}
.post-detail-content h3 {
    background-color: white;
    color: #000;
    padding: 6px;
    border-radius: 4px;
    border-bottom: 4px solid #007bff;  好みの色
}
/* 投稿詳細ページだけに適用されるスタイル */
.post-meta {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1rem;
}

.post-meta table {
  flex: 1;
  font-size: 0.8rem;
  border-collapse: collapse;
}

.post-meta table th {
  text-align: left;
  padding-right: 1rem;
  color: #555;
}

.post-meta table td {
  color: #000;
}

.map iframe {
  width: 300px;
  height: 200px;
  border-radius: 6px;
  border: none;
}

.post-body {
  margin: 1rem 0;
  font-size: 1rem;
  line-height: 1.6;
}

.poster-profile {
  margin-top: 2rem;
  padding: 1rem;
  background-color: #f8f8f8;
  border-radius: 6px;
}

.poster-profile img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin-bottom: 1rem;
}

.poster-profile table {
  width: 100%;
  font-size: 0.95rem;
  white-space: pre-wrap;   /* \n を改行に */
}

.contact-btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.6rem 1.2rem;
  background-color: #007bff;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
}

.contact-btn:hover {
  background-color: #0056b3;
}

/* ===== 新規投稿、投稿編集画面の曜日ピッカー ===== */
.weekday-picker{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.weekday-chip{
  display:inline-flex;
  align-items:center;
  cursor:pointer;
  user-select:none;
}

.weekday-chip input{
  display:none;
}

.weekday-chip span{
  display:inline-block;
  padding:6px 12px;
  border-radius:999px;
  border:1px solid #ced4da;
  background:#fff;
  color:#333;
  font-weight:700;
  font-size:14px;
  line-height:1;          /* 高さを詰める */
}

.weekday-chip input:checked + span{
  background:#2196F3;
  border-color:#2196F3;
  color:#fff;
}

/* ===== スマホだけコンパクトに ===== */
@media (max-width: 768px){
  .weekday-picker{
    gap:6px;              /* ちょい詰め */
  }

  .weekday-chip span{
    font-size:13px;       /* 文字を小さめ */
    padding:5px 10px;     /* チップも少し小さめ */
    border-width:1px;
    margin-bottom: 10px;
  }
}

/* さらに小さい端末（任意） */
@media (max-width: 360px){
  .weekday-chip span{
    font-size:10px;
    padding:4px 9px;
  }
}

/* ===== 新規投稿、投稿編集画面の曜日ピッカー ===== */


/* ===== 投稿者プロフィール：スマホはカード形式（読みやすさ最優先） ===== */
@media (max-width: 768px){

  .poster-profile{
    padding: 12px;
  }

  .poster-profile img{
    width: 72px;
    height: 72px;
    margin-bottom: 10px;
  }

  /* tableを縦並びに崩す */
  .poster-profile table,
  .poster-profile tbody,
  .poster-profile tr,
  .poster-profile th,
  .poster-profile td{
    display: block;
    width: 100%;
  }

  /* 1項目ごとの区切り */
  .poster-profile tr {
    padding: 5px 0;
    border-bottom: 1px solid #e2e2e2;
  }
  .poster-profile tr:last-child {
    border-bottom: none;
  }

  /* タイトル列（表示名・性別など） */
  .poster-profile th {
    padding: 0 0 4px;
    font-size: 0.85rem;
    font-weight: 700;          /* ★ 太字 */
    color: #333;
    text-align: left;          /* ★ 左寄せ */
    white-space: normal;
  }

  /* 内容列 */
  .poster-profile td {
    padding: 0;
    font-size: 1.0rem;
    color: #111;
    text-align: left;          /* ★ 左寄せ */
    white-space: pre-wrap;     /* 自己紹介の改行を活かす */
    overflow-wrap: anywhere;  /* 長文・URL対策 */
  }
}



/* 投稿詳細でURLがあればカード表示 */
/*.link-preview-card {*/
/*  border: 1px solid #ccc;*/
/*  padding: 8px;*/
/*  margin-top: 10px;*/
/*  display: flex;*/
/*  gap: 10px;*/
/*  background: #f9f9f9;*/
/*  border-radius: 8px;*/
/*}*/
/*.link-preview-card img {*/
/*  width: 100px;*/
/*  height: auto;*/
/*  object-fit: cover;*/
/*}*/
/* 投稿詳細でURLがあればカード表示 */

  /*-------投稿詳細-------*/

  /*-------ヘッダーボタンスタイル-------*/
  /* ヘッダー全体に背景青 */
  header {
      background-color: #3478f6;
      padding: 12px 24px;
      display: flex;
      align-items: center;
      justify-content: space-between;
  }


  /*ナビゲーションリンク*/
  header nav {
      background-color: #3478f6; /* 明示的に背景を青に */
  }

  header nav a {
      color: white;
      text-decoration: none;
      margin-left: 20px;
      font-weight: bold;
  }

  header nav {
      border-bottom: none;
      box-shadow: none;
  }

  /*-------ヘッダーボタンスタイル-------*/

  /*-------ユーザー登録-------*/
  .register-container {
    max-width: 80%;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    font-family: 'Arial', sans-serif;
  }


  .register-title {
      text-align: center;
      font-size: 24px;
      font-weight: bold;
      margin-bottom: 20px;
  }
  /* 横並びのスタイル */
  .profile-upload {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
  }
  /* プロフィールアイコンの見た目 */
  .user-icon {
      display: block;
      margin: 0 auto 10px;
      width: 100px;
      height: 100px;
      border-radius: 50%;
      background-color: #ccc;
  }

  /* アップロードボタンの見た目 */
  .upload-button {
      display: block;
      margin: 0 auto 20px;
      background: #f0f0f0;
      padding: 6px 12px;
      border: 1px solid #ccc;
      border-radius: 4px;
      cursor: pointer;
      font-size: 14px;
      text-align: center;
  }

  
  
  .form-group {
    display: flex;
    align-items: center;     /* ラベルと入力欄の縦位置を中央に */
    justify-content: center; /* 中央寄せ（全体を真ん中へ） */
    margin-bottom: 15px;
  }

  .form-group label {
    width: 120px;            /* ラベル幅（揃えたい場合） */
    text-align: left;       /* テキストを右寄せにして入力欄と揃える */
    margin-right: 10px;      /* ラベルと入力欄の間の隙間 */
    font-weight: bold;
  }

  .form-group input[type="text"],
  .form-group input[type="email"],
  .form-group input[type="password"],
  .form-group select,
  .form-group textarea {
    width: 70%;              /* 入力欄の幅 */
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
  }

  .login-link {
      text-align: center;
      margin-top: 15px;
      font-size: 14px;
  }

  .login-link a {
      color: #3a81f3;
      text-decoration: none;
  }

  .login-link a:hover {
      text-decoration: underline;
  }

  /*-------ユーザー登録-------*/

  /*-------ログイン-------*/
  .login-container {
      background-color: #fff;
      padding: 40px;
      border-radius: 10px;
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
      width: 500px;
      box-sizing: border-box;
  }

  .login-title {
      text-align: center;
      font-size: 26px;
      font-weight: bold;
      margin-bottom: 30px;
  }

  .form-group {
      margin-bottom: 20px;
  }

  input[type="email"],
  input[type="password"] {
      width: 70%;
      padding: 12px;
      border: 1px solid #ccc;
      border-radius: 6px;
      box-sizing: border-box;
      font-size: 16px;
  }

  .register-button {
    display: block;     /* ブロックにして幅を持たせる */
    width: 70%;         /* 入力欄と同じ幅に合わせる */
    margin: 20px auto;  /* 左右autoで中央寄せ */
    background-color: #3a81f3;
    color: #fff;
    border: none;
    padding: 10px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
  }


  .register-button:hover {
      background-color: #1b5fc9;
  }

  .login-link {
      margin-top: 15px;
      text-align: center;
      font-size: 14px;
  }

  .login-link a {
      color: #2d79e6;
      text-decoration: none;
      margin: 0 4px;
  }

  /* ===== ログイン：スマホ最適化 ===== */
  @media (max-width: 768px) {

    .login-container {
      width: 100% !important;       /* 500px固定を殺す */
      max-width: 420px;             /* 大きすぎない上限（好みで） */
      padding: 20px;                /* 40px→20px */
      margin: 0 auto;               /* 中央寄せ */
    }

    /* 入力欄・ボタンはスマホでは100% */
    .login-container input[type="email"],
    .login-container input[type="password"],
    .login-container .register-button {
      width: 100% !important;       /* 70%固定を殺す */
      max-width: 100% !important;
    }

    .login-title {
      font-size: 20px;
      margin-bottom: 16px;
    }
  }
  
  /*-------ログイン*-------/



/*新規投稿・編集*/
/* タイトルテキストボックスのサイズ */
.post-input-title {
    line-height: 1;
    padding: 6px;
    width: 98%;
}

/*投稿・更新ボタン*/
.post-submit-button {
    background-color: #d4f4dd; /* 薄い緑色の背景 */
    color: #2d5016; /* 濃い緑色の文字 */
/*  background-color: #2196F3;*/
/*  color: white;*/
  padding: 8px 16px;           /* 上下8px・左右16pxの余白 */
  border: none;                /* ボーダーなし */
  border-radius: 6px;          /* 丸み */
  font-size: 16px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.2s ease;
}
  /*下書きボタン*/
  .post-draft-button {
   background-color: #fff3cd; /* 薄い黄色の背景 */
   color: #664d03; /* 濃い茶色の文字 */
/*    background-color: #ffc107;*/
/*    color: black;*/
    padding: 8px 16px;           /* 上下8px・左右16pxの余白 */
    border: none;                /* ボーダーなし */
    border-radius: 6px;          /* 丸み */
    font-size: 16px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.2s ease;
  }
/*非公開ボタン*/
.post-private-button {
  background-color: #f8d7da; /* 薄いピンク色の背景 */
  color: #721c24; /* 濃い赤色の文字 */
/*  background-color: #6c757d;*/
/*  color: white;*/
  padding: 8px 16px;           /* 上下8px・左右16pxの余白 */
  border: none;                /* ボーダーなし */
  border-radius: 6px;          /* 丸み */
  font-size: 16px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.2s ease;
}

/*ボタンの右寄せ左寄せ*/
.post-controls-left {
    display: flex;
    justify-content: flex-start; /* 左寄せ */
    width: 100%;
    margin: 15px 0;
    padding: 10px;
}
/*ボタンの右寄せ左寄せ*/
.post-controls-right {
    display: flex;
    justify-content: flex-end; /* 右寄せ */
    width: 100%;
    margin: 15px 0;
    padding: 10px;
}

/*ボタンの編集ボタンとステータスラベルを左右に表示*/
.post-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin: 10px 0;
}

/* 投稿ステータスの共通スタイル */
.post-status-message {
    padding: 8px 16px;
    border-radius: 20px; /* 丸みを帯びたデザイン */
    font-weight: bold;
    font-size: 12px;
    display: inline-block;
    white-space: nowrap;
    text-transform: none; /* 大文字変換を無効化 */
    letter-spacing: 0.2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid transparent;
}

/* 投稿ステータスの公開（薄い緑色） */
.post-status-public {
    background-color: #d4f4dd; /* 薄い緑色の背景 */
    color: #2d5016; /* 濃い緑色の文字 */
    border: 1px solid #a8d8b9;
}

/* 投稿ステータスの下書き（薄い黄色） */
.post-status-draft {
    background-color: #fff3cd; /* 薄い黄色の背景 */
    color: #664d03; /* 濃い茶色の文字 */
    border: 1px solid #ffda6a;
}

/* 投稿ステータスの非公開（薄いピンク色） */
.post-status-private {
    background-color: #f8d7da; /* 薄いピンク色の背景 */
    color: #721c24; /* 濃い赤色の文字 */
    border: 1px solid #f1aeb5;
}

.post-submit-button:hover  {
  background-color: rgb(106, 184, 247);      /* hover時に少し濃い緑 */
}

@media (max-width: 768px) {


    /* 投稿ステータス */
  .post-status-message {
    padding: 4px 10px;        /* 高さを詰める */
    border-radius: 14px;      /* 角丸も少し小さく */
    font-size: 10.5px;        /* 主張しすぎないサイズ */
    font-weight: 600;         /* bold → 少し軽く */
    letter-spacing: 0.1px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
  }
  
  /* 公開ボタン */
  .post-status-public {
    background-color: #e6f7ec;   /* 少し白寄りに */
    color: #2f6b3f;
    border-color: #c7e9d3;
  }

  /* 下書きボタン */
  .post-status-draft {
    background-color: #fff8dd;   /* 黄を薄く */
    color: #6b5500;
    border-color: #ffe08a;
  }

  /* 非公開ボタン */
  .post-status-private {
    background-color: #fdecee;   /* 赤みを抑える */
    color: #842029;
    border-color: #f5c2c7;
  }

}

/*新規投稿・編集*/


/*-------ドロップダウンリスト-------*/
.selectBox {
    appearance: none;
    padding: 8px 30px 8px 10px;
    border: 1px solid #0066cc;
    border-radius: 4px;
    font-size: 12px;
    background-color: #f0f8ff;
    background-image: url("data:image/svg+xml;utf8,<svg fill='%23333' height='18' viewBox='0 0 24 24' width='18' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
}
.selectBoxSignup {
    appearance: none;
    width: 70%;
    padding: 8px 30px 8px 10px;
    border: 1px solid #0066cc;
    border-radius: 4px;
    font-size: 12px;
    background-color: #f0f8ff;
    background-image: url("data:image/svg+xml;utf8,<svg fill='%23333' height='18' viewBox='0 0 24 24' width='18' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
}

/*-------ドロップダウンリスト-------*/

/*記事投稿のトグルボタン-------*/
.toggle-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1em;
}

.toggle-label {
  font-size: 1rem;
  color: #333;
}

/* スイッチのスタイル */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 26px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #2196F3;
}

input:checked + .slider:before {
  transform: translateX(24px);
}

/*-------地図表示制御のトグルボタン-------*/


/*-------コンタクト申請一覧-------*/

/*-------コンタクト申請一覧-------*/


/*-------コンタクト申請モーダル-------*/

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal-content {
  background-color: #fff;
  padding: 20px 30px;
  border-radius: 8px;
  width: 90%;
  max-width: 400px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 20px;
  cursor: pointer;
  color: #888;
}

.modal-textarea {
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  resize: vertical;
  border: 1px solid #ccc;
  border-radius: 5px;
}
.modal-submit {
  margin-top: 10px;
  padding: 8px 16px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.modal-submit:hover {
  background-color: #0056b3;
}

/*-------コンタクト申請モーダル-------*/

/*-------マイページ-------*/
.mypage-container {
    max-width: 800px;
    margin: 2rem auto;
    font-family: sans-serif;
}

/*h2 {*/
/*    margin-bottom: 1rem;*/
/*}*/

.mypage-menu-list {
    list-style: none;
    padding: 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.mypage-menu-list li {
    border-bottom: 1px solid #ddd;
}

.mypage-menu-list li:last-child {
  border-bottom: none;
}

.mypage-menu-link {
    display: block;
    padding: 1rem;
    text-decoration: none;
    color: #000;
    font-weight: bold;
}

.mypage-menu-link:hover {
    background-color: #f0f8ff;
}


/* ログアウトボタン用  mypageメニュー：a と button を同じ見た目に揃える */
.mypage-menu-list form {
  margin: 0;           /* formの余白除去 */
}

.mypage-menu-link {
  display: block;      /* a も button も同一に */
  width: 100%;
  text-align: left;
  box-sizing: border-box;
}

/* button版のデフォルトを消す（重要） */
button.mypage-menu-link {
  background: none;
  border: none;
  font: inherit;
  font-weight: bold;
  color: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

/*-------マイページ-------*/

/* =======================================================
   SCR_CONT_001: コンタクト申請一覧画面 Contact Requests
   ======================================================= */

/* タブナビゲーション */
#contactTabs .nav-link {
  font-weight: 600;
  color: #555;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  margin-right: 2px;
}

#contactTabs .nav-link.active {
  background-color: #ffffff;
  color: #2f6df6;
  border-bottom: 2px solid #2f6df6;
}

/* タブコンテンツのカード */
.contact-request-card {
  border: 1px solid #e3e7ee;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.contact-request-card img.avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #ccc;
}

.contact-request-content {
  flex: 1;
}

.contact-request-content h5 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.contact-request-content p {
  font-size: 14px;
  margin-bottom: 8px;
  color: #333;
}

/* ボタン */
.contact-request-content form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.contact-request-content .btn-primary {
  background-color: #2f6df6;
  border-color: #2f6df6;
  color: #fff;
  font-weight: 800;
  letter-spacing: .08em;
  font-size: 14px;
  padding: 6px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color .15s ease, transform .02s ease;
}


.contact-request-content .btn-primary:hover {
  background-color: #2456c4;
  border-color: #2456c4;
}

.contact-request-content .btn-secondary {
  background-color: #f9fafb;
  border-color: #cbd5e1;
  color: #334155;
  font-weight: 800;
  letter-spacing: .08em;
  font-size: 14px;
  padding: 6px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color .15s ease, transform .02s ease;
}

.contact-request-content .btn-secondary:hover {
  background-color: #e2e8f0;
}

/* 空データ表示 */
.contact-request-empty {
  color: #94a3b8;
  font-size: 14px;
  padding: 24px 8px;
  text-align: center;
}
/* ======= ローカルCSSタブ切替 ======= */
.sc-contact {
  margin-top: 1rem;
}

/* ラジオボタンは非表示 */
.sc-contact input[type="radio"] {
  display: none;
}

/* タブラベル共通 */
.sc-contact label {
  display: inline-block;
  padding: 8px 16px;
  margin-right: 2px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  font-weight: 600;
  color: #555;
  cursor: pointer;
}

/* 選択中タブ */
.sc-contact input[type="radio"]:checked + label {
  background: #fff;
  color: #2f6df6;
  border-bottom: 2px solid #2f6df6;
}

/* コンテンツ初期非表示 */
.sc-contact .tab-content {
  display: none;
  border: 1px solid #dee2e6;
  border-top: none;
  padding: 16px;
  background: #fff;
}

/* 選択されたタブに対応するコンテンツ表示 */
#tab1:checked ~ #content1,
#tab2:checked ~ #content2,
#tab3:checked ~ #content3,
#tab4:checked ~ #content4,
#tab5:checked ~ #content5 {
  display: block;
}


/*-------ユーザ設定-------*/
/* ===== ユーザ設定（共通） ===== */
.usersettings-container {
  max-width: 920px;          /* 80%より安定 */
  margin: 40px auto;
  padding: 24px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  box-sizing: border-box;
}

.usersettings-form {
  margin-top: 16px;
}

/* 画像アップロード */
.profile-upload {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.user-icon {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
}

/* 共通：行（PCは2列、SPはカード化） */
.setting-row {
  display: grid;
  grid-template-columns: 160px 1fr; /* PC：ラベル左固定＋入力 */
  gap: 10px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid #e8e8e8;
}

.setting-row:last-of-type {
  border-bottom: none;
}

.setting-label {
  font-weight: 700;
  color: #333;
  text-align: left;
  padding-top: 8px; /* inputの高さに合わせる */
  white-space: nowrap;
}

.setting-input,
.setting-select,
.setting-textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 16px; /* iOSズーム防止 */
}

.setting-textarea {
  resize: vertical;
}

/* 下部アクション */
.usersettings-actions {
  text-align: center;
  margin-top: 18px;
}

.usersettings-sep {
  margin: 22px 0;
}

.usersettings-subtitle {
  margin: 0 0 10px;
}

/* Push */
.push-status {
  white-space: pre-line;
  margin-bottom: 10px;
}

.push-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.push-btn {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
}

.push-help {
  margin-top: 10px;
  font-size: 0.9em;
}

/* ===== スマホ：投稿者プロフィールと同じ “カード形式” + 10px相当 & ズーム防止 ===== */
@media (max-width: 768px) {

  /* 10px相当（16px * 0.625） */
  :root {
    --ui-scale: 0.625;
    --ui-wide: 152%; /* 160%だとピッタリ100%なので、少し詰めるなら152%(=95%相当) */
  }

  /* カード外枠 */
  .usersettings-container {
    max-width: 100%;
    margin: 12px auto;
    padding: 14px;
    border-radius: 10px;
    overflow: hidden;  /*scaleで横にはみ出すのを抑える */

  }

  .profile-upload {
    align-items: center;
  }

  /* --- 10px相当の縮小エリア（フォーム部分だけ縮小） --- */
  .usersettings-container .setting-row {
    width: var(--ui-wide);
    transform: scale(var(--ui-scale));
    transform-origin: left top;
  }
  /* ★profile-upload は縮小しない（大きく見せる） */
  .usersettings-container .profile-upload {
    width: 100%;
    transform: none;
  }

  /* スマホは “ラベル→入力” の縦並びカード */
  .setting-row {
    display: block;
    padding: 10px 0;           /* 少し詰める */
    border-bottom: none;        /* ★ 行の区切り線（hrっぽい線）を消す */
    margin-bottom: -18px;       /* scaleで空く隙間を埋める（必要なら微調整） */
  }

  /* もしHTMLに <hr> が入ってる場合も消す */
  .usersettings-container hr {
    display: none !important;
  }

  /* もし疑似要素で線を引いている場合も保険で消す */
  .usersettings-container .setting-row::before,
  .usersettings-container .setting-row::after {
    content: none !important;
    display: none !important;
  }

  /* ラベル（縮小前は16pxで保持 → 見た目10px相当） */
  .setting-label {
    display: block;
    padding-top: 0;
    margin-bottom: 1px;
    font-weight: 700;
    color: #333;
    white-space: normal;
    font-size: 16px;
    line-height: 1.2;
  }

  /* 入力欄：iOSズーム防止のため16px固定（見た目はscaleで10px相当） */
  .setting-input,
  .setting-select,
  .setting-textarea {
    width: 100%;
    font-size: 16px !important; /* ★ズーム防止 */
    line-height: 1.2;

    /* 幅詰め＋スッキリ見せ */
    padding: 6px 8px;          /* scale後はかなり小さく見える */
    margin: 0;                 /* 下に余計な隙間がある場合の対策 */
    box-shadow: none;
  }

  /* --- ボタンエリアは押しやすさ優先（縮小しない） --- */
  .push-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
  }

  .push-btn {
    width: 100%;
    height: 42px;
    font-size: 14px;           /* ボタン文字は読みやすさ優先 */
    transform: none !important;
  }
}


 /*-------ユーザ設定-------*/


/* ===== 承認済(#content2) を承認待ちと同配置に ===== */
#content2 .contact-request-card {
  align-items: flex-start;       /* 承認待ちと同じ縦揃え */
}

/* ブロックボタンの色だけ赤に（配置は既存の form レイアウトを流用） */
#content2 .contact-request-content .btn-danger {
  background-color: #d94835;
  border-color: #d94835;
  color: #fff;
  font-weight: 800;
  letter-spacing: .08em;
  font-size: 14px;
  padding: 6px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color .15s ease, transform .02s ease;
}

#content2 .contact-request-content .btn-danger:hover {
  background-color: #c84231;
  border-color: #c84231;
}

#content2 .contact-request-content .btn-danger:active {
  transform: translateY(1px);
}



/* =======================================================
   SCR_CHAT_001: トークルーム(チャット)一覧画面 talk_room
   ======================================================= */
.talk-rooms { margin-top: 12px; }
.talk-room-item{
  display:flex; gap:14px; align-items:center;
  padding:12px 10px; border:1px solid #e6e9ef; border-radius:10px;
  text-decoration:none; color:#000; background:#fff; margin-bottom:12px;
}
.talk-room-item:hover{ background:#f9fbff; }
.talk-room-avatar{ width:52px; height:52px; border-radius:50%; object-fit:cover; border:1px solid #ccd2dd; }

.talk-room-main{ flex:1 1 auto; min-width:0; }
.talk-room-head{ display:flex; align-items:center; justify-content:space-between; gap:8px; }
.talk-room-name{ font-weight:800; }
.talk-room-date{ color:#6b7280; font-size:12px; white-space:nowrap; }

.talk-room-last{
  margin:.25rem 0 0 0; color:#111827; opacity:.9;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
@media (max-width:520px){
  .talk-room-item{ padding:10px 8px; }
  .talk-room-date{ font-size:11px; }
}

/* =======================================================
   投稿詳細用 OGPカードデザイン
   ======================================================= */
.ogp-card {
  display: flex;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #f9f9f9;
  margin-top: 1rem;
  overflow: hidden;
}

.ogp-link {
  display: flex;
  text-decoration: none;
  color: inherit;
  width: 100%;
}

.ogp-thumb img {
  width: 300px;
  height: 180px;
  object-fit: cover;
}

.ogp-info {
  padding: 0.5rem;
  flex: 1;
}
/* OGPカード：スマホ向けレイアウト */
@media screen and (max-width: 768px) {
  .ogp-card {
    flex-direction: column;  /* 上下に表示 */
  }

  .ogp-thumb img {
    width: 100%;             /* 画面幅いっぱいに */
    height: auto;
    max-height: 200px;
  }

  .ogp-info {
    padding: 1rem;
  }
}
/* ================================
   チャット用 OGPカードデザイン
   ================================ */
.chat-ogp-card {
  display: flex;
  border: 1px solid #ccc;
  border-radius: 10px;
  overflow: hidden;
  margin: 10px 0;
  background-color: #f8f8f8;
  max-width: 90%;
  box-shadow: 1px 1px 5px rgba(0,0,0,0.1);
}

.chat-ogp-link {
  display: flex;
  text-decoration: none;
  color: inherit;
  width: 100%;
}

.chat-ogp-thumb {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  overflow: hidden;
  background: #eee;
}

.chat-ogp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-ogp-info {
  padding: 10px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.chat-ogp-info h3 {
  font-size: 14px;
  margin: 0 0 5px;
  font-weight: bold;
  line-height: 1.2;
}

.chat-ogp-info p {
  font-size: 12px;
  margin: 0;
  color: #666;
}

@media screen and (max-width: 600px) {
  .chat-ogp-card {
    flex-direction: column;
    max-width: 100%;
  }

  .chat-ogp-thumb {
    width: 100%;
    height: 180px;
  }

  .chat-ogp-info {
    padding: 8px;
  }
}


/* =======================================================
   SCR_CHAT_002: チャット画面
   ======================================================= */
   /* 吹き出し全体の枠とスクロール */
   /* チャット一覧 */
   .chat-box{
     border: 1px solid #ccc;
     margin-bottom: 1rem;
     height: 370px;
     overflow-y: auto;
     background: #fff;
     border-radius: 8px;
     padding: 12px;
   }

   /* 1メッセージ行 */
   .chat-row{
     display: flex;
     align-items: flex-end;   /* バブルと日時の下端を揃える */
     gap: 1px;
     margin-bottom: 10px;

     /* ★見切れ防止 */
     width: 100%;
   }

   /* 左側の順番を強制（アイコン→バブル→timestamp） */
   .chat-row.left .chat-icon { order: 1; }
   .chat-row.left .bubble    { order: 2; }
   .chat-row.left .timestamp { order: 3; }
   
   /* 左：アイコン→バブル→日時 */
   .chat-row.left{
     justify-content: flex-start;
     
   }
 .chat-row.left{ gap: 2px; }

   /* 右：日時→バブル（右寄せ） */
   .chat-row.right{
     justify-content: flex-end;
   }

   /* 相手アイコン */
   .chat-icon{
     width: 26px;
     height: 26px;
     border-radius: 50%;
     object-fit: cover;
     flex: 0 0 auto;
   }

   /* バブル本体（幅取りすぎ＆見切れ防止） */
   .bubble{
     display: inline-block;    /* 内容幅に合わせる */
     max-width: 72%;
     min-width: 0;             /* ★折り返し安定 */

     padding: 10px 12px;
     border-radius: 16px;
     line-height: 1.4;

     /* ★長文/URL/OGPで見切れない */
     overflow-wrap: anywhere;
     word-break: break-word;
     margin: 0;
   }

   /* バブル内の本文（OGPカード含めても崩れにくく） */
   .bubble .msg{
     min-width: 0;
     white-space: pre-wrap;   /* \n を改行に */
   }
   .bubble .msg img{
     max-width: 100%;
     height: auto;
     display: block;
   }

   /* 左バブル */
   .bubble.left{
     background: #f1f1f1;
     color: #333;
     border-top-left-radius: 4px;
   }

   /* 右バブル */
   .bubble.right{
     background: #007bff;
     color: #fff;
     border-top-right-radius: 4px;
   }

   /* 日時：バブルの外、下に揃える */
   .timestamp{
     font-size:8px;
     line-height:1;
     white-space:nowrap;
     flex:0 0 auto;
     color: rgba(0,0,0,0.55);
   }

   /* 右側の日時は少し薄い白に（LINEっぽく） */
   .chat-row.right .timestamp{
     color: rgba(0,0,0,0.45); /* 背景が白ならこれ。濃くしたければ調整 */
   }

      
   /* チャット画面のメッセージテキストボックスと送信ボタンのCSS */
   /* 入力欄と送信ボタンを横並び＆横幅いっぱい */
   #chatSendForm .input-wrapper {
     display: flex;
     align-items: center;
     gap: 8px;
     width: 100%;
   }

   /* textareaを伸ばす（最重要） */
   #chatSendForm .input-wrapper .modal-textarea.auto-expand {
     flex: 1 1 auto;
     width: 100%;
     min-width: 0;          /* ← これが無いとflexで縮んで狭くなることがある */
     box-sizing: border-box;
     font-size: 12px;

     padding: 10px 12px;
     border: 1px solid #ccc;
     border-radius: 10px;

     resize: none;
     overflow-y: auto;

     /* iPhoneズーム防止：16px以上 */
     font-size: 16px;
     line-height: 1.35;
   }

   /* ボタンは幅固定で右に */
   #chatSendForm .input-wrapper button[type="submit"] {
     flex: 0 0 auto;
     padding: 0;
     border: none;
     background: transparent;
   }
   
      /* =======================================================
      画面のエラーメッセージ
      ======================================================= */
   .alert {
     position: relative;
     padding: 0.75rem 1.25rem;
     margin-bottom: 1rem;
     border: 1px solid transparent;
     border-radius: 0.375rem;
     font-size: 0.9rem;
     line-height: 1.5;
   }

   .alert-danger {
     color: #842029;
     background-color: #f8d7da;
     border-color: #f5c2c7;
   }
   .alert {
     position: relative;
     padding: 0.75rem 1.25rem;
     margin-bottom: 1rem;
     border: 1px solid transparent;
     border-radius: 0.375rem;
     font-size: 0.9rem;
     line-height: 1.5;
   }
 .alert-info {
   color: rgb(0, 64, 0);
   background-color: rgb(213, 255, 208);
   border-color: rgb(213, 255, 208);
 }

 /* ======================================================= 
       Search UI 検索条件のボックス (最終安定版)
    ======================================================= */

 /* box-sizingの徹底 */
 .search-panel, .search-panel * {
   box-sizing: border-box;
 }

 .search-header {
   display: flex;
   justify-content: center;
   margin: 10px 0 14px;
 }

 .search-toggle {
   width: 44px;
   height: 44px;
   border-radius: 999px;
   border: none;
   background: #ffffff;
   box-shadow: 0 6px 18px rgba(0,0,0,0.16);
   cursor: pointer;
 }

 /* パネル本体 */
 .search-panel {
   width: 92%;
   max-width: 920px;
   margin: 0 auto 14px;
   padding: 20px;
   border-radius: 14px;
   background: #ffffff;
   box-shadow: 0 10px 24px rgba(0,0,0,0.12);
 }

 /* PC表示：グリッドレイアウト */
 .search-row {
   display: grid;
   grid-template-columns: 140px 1fr; /* ラベル幅を少し広げて安定させる */
   gap: 12px;
   align-items: center;
   margin-bottom: 12px;
   width: 100%;
 }

 .search-row label {
   font-weight: 700;
   color: #222;
   font-size: 14px;
 }

 /* 入力要素の基本設定 */
 .search-row input,
 .search-row select {
   width: 100%;
   height: 44px;
   border-radius: 10px;
   border: 1px solid #d9d9d9;
   padding: 0 12px;
   font-size: 15px;
   background: #fff;
   appearance: none;
   -webkit-appearance: none;
   text-align: left !important;
   outline: none;
 }

 .search-row input[type="date"] {
   padding: 0 10px;
 }

 /* ★日付の範囲入力 (From〜To) の崩れを修正 */
 .search-inline {
   display: flex;
   align-items: center;
   gap: 8px;
   width: 100%; /* 親要素(1fr)いっぱいに広げる */
 }

 /* 範囲入力内のinputを強制的に等幅にする */
 .search-inline input {
   flex: 1 !important; /* 1:1で均等に広がるように強制 */
   min-width: 0;        /* flexコンテナ内での縮みすぎ・はみ出しを防止 */
 }

 .search-inline span {
   flex-shrink: 0;
   color: #666;
   font-size: 14px;
 }

 /* アクションボタン */
 .search-actions {
   display: flex;
   gap: 10px;
   justify-content: flex-end;
   margin-top: 20px;
 }

 .search-actions button,
 .search-actions a {
   height: 44px;
   padding: 0 24px;
   border-radius: 10px;
   font-weight: 700;
   font-size: 15px;
   text-decoration: none;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   cursor: pointer;
 }

 .search-actions button {
   background: #4a90e2;
   color: #fff;
   border: none;
   flex: 3;
 }

 .search-actions a {
   border: 1px solid #d9d9d9;
   color: #333;
   background: #fff;
   flex: 1;
 }
 .search-row--place {
   display: grid;
   grid-template-columns: 
     80px
     1fr
     110px
     120px;
   gap: 10px;
 }

 /* ===== Mobile (スマホ最適化：10px相当 & ズーム防止) ===== */
 @media (max-width: 640px) {
   .search-panel {
     width: calc(100% - 16px);
     padding: 12px 10px;
     overflow: hidden;
   }

   .search-row {
     display: flex;
     flex-direction: column;
     align-items: flex-start;
     width: 160%; /* 1 / 0.625 = 160% */
     transform: scale(0.625);
     transform-origin: left top;
     margin-bottom: -24px; /* 縮小で空いた隙間を埋める */
     gap: 4px;
   }

   .search-row label {
     font-size: 16px; /* 縮小後10px相当 */
     padding-left: 2px;
   }

   .search-row input,
   .search-row select {
     font-size: 16px !important; /* iOSズーム防止 */
     height: 46px; 
   }

   /* スマホ時の日付範囲：2列横並びを維持 */
   .search-inline {
     display: grid;
     grid-template-columns: 1fr 1fr; /* 均等2列 */
     gap: 10px;
     width: 100%;
   }

   /* スマホでは「〜」を消す（スペース確保のため） */
   .search-inline span {
     display: none;
   }

    /* ボタンエリアは押しやすさ重視でscaleをかけないか、少しだけにする */
     .search-actions {
       display: flex;
       gap: 8px;
       margin-top: 10px; /* scale調整後の位置合わせ */
       width: 100%;
     }

     .search-actions button,
     .search-actions a {
       flex: 1;
       height: 40px;
       font-size: 12px; /* ボタンの文字は読みやすさ優先で少し大きく */
       display: flex;
       justify-content: center;
       align-items: center;
     }
     
     /* 場所 + 範囲（SP専用レイアウト） */
     .search-row--place {
         display: grid;
         grid-template-columns: 1fr 90px; /* 場所 | 半径 */
         grid-template-rows: auto auto;   /* 1段目ラベル, 2段目入力 */
         gap: 2px 6px;
         align-items: center;
       }

       /* 1段目：ラベルを横並びに */
       .search-row--place label:nth-of-type(1) {
         grid-column: 1 / 2;
         grid-row: 1;
         font-size: 16px;
         margin: 0;
         padding-left: 2px;
       }

       .search-row--place label:nth-of-type(2) {
         grid-column: 2 / 3;
         grid-row: 1;
         font-size: 16px;
         margin: 0;
         padding-left: 2px;
         text-align: left;
         white-space: nowrap;
       }

       /* 2段目：入力欄を横並びに */
       .search-row--place input[type="text"] {
         grid-column: 1 / 2;
         grid-row: 2;
         width: 100%;
         min-width: 0;
       }

       .search-row--place input[type="number"] {
         grid-column: 2 / 3;
         grid-row: 2;
         width: 100%;
         min-width: 0;
       }

       /* 場所 + 範囲（SP専用レイアウト） */
     
   }
   
   
   

   /* ===== PWA読込バー表示 ===== */
   /* 上部バー */
   .loading-bar{
     position: fixed;
     top: 0; left: 0;
     height: 3px;
     width: 0%;
     opacity: 0;
     z-index: 9999;
     background: #1a73e8;
     transition: width .25s ease, opacity .2s ease;
   }

   /* 画面オーバーレイ（任意：押せないようにする） */
   .loading-overlay{
     position: fixed;
     inset: 0;
     background: rgba(255,255,255,.55);
     opacity: 0;
     pointer-events: none;
     z-index: 9998;
     transition: opacity .15s ease;
   }

   .loading-overlay.is-show{
     opacity: 1;
     pointer-events: auto;
   }

   .loading-spinner{
     position: absolute;
     top: 50%; left: 50%;
     width: 28px; height: 28px;
     margin: -14px 0 0 -14px;
     border-radius: 50%;
     border: 3px solid rgba(0,0,0,.15);
     border-top-color: rgba(0,0,0,.45);
     animation: spin .8s linear infinite;
   }
   @keyframes spin{ to{ transform: rotate(360deg); } }
   
   /* ===== PWA読込バー表示 ===== */
   

   /* ===== 標準バリデーションエラー用 ===== */
   /* 標準バリデーションエラー用（フォーカスしない） */
   .has-invalid {
     background-color: #fff3e0 !important;   /* 薄いオレンジ */
     border-color: #ff9800 !important;
   }

   /* select / date 系も自然に */
   .has-invalid:focus {
     outline: none;
     box-shadow: none;
   }

   /* textarea も統一 */
   textarea.has-invalid {
     background-color: #fff3e0 !important;
   }
 /* ===== 標準バリデーションエラー用 ===== */

   
 /* 
   ==============================================================================
    ChatGPT
    ============================================================================== 
   */
   
   /* ===================================================
      Sports Connect - Unified Style.css
      Mobile First / Desktop Enhanced
   =================================================== */

   /* ===================================================
      1. Reset / Base
   =================================================== */
   *, *::before, *::after {
     box-sizing: border-box;
   }

   html {
     font-size: 16px;
   }

   body {
     margin: 0;
     font-family: -apple-system, BlinkMacSystemFont,
                  "Segoe UI", Roboto, "Helvetica Neue",
                  Arial, sans-serif;
     background: #f7f8fa;
     color: #111;
     line-height: 1.45;
   }

   img {
     max-width: 100%;
     height: auto;
     display: block;
   }

   a {
     color: inherit;
     text-decoration: none;
   }

   /* ===================================================
      2. Layout
   =================================================== */
   main {
     max-width: 1100px;
     margin: 0 auto;
     padding-bottom: 96px; /* bottom nav / CTA 対策 */
   }

   .section {
     margin-bottom: 20px;
   }

   /* ===================================================
      3. Common UI
   =================================================== */
   .btn {
     display: inline-flex;
     align-items: center;
     justify-content: center;
     border-radius: 999px;
     padding: 12px 16px;
     font-weight: 700;
     cursor: pointer;
     border: none;
   }

   .btn-primary {
     background: #2563eb;
     color: #fff;
   }

   .btn-ghost {
     background: transparent;
     border: 1px solid #d0d5dd;
     color: #333;
   }

   .card {
     background: #fff;
     border-radius: 16px;
     box-shadow: 0 10px 28px rgba(0,0,0,.12);
   }

   /* ===================================================
      4. Top Page : Hero
   =================================================== */
   .hero {
     margin: 14px;
     padding: 20px 18px;
     border-radius: 18px;
     background: linear-gradient(135deg, #2563eb, #1e40af);
     color: #fff;
     box-shadow: 0 18px 40px rgba(0,0,0,.28);
   }

   .hero h1 {
     font-size: 20px;
     line-height: 1.4;
     margin: 0 0 6px;
   }

   .hero-sub {
     font-size: 14px;
     opacity: .9;
     margin-bottom: 14px;
   }

   .hero-actions {
     display: flex;
     gap: 10px;
   }

   /* ===================================================
      5. Top Page : Category Bar
   =================================================== */
   .catbar {
     display: flex;
     gap: 10px;
     padding: 6px 12px;
     overflow-x: auto;
   }

   .catitem {
     padding: 8px 14px;
     border-radius: 999px;
     background: #eef2ff;
     font-size: 13px;
     white-space: nowrap;
   }

   .catitem.is-active {
     background: #2563eb;
     color: #fff;
     font-weight: 700;
   }

   /* ===================================================
      6. Top Page : Post List
   =================================================== */
   .post-grid {
     display: grid;
     grid-template-columns: 1fr;
     gap: 14px;
     padding: 0 12px;
   }

   .post-card {
     background: #fff;
     border-radius: 16px;
     padding: 14px;
     box-shadow: 0 10px 28px rgba(0,0,0,.12);
     transition: transform .15s ease, box-shadow .15s ease;
   }

   .post-card:hover {
     transform: translateY(-2px);
     box-shadow: 0 14px 36px rgba(0,0,0,.18);
   }

   .post-card h2 {
     font-size: 16px;
     margin: 0 0 6px;
   }

   .post-meta {
     font-size: 12px;
     color: #666;
     margin-bottom: 6px;
   }

   .post-summary {
     font-size: 13px;
     line-height: 1.5;
   }

   /* ===================================================
      7. Search / Form
   =================================================== */
   .search-panel {
     background: #fff;
     padding: 14px;
     border-radius: 16px;
     box-shadow: 0 10px 24px rgba(0,0,0,.12);
     margin: 12px;
   }

   .search-row {
     display: flex;
     flex-direction: column;
     margin-bottom: 10px;
   }

   .search-row label {
     font-size: 12px;
     margin-bottom: 4px;
   }

   .search-row input,
   .search-row select {
     height: 44px;
     border-radius: 10px;
     border: 1px solid #ccc;
     padding: 0 12px;
     font-size: 16px; /* iOS zoom 防止 */
   }

   /* ===================================================
      8. Detail Page
   =================================================== */
   .fixed-cta {
     position: fixed;
     left: 12px;
     right: 12px;
     bottom: 72px;
     z-index: 999;
   }

   .fixed-cta a {
     display: block;
     background: #2563eb;
     color: #fff;
     text-align: center;
     padding: 14px 0;
     border-radius: 999px;
     font-size: 16px;
     font-weight: 800;
     box-shadow: 0 14px 36px rgba(37,99,235,.45);
   }

   .trust-note {
     margin-top: 10px;
     padding: 10px 12px;
     font-size: 12px;
     background: #f1f5f9;
     border-radius: 12px;
     color: #555;
   }

   /* ===================================================
      9. Chat (Minimal)
   =================================================== */
   .chat-box {
     height: 360px;
     overflow-y: auto;
     background: #fff;
     border-radius: 12px;
     padding: 12px;
     border: 1px solid #ddd;
   }

   .bubble {
     max-width: 72%;
     padding: 10px 12px;
     border-radius: 16px;
     line-height: 1.4;
     word-break: break-word;
   }

   .bubble.left {
     background: #f1f1f1;
   }

   .bubble.right {
     background: #2563eb;
     color: #fff;
   }

   /* ===================================================
      10. Desktop Enhancement
   =================================================== */
   @media (min-width: 768px) {

     .hero {
       max-width: 960px;
       margin: 24px auto;
       padding: 32px;
     }

     .hero h1 {
       font-size: 28px;
     }

     .post-grid {
       max-width: 1100px;
       margin: 0 auto;
       grid-template-columns: repeat(3, 1fr);
       gap: 20px;
     }

     .fixed-cta {
       position: static;
       margin-top: 24px;
     }

     .fixed-cta a {
       max-width: 360px;
       margin: 0 auto;
     }
   }
