/* シンポジウム質問募集 共通スタイル（外部CDNなし・自己完結） */

:root {
  --bg: #f7f6f3;
  --surface: #ffffff;
  --border: #e3e0d9;
  --text: #1f2328;
  --muted: #6f7681;
  --accent: #1f5f5b;
  --danger: #a33a3a;
  --warn-bg: #fdf3e2;
  --warn-border: #e0b970;
  --warn-text: #7a5310;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(31, 35, 40, 0.05), 0 4px 14px rgba(31, 35, 40, 0.05);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Noto Sans JP", "Yu Gothic", "Meiryo", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  /* iPhone のホームインジケータ分だけ下余白を足す */
  padding: 24px 16px calc(64px + env(safe-area-inset-bottom));
}

header.page-head {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

header.page-head .inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 18px 16px;
}

h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.lead {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.875rem;
}

/* ---------- 共通ナビ（投稿 / 一覧 / 案内） ---------- */

.page-nav {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.page-nav a {
  flex: 1 1 0;
  max-width: 160px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  -webkit-tap-highlight-color: transparent;
}

.page-nav a[aria-current="page"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ---------- フォーム ---------- */

/* 必須マーク */
.req {
  color: var(--danger);
  font-weight: 700;
}

/* 入力欄の補足文 */
.hint {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 6px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.field {
  margin-bottom: 20px;
}

textarea,
select,
input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236f7681' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

textarea:focus,
select:focus,
input[type="text"]:focus,
input[type="password"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 95, 91, 0.12);
}

/* 送信前の確認中や受付停止中など、入力を固定しているときは触れないことが分かるようにする */
textarea:disabled,
select:disabled,
input[type="text"]:disabled {
  /* select の矢印（background-image）を消さないよう background-color で指定する */
  background-color: #f2f1ee;
  color: var(--muted);
  cursor: not-allowed;
}

textarea {
  min-height: 168px;
  resize: vertical;
}

.counter {
  margin-top: 6px;
  text-align: right;
  font-size: 0.8125rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.counter.over {
  color: var(--danger);
  font-weight: 600;
}

button {
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
}

.btn-primary {
  display: block;
  width: 100%;
  padding: 14px 20px;
  font-weight: 600;
  color: #fff;
  text-align: center;
  text-decoration: none;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  transition: opacity 0.15s ease;
}

.btn-primary:hover:not(:disabled) {
  opacity: 0.88;
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-secondary {
  display: block;
  width: 100%;
  padding: 14px 20px;
  font-weight: 600;
  color: var(--accent);
  text-align: center;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: opacity 0.15s ease;
}

.btn-secondary:hover:not(:disabled) {
  opacity: 0.8;
}

.btn-link {
  display: block;
  margin-top: 12px;
  padding: 13px 20px;
  text-align: center;
  font-weight: 600;
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.btn-link:hover {
  opacity: 0.8;
}

/* ---------- メッセージ ---------- */

.msg {
  margin-bottom: 20px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.9375rem;
}

.msg.ok {
  background: #e8f3ef;
  border: 1px solid #a9cfc3;
  color: #1a5c47;
}

.msg.err {
  background: #fbeceb;
  border: 1px solid #e0aeab;
  color: var(--danger);
}

.msg[hidden] {
  display: none;
}

/* ---------- 送信前の確認カード（投稿ページ） ---------- */

/* 見た目は .card と同じ（surface / border / radius / shadow） */
.confirm-card {
  margin-top: 16px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.confirm-card[hidden] {
  display: none;
}

.confirm-card h2 {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 600;
}

.confirm-list {
  margin: 0;
  padding: 0;
}

/* dl の中の 1 項目（dt + dd）。行ごと隠せるよう div でまとめている */
.confirm-row {
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.confirm-row:first-child {
  padding-top: 0;
  border-top: none;
}

.confirm-row[hidden] {
  display: none;
}

.confirm-list dt {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}

.confirm-list dd {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.confirm-note {
  margin: 14px 0 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* スマホ基準なので縦積み（primary の下に secondary） */
.confirm-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

/* ---------- 送信完了のポップアップ（投稿ページ） ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(31, 35, 40, 0.45);
}

.overlay[hidden] {
  display: none;
}

.dialog {
  width: 100%;
  max-width: 400px;
  padding: 24px 20px 20px;
  text-align: center;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(31, 35, 40, 0.25);
  animation: dialog-in 0.18s ease-out;
}

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

.dialog img {
  display: block;
  margin: 0 auto 8px;
  border-radius: 12px;
}

.dialog h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}

.dialog p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.7;
  text-align: left;
}

.dialog-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

/* ---------- 質問カード ---------- */

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
}

.card .body {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* カード上部のバッジ・チップをまとめる行 */
.card-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.card-chips .flag-badge,
.card-chips .to-badge {
  margin: 0;
}

.to-badge {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 12px;
  border-radius: 999px;
  background: #e8f3ef;
  border: 1px solid #a9cfc3;
  color: #17544f;
  font-size: 0.8125rem;
  font-weight: 600;
}

.card .meta {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--muted);
}

.card .author {
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* ---------- セグメントコントロール（枠でつながった 2 択） ---------- */

.seg {
  display: inline-flex;
  flex: none;
  border-radius: 999px;
  overflow: hidden;
}

.seg-btn {
  flex: none;
  min-height: 36px;
  padding: 7px 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, color 0.15s ease;
}

/* 隣り合うボタンの枠を重ねて 1 本の線に見せる */
.seg-btn + .seg-btn {
  margin-left: -1px;
}

.seg-btn[aria-pressed="true"] {
  position: relative;
  z-index: 1;
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ---------- いいね ---------- */

.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  min-height: 40px;
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  font-variant-numeric: tabular-nums;
  /* 押せるものだと分かるよう、薄いグレーではなくブランド色の濃い緑で描く */
  background: var(--surface);
  color: var(--accent);
  border: 1.5px solid #7aa39e;
  border-radius: 999px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

/* 押した後は塗りつぶし（自分が「気になる」を付けた状態） */
.like-btn.liked {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
}

.like-btn:disabled {
  opacity: 0.5;
  cursor: wait;
}

/* いいね数の表示のみ（管理画面など、ボタンにしない場合） */
.like-count {
  font-variant-numeric: tabular-nums;
}

/* ---------- ピン留め・回答済みバッジ ---------- */

.flag-badge {
  display: inline-block;
  margin: 0 6px 10px 0;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
}

.flag-badge.pin {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  color: var(--warn-text);
}

.flag-badge.answered {
  background: #e2efeb;
  border: 1px solid #a9cfc3;
  color: #17544f;
}

/* 「自分の投稿」の状態バッジ。ピン留め（琥珀）と紛れないよう灰色にする */
.flag-badge.pending {
  background: #eef0f2;
  border: 1px solid #cfd5dc;
  color: #4c5866;
}

/* 掲載済み。回答済み（.answered）と同系色 */
.flag-badge.approved {
  background: #dcece6;
  border: 1px solid #8fc0b2;
  color: #14524c;
}

.card.pinned {
  border-color: var(--warn-border);
}

/* ---------- 運営からの返信 ---------- */

.reply {
  margin-top: 12px;
  padding: 10px 14px;
  background: #f0f5f4;
  border-left: 3px solid var(--accent);
  border-radius: 8px;
}

.reply .reply-label {
  display: block;
  margin-bottom: 2px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
}

.reply p {
  margin: 0;
  font-size: 0.9375rem;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.empty {
  padding: 48px 16px;
  text-align: center;
  color: var(--muted);
}

.foot-note {
  margin-top: 28px;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* ---------- 投稿への導線 ---------- */

/* 一覧のスマホ表示で画面下に固定する「質問を投稿する」バー */
.cta-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(247, 246, 243, 0.94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
}

.cta-bar .btn-primary {
  max-width: 720px;
  margin: 0 auto;
  box-shadow: 0 6px 18px rgba(31, 95, 91, 0.25);
}

/* 固定バーの分だけ本文の下余白を広げる */
body.has-cta .wrap {
  padding-bottom: calc(110px + env(safe-area-inset-bottom));
}

/* PC・投影（768px 以上）では固定バーを出さない */
@media (min-width: 768px) {
  .cta-bar { display: none; }
  body.has-cta .wrap { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
}

/* 投稿フォームの「こんな質問も歓迎」チップ（タップで下書きに入る） */
.examples { margin-top: 10px; }
.examples .hint { margin: 0 0 6px; }
.ex-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ex-chip {
  padding: 6px 12px;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
  color: var(--accent);
  background: var(--surface);
  border: 1px dashed #7aa39e;
  border-radius: 999px;
  -webkit-tap-highlight-color: transparent;
}
.ex-chip:hover, .ex-chip:active { background: #e8f3ef; }

/* 空表示の中の投稿ボタン */
.empty .btn-primary {
  max-width: 280px;
  margin: 14px auto 0;
}

/* ---------- カシカ ---------- */

.kashika-greet {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 20px;
}

.kashika-greet img {
  flex: none;
  width: 64px;
  height: 64px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.kashika-greet .bubble {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px 14px;
  font-size: 0.9375rem;
}

.kashika-greet .bubble::before {
  content: "";
  position: absolute;
  left: -6px;
  bottom: 22px;
  width: 10px;
  height: 10px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transform: rotate(45deg);
}

.empty img {
  display: block;
  margin: 0 auto 10px;
  width: 72px;
  height: 72px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.empty p {
  margin: 0;
}

.empty[hidden] {
  display: none;
}

/* ---------- 一覧の操作行（並び替え・表示範囲・EN トグル） ---------- */

/*
 * 2 行構成（390px 幅を基準に寸法を決めている）。各行はそれぞれ折り返さずに 1 行へ収める。
 *   1 行目 .list-controls              … 並び替え（新着順 / 気になる順）＋ 右端に EN トグル
 *   2 行目 .list-controls-scope        … 表示範囲（今日 / すべて / 自分の投稿）
 */
.list-controls {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

/* 2 行目は 1 行目にぶら下げ、下だけカード群と離す */
.list-controls-scope {
  margin-bottom: 16px;
}

.list-controls .toggle-chip {
  margin-left: auto;
  min-height: 36px;
  padding: 8px 12px;
  font-size: 0.8125rem;
}

.toggle-chip {
  flex: none;
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.toggle-chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ---------- 英訳 ---------- */

.en-view {
  margin-top: 10px;
}

.en-label {
  display: inline-block;
  padding: 0 7px;
  background: #e8f3ef;
  border: 1px solid #a9cfc3;
  border-radius: 5px;
  color: var(--accent);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.en-text {
  margin: 6px 0 0;
  font-size: 0.85em;
  line-height: 1.6;
  color: var(--muted);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* ---------- セッション ---------- */

.session-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 6px;
  background: #eef1f0;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
}

/* ---------- キーボード操作のフォーカス表示 ---------- */

button:focus-visible,
a:focus-visible,
select:focus-visible,
textarea:focus-visible,
input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- スマホ（1 画面に入る情報量を増やす） ---------- */

/* 320px 級（iPhone SE など）では EN チップだけ 2 行目に落とし、横はみ出しを防ぐ */
@media (max-width: 359px) {
  .list-controls { flex-wrap: wrap; }
  .seg-btn { padding: 7px 10px; }
}

@media (max-width: 600px) {
  header.page-head .inner {
    padding: 14px 16px;
  }

  h1 {
    font-size: 1.125rem;
  }

  .kashika-greet img {
    width: 48px;
    height: 48px;
  }

  .kashika-greet .bubble {
    font-size: 0.875rem;
  }

  .card {
    padding: 16px;
  }

  .cards {
    gap: 12px;
  }
}

/* 参加者アンケートへの外部リンク（通常の btn-link より目立たせる） */
.btn-link-accent {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
}

/* ---------- 種別（アーカイブ先行配信の窓口） ---------- */

/*
 * 投稿フォームの種別チップ。ex-chip（破線）と紛れないよう実線で、選択中は accent で塗る。
 * 絵文字は種別の識別子として使い、ラベルと 2 段に積む（390px 幅で 2 列に並ぶ）。
 */
.kind-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.kind-chip {
  flex: 1 1 calc(50% - 4px);
  min-height: 52px;
  padding: 8px 12px;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.kind-chip .em {
  display: block;
  font-size: 1.125rem;
  line-height: 1.2;
}

.kind-chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.kind-chip:hover:not([aria-pressed="true"]) { background: #f0f5f4; }

/* 選んだ種別の説明（チップの下） */
.kind-desc {
  margin-top: 8px;
  min-height: 1.2em;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* カード上の種別バッジ。色は足さず絵文字で区別する（配色を増やさないため） */
.kind-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: #f0f2f1;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- 対応状況バッジ ---------- */

.res-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  background: #eef0f2;
  border: 1px solid #cfd5dc;
  color: #4c5866;
}

.res-badge.triage   { background: #eef3f2; border-color: #c6ddd5; color: #3c5c57; }
.res-badge.planned  { background: var(--warn-bg); border-color: var(--warn-border); color: var(--warn-text); }
.res-badge.fixed    { background: #dcece6; border-color: #8fc0b2; color: #14524c; }
.res-badge.answered { background: #e2efeb; border-color: #a9cfc3; color: #17544f; }
.res-badge.wontfix  { background: #f1f0ee; border-color: #dcd9d3; color: #7b7772; }

/* ---------- 該当箇所（📍 12:34 あたり） ---------- */

.loc-line {
  margin: 0 0 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* 該当箇所を強調したいとき（不具合・誤りを選んだフォーム） */
.field.emphasized > label { color: var(--accent); }
.field.emphasized input[type="text"] { border-color: #7aa39e; }

/* ---------- 視聴環境（端末 / 再生方法の 2 択） ---------- */

.env-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.env-row select { flex: 1 1 140px; width: auto; min-width: 0; }

/* ---------- 「この講座について」パネル（投稿フォーム） ---------- */

.ctx-panel {
  margin: -8px 0 20px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.ctx-panel[hidden] { display: none; }

.ctx-panel > h2 {
  margin: 0 0 4px;
  font-size: 0.9375rem;
  font-weight: 600;
}

.ctx-panel .ctx-lead {
  margin: 0 0 12px;
  font-size: 0.8125rem;
  color: var(--muted);
}

.ctx-section + .ctx-section { margin-top: 14px; }

.ctx-details > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  -webkit-tap-highlight-color: transparent;
}
.ctx-details > summary::-webkit-details-marker { display: none; }
.ctx-details > summary::before {
  content: '';
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform 0.15s;
  flex: none;
}
.ctx-details[open] > summary::before { transform: rotate(45deg); }
.ctx-details > summary h3 { margin: 0; }
.ctx-details[open] > summary { margin-bottom: 8px; }
.ctx-section[hidden] { display: none; }

.ctx-section h3 {
  margin: 0 0 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
}

.ctx-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ctx-item {
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.ctx-item .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.ctx-item .body {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.ctx-item .reply { margin-top: 8px; }
.ctx-item .reply p { font-size: 0.8125rem; }

.ctx-item .foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.ctx-item .like-btn { margin-left: auto; min-height: 34px; padding: 5px 12px; font-size: 0.8125rem; }

.ctx-none {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

.ctx-more {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
}

/* ---------- 一覧の種別チップ行（横スクロールで 1 行に収める） ---------- */

.chip-row {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.chip-row::-webkit-scrollbar { display: none; }

.chip-row .toggle-chip {
  padding: 6px 12px;
  font-size: 0.8125rem;
  min-height: 34px;
}
