  :root { --main:#4fc3f7; }

* { box-sizing: border-box; }

body{
  margin:0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background:#f6fbff;
  overflow-x:hidden;
}

/* ヘッダー */
.header{
  background:var(--main);
  color:#fff;
  padding:10px 12px;
}

.header-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.logo{
  margin:0;
  font-size:20px;
  font-weight:900;
}

.icon-btn{
  background:none;
  border:none;
  color:#fff;
  cursor:pointer;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:2px;
  padding:4px 6px;
  min-width:72px;
}

.icon-btn .icon{
  font-size:28px;
  font-weight:900;
  line-height:1;
}

.icon-btn .icon-label{
  font-size:12px;
  font-weight:900;
  line-height:1;
}

/* メニュー */
.menu{
  position:fixed;
  top:0; left:0;
  width:min(320px, 86vw);
  height:100%;
  background:#fff;
  padding:16px;
  border-right:3px solid var(--main);
  box-shadow: 2px 0 10px rgba(0,0,0,.08);
  z-index:1000;
}

.hidden{ display:none !important; }

.menu button{
  width:100%;
  padding:12px;
  margin-bottom:10px;
  border-radius:12px;
  border:none;
  background:var(--main);
  color:#fff;
  font-size:16px;
  font-weight:900;
  cursor:pointer;
}
.menu .ghost{
  background:#fff;
  color:#245;
  border:2px solid rgba(79,195,247,.75);
}

/* コンテナ */
.container{
  padding:16px;
  display:flex;
  flex-direction:column;
  gap:12px;
}

/* パネル */
.panel{
  background:#fff;
  border-radius:14px;
  padding:14px;
  box-shadow:0 2px 8px rgba(0,0,0,.06);
}

.panel-title{
  font-weight:900;
  color:#234;
  margin-bottom:10px;
}

/* 入力 */
input, textarea, select{
  width:100%;
  padding:12px;
  border-radius:10px;
  border:2px solid rgba(79,195,247,.85);
  font-size:16px;
  background:#fff;
}

textarea{ min-height:160px; resize: vertical; }

.row{ margin-top:10px; }
.row-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.result-count{
  margin-left:auto;
  font-weight:900;
  color:#345;
}

/* ✅ チェック（左固定・縦崩れ防止） */
.checkbox-row{
  margin-top:10px;
  display:flex;
  justify-content:flex-start;
  align-items:center;
  width:100%;
}

.checkbox-label{
  display:flex;
  align-items:center;
  gap:10px;
  width:auto;
  max-width:100%;
  color:#234;
  font-weight:900;
  white-space:nowrap;          /* 1文字ずつ縦に折れない */
}

.checkbox-label input{
  margin:0;
  flex:0 0 auto;
}

/* ✅ ジャンル（崩れないGrid版） */
.genres-title{
  font-weight:900;
  color:#234;
  margin-bottom:8px;
}

/* スマホは2列、タブレット以上は自動で増える */
.genres-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:12px;
}

@media (min-width: 520px){
  .genres-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 860px){
  .genres-grid{
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ラベル＝横長の“ボタン”として安定 */
.genre-item{
  display:flex;
  align-items:center;
  gap:10px;

  width:100%;
  min-width:0;                 /* 省略を効かせる */
  padding:12px 12px;
  border-radius:16px;          /* 999pxやめて円化防止 */
  border:2px solid rgba(79,195,247,.45);
  background:#fff;

  font-weight:900;
  color:#234;

  /* 1文字ずつ縦折れ対策 */
  writing-mode: horizontal-tb;
}

.genre-item input{
  margin:0;
  flex:0 0 auto;
}

/* テキストは1行で省略（縦折れ防止） */
.genre-item span{
  display:block;
  min-width:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* ボタン */
button{
  background:var(--main);
  color:#fff;
  border:none;
  padding:12px 14px;
  border-radius:12px;
  font-size:16px;
  font-weight:900;
  cursor:pointer;
}
button.ghost{
  background:#fff;
  color:#245;
  border:2px solid rgba(79,195,247,.75);
}

/* 投稿カード */
.post-card{
  background:#fff;
  padding:14px;
  border-radius:14px;
  box-shadow:0 2px 8px rgba(0,0,0,.06);
  cursor:pointer;
}
.post-card h3, .post-card h2{
  margin:0 0 6px;
  font-size:18px;
}
.meta{
  font-size:12px;
  color:#667;
  font-weight:800;
  margin-bottom:8px;
}
.post-text, .post-card p{
  margin:0;
  overflow-wrap:anywhere;
  word-break:break-word;
  white-space:normal;
}

/* タグ */
.tags{ display:flex; flex-wrap:wrap; gap:8px; margin:8px 0; }
.tag{
  padding:6px 10px;
  border-radius:999px;
  border:2px solid rgba(79,195,247,.35);
  font-weight:900;
  color:#234;
  background:#fff;
}

/* ページャー */
.pager-wrap{ padding: 6px 2px 0; }
.pager-info{
  text-align:center;
  color:#345;
  font-size:14px;
  font-weight:900;
  margin-bottom:10px;
}
.pager{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom: 6px;
}
.pager-btn{
  border:none;
  background:#fff;
  border:2px solid rgba(79,195,247,.55);
  color:#245;
  padding:10px 12px;
  border-radius:12px;
  font-weight:900;
  cursor:pointer;
  min-width:44px;
}
.pager-btn.is-active{
  background: var(--main);
  color:#fff;
  border-color: var(--main);
}
.pager-btn:disabled{ opacity:.45; cursor:not-allowed; }
.pager-dots{ font-weight:900; color:#456; padding:0 6px; }

/* ===== コメント（2段フラット） ===== */
.comment-root{
  margin-top:12px;
  background:#fff;
  border-radius:14px;
  padding:14px;
  box-shadow:0 2px 8px rgba(0,0,0,.06);
}

.comment-item{
  display:flex;
  gap:10px;
  align-items:flex-start;
  margin-top:12px;
}

/* コメント操作用 */
.comment-item {
  position: relative;
}

.avatar{
  /* width:46px; */
  height:46px;
  border-radius:999px;
  /* background:#d94b4b; */
  flex:0 0 auto;
}

.c-body{ flex:1; min-width:0; }
.c-user{ font-weight:900; color:#222; margin-bottom:6px; }
.c-text{
  font-size:17px;
  color:#222;
  overflow-wrap:anywhere;
  word-break:break-word;
  white-space:normal;
}
.c-actions{ margin-top:8px; display:flex; gap:10px; align-items:center; }
.reply-btn{
  background:none;
  border:none;
  color:#345;
  font-weight:900;
  cursor:pointer;
  padding:0;
}

/* 子コメント（最大1段の見た目） */
.child-wrap{
  margin-left: 18px;
  padding-left: 12px;
  border-left: 3px solid rgba(0,0,0,.12);
}

/* 折りたたみボタン（ルートだけ） */
.reply-toggle-row{ margin-top:10px; margin-left:56px; }
.reply-toggle-btn{
  border:none;
  background: var(--main);
  color:#fff;
  font-weight:900;
  padding:10px 14px;
  border-radius:12px;
  cursor:pointer;
}

/* インライン返信フォーム（縮まない） */
.inline-reply{
  margin-top:10px;
  width:100%;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.inline-reply textarea{ min-height:160px; }
.inline-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:nowrap;
}
.cancel-inline{
  background:#fff;
  color:#245;
  border:2px solid rgba(79,195,247,.75);
  border-radius:999px;
  font-weight:900;
  padding:12px 14px;
  cursor:pointer;
  white-space:nowrap;
  min-width:110px;
}
.send-inline{
  border-radius:999px;
  font-weight:900;
  white-space:nowrap;
  min-width:110px;
}

@media (max-width:420px){
  .inline-actions{ justify-content:space-between; }
  .cancel-inline,.send-inline{ min-width:48%; }
}
/* ====== FIX: checkbox系が width:100% に巻き込まれて崩れるのを防ぐ ====== */

/* checkbox/radio は幅100%にしない */
input[type="checkbox"],
input[type="radio"]{
  width:auto !important;
  height:auto !important;
  padding:0 !important;
  border-radius:6px;
}

/* ジャンルのラベル内：チェック＋文字を必ず横並び */
.genre-item{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:10px !important;
  width:100% !important;
  min-height:52px;
}

/* 文字が消えてる対策：spanを必ず表示 */
.genre-item span{
  display:block !important;
  color:#234 !important;
  font-weight:900 !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}

/* 「コメントを受け取らない」を左に固定＆下に落ちない */
.checkbox-row{
  display:flex !important;
  justify-content:flex-start !important;
  align-items:center !important;
  width:100% !important;
}

.checkbox-label{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  white-space:nowrap !important;
  width:auto !important;
}

/* スマホでジャンルが2列で揃うように固定 */
.genres-grid{
  display:grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap:12px !important;
}

/* 文字が縦に割れるのを強制停止 */
.genre-item,
.checkbox-label{
  writing-mode: horizontal-tb !important;
}
/* コメントを受け取らない と シェアボタンの間隔を確保 */

.checkbox-row{
  margin-bottom: 18px !important; /* ボタンと距離を作る */
}

.checkbox-label{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
}

/* シェアボタンを少し下に固定 */
.share-button,
button[type="submit"]{
  margin-top: 6px !important;
}
/* タイトルと内容の間に余白を追加 */
input[type="text"]{
  margin-bottom: 6px;
}

textarea{
  margin-top: 6px;
}
/* ジャンル選択ボタン修正 */
.genre-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* 各ジャンルボタン */
.genre-item{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 2px solid #9bd7ff;
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  min-height: 56px;
}

/* チェックボックス */
.genre-item input{
  flex-shrink: 0;
}

/* テキスト（省略を解除＆折り返しOK） */
.genre-item span{
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  word-break: break-word;
  font-size: 15px;
  line-height: 1.4;
}
/* ===== コメント入力欄を「今の気持ち」くらい大きく & 縮まない ===== */

/* 返信フォーム全体：どの階層でも幅100%で固定 */
.reply-form{
  width: 100% !important;
  max-width: 100% !important;
  margin: 12px 0 0 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
/* ===============================
   返信フォームが細く潰れて縦になるバグ修正
   =============================== */

/* コメント1件が flex の場合、折り返し可能にして body が縮みすぎないようにする */
.comment-item{
  display: flex;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;           /* ←これ重要 */
}

.comment-item .c-body{
  flex: 1 1 0;
  min-width: 0;              /* ←長文で横幅計算が壊れるのを防ぐ */
}

/* コメント本文はどんな文字列でも折り返す（長い連続文字対策） */
.c-text{
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* 返信フォームは常に「横幅100%」で表示（潰れない） */
.reply-form{
  flex: 1 1 100%;
  width: 100% !important;
  max-width: 100% !important;
  margin: 12px 0 0 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* 返信入力欄は「今の気持ちを書く欄」くらい大きく */
.reply-form textarea{
  width: 100% !important;
  min-height: 160px !important;
  padding: 10px !important;
  border-radius: 12px !important;
  border: 2px solid var(--main) !important;
  font-size: 16px !important;
  box-sizing: border-box !important;
  resize: vertical;
}

/* 送信/キャンセルは横並びで崩れない */
.reply-actions{
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 10px;
}
/* ===== Auth Modal (安全：既存と衝突しないクラス名) ===== */
.auth-modal.hidden{ display:none !important; }
.auth-modal{ position:fixed; inset:0; z-index:3000; }
.auth-backdrop{ position:absolute; inset:0; background:rgba(0,0,0,.35); }

.auth-card{
  position:relative;
  width:min(520px, calc(100vw - 24px));
  margin:14vh auto 0;
  background:#fff;
  border-radius:16px;
  padding:16px;
  box-shadow:0 12px 40px rgba(0,0,0,.25);
}

.auth-title{ font-weight:900; font-size:18px; color:#123; margin-bottom:12px; }
.auth-card input{
  width:100%;
  margin-top:10px;
  padding:10px;
  border-radius:10px;
  border:2px solid var(--main);
  font-size:16px;
  box-sizing:border-box;
}

.auth-actions{
  margin-top:12px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.auth-msg{ margin-top:10px; color:#c00; font-weight:800; min-height:1.2em; }
/* ログイン状態表示（崩れにくい） */
.auth-status{
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.25);
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 45vw;
}

@media (max-width: 520px){
  .auth-status{ max-width: 55vw; }
}

/* メニュー内に置いた場合でも読めるように */
.menu .auth-status{
  background: #e8f6ff;
  color: #123;
  border: 2px solid var(--main);
  max-width: 100%;
}

/* マイページ：自分の投稿カードを押せる見た目に */
.card-click { cursor: pointer; }
.card-click:active { transform: scale(0.99); }

/* hidden が無ければ追加（既にあれば不要） */
.hidden { display: none; }

.myPostsList { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }

.subTitle { margin: 0 0 8px; font-size: 16px; font-weight: 800; }

/* 長文がはみ出ないように（投稿一覧のカード内） */
.myPostsList h4, .myPostsList p { overflow-wrap: anywhere; word-break: break-word; }
/* ✅ マイページのボタンが押せない原因(重なり)対策 */
button, a {
  pointer-events: auto;
}

.mypage button,
.mypage a {
  position: relative;
  z-index: 5;
}

/* もしカード全体をクリックできるようにしてるなら、ボタンだけ前面に */
.mypage .card {
  position: relative;
}
/* ===== マイページ系 共通レイアウト（mypage / myposts で使う） ===== */
.mypage-wrap{
  max-width: 720px;
  margin: 0 auto;
  padding: 16px;
}

/* “カード”の見た目を統一 */
.mypage-card{
  background:#fff;
  border-radius:16px;
  padding:18px;
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
  margin-bottom: 16px;
}

.mypage-title{
  font-size: 22px;
  margin: 0 0 10px;
  font-weight: 800;
}

.mypage-muted{
  color:#7a7a7a;
  font-size: 14px;
  line-height: 1.5;
}

/* 一覧の中のカード（投稿カードを並べる箱） */
.mypage-list{
  display: grid;
  gap: 12px;
}
/* ===== myposts のヘッダーだけサイズを整える ===== */


.myposts-page .header-bar{
  height: 64px;          /* ←ここで“ヘッダーの高さ”を固定 */
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.myposts-page .back-btn{
  width: 44px;
  height: 44px;
  font-size: 26px;
  line-height: 1;
  display: grid;
  place-items: center;
  border-radius: 999px;
}

.myposts-page .header-center{
  flex: 1;
  text-align: center;
  pointer-events: none;  /* 真ん中がクリックの邪魔しない */
}

.myposts-page .header-center h1{
  margin: 0;
  font-size: 26px;       /* タイトルの大きさ */
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: .02em;
}

.myposts-page .header-right{
  width: 44px;           /* 左の戻るボタンと幅を揃えて中央をキープ */
  height: 44px;
}
/* ===== myposts only pager (超安全版) ===== */
.mp-pagerArea{
  margin: 14px 0 18px;
  text-align: center;
}

.mp-pagerInfo{
  font-weight: 700;
  color: #2b3a42;
  margin-bottom: 10px;
}

.mp-pager{
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mp-pager button{
  appearance: none;
  border: 3px solid rgba(110, 200, 240, 0.55);
  background: #ffffff;
  color: #2b3a42;
  border-radius: 18px;
  padding: 8px 4px;
  min-width: 78px;
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.mp-pager button.mp-num{ min-width: 64px; }

.mp-pager button.mp-active{
  background: #56bff0;
  border-color: #56bff0;
  color: #fff;
}

.mp-pager button:disabled{
  opacity: 0.45;
  box-shadow: none;
}
/* mypostsの削除ボタン（既存を壊さない追記） */
.post-card .del-btn{
  margin-top: 10px;
  padding: 10px 18px;
  border-radius: 16px;
  font-weight: 800;
}
/* お気に入りボタン：枠なし・背景なし */
.fav-btn{
  position:absolute;
  top:13px;
  right:0px;
  z-index:5;

  /* 枠を消す */
  background: transparent;
  border: none;
  box-shadow: none;
  outline: none;

  /* 余計な四角を消す */
  padding: 0;
  line-height: 0;

  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* アイコンサイズ（少し大きめ） */
.fav-btn svg{
  width: 30px;     /* ← ここを 24→26 にして少し大きく */
  height: 26px;
  display:block;
}

/* OFF：白（塗りなし）＋外枠は青 */
.fav-btn svg path{
  fill: none;
  stroke: #79BFEA;     /* ココシェアの青寄せ */
  stroke-width: 2;
  stroke-linejoin: round;
}

/* ON：黄色（塗りあり）＋黄色部分をほんの少し大きく */
.fav-btn.is-on svg,
.fav-btn.is-fav svg{   /* どっちのクラスでも効くように両対応 */     /* ← 黄色をほんの少し大きく */
  transform-origin: center;
}

.fav-btn.is-on svg path,
.fav-btn.is-fav svg path{
  fill: #F3C12F;          /* 黄色 */
  stroke: #D7A300;        /* 黄色の縁（好みで none でもOK） */
}

/* ===== お気に入り用：自分の投稿ヘッダー風 ===== */
.simple-header{
  /* ✅ 固定しない */
  position: relative;   /* または position: static; でもOK */
  top: auto;
  z-index: auto;

  height: calc(64px + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);

  background: #56BEEB;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ✅ タイトル中央 */
.simple-title{
  margin: 0;
  color: #fff;
  font-weight: 800;
  font-size: 26px;      /* 文字を中央で大きめ */
  line-height: 1;
  letter-spacing: 0.02em;
}

/* ✅ 戻るボタンを大きく（押しやすく） */
.simple-back{
  position: absolute;
  left: 14px;
  top: calc(env(safe-area-inset-top) + 50%);
  transform: translateY(-50%);

  width: 52px;
  height: 52px;

  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;
}

.simple-back-icon{
  font-size: 26px;  /* 矢印を大きく */
  line-height: 1;
  font-weight: 900;
}
.panel .panel-sub{
  font-size: 13px;
  font-weight: 330;
  color: #1e1d1d;
  margin-top: 10px;
}
/* ===== 共通：ヘッダー（お問い合わせも他ページと同じ） ===== */
.app-header{
  position: relative;
  z-index: 1;

  /* iPhoneのノッチ対応 */
  padding-top: env(safe-area-inset-top);

  height: calc(56px + env(safe-area-inset-top));
  background: #57C7F4;

  display: flex;
  align-items: center;
  justify-content: center;
}

/* 戻るボタン（左・大きく） */
.header-back{
  position: absolute;
  left: 12px;
  top: env(safe-area-inset-top);
  height: 56px;

  display: flex;
  align-items: center;
  gap: 6px;

  background: transparent;
  border: none;
  color: #fff;
  font-weight: 800;
  font-size: 26px; /* ←矢印を大きく */
  padding: 0 6px;
  cursor: pointer;
}


/* タイトル（中央） */
.header-title{
  height: 56px;
  margin-top: env(safe-area-inset-top);

  display: flex;
  align-items: center;

  color: #fff;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0.02em;
}

/* ===== 利用規約ページ専用ヘッダー ===== */
.app-header.terms-header{
  position: relative;        /* 固定しない */
  height: 80px;              /* ← 高さをプラス（好みで 80〜96） */
  background: #63c7ff;       /* いつもの水色に合わせる */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 中央ロゴ（白・大きく） */
.app-header.terms-header .terms-logo{
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-weight: 800;
  font-size: 24px;           /* ← ロゴ大きさ（好みで 22〜28） */
  letter-spacing: 0.04em;
}

/* 戻るボタン（左・大きく・枠なし） */
.app-header.terms-header .terms-back{
  position: absolute;
  left: 14px;
  top: 12px;
  background: transparent;
  border: none;              /* ← 青い枠（border）消す */
  box-shadow: none;          /* ← 影も消す */
  padding: 10px 12px;
  font-size: 28px;           /* ← 大きく */
  font-weight: 900;
  color: #fff;
  line-height: 1;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

/* iOSのタップ時の変なハイライト軽減 */
.app-header.terms-header .terms-back{
  -webkit-tap-highlight-color: transparent;
}

/* キーボード操作の時だけ控えめに見えるフォーカス（青枠じゃない） */
.app-header.terms-header .terms-back:focus{
  outline: none;
}
.app-header.terms-header .terms-back:focus-visible{
  outline: 2px solid rgba(255,255,255,0.85);
  outline-offset: 2px;
  border-radius: 10px;
}

/* ===== Terms Page ===== */
.terms-wrap{
  max-width: 900px;
  margin: 16px auto 40px;
  padding: 0 14px;
}

.terms-card{
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
  padding: 18px 16px;
}

.terms-title{
  font-size: 22px;
  margin: 6px 0 14px;
}

.terms-card h2{
  font-size: 16px;
  margin: 18px 0 10px;
  padding-left: 10px;
  border-left: 4px solid rgba(0,0,0,0.15);
}

.terms-card p,
.terms-card li{
  line-height: 1.8;
  font-size: 15px;
}

.terms-card ol,
.terms-card ul{
  padding-left: 1.2em;
  margin: 8px 0 12px;
}

.terms-note{
  margin-top: 18px;
  font-size: 13px;
  opacity: 0.7;
}

/* ===== 投稿フォーム前の紹介文 ===== */
.intro-panel{
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
  padding: 14px 14px;
  margin: 14px 0 14px;
}

.intro-title{
  font-size: 18px;
  margin: 2px 0 8px;
  font-weight: 700;
}

.intro-text{
  margin: 0 0 8px;
  line-height: 1.7;
  font-size: 14px;
}

.intro-note{
  margin: 0;
  font-size: 12px;
  opacity: 0.75;
  line-height: 1.6;
}

/* --- このサイトについてカード --- */
.info-card {
  width: 100%;
  max-width: 760px;
  margin: 16px auto;
  padding: 0 16px;
}
.info-card__btn {
  width: 100%;
  text-align: left;
  background: #fff;
  border: 0;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  cursor: pointer;
}
.info-card__title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 6px;
}
.info-card__desc {
  font-size: 14px;
  line-height: 1.6;
  opacity: 0.9;
}
.info-card__hint {
  margin-top: 10px;
  font-size: 12px;
  color: #1a73e8;
  font-weight: 700;
}

/* --- モーダル --- */
.hidden { display: none !important; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}
.modal__panel {
  position: relative;
  width: min(92vw, 760px);
  max-height: 86vh;
  margin: 7vh auto 0;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0,0,0,0.25);
}
.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.modal__title {
  font-weight: 900;
  font-size: 16px;
}
.modal__close {
  border: 0;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
}
.modal__body {
  padding: 14px 16px;
  overflow: auto;
  max-height: 62vh;
}
.modal__body h3 {
  margin: 14px 0 8px;
  font-size: 15px;
}
.modal__body ul {
  padding-left: 18px;
  margin: 0;
}
.modal__footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(0,0,0,0.08);
  display: flex;
  justify-content: flex-end;
}
.muted { opacity: 0.7; font-size: 12px; }

.btn {
  border: 0;
  background: #1a73e8;
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
}

.is-hidden { display: none !important; }

/* このサイトについてカード */
.about-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 18px rgba(0,0,0,.08);
  margin: 18px 16px;
  overflow: hidden;
}

.about-card__btn{
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 18px;
  display: block;
}

.about-card__texts{
  display: block;
}

.about-card__title{
  font-size: 18px;
  font-weight: 800;
  color: #111 !important;   /* ←強制で見える色に */
  display: block !important; /* ←強制表示 */
  opacity: 1 !important;
  margin-bottom: 6px;
}

.about-card__desc{
  font-size: 14px;
  color: #444 !important;   /* ←強制で見える色に */
  display: block !important;
  opacity: 1 !important;
  line-height: 1.6;
}

.about-card__hint{
  margin-top: 22px;
  font-size: 14px;
  font-weight: 700;
  color: #2f77ff;
}


/* お問い合わせページ */

.contact-wrap {
  padding: 22px 16px 40px;
}

.contact-card {
  max-width: 720px;
  margin: 0 auto;
  padding: 22px 18px 24px;
  background: #fffdf4;
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(31, 43, 58, 0.08);
}

.contact-lead {
  margin: 0 0 22px;
  color: #555;
  font-size: 15px;
  line-height: 1.8;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-field label {
  color: #333;
  font-size: 18px;
  font-weight: 800;
}

.contact-field label span {
  color: #ff4d4f;
  margin-left: 2px;
}

.contact-field input,
.contact-field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 2px solid #e2e2e8;
  border-radius: 12px;
  background: #fff;
  color: #222;
  font-size: 17px;
  padding: 14px 14px;
  outline: none;
}

.contact-field input::placeholder,
.contact-field textarea::placeholder {
  color: #aaa;
}

.contact-field input:focus,
.contact-field textarea:focus {
  border-color: var(--main);
  box-shadow: 0 0 0 3px rgba(79, 195, 247, 0.18);
}

.contact-field textarea {
  min-height: 260px;
  resize: vertical;
  line-height: 1.7;
}

.contact-send-btn {
  width: 100%;
  border: none;
  border-radius: 999px;
  background: var(--main);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  padding: 16px 18px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(79, 195, 247, 0.28);
}

.contact-send-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.contact-status {
  margin: 0;
  min-height: 1.5em;
  font-size: 14px;
  font-weight: 700;
}

.contact-status.success {
  color: #168a45;
}

.contact-status.error {
  color: #d93025;
}

@media (max-width: 480px) {
  .contact-wrap {
    padding: 18px 14px 36px;
  }

  .contact-card {
    padding: 20px 16px 22px;
    border-radius: 20px;
  }

  .contact-field label {
    font-size: 17px;
  }

  .contact-field input,
  .contact-field textarea {
    font-size: 16px;
    padding: 13px 13px;
  }

  .contact-field textarea {
    min-height: 300px;
  }

  .contact-send-btn {
    font-size: 19px;
    padding: 15px 18px;
  }
}

/* 管理者ページ：お問い合わせ一覧 */
.admin-section {
  margin: 16px;
  padding: 16px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(31, 43, 58, 0.08);
}

.admin-section h2 {
  margin: 0 0 8px;
  color: #1f2b3a;
  font-size: 22px;
  font-weight: 900;
}

.admin-contact-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.admin-contact-card {
  padding: 14px;
  border: 2px solid rgba(79, 195, 247, 0.25);
  border-radius: 14px;
  background: #fafdff;
}

.admin-contact-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.admin-contact-name {
  color: #1f2b3a;
  font-size: 17px;
  font-weight: 900;
}

.admin-contact-meta {
  margin-top: 4px;
  color: #666;
  font-size: 13px;
  line-height: 1.5;
}

.admin-contact-message {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: #fff;
  color: #222;
  font-size: 15px;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.admin-contact-sub {
  margin-top: 10px;
  color: #777;
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.admin-contact-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.admin-contact-actions button {
  width: auto;
  border: none;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.admin-contact-done-btn {
  background: var(--main);
  color: #fff;
}

.admin-contact-delete-btn {
  background: #ff5a5f;
  color: #fff;
}

.admin-contact-new,
.admin-contact-done {
  display: inline-flex;
  margin-left: 8px;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  vertical-align: middle;
}

.admin-contact-new {
  background: #ffe6e6;
  color: #c62828;
}

.admin-contact-done {
  background: #e5f7ed;
  color: #168a45;
}

/* 投稿詳細：シェアボタン */
.post-share-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
  padding-right: 4px;
}

.post-share-btn {
  position: static;
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 999px;
  background: #fff;
  color: #8f8fa3;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(31, 43, 58, 0.14);
  z-index: 3;
}

.post-share-svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: #8f8fa3;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.post-share-svg-fill {
  width: 34px;
  height: 34px;
  fill: #8f8fa3;
  transform: translate(-3px, 1px);
}

.post-share-btn:active {
  transform: scale(0.96);
}

/* シェアメニュー */
.share-sheet {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.share-sheet-bg {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.share-sheet-panel {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 16px;
  max-width: 520px;
  margin: 0 auto;
  padding: 18px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(31, 43, 58, 0.22);
}

.share-sheet-title {
  color: #1f2b3a;
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 6px;
}

.share-sheet-sub {
  margin: 0 0 14px;
  color: #666;
  font-size: 14px;
  line-height: 1.7;
}

.share-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.share-action-btn {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 13px 14px;
  background: var(--main);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}

.share-action-btn.ghost {
  background: #fff;
  color: #1f2b3a;
  border: 2px solid rgba(79, 195, 247, 0.55);
}

.share-close-btn {
  width: 100%;
  margin-top: 12px;
  border: none;
  background: transparent;
  color: #666;
  font-size: 15px;
  font-weight: 800;
  padding: 10px;
  cursor: pointer;
}

/* =========================================================
   やらかし広場デザイン上書き
   オレンジで明るめ・失敗談/黒歴史掲示板向け
========================================================= */

:root {
  --main: #f97316;
  --main-dark: #ea580c;
  --main-soft: #fed7aa;
  --bg: #fff7ed;
  --card: #ffffff;
  --accent: #facc15;
  --text: #3b2414;
  --muted: #8a6a55;
  --border: #fdba74;
}

/* 全体 */
body {
  background:
    radial-gradient(circle at top left, rgba(250, 204, 21, 0.22), transparent 34%),
    linear-gradient(180deg, #fff7ed 0%, #fffbeb 45%, #fff7ed 100%);
  color: var(--text);
}

/* ヘッダー */
.header {
  background: linear-gradient(135deg, #fb923c 0%, #f97316 55%, #ea580c 100%);
  color: #fff;
  box-shadow: 0 4px 18px rgba(234, 88, 12, 0.22);
}

.header-bar {
  min-height: 54px;
}

.logo {
  color: #fff;
  font-size: 22px;
  letter-spacing: 0.03em;
  text-shadow: 0 2px 8px rgba(0,0,0,0.14);
}

/* メニュー */
.menu {
  background: #fffaf3;
  border-right: 3px solid var(--main);
}

.menu button {
  background: linear-gradient(135deg, #fb923c, #f97316);
  color: #fff;
  box-shadow: 0 6px 14px rgba(249, 115, 22, 0.18);
}

.menu .ghost,
button.ghost,
.share-action-btn.ghost {
  background: #fff;
  color: var(--text);
  border: 2px solid var(--border);
}

/* コンテナ */
.container {
  max-width: 880px;
  margin: 0 auto;
}

/* パネル・カード共通 */
.panel,
.post-card,
.comment-root,
.mypage-card,
.terms-card,
.contact-card,
.about-card,
.info-card__btn,
.admin-section {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(253, 186, 116, 0.55);
  box-shadow: 0 8px 22px rgba(154, 77, 0, 0.08);
}

.panel,
.post-card,
.comment-root {
  border-radius: 20px;
}

.panel-title {
  color: var(--text);
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-title::before {
  content: "🔥";
  font-size: 18px;
}

/* 入力欄 */
input,
textarea,
select {
  border: 2px solid rgba(253, 186, 116, 0.9);
  background: #fffdf8;
  color: var(--text);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--main);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.16);
}

textarea::placeholder,
input::placeholder {
  color: #a58267;
}

/* ボタン */
button,
.btn,
.contact-send-btn,
.share-action-btn {
  background: linear-gradient(135deg, #fb923c, #f97316);
  color: #fff;
  box-shadow: 0 6px 14px rgba(249, 115, 22, 0.20);
}

button:active,
.post-card:active {
  transform: scale(0.99);
}

/* 紹介文 */
.intro-panel {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.95), rgba(255,247,237,0.96)),
    radial-gradient(circle at top right, rgba(250, 204, 21, 0.25), transparent 38%);
  border: 2px solid rgba(253, 186, 116, 0.65);
  border-radius: 24px;
  padding: 20px 18px;
  box-shadow: 0 10px 26px rgba(154, 77, 0, 0.10);
}

.intro-title {
  color: var(--text);
  font-size: 23px;
  font-weight: 900;
  line-height: 1.35;
}


.intro-text {
  color: #5c3b22;
  font-size: 15px;
}

.intro-note {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff7ed;
  border: 1px dashed var(--border);
  color: #7c4a22;
  opacity: 1;
}

/* このサイトについて */
.about-card {
  margin: 14px 0;
  border-radius: 22px;
  border: 2px solid rgba(253, 186, 116, 0.55);
}

.about-card__btn {
  background: #fffaf3;
}

.about-card__title {
  color: var(--text) !important;
}

.about-card__title::before {
  content: "📌 ";
}

.about-card__desc {
  color: #6b4a2f !important;
}

.about-card__hint {
  color: #ea580c;
}

/* ジャンル */
.genres-title {
  color: var(--text);
}

.genre-item {
  border: 2px solid rgba(253, 186, 116, 0.78) !important;
  background: #fffaf3 !important;
  color: var(--text) !important;
}

.genre-item:hover {
  background: #ffedd5 !important;
}

.genre-item span {
  color: var(--text) !important;
}

/* チェックボックス */
input[type="checkbox"] {
  accent-color: var(--main);
}

/* 投稿カード */
.post-card {
  position: relative;
}


.post-card h3,
.post-card h2 {
  color: var(--text);
  padding-right: 74px;
}

.meta {
  color: var(--muted);
}

.post-text,
.post-card p {
  color: #4a3425;
  line-height: 1.75;
}

/* タグ */
.tag {
  border: 2px solid rgba(253, 186, 116, 0.75);
  background: #ffedd5;
  color: #9a3412;
}

/* ページャー */
.pager-btn,
.mp-pager button,
.best-pager-btn {
  border: 2px solid rgba(253, 186, 116, 0.85);
  background: #fffaf3;
  color: var(--text);
}

.pager-btn.is-active,
.mp-pager button.mp-active,
.best-pager-btn.is-active {
  background: var(--main);
  border-color: var(--main);
  color: #fff;
}

/* コメント */

.comment-item {
  color: var(--text);
}

.c-user {
  color: #7c2d12;
}

.c-text {
  color: #3b2414;
}

.child-wrap {
  border-left: 3px solid rgba(249, 115, 22, 0.25);
}

.reply-toggle-btn {
  background: #fb923c;
}

.reply-form textarea,
.inline-reply textarea {
  border: 2px solid var(--border) !important;
}

/* お気に入り */
.fav-btn svg path {
  stroke: #f97316;
}

.fav-btn.is-on svg path,
.fav-btn.is-fav svg path {
  fill: #facc15;
  stroke: #ca8a04;
}

/* 戻る系ヘッダー */
.simple-header,
.app-header,
.app-header.terms-header {
  background: linear-gradient(135deg, #fb923c, #f97316);
}

/* 認証モーダル */
.auth-card {
  border: 2px solid rgba(253, 186, 116, 0.65);
  background: #fffaf3;
}

.auth-title {
  color: var(--text);
}

.auth-card input {
  border-color: var(--border);
}

/* お問い合わせ */
.contact-card {
  background: #fffaf3;
}

.contact-field label {
  color: var(--text);
}

.contact-field input:focus,
.contact-field textarea:focus {
  border-color: var(--main);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.18);
}

.contact-send-btn {
  box-shadow: 0 8px 20px rgba(249, 115, 22, 0.24);
}

/* 管理者ページ */
.admin-contact-card {
  border: 2px solid rgba(253, 186, 116, 0.45);
  background: #fffaf3;
}

.admin-contact-name,
.admin-section h2 {
  color: var(--text);
}

.admin-contact-done-btn {
  background: var(--main);
}

.admin-contact-new {
  background: #ffedd5;
  color: #c2410c;
}

/* シェアボタン */
.post-share-btn {
  background: #fffaf3;
  color: var(--main);
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.18);
}

.post-share-svg {
  stroke: var(--main);
}

.post-share-svg-fill {
  fill: var(--main);
}

.share-sheet-panel {
  background: #fffaf3;
  border: 2px solid rgba(253, 186, 116, 0.5);
}

.share-sheet-title {
  color: var(--text);
}

/* スマホ調整 */
@media (max-width: 520px) {
  .logo {
    font-size: 20px;
  }

  .intro-title {
    font-size: 21px;
  }

  .container {
    padding: 14px;
  }

  .panel,
  .post-card,
  .comment-root {
    border-radius: 18px;
  }
}

/* やらかし広場：投稿フォーム補足文 */
.form-lead {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #fff7ed;
  border: 1px solid rgba(253, 186, 116, 0.75);
  color: #6b3b1f;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.7;
}

.post-rule-note {
  margin: 12px 0 16px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fffbeb;
  border: 1px dashed #fdba74;
  color: #7c4a22;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
}

#postForm textarea {
  min-height: 190px;
}

#sendBtn {
  width: 100%;
  border-radius: 18px;
  padding: 15px 16px;
  font-size: 18px;
}

/* 共感したボタン */
.empathy-area {
  margin-top: 22px;
  display: flex;
  justify-content: flex-start;
}

.empathy-btn {
  border: 2px solid rgba(253, 186, 116, 0.95);
  background: #fff7ed;
  color: #9a3412;
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 16px;
  font-weight: 900;
  box-shadow: 0 6px 16px rgba(249, 115, 22, 0.14);
}

.empathy-btn.is-on {
  background: linear-gradient(135deg, #fb923c, #f97316);
  color: #fff;
  border-color: #f97316;
}

.empathy-btn span {
  margin-left: 4px;
}

/* 投稿詳細：共感ボタンとシェアボタンを同じ高さに並べる */
.post-action-row {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

/* 余白を詰める */
.empathy-area {
  margin-top: 0 !important;
  display: flex;
  align-items: center;
}

/* 共感ボタン */
.empathy-btn {
  min-height: 48px;
  border-radius: 999px;
  padding: 10px 18px;
}

/* シェアボタンの位置調整 */
.post-share-row {
  margin-top: 0 !important;
  position: static !important;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* 浮きすぎ・下がりすぎ対策 */
.post-share-btn {
  position: static !important;
  width: 58px;
  height: 58px;
  margin: 0 !important;
}

/* 投稿カード下の余白を少し詰める */
#postDetail {
  padding-bottom: 22px !important;
}

/* 投稿カード：共感数表示 */
.post-empathy-count {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 9px 0 10px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #fff7ed;
  border: 1px solid rgba(253, 186, 116, 0.8);
  color: #9a3412;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.4;
}

/* 並び替え */
.sort-area {
  margin: 18px auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.sort-label {
  color: #1f2b3a;
  font-size: 15px;
  font-weight: 900;
}

.sort-select {
  width: auto;
  min-width: 210px;
  border: 2px solid rgba(253, 186, 116, 0.9);
  border-radius: 999px;
  padding: 10px 14px;
  background: #fff;
  color: #3b2414;
  font-size: 15px;
  font-weight: 900;
}