:root {
  --orange: #ff7f27;
  --orange-dark: #f26c1a;
  --orange-soft: #fff1e8;
  --bg: #eceff1;
  --card: #ffffff;
  --ink: #2b2b2b;
  --ink-soft: #7a7f85;
  --line: #e6e8eb;
  --icon-grey: #9aa0a6;
  --ec-bg: #f2f2f0;   /* アイキャッチ画像の余白と同じ色（継ぎ目を消すため） */
  --reply-bg: #ececec;   /* レスの地色：メインスレッド（白）よりややグレー */
  --reply-line: #dcdcdc; /* レス同士の境界線（余白なしで線1本） */
  --gu: #2f80ed;      /* ぐー → 青 */
  --boo: #eb5757;     /* ぶー → 赤 */
  --bookmark: #f2b01e;/* ブクマ → 黄 */
  --danger: #e0533d;
  --radius: 12px;
  --header-h: 56px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Noto Sans JP', 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: #d7dbdf;
}

body { display: flex; justify-content: center; }

.phone {
  width: 100%;
  max-width: 460px;
  /* --app-h はソフトウェアキーボードが出たときに JS が実寸へ差し替える。
     100dvh はアドレスバーぶんは考慮するが、キーボードぶんは縮まないため
     入力欄がキーボードの裏に隠れてしまう（2-2）。 */
  height: var(--app-h, 100dvh);
  background: var(--bg);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.18);
}

/* ---------- 縦画面固定（横向きだとレイアウトが崩れるため） ---------- */
/* CSS の @media (orientation: landscape) だけに頼ると、iOS Safari で
   アドレスバーが出入りするアニメーション中に innerWidth/innerHeight が
   一瞬だけ矛盾した値になり、.phone と .rotate-overlay が「両方とも中途半端に
   表示された」状態のまま固まって画面が半分に割れる不具合が起きた
   （メディアクエリの再評価タイミングがブラウザの内部都合に左右されるため）。
   そこで判定はJS側（index.htmlの末尾）でリサイズ後に少し待ってから確定し、
   <html> に is-landscape クラスを付け外しする方式に変えた。CSSはそのクラスを
   見るだけにして、途中経過の値では絶対に切り替わらないようにしてある。 */
.rotate-overlay { display: none; }
html.is-landscape .phone { visibility: hidden; }
html.is-landscape .rotate-overlay {
  display: flex; position: fixed; inset: 0; z-index: 9999;
  width: 100vw; height: 100vh; height: 100dvh;
  flex-direction: column; align-items: center; justify-content: center;
  background: #1c1c1c; color: #fff; text-align: center; padding: 24px;
}
.rotate-icon { font-size: 48px; margin-bottom: 12px; transform: rotate(90deg); }
.rotate-overlay p { margin: 0 0 6px; font-size: 16px; font-weight: 700; }
.rotate-overlay p.sub { font-size: 12px; font-weight: 400; opacity: .75; }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font-family: inherit; font-size: 16px; }

/* ---------- Screen layout ---------- */
.screen { flex: 1; display: flex; flex-direction: column; min-height: 0; position: relative; }
.screen-body {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  position: relative; z-index: 1;
  /* 端まで来たときに背面のページごと動く（ゴムのように引っ張られる）のを止める */
  overscroll-behavior: contain;
}
.bottom-nav {
  flex: 0 0 auto;
  min-height: 62px;
  padding: 5px 8px max(5px, env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.98);
  border-top: 2px solid #f0a071;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  z-index: 20;
}
.bottom-nav-item {
  min-width: 0; min-height: 50px; padding: 2px 4px 1px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  color: #a4a7aa; font-size: 11px; font-weight: 700;
}
.bottom-nav-item.active { color: var(--orange-dark); }
.bottom-nav-item:active { background: var(--orange-soft); border-radius: 10px; }
.bottom-nav-icon { width: 28px; height: 28px; position: relative; display: block; }
.bottom-nav-icon svg { width: 100%; height: 100%; display: block; fill: currentColor; }
.bottom-badge {
  position: absolute; top: -4px; right: -9px; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 999px; background: var(--orange); color: #fff; border: 2px solid #fff;
  font-size: 9px; font-weight: 800; line-height: 14px; text-align: center;
}
/* グループの背景画像。カードの後ろに固定で敷く（スクロールしても動かない） */
.group-bg {
  position: absolute; left: 0; right: 0; top: var(--header-h); bottom: 0;
  background-size: cover; background-position: center; z-index: 0; pointer-events: none;
}

/* ---------- Top bar ---------- */
.topbar {
  height: var(--header-h);
  min-height: var(--header-h);
  background: var(--orange);
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 8px;
  gap: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  z-index: 5;
}
.topbar .title { flex: 1; min-width: 0; }
.topbar .title h1 { margin: 0; font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .title .sub { font-size: 11px; opacity: 0.9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iconbtn {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px;
}
.iconbtn:active { background: rgba(255, 255, 255, 0.2); }

/* ---------- 起動画面（ローディング） ----------
   版権のあるアイキャッチ画像は廃止し、アプリ名と読み込み中の表示だけにした。
   画像を待たないので、そのぶん早く次の画面へ進める。 */
.eyecatch {
  flex: 1; background: var(--ec-bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px; overflow: hidden;
}
.ec-title {
  font-size: 40px; font-weight: 800; letter-spacing: .06em;
  color: var(--orange); animation: pop .5s ease; user-select: none;
}
/* ロード中インジケータ（画像の下） */
.ec-loading {
  display: flex; align-items: center; gap: 10px; margin-top: 30px;
  color: var(--ink-soft); font-size: 13px; font-weight: 600;
}
.ec-loading .spinner {
  width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
  border: 2.5px solid rgba(0, 0, 0, 0.12); border-top-color: var(--orange);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Opening / onboarding ---------- */
.opening {
  flex: 1;
  background: linear-gradient(160deg, var(--orange) 0%, var(--orange-dark) 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* justify-content: center は使わない。
     中身が画面より高くなったとき（ログイン欄を開いたときなど）、負の余白まで
     等分されて上側がはみ出し、スクロールしても届かなくなる。
     auto マージンなら余白が足りないときに 0 へ落ちるので、上が切れない。 */
  justify-content: flex-start;
  text-align: center;
  padding: 32px;
  position: relative;
  /* はみ出したぶんは縦スクロールで届くようにする（以前は hidden で、
     連携ログインのボタンが画面外に出たまま触れなかった） */
  overflow-y: auto;
  overscroll-behavior: contain;
}
.opening > :first-child { margin-top: auto; }
.opening > :last-child { margin-bottom: auto; }
.opening::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.18), transparent 40%),
              radial-gradient(circle at 80% 70%, rgba(255,255,255,0.12), transparent 45%);
  /* ★重要：ここに pointer-events を書き忘れると、この装飾がタップを吸ってしまう。
     .opening は flex なので子要素は z-index が効く（flex アイテムの特例）。
     z-index を持たない .onboard-login だけがこの装飾より下になり、
     「連携ログインのボタンだけ押せない」状態になっていた。 */
  pointer-events: none;
}
.opening .logo {
  width: 96px; height: 96px; border-radius: 24px;
  background: #fff; color: var(--orange);
  display: flex; align-items: center; justify-content: center;
  font-size: 56px; font-weight: 800;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  margin-bottom: 20px; position: relative; z-index: 1;
  animation: pop .5s ease;
}
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.opening h1 { font-size: 30px; margin: 0 0 6px; letter-spacing: 1px; z-index: 1; }
.opening p { margin: 0 0 36px; opacity: 0.95; font-size: 14px; line-height: 1.6; z-index: 1; }
.opening .cta {
  z-index: 1; background: #fff; color: var(--orange);
  font-weight: 700; font-size: 16px; padding: 14px 20px; border-radius: 999px;
  width: 100%; max-width: 320px; box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}
.opening .cta:active { transform: translateY(1px); }

/* onboarding form (inside opening / .reg-body) */
.onboard { z-index: 1; width: 100%; max-width: 320px; text-align: left; }
.onboard label { font-size: 13px; font-weight: 600; display: block; margin-bottom: 8px; }
.onboard input {
  width: 100%; padding: 14px; border-radius: 12px; border: none;
  background: rgba(255,255,255,0.95); color: var(--ink); margin-bottom: 18px;
}
.avatar-picker { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.swatch {
  width: 38px; height: 38px; border-radius: 50%;
  border: 3px solid transparent; transition: transform .1s;
}
.swatch.selected { border-color: #fff; transform: scale(1.12); }
.onboard-login {
  /* position + z-index で装飾（.opening::before）より前に出す。
     pointer-events: none との二重の守りにしておく（片方だけ消えても押せる）。 */
  position: relative; z-index: 1;
  width: min(92%, 420px); margin: 20px auto 0; padding: 16px;
  border-radius: 14px; background: rgba(255,255,255,.14); text-align: center;
}
.onboard-login > p { margin: 0 0 9px; font-size: 13px; color: #fff; }
.onboard-login .auth-form {
  margin-top: 14px; padding: 14px; border-radius: 12px; background: #fff; color: var(--ink); text-align: left;
}
.onboard-login .auth-form input { border: 1px solid var(--line); }

/* ---------- 新規登録画面（添付デザイン再現） ---------- */
/* オレンジのウェーブヘッダー＋白いカード、という見た目のリクエストなので
   .opening とは別の専用クラスで組む。ロゴ（.reg-mark）は添付画像から
   切り出した実画像（public/icons/onboard-mark.png）で、縁をぼかして
   ヘッダーの地色（#fe7602。添付画像から実測した色）へ自然になじませてある。 */
.reg-screen {
  flex: 1; display: flex; flex-direction: column;
  overflow-y: auto; overscroll-behavior: contain; background: var(--card);
}
.reg-hero {
  position: relative; overflow: hidden; flex-shrink: 0;
  background: #fe7602;
  padding: 34px 24px 44px; text-align: center; color: #fff;
}
.reg-blob { position: absolute; border-radius: 50%; background: rgba(255,255,255,.18); pointer-events: none; }
.reg-blob.b1 { width: 90px; height: 90px; left: 6%; top: 46%; }
.reg-blob.b2 { width: 44px; height: 44px; right: 9%; top: 10%; background: rgba(255,255,255,.24); }
.reg-paw-deco { position: absolute; font-size: 38px; opacity: .22; pointer-events: none; }
.reg-paw-deco.right { right: 5%; top: 44%; }
.reg-paw-deco.left { left: 4%; top: 66%; font-size: 24px; }
.reg-mark { width: 62%; max-width: 250px; margin: 0 auto; display: block; position: relative; z-index: 1; }
.reg-hero h1 { margin: 4px 0 6px; font-size: 25px; font-weight: 800; position: relative; z-index: 1; }
.reg-hero p { margin: 0; font-size: 13px; opacity: .95; position: relative; z-index: 1; }
.reg-wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 26px; display: block; }
.reg-body { flex: 1; padding: 22px 22px 36px; position: relative; }
.reg-label { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; margin: 0 0 10px; color: var(--ink); }
.reg-body .onboard { max-width: none; }
.reg-body .onboard input {
  background: #fff; border: 1.5px solid var(--line); color: var(--ink);
  border-radius: 14px; padding: 15px;
}
.reg-avatar-row { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.reg-avatar-preview {
  width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: #f6f7f8; border: 1.5px dashed var(--line); font-size: 24px;
}
.reg-avatar-preview.has-img { background-color: var(--icon-grey); background-size: cover; background-position: center; border-style: solid; border-color: transparent; }
.reg-avatar-actions { display: flex; gap: 8px; }
.reg-avatar-btn {
  padding: 9px 14px; border-radius: 999px; background: var(--orange-soft); color: var(--orange-dark);
  font-size: 12px; font-weight: 700;
}
.reg-avatar-btn.ghost { background: #f1f2f4; color: var(--ink-soft); }
.reg-avatar-btn:active { opacity: .85; }
.reg-body .avatar-picker { gap: 14px; }
.reg-body .swatch {
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
}
.reg-body .swatch.selected { border-color: var(--orange); transform: none; box-shadow: 0 0 0 2px #fff inset; }
.swatch-check { color: #fff; font-size: 18px; font-weight: 800; }
.reg-cta-wrap { position: relative; margin-top: 6px; }
.reg-cta {
  width: 100%; padding: 16px; border-radius: 999px;
  background: var(--orange); color: #fff; font-weight: 800; font-size: 16px;
  box-shadow: 0 8px 20px rgba(255,127,39,.35);
}
.reg-cta:active { transform: translateY(1px); }
.reg-spark { position: absolute; top: -10px; width: 18px; height: 18px; color: var(--orange); pointer-events: none; }
.reg-spark.left { left: 6px; transform: rotate(-12deg); }
.reg-spark.right { right: 6px; transform: rotate(12deg); }
.reg-divider {
  display: flex; align-items: center; gap: 10px; margin: 22px 0 16px;
  color: var(--ink-soft); font-size: 12px;
}
.reg-divider::before, .reg-divider::after { content: ''; flex: 1; border-top: 1px dashed var(--line); }
.reg-login-btn {
  width: 100%; padding: 14px; border-radius: 999px; border: 1.5px solid var(--orange);
  color: var(--orange); background: #fff; font-weight: 700; font-size: 14px;
}
.reg-login-btn:active { background: var(--orange-soft); }
.reg-body .onboard-login { background: transparent; padding: 0; width: 100%; margin: 0; text-align: center; }
.reg-body .onboard-login > p { color: var(--ink-soft); margin: 0 0 10px; }
.reg-body .onboard-login .auth-form { background: #fafbfc; border: 1px solid var(--line); }
.reg-paws-footer {
  margin-top: 30px; display: flex; justify-content: center; gap: 46px;
  overflow: hidden; height: 58px;
}
.reg-paw-print { width: 76px; height: 76px; flex-shrink: 0; }
.reg-paw-print.solid { color: var(--orange); transform: rotate(-8deg) translateY(6px); }
.reg-paw-print.outline { color: #e7c8ae; transform: rotate(10deg) translateY(10px); }

/* ---------- Group list ---------- */
.tabbar {
  display: flex; background: var(--card); border-bottom: 1px solid var(--line);
}
.tabbar .tab {
  flex: 1; padding: 12px 0; font-size: 13px; font-weight: 600; color: var(--ink-soft);
  border-bottom: 3px solid transparent; text-align: center;
}
.tabbar .tab.active { color: var(--orange); border-bottom-color: var(--orange); }

.action-row {
  display: flex; gap: 10px; padding: 12px;
}
.action-row .btn-create {
  flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px; display: flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; color: var(--ink); box-shadow: var(--shadow);
}
.action-row .btn-create .plus { color: var(--orange); font-size: 20px; font-weight: 700; }
.action-row .btn-create:active { background: var(--orange-soft); }

.group-list { padding: 0 12px 24px; }
.group-card {
  background: var(--card); border-radius: 10px; padding: 12px; margin-bottom: 10px;
  display: flex; gap: 12px; align-items: center; box-shadow: var(--shadow);
}
.group-card:active { background: #fafafa; }
.group-card .thumb {
  width: 52px; height: 52px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 22px;
}
.group-card .meta { flex: 1; min-width: 0; }
.group-card .meta .name { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.group-card .meta .desc { font-size: 12px; color: var(--ink-soft); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.group-card .meta .stats { font-size: 11px; color: var(--ink-soft); margin-top: 6px; display: flex; gap: 12px; }
.group-card .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--bookmark); flex-shrink: 0; }
.badge-tag { display: inline-block; font-size: 10px; padding: 1px 6px; border-radius: 4px; background: var(--orange-soft); color: var(--orange-dark); font-weight: 700; }

/* ---------- Thread list (group chat) ---------- */
.thread-list { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.thread-card {
  background: var(--card); border-radius: 10px; box-shadow: var(--shadow); overflow: hidden;
}
/* ヘッダー：[アイコン] [名前・時刻] [詳細 ⋯] */
.thread-head { display: flex; gap: 8px; padding: 10px 12px 0; align-items: flex-start; }

/* ---------- レス（thread detail の返信一覧） ----------
   メインスレッド＝白いカード。レス＝ややグレーで、端まで広がる連続リスト。
   レスとレスの間に余白は作らず、境界は 1px の線だけで表す。 */
.reply-list { background: var(--reply-bg); }
.reply-item { background: var(--reply-bg); border-top: 1px solid var(--reply-line); }
.reply-item:first-child { border-top: none; }
/* ヘッダー：アイコン左 / 名前・時刻 左寄せ / 詳細 ⋯ 右 */
.reply-head { display: flex; gap: 10px; padding: 10px 12px 0; align-items: flex-start; }
.reply-head .who { flex: 1; min-width: 0; }
.reply-head .who .name { font-weight: 700; font-size: 14px; word-break: break-word; }
.reply-head .who .time { font-size: 11px; color: var(--ink-soft); margin-top: 1px; }
.reply-item .reply-body { font-size: 14px; }
/* 区切りは上の border-top 1本だけにしたいので、バー上の線は消す */
.reply-item .reaction-bar { border-top: none; margin-top: 4px; }
.reply-item .reaction-bar .rbtn:active { background: rgba(0, 0, 0, 0.05); }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 16px;
}
.avatar.sm { width: 30px; height: 30px; font-size: 13px; }
/* アイコン → ネーム の順で左寄せ（実機と同じ並び） */
.thread-head .who { flex: 1; min-width: 0; text-align: left; }
.thread-head .who .name { font-weight: 700; font-size: 14px; word-break: break-word; }
.thread-head .who .time { font-size: 11px; color: var(--ink-soft); margin-top: 1px; }
.shout-flag { font-size: 10px; color: #fff; background: var(--danger); padding: 2px 6px; border-radius: 4px; font-weight: 700; }
.edited-flag { font-size: 10px; color: var(--ink-soft); font-weight: 400; margin-left: 4px; }
.thread-body { padding: 8px 12px 4px; font-size: 15px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }

/* ---------- スレッドのジャンル・色（親スレッドだけ。レスには付けない） ---------- */
.genre-badge {
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px;
  background: #f1f2f4; color: var(--ink-soft); white-space: nowrap;
}
/* 親スレッドカードだけに乗せる淡い背景色。レス（.reply-item / .reply-row）には
   このクラスを一切付けないので、レスの地色（グレー）は常に維持される。 */
.thread-card.thread-color-red    { background: #fdeceb; border: 1px solid #f3c8c4; }
.thread-card.thread-color-green  { background: #eaf6ec; border: 1px solid #bfe3c6; }
.thread-card.thread-color-blue   { background: #eaf2fb; border: 1px solid #bdd6f3; }
.thread-card.thread-color-red    .genre-badge { background: #fff; color: #b23c30; }
.thread-card.thread-color-green  .genre-badge { background: #fff; color: #2f7d43; }
.thread-card.thread-color-blue   .genre-badge { background: #fff; color: #2f5f9e; }
/* 検索結果の行（.bm-item）はカードではないので、左端の帯だけで色を示す（軽い表現）。 */
.bm-item.thread-color-red   { border-left: 3px solid #e0847c; }
.bm-item.thread-color-green { border-left: 3px solid #7fc491; }
.bm-item.thread-color-blue  { border-left: 3px solid #7fabdd; }

.reaction-bar {
  display: flex; align-items: center; border-top: 1px solid var(--line); margin-top: 8px;
}
.reaction-bar .rbtn {
  flex: 1; padding: 9px 4px; display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 13px; color: var(--icon-grey); font-weight: 600;
}
.reaction-bar .rbtn:active { background: #f6f6f6; }
.reaction-bar .rbtn svg.ico { width: 20px; height: 20px; fill: currentColor; display: block; }
/* Recolor only when the current viewer has reacted (server sets .on via mine[]). */
.reaction-bar .rbtn.on.gu { color: var(--gu); }
.reaction-bar .rbtn.on.boo { color: var(--boo); }
.reaction-bar .rbtn.on.bookmark { color: var(--bookmark); }
/* 件数 0 のときはラベル文字（ぶー / 返信 …）が入る */
.reaction-bar .rbtn .count { min-width: 6px; color: var(--ink-soft); white-space: nowrap; }
.reaction-bar .rbtn.on .count { color: currentColor; }

/* role labels (leader / sub-leader) — cosmetic only */
.role-badge { display: inline-block; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 10px; vertical-align: middle; }
.role-badge.leader { background: #fff1e8; color: var(--orange-dark); border: 1px solid #ffd6bd; }
.role-badge.sub { background: #eaf2fe; color: #2f6fd0; border: 1px solid #cfe0fb; }

/* bookmark tab list */
.bm-list { padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.bm-item .bm-ctx { font-size: 11px; color: var(--ink-soft); margin: 0 2px 6px; display: flex; align-items: center; gap: 6px; }
.bm-item .bm-kind { background: var(--bookmark); color: #fff; font-weight: 700; padding: 1px 7px; border-radius: 4px; }
.bm-item .thread-card { box-shadow: var(--shadow); }

/* members / sub-leader modal */
.member-list { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; max-height: 50vh; overflow-y: auto; }
.member-row { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.member-row .mname { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub-toggle { font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-soft); background: #fafbfc; }
.sub-toggle.active { background: #eaf2fe; color: #2f6fd0; border-color: #cfe0fb; }

/* 一覧のレスプレビューも同じくグレー地・余白なし・境界は線1本
   グレー欄全体がスレッドを開くボタンなので、押した行だけ沈ませる */
.replies-preview { border-top: 1px solid var(--reply-line); background: var(--reply-bg); cursor: pointer; }
.see-all { text-align: center; padding: 12px; color: var(--orange-dark); font-size: 13px; font-weight: 700; }
.see-all:active { background: #e2e2e2; }
.reply-row { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--reply-line); }
.reply-row:active { background: #e2e2e2; }
.reply-row:first-child { border-top: none; }
.reply-row .who { flex: 1; min-width: 0; }
/* 名前は投稿者の色、時刻は右端（3枚目の画像と同じ） */
.reply-row .who .name { font-size: 12px; font-weight: 700; color: var(--ink-soft); display: flex; align-items: center; gap: 6px; }
.reply-row .who .name .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 62%; }
.reply-row .who .name .time { font-weight: 400; margin-left: auto; flex-shrink: 0; }
.reply-row .who .text { font-size: 14px; line-height: 1.5; margin-top: 2px; white-space: pre-wrap; word-break: break-word; }

/* ---------- Composer ---------- */
.composer {
  display: flex; align-items: flex-end; gap: 8px; padding: 8px 10px;
  background: var(--card); border-top: 1px solid var(--line);
}
.composer textarea {
  flex: 1; resize: none; border: 1px solid var(--line); border-radius: 18px;
  padding: 9px 14px; max-height: 120px; line-height: 1.4; background: #f6f7f8;
}
.composer textarea:focus { outline: none; border-color: var(--orange); background: #fff; }
.composer .send {
  background: var(--orange); color: #fff; font-weight: 700; border-radius: 18px;
  padding: 9px 16px; min-width: 60px; align-self: stretch;
}
.composer .send:disabled { background: #cfd3d6; }

/* ---------- Modal (create group) ---------- */
.modal-scrim {
  position: absolute; inset: 0; background: rgba(0,0,0,0.4);
  display: flex; align-items: flex-end; z-index: 20;
  animation: fade .15s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--card); width: 100%; border-radius: 16px 16px 0 0; padding: 18px 18px 24px;
  max-height: 90%; overflow-y: auto; animation: slideup .2s ease;
}
@keyframes slideup { from { transform: translateY(30px); } to { transform: translateY(0); } }
.modal h2 { margin: 4px 0 16px; font-size: 18px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: #fafbfc;
}
.field textarea { resize: vertical; min-height: 70px; }
.field .hint { font-size: 11px; color: var(--ink-soft); margin-top: 4px; }
.toggle-row { display: flex; gap: 10px; }
.toggle-row .opt {
  flex: 1; padding: 12px; text-align: center; border: 1px solid var(--line); border-radius: 10px;
  font-size: 13px; font-weight: 600; color: var(--ink-soft);
}
.toggle-row .opt.active { border-color: var(--orange); background: var(--orange-soft); color: var(--orange-dark); }
.modal-actions { display: flex; gap: 10px; margin-top: 8px; }
.modal-actions button { flex: 1; padding: 14px; border-radius: 10px; font-weight: 700; font-size: 15px; }
.modal-actions .cancel { background: #f1f2f4; color: var(--ink); }
.modal-actions .primary { background: var(--orange); color: #fff; }
.modal-actions .primary:disabled { background: #cfd3d6; }

/* ---------- 外部リンクの確認ダイアログ ---------- */
.ext-link-modal .ext-link-body { font-size: 13px; line-height: 1.7; color: var(--ink); margin: 0 0 14px; }
.ext-link-modal .ext-link-danger {
  background: #fdeeee; border: 1px solid #f6c6c6; color: var(--danger);
  border-radius: 10px; padding: 10px 12px; font-size: 12px; line-height: 1.6; margin-bottom: 14px; font-weight: 600;
}
.ext-link-domain {
  background: #f6f7f8; border-radius: 10px; padding: 10px 12px;
  font-size: 13px; color: var(--ink-soft); margin-bottom: 14px; word-break: break-all;
}
.ext-link-domain b { color: var(--ink); }
.ext-link-check {
  display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-soft);
  margin-bottom: 6px; cursor: pointer;
}
.ext-link-check input { width: 16px; height: 16px; flex-shrink: 0; accent-color: var(--orange); }

/* ---------- misc ---------- */
.empty { text-align: center; color: var(--ink-soft); padding: 48px 24px; font-size: 14px; line-height: 1.7; }
.empty .big { font-size: 40px; margin-bottom: 8px; }
.toast {
  position: absolute; left: 50%; bottom: 80px; transform: translateX(-50%);
  background: rgba(0,0,0,0.82); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: 13px; z-index: 40; animation: fade .15s ease; max-width: 90%; text-align: center;
}
.section-label { padding: 14px 12px 4px; font-size: 12px; font-weight: 700; color: var(--ink-soft); }

/* ============================================================================
   以下、あとから足した機能ぶんのスタイル
   （アイコン画像 / 通知 / 開発者モード / 画像投稿 / マイページ / グループ設定）
   ============================================================================ */

/* ---------- アイコン画像 ----------
   background-image は要素が置かれた直後には何も描けず、画像が届くまで
   透明な穴になる（背景色が無いため）。ダウンロードが終わるまでの間、
   目立たない中間グレーで場所だけ占めておく（簡素なプレースホルダー）。
   届いたら background-image がそのまま上に重なって置き換わるので、
   追加のJS処理は要らない。 */
.avatar.has-img { background-color: var(--icon-grey); background-size: cover; background-position: center; color: transparent; }
.avatar.me { cursor: pointer; }
.avatar.me:active { opacity: .75; }
.group-card .thumb.has-img { background-color: var(--icon-grey); background-size: cover; background-position: center; }
.badge-dev {
  display: inline-block; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 4px;
  background: #2b2b2b; color: #fff; vertical-align: middle;
}
/* 「常に上に表示」にしたグループの目印 */
.badge-pin { font-size: 12px; vertical-align: middle; }

/* ---------- 投稿ヘッダーの 詳細（…）ボタン ---------- */
.thread-head .more, .reply-head .more {
  width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%;
  color: var(--icon-grey); font-size: 17px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.thread-head .more:active, .reply-head .more:active { background: #f2f2f2; }

/* ---------- 通知（ベル + 右から開くドロワー） ---------- */
.topbar .bell { position: relative; flex-shrink: 0; }
.topbar .bell svg.ico-bell { width: 22px; height: 22px; fill: currentColor; display: block; }
.topbar .bell.on { background: rgba(255, 255, 255, 0.22); }
.bell-dot {
  position: absolute; top: 4px; right: 4px; min-width: 15px; height: 15px; border-radius: 999px;
  background: #e01e1e; color: #fff; font-size: 10px; font-weight: 800; line-height: 15px;
  text-align: center; border: 1.5px solid var(--orange);
}
.notif-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.35); z-index: 24; animation: fade .15s ease; }
/* 右半分を基本の幅にする。小さい端末では狭くなりすぎないよう下限を置き、
   画面より広がらないよう上限も置く（横にはみ出さない）。 */
.notif-drawer {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 50%; min-width: min(300px, 88%); max-width: 100%;
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--card); z-index: 25; display: flex; flex-direction: column;
  box-shadow: -4px 0 18px rgba(0, 0, 0, 0.22); animation: slidein .18s ease;
}
/* ドロワーを開いている間は、後ろの一覧が一緒に動かないようにする */
.phone.drawer-open .screen-body { overflow: hidden; }
.notif-drawer-foot {
  flex: 0 0 auto; border-top: 1px solid var(--line); background: var(--card);
}
.notif-drawer-foot button {
  width: 100%; padding: 14px; font-size: 13px; font-weight: 700; color: var(--orange-dark);
}
.notif-drawer-foot button:active { background: var(--orange-soft); }
@keyframes slidein { from { transform: translateX(100%); } to { transform: translateX(0); } }
.notif-head {
  height: var(--header-h); min-height: var(--header-h); background: var(--orange); color: #fff;
  display: flex; align-items: center; justify-content: space-between; padding: 0 8px 0 14px;
  font-weight: 700; font-size: 15px;
}
.notif-head .notif-x { color: #fff; font-size: 16px; width: 34px; height: 34px; border-radius: 50%; }
.notif-list { flex: 1; overflow-y: auto; }
.notif-item { display: flex; gap: 9px; padding: 11px 12px; border-bottom: 1px solid var(--line); }
.notif-item:active { background: #f6f6f6; }
.notif-item.unread { background: var(--orange-soft); }
.notif-meta { flex: 1; min-width: 0; }
.notif-top { display: flex; align-items: baseline; gap: 6px; }
.notif-top .nm { font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-top .tm { font-size: 10px; color: var(--ink-soft); margin-left: auto; flex-shrink: 0; }
.notif-body {
  font-size: 13px; line-height: 1.45; margin-top: 2px; word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.notif-ctx { font-size: 10px; color: var(--ink-soft); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-empty { padding: 40px 18px; text-align: center; color: var(--ink-soft); font-size: 12px; line-height: 1.8; }
.notification-page-list {
  background: var(--card); min-height: 100%;
}
.notification-page-list .notif-item { padding: 14px; cursor: pointer; }

/* ---------- ぐー・ぶーした人の一覧 ---------- */
.reactor-list { background: var(--card); min-height: 100%; }
.reactor-row {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px;
  border: none; border-bottom: 1px solid var(--line); background: none; text-align: left; cursor: pointer;
}
.reactor-row:active { background: #fafbfc; }
.reactor-info { min-width: 0; }
.reactor-name { font-size: 14px; font-weight: 700; color: var(--ink); }
.reactor-verb { display: flex; align-items: center; gap: 4px; font-size: 12px; margin-top: 2px; color: var(--ink-soft); }
.reactor-verb .ico { width: 14px; height: 14px; fill: currentColor; }
.reactor-verb.gu { color: var(--gu); }
.reactor-verb.boo { color: var(--boo); }

/* ---------- 開発者モードのボタン ---------- */
.dev-chip {
  flex-shrink: 0; font-size: 10px; font-weight: 700; color: #fff; padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 999px; white-space: nowrap;
}
.dev-chip.on { background: #fff; color: var(--orange-dark); border-color: #fff; }
.dev-chip:active { background: rgba(255, 255, 255, 0.25); }
.topbar .avatar.topbar-me { border: 2px solid rgba(255, 255, 255, 0.85); }

/* ---------- 投稿画像 ---------- */
/* 画像の読み込みが終わるまで高さが 0 のままだと、画面を作り直したときに下の内容が
   一度せり上がってから押し下げられ、スクロール位置がずれて画面が揺れる。
   min-height で先に場所を確保しておく（表示上限は下の max-height で決まるので、
   サムネイルの実ピクセルサイズ＝長辺640pxを上げても、ここは変えなくてよい）。 */
.post-img-wrap { padding: 4px 12px 2px; min-height: 124px; }
.post-img {
  max-width: 100%; max-height: 320px; min-height: 120px; border-radius: 8px; border: 1px solid var(--line);
  display: block; background: #f2f2f2; cursor: pointer;
}
.post-img-wrap.sm { padding: 6px 0 0; min-height: 104px; }
.post-img-wrap.sm .post-img { max-height: 160px; min-height: 100px; }

/* ---------- 2枚目の画像（積み重ねレイヤー表示） ----------
   2枚目はサムネイルを作っていないので、ここでは実際の画像データを一切
   読み込まない。box-shadow の多重指定だけで「奥にもう1枚ある」カードの
   縁を描く（1枚目の実寸に自動で追従するので、縦横比が何であっても崩れない）。
   タップして初めて2枚目の原寸を取りに行き、拡大表示する。 */
.post-img-wrap.has-stack { padding-right: 22px; padding-bottom: 14px; }
.post-img-wrap.sm.has-stack { padding-right: 16px; padding-bottom: 10px; }
.post-img-stack { position: relative; display: inline-block; }
.post-img-stack .post-img {
  position: relative; z-index: 1;
  box-shadow: 4px 4px 0 0 var(--card), 9px 9px 0 0 var(--icon-grey);
}
.post-img-wrap.sm .post-img-stack .post-img {
  box-shadow: 3px 3px 0 0 var(--card), 7px 7px 0 0 var(--icon-grey);
}
.post-img-peek {
  position: absolute; right: -7px; bottom: -9px; z-index: 2;
  width: 26px; height: 26px; border-radius: 999px;
  background: rgba(0, 0, 0, .65); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
}
.post-img-wrap.sm .post-img-peek { width: 22px; height: 22px; right: -5px; bottom: -6px; }
.post-img-peek:active { background: rgba(0, 0, 0, .8); }
.post-img-peek-badge { font-size: 11px; font-weight: 800; line-height: 1; }
.post-img-wrap.sm .post-img-peek-badge { font-size: 10px; }

.zoom-scrim {
  position: absolute; inset: 0; background: rgba(0, 0, 0, 0.9); z-index: 60;
  display: flex; align-items: center; justify-content: center; padding: 12px; animation: fade .15s ease;
}
.zoom-scrim img { max-width: 100%; max-height: 100%; object-fit: contain; }
/* 2枚投稿されている場合の、拡大表示での前後移動（右スワイプ／右矢印＝次へ）。 */
.zoom-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255, 255, 255, .14); color: #fff; font-size: 26px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.zoom-nav:active { background: rgba(255, 255, 255, .28); }
.zoom-nav.prev { left: 6px; }
.zoom-nav.next { right: 6px; }
.zoom-dots {
  position: absolute; left: 0; right: 0; bottom: max(18px, env(safe-area-inset-bottom));
  display: flex; justify-content: center; gap: 6px; z-index: 2; pointer-events: none;
}
.zoom-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .4); }
.zoom-dots span.on { background: #fff; }

/* ---------- コンポーザー（＋ボタン / 添付プレビュー） ---------- */
.composer-wrap { background: var(--card); border-top: 1px solid var(--line); position: relative; z-index: 2; }
.composer-wrap .composer { border-top: none; }
.composer.locked {
  background: var(--card); border-top: 1px solid var(--line); padding: 14px 16px; position: relative; z-index: 2;
  font-size: 12px; color: var(--ink-soft); text-align: center; line-height: 1.6;
}
/* 未参加のときに入力欄の代わりに出す「グループに参加する」 */
.composer.join {
  display: block; background: var(--card); border-top: 1px solid var(--line);
  padding: 12px 16px 14px; position: relative; z-index: 2; text-align: center;
}
.composer.join .join-btn {
  width: 100%; background: var(--orange); color: #fff; font-weight: 700;
  border-radius: 22px; padding: 12px 16px; font-size: 15px;
}
.composer.join .join-btn:active { background: var(--orange-dark); }
.composer.join .join-note { font-size: 11px; color: var(--ink-soft); margin-top: 8px; line-height: 1.6; }
.composer .plus-btn {
  width: 34px; height: 34px; min-width: 34px; border-radius: 50%; border: 1px solid var(--line);
  color: var(--ink-soft); font-size: 20px; line-height: 1; align-self: center;
  display: flex; align-items: center; justify-content: center;
}
.composer .plus-btn:active { background: var(--orange-soft); color: var(--orange-dark); border-color: var(--orange); }
.composer .plus-btn[disabled] { opacity: .4; }
.composer .plus-btn svg.ico { width: 18px; height: 18px; }
/* 投稿前に選んでいるジャンル・色を確認・解除できる小さなチップ */
.composer-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 10px 0; }
.composer-chip {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700;
  color: var(--orange-dark); background: var(--orange-soft); border: 1px solid #ffd6bd;
  padding: 4px 6px 4px 10px; border-radius: 999px;
}
.composer-chip .chip-x {
  width: 16px; height: 16px; border-radius: 50%; background: #fff; color: var(--orange-dark);
  font-size: 9px; display: flex; align-items: center; justify-content: center; line-height: 1;
}
/* スレッド色を選ぶシートの1行（丸いカラープレビュー＋名前） */
.color-sheet-btn { display: flex; align-items: center; gap: 12px; }
.color-sheet-label { display: flex; flex-direction: column; }
.color-swatch {
  width: 26px; height: 26px; min-width: 26px; border-radius: 50%; border: 1px solid var(--line);
}
.color-swatch.swatch-default { background: #ffffff; }
.color-swatch.swatch-red     { background: #fdeceb; border-color: #f3c8c4; }
.color-swatch.swatch-green   { background: #eaf6ec; border-color: #bfe3c6; }
.color-swatch.swatch-blue    { background: #eaf2fb; border-color: #bdd6f3; }
/* 添付待ちの画像（最大2枚）。それぞれ右上の✕で個別に外せる。 */
.img-pending-list { display: flex; align-items: center; gap: 10px; padding: 8px 10px 0; flex-wrap: wrap; }
.img-pending { position: relative; display: inline-flex; flex-shrink: 0; }
.img-pending img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; }
.img-pending .img-x {
  position: absolute; top: -7px; right: -7px;
  width: 22px; height: 22px; border-radius: 50%; background: #fff; color: var(--ink-soft); font-size: 11px;
  display: flex; align-items: center; justify-content: center; border: 1px solid var(--line);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
}
.img-pending-list .img-note { flex-basis: 100%; font-size: 11px; color: var(--ink-soft); }

/* ---------- シート（… メニュー / グループメニュー） ---------- */
.sheet-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.sheet-name { font-size: 12px; color: var(--ink-soft); padding: 0 2px 2px; }
.sheet-btn {
  width: 100%; text-align: left; padding: 14px; border-radius: 10px; background: #f6f7f8;
  font-size: 15px; font-weight: 600; color: var(--ink);
}
.sheet-btn:active { background: #ececec; }
.sheet-btn.danger { color: var(--danger); }
.sheet-note { font-size: 12px; color: var(--ink-soft); line-height: 1.7; padding: 4px 2px; }

/* ---------- マイページ ---------- */
/* 設定項目が増えたので、意味のまとまりごとにカードへ分けている。
   上から プロフィール → アカウント → 通知 → その他 → 別アカウントへのログイン。
   いちばん下の「別のアカウントにログイン」は、間違って押すと今の端末のデータから
   離れてしまうため、他と切り離して置き、色も文言も分けている。 */
.mypage { padding: 16px 14px 40px; display: flex; flex-direction: column; gap: 14px; }
.mp-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 16px 18px;
}
.mp-card-title {
  font-size: 13px; font-weight: 700; color: var(--ink-soft);
  letter-spacing: .04em; margin: 0 0 14px;
  display: flex; align-items: center; gap: 8px;
}
/* 未登録のときのアカウント欄は、気づいてもらいたいので目立たせる */
.mp-card.accent { border-color: #ffd2b3; background: var(--orange-soft); }
.mp-card.accent .mp-card-title { color: var(--orange-dark); }
.mp-card.quiet { background: transparent; border-style: dashed; }
.mp-card .cta-solid { margin-top: 12px; }
.mp-card > .push-setting { margin-top: 0; padding-top: 0; border-top: 0; }
.acct-badge {
  font-size: 10px; font-weight: 700; color: #fff; background: var(--orange);
  padding: 2px 8px; border-radius: 999px; letter-spacing: 0;
}
.acct-rows { display: flex; flex-direction: column; gap: 10px; }
.acct-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; background: #f7f8f9; border-radius: 10px;
}
.acct-label { font-size: 12px; font-weight: 700; color: var(--ink-soft); flex-shrink: 0; }
.acct-value {
  font-size: 13px; flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.acct-ok { color: #2e9e5b; font-weight: 700; flex-shrink: 0; }
.acct-note { font-size: 12px; line-height: 1.75; color: var(--ink-soft); margin: 12px 0 0; }
.mp-card.accent .acct-note { color: #8a5a33; }
.acct-note.warn { color: var(--ink-soft); }
.acct-note.warn b { color: var(--danger); }
.mp-btn.sm { padding: 6px 12px; font-size: 12px; flex-shrink: 0; }
/* 各社ブランドの登録・ログインボタン。それぞれの提供元が示す配色に合わせている。 */
.mp-btn.oauth-google, .mp-btn.oauth-apple, .mp-btn.oauth-discord { margin-top: 10px; }
.mp-btn.oauth-google::before, .mp-btn.oauth-apple::before, .mp-btn.oauth-discord::before {
  content: ''; display: inline-block; width: 15px; height: 15px; margin-right: 8px;
  vertical-align: -3px; background: no-repeat center/contain;
}
/* Google：白地＋枠線 */
.mp-btn.oauth-google { background: #fff; color: #3c4043; border: 1px solid #dadce0; }
.mp-btn.oauth-google::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='%234285F4' d='M45.1 24.5c0-1.6-.1-3.1-.4-4.5H24v8.5h11.8c-.5 2.7-2 5-4.4 6.6v5.5h7.1c4.700-4.3 6.6-10.6 6.6-16.1z'/%3E%3Cpath fill='%2334A853' d='M24 46c6 0 11-2 14.6-5.4l-7.1-5.5c-2 1.3-4.5 2.1-7.5 2.1-5.8 0-10.7-3.9-12.4-9.1H4.3v5.7C7.9 41.1 15.4 46 24 46z'/%3E%3Cpath fill='%23FBBC05' d='M11.6 28.1c-.4-1.3-.7-2.7-.7-4.1s.2-2.8.7-4.1v-5.7H4.3C2.8 17.1 2 20.4 2 24s.8 6.9 2.3 9.8l7.3-5.7z'/%3E%3Cpath fill='%23EA4335' d='M24 10.8c3.3 0 6.2 1.1 8.5 3.3l6.3-6.3C35 4.3 30 2 24 2 15.4 2 7.9 6.9 4.3 14.2l7.3 5.7c1.7-5.2 6.6-9.1 12.4-9.1z'/%3E%3C/svg%3E");
}
.mp-btn.oauth-google:active { background: #f1f3f4; }
/* Apple：黒地＋白ロゴ（Apple のヒューマンインターフェースガイドラインに沿った配色） */
.mp-btn.oauth-apple { background: #000; color: #fff; }
.mp-btn.oauth-apple::before {
  width: 13px; height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512'%3E%3Cpath fill='%23fff' d='M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141 4 184.8 4 273.5c0 26.2 4.8 53.3 14.4 81.2 12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z'/%3E%3C/svg%3E");
}
.mp-btn.oauth-apple:active { background: #1a1a1a; }
/* Discord：ブランドカラーの blurple */
.mp-btn.oauth-discord { background: #5865f2; color: #fff; }
.mp-btn.oauth-discord::before {
  width: 17px; height: 13px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 127.14 96.36'%3E%3Cpath fill='%23fff' d='M107.7 8.07A105.15 105.15 0 0 0 81.47 0a72.06 72.06 0 0 0-3.36 6.83 97.68 97.68 0 0 0-29.11 0A72.37 72.37 0 0 0 45.64 0a105.89 105.89 0 0 0-26.25 8.09C2.79 32.65-1.71 56.6.54 80.21a105.73 105.73 0 0 0 32.17 16.15 77.7 77.7 0 0 0 6.89-11.11 68.42 68.42 0 0 1-10.85-5.18c.91-.66 1.8-1.34 2.66-2a75.57 75.57 0 0 0 64.32 0c.87.71 1.76 1.39 2.66 2a68.68 68.68 0 0 1-10.87 5.19 77 77 0 0 0 6.89 11.1 105.25 105.25 0 0 0 32.19-16.14c2.64-27.38-4.51-51.11-18.85-72.15zM42.45 65.69C36.18 65.69 31 60 31 53s5-12.74 11.43-12.74S54 46 53.89 53s-5.05 12.69-11.44 12.69zm42.24 0C78.41 65.69 73.25 60 73.25 53s5-12.74 11.44-12.74S96.23 46 96.12 53s-5.05 12.69-11.43 12.69z'/%3E%3C/svg%3E");
}
.mp-btn.oauth-discord:active { background: #4752c4; }
/* 登録・ログインの入力フォーム */
.auth-form {
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line);
}
.mp-card.accent .auth-form { border-top-color: #ffd2b3; }
.auth-step {
  font-size: 12px; font-weight: 700; color: var(--orange-dark); margin-bottom: 12px;
}
.auth-form .field { margin-bottom: 12px; }
.auth-msg {
  font-size: 12px; line-height: 1.7; color: var(--danger);
  background: #fdeeeb; border-radius: 8px; padding: 10px 12px; margin-bottom: 4px;
}
.linklike {
  display: block; width: 100%; margin-top: 12px; padding: 6px;
  font-size: 12px; color: var(--ink-soft); text-decoration: underline; background: none;
}
.mp-top { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.mp-face {
  width: 84px; height: 84px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 34px;
}
.mp-face.has-img { background-color: var(--icon-grey); background-size: cover; background-position: center; }
.mp-btns { display: flex; flex-direction: column; gap: 8px; }
.mp-btns.row { flex-direction: row; }
.mp-btn {
  padding: 9px 14px; border-radius: 999px; background: var(--orange); color: #fff;
  font-size: 13px; font-weight: 700;
}
.mp-btn.ghost { background: #f1f2f4; color: var(--ink-soft); }
.mp-btn:active { opacity: .85; }
.mypage .field input, .mypage .field textarea { background: #fff; }
.mypage .avatar-picker { margin-bottom: 4px; }
.cta-solid {
  width: 100%; background: var(--orange); color: #fff; font-weight: 700; font-size: 16px;
  padding: 14px; border-radius: 12px; margin-top: 8px;
}
.cta-solid:active { transform: translateY(1px); }
.mp-dev {
  margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--ink-soft); display: flex; align-items: center; gap: 12px;
}

/* ---------- その他 / ユーザー検索 / お問い合わせ ---------- */
.more-page { display: flex; flex-direction: column; background: #f2f3f4; }
.more-profile {
  width: 100%; min-height: 122px; padding: 20px 18px;
  display: flex; align-items: center; gap: 15px;
  color: #fff; background: #727578; text-align: left;
}
/* 背景バナーを設定しているときは、それをこの帯にも敷く（style 属性で url を渡す） */
.more-profile.has-banner { background-size: cover; background-position: center; }
.more-face {
  width: 76px; height: 76px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 28px; font-weight: 700;
  border: 3px solid rgba(255,255,255,.85);
}
.more-face.has-img { background-color: rgba(255,255,255,.25); background-size: cover; background-position: center; }
.more-profile > span:nth-of-type(1) {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 20px; font-weight: 700;
}
.more-chevron { color: rgba(255,255,255,.75); font-size: 30px; }
.more-menu { margin-top: 12px; background: #fff; border-top: 1px solid var(--line); }
.more-row {
  width: 100%; min-height: 64px; padding: 0 18px;
  display: flex; align-items: center; gap: 14px; text-align: left;
  background: #fff; border-bottom: 1px solid var(--line); font-size: 16px;
}
.more-row:active { background: #f7f7f7; }
.more-row-icon { width: 24px; height: 24px; color: #3d4145; flex-shrink: 0; }
.more-row-icon svg { width: 100%; height: 100%; fill: currentColor; display: block; }
.more-row > span:nth-child(2) { flex: 1; }
.more-row b, .user-search-row b { font-size: 26px; color: #c5c8cb; font-weight: 500; }
.more-row.support-row .more-row-icon { color: var(--orange-dark); }
.more-spacer { flex: 1; min-height: 40px; }
.account-nudge {
  margin: 18px 14px 22px; padding: 16px;
  border: 1px solid #ffd2b3; border-radius: 14px; background: var(--orange-soft);
  display: grid; grid-template-columns: auto 1fr; gap: 10px 12px;
}
.account-nudge-icon { font-size: 25px; }
.account-nudge h2 { margin: 1px 0 5px; font-size: 15px; color: var(--orange-dark); }
.account-nudge p { margin: 0; font-size: 12px; line-height: 1.65; color: #8a5a33; }
.account-nudge .cta-solid { grid-column: 1 / -1; margin-top: 4px; }
.account-saved {
  margin: 18px 14px 24px; padding: 12px 14px; border-radius: 10px;
  background: #eaf7ef; color: #2e8b57; font-size: 12px; font-weight: 700; text-align: center;
}
.ib-icon.support-heart {
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px; background: #fff0e6; color: var(--orange-dark);
  font-size: 25px; font-weight: 700;
}
.ib-cta.support { min-width: 72px; }
.support-page {
  padding: 20px 14px 28px; background: #f2f3f4;
}
.support-card {
  padding: 24px 18px 20px; border: 1px solid #ffd2b3; border-radius: 18px;
  background: #fff; box-shadow: 0 3px 14px rgba(60, 30, 10, .07); text-align: center;
}
.support-mark, .support-result-icon {
  width: 58px; height: 58px; margin: 0 auto 14px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--orange-soft); color: var(--orange-dark); font-size: 30px;
}
.support-card h1 { margin: 0 0 12px; font-size: 21px; color: var(--ink); }
.support-card p { margin: 0 0 12px; font-size: 14px; line-height: 1.75; color: var(--ink-soft); }
.support-card .support-note { margin: 16px 0; padding: 12px; border-radius: 10px; background: #f7f7f7; font-size: 12px; }
.support-checkout-btn {
  width: 100%; min-height: 50px; padding: 12px 18px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  background: var(--orange); color: #fff; font-size: 16px; font-weight: 700;
}
.support-checkout-btn:disabled { opacity: .65; }
.support-spinner {
  width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.45);
  border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite;
}
.support-error {
  margin: 12px 0; padding: 11px 12px; border-radius: 9px;
  background: #fff0f0; color: #b42318; font-size: 13px; line-height: 1.55; text-align: left;
}
.support-result { margin: 0 0 16px; padding: 18px 16px; border-radius: 14px; text-align: center; }
.support-result.success { background: #eaf7ef; color: #236b45; }
.support-result.cancel { background: #fff7e8; color: #7a5520; }
.support-result h2 { margin: 4px 0 8px; font-size: 20px; }
.support-result p { margin: 0; font-size: 13px; line-height: 1.65; }
.support-result .support-result-icon { margin-bottom: 8px; background: #fff; color: #2e8b57; }
.support-back-btn {
  width: 100%; margin-top: 14px; padding: 13px; color: var(--ink-soft);
  font-size: 14px; font-weight: 700;
}
.user-search-form {
  padding: 10px 12px; display: flex; gap: 8px; background: #fff; border-bottom: 1px solid var(--line);
}
.user-search-form input {
  flex: 1; min-width: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px;
}
.user-search-form button {
  padding: 0 17px; border-radius: 10px; background: var(--orange); color: #fff; font-weight: 700;
}
.user-search-results { background: #fff; min-height: 100%; }
.user-search-row {
  width: 100%; min-height: 64px; padding: 10px 15px;
  display: flex; align-items: center; gap: 12px; text-align: left;
  background: #fff; border-bottom: 1px solid var(--line);
}
.user-search-row > span { flex: 1; font-size: 15px; }
.block-list-note {
  padding: 13px 16px; background: #fff7f1; border-bottom: 1px solid #ffd9bf;
  color: #865537; font-size: 11px; line-height: 1.65;
}
.block-list { background: #fff; min-height: 100%; }
.block-list-row {
  min-height: 68px; padding: 9px 14px;
  display: flex; align-items: center; gap: 10px;
  background: #fff; border-bottom: 1px solid var(--line);
}
.block-list-user {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px;
  text-align: left; background: transparent;
}
.block-list-user > span {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 15px;
}
.block-list-unblock {
  flex-shrink: 0; padding: 8px 13px; border: 1px solid #e3a680; border-radius: 9px;
  color: var(--orange-dark); background: #fff; font-size: 12px; font-weight: 700;
}
.block-list-unblock:active { background: var(--orange-soft); }
.block-list-empty { padding-top: 70px; }
.contact-page { padding: 20px 16px 40px; }
.contact-page > p { margin: 0 0 20px; color: var(--ink-soft); font-size: 12px; line-height: 1.7; }
.contact-page input, .contact-page textarea {
  width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
.contact-page textarea { resize: vertical; line-height: 1.6; }
.contact-destination { margin-top: 12px; color: var(--ink-soft); font-size: 11px; text-align: center; }
.settings-page { padding-bottom: 32px; }

/* ---------- グループ設定 ---------- */
.gs-row { display: flex; align-items: center; gap: 14px; }
.gs-icon {
  width: 64px; height: 64px; border-radius: 12px; flex-shrink: 0; background: var(--icon-grey);
  display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 700; color: #fff;
}
.gs-icon.has-img { background-color: var(--icon-grey); background-size: cover; background-position: center; color: transparent; }
.gs-bg {
  height: 92px; border-radius: 10px; background: #f1f2f4; border: 1px dashed var(--line);
  display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--ink-soft);
}
.gs-bg.has-img { background-size: cover; background-position: center; border-style: solid; }
/* グループ削除（取り返しがつかない操作なので枠で区切って目立たせる） */
.danger-zone { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.danger-btn {
  width: 100%; padding: 13px; border-radius: 10px; font-weight: 700; font-size: 14px;
  color: var(--danger); background: #fdf0ee; border: 1px solid #f5cdc5;
}
.danger-btn:active { background: #fadfda; }
.danger-zone .hint { font-size: 11px; color: var(--ink-soft); margin-top: 8px; line-height: 1.6; }
.modal-actions .primary.danger { background: var(--danger); }
.modal-actions .primary.danger:disabled { background: #cfd3d6; }

/* ---------- 端末通知の設定（マイページ） ---------- */
.push-setting { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.push-setting .ps-title { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.push-setting .ps-note { font-size: 11px; color: var(--ink-soft); line-height: 1.7; margin-bottom: 10px; }
.push-setting .ps-state { font-size: 12px; font-weight: 700; }
.push-setting .ps-state.on { color: #2f9e44; }
.push-setting .ps-state.off { color: var(--ink-soft); }
/* ブラウザのタブから開いているときの注意書き（ホーム画面アプリを勧める） */
.push-setting .ps-warn {
  background: var(--orange-soft); border: 1px solid #ffd6bd; border-radius: 8px;
  padding: 9px 11px; margin-bottom: 10px;
  font-size: 11px; line-height: 1.7; color: var(--orange-dark);
}

/* ---------- ホーム画面に追加（インストール誘導） ---------- */
.install-banner {
  margin: 12px 12px 0; padding: 10px 12px; border-radius: 10px;
  background: var(--card); box-shadow: var(--shadow); border: 1px solid #ffd6bd;
  display: flex; align-items: center; gap: 10px;
}
.install-banner .ib-icon { width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0; }
.install-banner .ib-text { flex: 1; min-width: 0; }
.install-banner .ib-title { font-size: 13px; font-weight: 700; }
.install-banner .ib-sub { font-size: 11px; color: var(--ink-soft); margin-top: 1px; }
.install-banner .ib-cta {
  flex-shrink: 0; background: var(--orange); color: #fff; font-weight: 700; font-size: 12px;
  padding: 8px 14px; border-radius: 999px;
}
.install-banner .ib-cta:active { background: var(--orange-dark); }
.install-banner .ib-x {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  color: var(--icon-grey); font-size: 12px;
}
.ios-share {
  display: inline-block; padding: 0 6px; border-radius: 5px;
  background: #eaf2fe; color: #2f6fd0; font-weight: 700;
}

/* ---------- 通知タブ上部の「通知オンにする」推奨バナー ---------- */
/* 設定画面のどこにあるか分かりにくいという指摘への対応。通知タブを開いた人のうち、
   まだオンにしていない人にだけ、ここで直接オンにできる導線を出す。 */
.notif-push-banner {
  margin: 12px 12px 0; padding: 12px 14px; border-radius: 10px;
  background: var(--orange-soft); border: 1px solid #ffd6bd;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.notif-push-banner .npb-text { flex: 1; min-width: 160px; font-size: 12px; line-height: 1.6; color: var(--orange-dark); }
.notif-push-banner .npb-btn {
  flex-shrink: 0; background: var(--orange); color: #fff; font-weight: 700; font-size: 12px;
  padding: 9px 16px; border-radius: 999px;
}
.notif-push-banner .npb-btn:active { background: var(--orange-dark); }

/* ---------- 検索 / 絞り込み ---------- */
.search-btn.on { background: rgba(255, 255, 255, 0.25); border-radius: 8px; }
.search-bar, .filter-row {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  background: var(--card); border-bottom: 1px solid var(--line); position: relative; z-index: 2;
}
.filter-row { border-bottom: none; padding-bottom: 4px; background: transparent; }
.filter-input {
  flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 18px;
  padding: 9px 14px; background: #f6f7f8; font-size: 14px;
}
.filter-input:focus { outline: none; border-color: var(--orange); background: #fff; }
.filter-x {
  width: 32px; height: 32px; border-radius: 50%; color: var(--ink-soft);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.filter-x:active { background: #ececec; }
.search-row { display: flex; gap: 10px; align-items: flex-start; background: var(--card); border-radius: 10px; padding: 10px 12px; box-shadow: var(--shadow); }
.search-meta { flex: 1; min-width: 0; }
.search-top { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.search-top .nm { font-weight: 700; }
.search-top .tm { color: var(--ink-soft); margin-left: auto; flex-shrink: 0; }
.search-body { font-size: 14px; line-height: 1.5; margin-top: 3px; word-break: break-word; }
.search-body mark { background: var(--orange-soft); color: var(--orange-dark); font-weight: 700; border-radius: 3px; }

/* ---------- 他ユーザーのプロフィール ---------- */
.up-name { font-size: 20px; font-weight: 700; }
.mp-btn.wide { width: 100%; text-align: center; margin-bottom: 10px; }
.up-note { font-size: 11px; color: var(--ink-soft); line-height: 1.7; margin-top: 6px; }
.up-blocked {
  background: #fdecea; color: var(--danger); font-size: 12px; line-height: 1.7;
  padding: 12px 14px; border-radius: 10px; margin-bottom: 14px; text-align: center;
}

/* ---------- 通報 ---------- */
.report-reasons { display: flex; flex-direction: column; gap: 6px; }
.report-reasons .opt {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  font-size: 14px; color: var(--ink-soft); text-align: left;
}
.report-reasons .opt.active { border-color: var(--orange); background: var(--orange-soft); color: var(--orange-dark); font-weight: 700; }
.report-list { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.report-card { background: var(--card); border-radius: 10px; padding: 12px 14px; box-shadow: var(--shadow); }
.report-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.report-top .tm { font-size: 11px; color: var(--ink-soft); margin-left: auto; }
.report-line { font-size: 14px; }
.report-line.sub { font-size: 11px; color: var(--ink-soft); margin-top: 6px; }
.report-reason { font-size: 13px; color: var(--danger); font-weight: 700; margin-top: 4px; }
.report-snap {
  font-size: 12px; color: var(--ink-soft); background: #f6f7f8; border-radius: 8px;
  padding: 8px 10px; margin-top: 8px; line-height: 1.6; word-break: break-word;
}
.report-actions { display: flex; gap: 8px; margin-top: 10px; }
.report-actions .mp-btn { flex: 1; text-align: center; }
.report-actions .mp-btn[disabled] { opacity: .45; }

/* ---------- リアクション通知 ---------- */
.notif-act { font-size: 13px; line-height: 1.5; margin-top: 2px; }
.notif-act b { font-weight: 700; }
.notif-act .rx-gu { color: var(--gu); }
.notif-act .rx-boo { color: var(--boo); }
.notif-body.quiet { color: var(--ink-soft); font-size: 12px; }

/* ---------- グループのシステムメッセージ（役職の変更） ----------
   スレッドではないので、カードにせず中央寄せの1行にする。
   押しても何も起きない（レスもリアクションも付かない）。 */
.sys-msg {
  margin: 8px 12px; padding: 8px 12px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.06); text-align: center;
  font-size: 12px; color: var(--ink-soft); line-height: 1.6;
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
}
.sys-msg .sys-text { font-weight: 700; }
.sys-msg .sys-time { font-size: 10px; opacity: .8; }

/* ---------- 案内バナー：Discord のとき ---------- */
.install-banner { position: relative; }
.install-banner.discord { border-color: #c9cdf5; }
/* 案内バナー：アカウント登録のとき（未登録の人にだけ出る） */
.install-banner.account { border-color: #ffd2b3; background: var(--orange-soft); }
.install-banner .ib-icon.glyph {
  display: flex; align-items: center; justify-content: center;
  background: #fff; font-size: 19px;
}
.install-banner .ib-cta.discord {
  background: #5865f2; text-decoration: none; display: inline-flex;
  align-items: center; justify-content: center;
}
.install-banner .ib-cta.discord:active { background: #4752c4; }
.install-banner .ib-dots {
  position: absolute; left: 0; right: 0; bottom: 3px;
  display: flex; justify-content: center; gap: 5px; pointer-events: none;
}
.install-banner .ib-dots span {
  width: 4px; height: 4px; border-radius: 50%; background: rgba(0, 0, 0, 0.16);
}
.install-banner .ib-dots span.on { background: var(--orange); }

/* ---------- メンバー：リーダーにするボタン ---------- */
.sub-toggle.lead { border-color: #c9cdf5; color: #4752c4; }
.sub-toggle.lead:active { background: #eef0fe; }

/* ---------- お知らせの帯（上部バーの下を右から左へ流れる） ---------- */
.announce-bar {
  background: #2b2b2b; color: #ffd9bd; overflow: hidden; white-space: nowrap;
  font-size: 12px; line-height: 1.4; padding: 6px 0; position: relative; z-index: 4;
}
.announce-track { display: inline-block; padding-left: 100%; }
.announce-text { display: inline-block; padding-right: 3em; font-weight: 600; }
/* 右 → 左へ流す。画面の外（右）から入ってきて、左へ抜ける。
   track は padding-left: 100% で「帯の幅ぶんの余白＋本文」の長さになっている。
   animation-direction: reverse でキーフレームを逆再生し、0（余白ぶんだけ右にはみ出た
   状態＝本文は画面の右外）から -100%（本文が左外まで抜けた状態）へ動かす。 */
@keyframes announce-flow {
  from { transform: translateX(-100%); }
  to   { transform: translateX(0); }
}
.announce-track { animation: announce-flow 18s linear infinite reverse; }
@media (prefers-reduced-motion: reduce) {
  /* 動きを減らす設定の人には流さず、そのまま読めるようにする */
  .announce-track { animation: none; padding-left: 12px; }
  .announce-bar { white-space: normal; }
}

/* 開発者のマイグループにだけ出す入力フォーム */
.announce-form {
  margin: 12px 12px 0; padding: 12px; border-radius: 10px;
  background: var(--card); border: 1px dashed #b9bec5; box-shadow: var(--shadow);
}
.announce-head { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.announce-head .dev-only {
  font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 4px;
  background: #2b2b2b; color: #fff;
}
.announce-input { display: flex; gap: 8px; margin-top: 10px; }
.announce-input input {
  flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 18px;
  padding: 9px 14px; background: #f6f7f8; font-size: 14px;
}
.announce-input input:focus { outline: none; border-color: var(--orange); background: #fff; }
.announce-send {
  flex-shrink: 0; background: var(--orange); color: #fff; font-weight: 700;
  border-radius: 18px; padding: 9px 16px; font-size: 13px;
}
.announce-send:active { background: var(--orange-dark); }
.announce-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.announce-row {
  display: flex; align-items: center; gap: 8px; font-size: 12px;
  background: #f6f7f8; border-radius: 8px; padding: 7px 10px;
}
.announce-body { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.announce-x { width: 24px; height: 24px; border-radius: 50%; color: var(--icon-grey); flex-shrink: 0; }
.announce-x:active { background: #e4e6e9; }
.announce-empty { margin-top: 10px; font-size: 11px; color: var(--ink-soft); }

/* ---------- シャウト（開発者：全員に通知） ---------- */
.shout-note {
  font-size: 11px; color: var(--orange-dark); background: var(--orange-soft);
  padding: 6px 12px; text-align: center;
}
.notif-act .rx-shout { color: var(--orange-dark); }

/* ---------- 投稿禁止（BAN）の表示 ---------- */
.composer.locked.banned { color: var(--danger); font-weight: 600; }
.composer.locked.banned .ban-sub { color: var(--ink-soft); font-weight: 400; }
.mod-box { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.mp-btn.danger-text { color: var(--danger); }
.toggle-row.wrap { flex-wrap: wrap; }
.toggle-row.wrap .opt { flex: 1 0 30%; }

/* ---------- 規約類へのリンク（マイページ下部） ---------- */
.legal-links {
  margin-top: 22px; text-align: center; font-size: 12px; color: var(--ink-soft);
  display: flex; justify-content: center; gap: 8px; flex-wrap: wrap;
}
.legal-links a { color: var(--ink-soft); text-decoration: underline; }
.legal-links a:active { color: var(--orange-dark); }

/* ============================================================================
   2026-07-31 アップデートぶん
     タップの手応え / プル・トゥ・リフレッシュ / 通知ドロワー / レスへの返信 /
     プロフィール（ひとこと・バナー）/ 公開グループの並べ替え / 開発者表示
   ============================================================================ */

/* ---------- タップの手応え（項目3） ----------
   押したことが分かればよいので、いずれも「軽く・短く」に留める。
   ・背景色をほんの少し変える
   ・0.97 まで縮める（1〜2px 程度の沈み込みに相当）
   ・遷移そのものは遅らせない（transition は戻るときだけ効かせる）
   レイアウトが動かないよう transform だけで表現し、余白や高さは変えない。 */
.tapable { transition: background-color .12s ease, opacity .12s ease, transform .12s ease; }
.tapable:active {
  background-color: rgba(0, 0, 0, .05);
  transform: scale(.985);
}
/* 一覧の行・カード（グループ / スレッド / ブックマーク / 通知 / 検索結果） */
.group-card, .thread-card .thread-body, .bm-item, .notif-item,
.user-search-row, .more-row, .block-list-row, .report-card {
  transition: background-color .12s ease, transform .12s ease;
}
.group-card:active { background: #f3f4f5; transform: scale(.99); }
.bm-item:active .thread-card { background: #fafafa; }
.notif-item:active { transform: scale(.995); }
.user-search-row:active, .block-list-user:active { background: #f5f5f5; }
.thread-card .thread-body[data-act]:active { background: #f7f7f7; }
.replies-preview:active { background: #e6e6e6; }
/* アイコン（ユーザー / グループ） */
.avatar[data-act], .more-face, .mp-face, .group-card .thumb {
  transition: opacity .12s ease, transform .12s ease;
}
.avatar[data-act]:active { opacity: .7; transform: scale(.93); }
.more-profile:active { background: #666a6d; }
/* 通常ボタン全般。個別に :active を持つものは、そちらが優先される。 */
.mp-btn:active, .cta-solid:active, .sheet-btn:active, .btn-create:active,
.iconbtn:active, .rbtn:active, .filter-x:active, .sub-toggle:active,
.bottom-nav-item:active, .tabbar .tab:active, .linklike:active {
  transform: scale(.97);
}
.tabbar .tab { transition: background-color .12s ease, transform .12s ease; }
.tabbar .tab:active { background: var(--orange-soft); }
.modal-actions button:active { transform: scale(.98); filter: brightness(.97); }
.toggle-row .opt:active, .report-reasons .opt:active { background: #f0f1f3; }
/* 動きを減らす設定の人には、縮小をやめて色の変化だけにする */
@media (prefers-reduced-motion: reduce) {
  .tapable, .group-card, .notif-item, .avatar[data-act], .more-face, .mp-face,
  .group-card .thumb, .tabbar .tab { transition: none; }
  .tapable:active, .group-card:active, .notif-item:active, .avatar[data-act]:active,
  .mp-btn:active, .cta-solid:active, .sheet-btn:active, .btn-create:active,
  .iconbtn:active, .rbtn:active, .filter-x:active, .sub-toggle:active,
  .bottom-nav-item:active, .tabbar .tab:active, .linklike:active,
  .modal-actions button:active { transform: none; }
  .notif-drawer, .modal, .modal-scrim, .zoom-scrim { animation: none; }
}

/* ---------- プル・トゥ・リフレッシュ（項目4） ----------
   一覧のいちばん上で下へ引いたときだけ出る帯。高さは JS が引いた距離に応じて
   --ptr-h に入れる。レイアウトを押し下げないよう、内容の上に重ねて出す。 */
.ptr {
  position: absolute; top: 0; left: 0; right: 0; z-index: 6;
  height: var(--ptr-h, 0px);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  overflow: hidden; pointer-events: none;
  font-size: 12px; font-weight: 700; color: var(--orange-dark);
  background: linear-gradient(180deg, rgba(255,241,232,.98), rgba(255,241,232,0));
}
.ptr .ptr-spin {
  width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid rgba(255, 127, 39, .3); border-top-color: var(--orange);
}
.ptr.spinning .ptr-spin { animation: spin .8s linear infinite; }
.ptr.error { color: var(--danger); background: linear-gradient(180deg, rgba(253,240,238,.98), rgba(253,240,238,0)); }
@media (prefers-reduced-motion: reduce) { .ptr.spinning .ptr-spin { animation-duration: 2s; } }

/* ---------- レスへの返信（項目6） ---------- */
/* ブックマークの右隣に並ぶリプライボタン。既存のバーの作りは変えない。 */
.reaction-bar .rbtn.reply-to.on { color: var(--orange-dark); }
/* 投稿入力欄の上に出る「返信モード」の帯 */
.reply-target {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 9px 12px; background: var(--orange-soft); border-bottom: 1px solid #ffd6bd;
}
.reply-target .rt-meta { flex: 1; min-width: 0; }
.reply-target .rt-to { font-size: 12px; font-weight: 700; color: var(--orange-dark); }
.reply-target .rt-body {
  font-size: 11px; color: var(--ink-soft); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.reply-target .rt-x {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  color: var(--orange-dark); font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.reply-target .rt-x:active { background: #ffe0cb; }
/* 投稿に付く「↪ ○○さんへの返信」。押すと元のレスへ移動する。 */
.reply-ref {
  display: block; width: 100%; text-align: left;
  margin: 6px 12px 0; padding: 6px 10px; max-width: calc(100% - 24px);
  border-left: 3px solid #ffd6bd; border-radius: 0 8px 8px 0;
  background: #fafafa; font-size: 12px; color: var(--ink-soft); line-height: 1.5;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 一覧のレスプレビューの中に出すときは、まわりの余白に合わせて詰める */
.reply-ref.sm { margin: 2px 0 0; max-width: 100%; padding: 3px 8px; font-size: 11px; }
.reply-ref:active { background: #f0f0f0; }
.reply-ref .rr-name { font-weight: 700; color: var(--orange-dark); }
.reply-ref.gone { border-left-color: var(--line); color: #a3a8ad; }
/* 返信元へ飛んだときに一瞬光らせる（どこへ来たのか分かるように） */
.reply-item.flash { animation: replyflash 1.2s ease; }
@keyframes replyflash { from { background: var(--orange-soft); } to { background: var(--reply-bg); } }
@media (prefers-reduced-motion: reduce) { .reply-item.flash { animation: none; outline: 2px solid var(--orange); } }

/* ---------- プロフィール：ひとことメモ / 背景バナー（項目7） ---------- */
.mp-banner {
  position: relative; height: 112px; border-radius: 12px; overflow: hidden;
  background: linear-gradient(120deg, #ffd9bd, #ffe9d8);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: #a5764f; margin-bottom: 14px;
}
.mp-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mp-banner .mp-banner-busy {
  position: absolute; inset: 0; background: rgba(255, 255, 255, .72);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 12px; font-weight: 700; color: var(--orange-dark);
}
/* .ptr の中でだけ効く指定なので、ここでも同じ見た目を作っておく */
.mp-banner-busy .ptr-spin {
  width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid rgba(255, 127, 39, .3); border-top-color: var(--orange);
}
.mp-banner-btns { display: flex; gap: 8px; margin: -6px 0 16px; flex-wrap: wrap; }
.mp-banner-err { font-size: 11px; color: var(--danger); line-height: 1.6; margin: -8px 0 14px; }
/* 長い文章・URL・英数字の羅列でも枠を押し広げない */
.mp-bio {
  font-size: 13px; line-height: 1.7; color: var(--ink); white-space: pre-wrap;
  word-break: break-word; overflow-wrap: anywhere;
}
.mp-bio.empty { color: var(--ink-soft); }
.mp-bio-count { font-size: 11px; color: var(--ink-soft); text-align: right; margin-top: 4px; }
.mp-bio-count.over { color: var(--danger); font-weight: 700; }

/* ---------- 公開グループの並べ替え（項目9） ---------- */
.sort-row { display: flex; justify-content: flex-end; padding: 8px 12px 0; }
.sort-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink-soft); font-size: 12px; font-weight: 700;
  box-shadow: var(--shadow);
}
.sort-btn:active { background: var(--orange-soft); color: var(--orange-dark); border-color: #ffd6bd; }
.sort-btn .sort-ico { font-size: 13px; }
.sheet-btn.chosen { background: var(--orange-soft); color: var(--orange-dark); }
.sheet-btn.chosen::after { content: ' ✓'; font-weight: 800; }

/* ---------- 開発者アカウントの目印（項目10） ----------
   表示名の先頭に付ける。DB の is_developer を見て描くので、
   自分で名前を「開発者」にしても同じ形にはならない。 */
.dev-mark {
  display: inline-block; vertical-align: middle; margin-right: 4px;
  font-size: 10px; font-weight: 800; line-height: 1.6; letter-spacing: .02em;
  padding: 0 6px; border-radius: 4px;
  background: linear-gradient(135deg, #2b2b2b, #4a4a4a); color: #ffd9bd;
}
.dev-mark.sm { font-size: 9px; padding: 0 5px; }

/* ---------- その他タブ：アカウント案内 / 開発者向け（項目2-2・11） ---------- */
.more-account {
  margin: 18px 14px 0; padding: 16px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--card);
}
.more-account.anon { border-color: #ffd2b3; background: var(--orange-soft); }
.more-account h2 { margin: 0 0 8px; font-size: 15px; }
.more-account.anon h2 { color: var(--orange-dark); }
.more-account p { margin: 0 0 12px; font-size: 12px; line-height: 1.7; color: var(--ink-soft); }
.more-account.anon p { color: #8a5a33; }
.more-account .mp-btn.wide { margin-bottom: 8px; }
.more-account .mp-btn.wide:last-child { margin-bottom: 0; }
.more-account-state {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; color: #2e8b57;
}
.more-account-mail {
  margin-top: 10px; padding: 9px 12px; border-radius: 9px; background: #f7f8f9;
  font-size: 12px; color: var(--ink-soft);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 開発者向け。通常の項目とはっきり分け、目立たない見た目にして下端へ置く。 */
.more-dev { margin: 26px 14px 20px; }
.more-dev-label {
  font-size: 10px; font-weight: 700; color: #b0b4b8; letter-spacing: .08em;
  padding: 0 4px 6px;
}
.more-dev-row {
  width: 100%; padding: 12px 14px; text-align: left;
  display: flex; align-items: center; gap: 10px;
  border: 1px dashed #d5d8db; border-radius: 10px; background: transparent;
  font-size: 13px; color: #8b9096;
}
.more-dev-row:active { background: #f0f1f2; }
.more-dev-row .more-dev-state { margin-left: auto; font-size: 11px; font-weight: 700; }
.more-dev-row.on { border-style: solid; border-color: #2b2b2b; color: #2b2b2b; }
.more-dev-row.on .more-dev-state { color: var(--orange-dark); }
