@charset "UTF-8";
/* X ASTRA custom.v35.css  version 3.5 */

body, input, textarea, select, button {
  font-family: 'Meiryo', 'メイリオ', 'Hiragino Sans', sans-serif !important;
}

.content-section {
  animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.char-over {
  color: #ef4444 !important;
  font-weight: bold;
}

.drop-zone.dragover {
  border-color: #008080 !important;
  background-color: rgba(0, 128, 128, 0.12) !important;
}

/* ============================================================
   ボタンの色ルール（文字は全て白）
   .btn-primary 青緑 #008080 : 保存・作成などの行動ボタン / Xで見る
   .btn-accent  赤紫 #884898 : 再送・今すぐ投稿・切替など（オレンジ系だった役割）
   .btn-danger  赤           : 削除に関するボタン
   .btn-neutral グレー       : 選択前のトグルなど
   ============================================================ */
.btn-primary, .btn-accent, .btn-danger, .btn-neutral {
  color: #fff !important;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.btn-primary { background-color: #008080; }
.btn-primary:hover { background-color: #006666; }
.btn-accent { background-color: #884898; }
.btn-accent:hover { background-color: #6e3a7c; }
.btn-danger { background-color: #dc2626; }
.btn-danger:hover { background-color: #b91c1c; }
.btn-neutral { background-color: #475569; }
.btn-neutral:hover { background-color: #334155; }
.btn-primary:disabled, .btn-accent:disabled, .btn-danger:disabled, .btn-neutral:disabled,
.btn-primary:disabled:hover, .btn-accent:disabled:hover, .btn-danger:disabled:hover, .btn-neutral:disabled:hover {
  background-color: #475569;
  opacity: 0.55;
  cursor: not-allowed;
}
.btn-primary:focus-visible, .btn-accent:focus-visible, .btn-danger:focus-visible, .btn-neutral:focus-visible {
  outline: 2px solid #5eead4;
  outline-offset: 2px;
}

/* ============================================================
   左メニューの選択中（青緑 #008080 / 白文字）
   ============================================================ */
.nav-active, .nav-active:hover {
  background-color: #008080 !important;
  color: #fff !important;
}

/* ============================================================
   チェックボックス（大きく・チェックが見やすい）
   ============================================================ */
.chk {
  -webkit-appearance: none;
  appearance: none;
  display: inline-block;
  vertical-align: middle;
  position: relative;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin: 0;
  border: 2px solid #94a3b8;
  border-radius: 5px;
  background-color: #0f172a;
  cursor: pointer;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}
.chk:hover { border-color: #5eead4; }
.chk:checked, .chk:indeterminate {
  background-color: #008080;
  border-color: #008080;
}
.chk:checked::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 1px;
  width: 6px;
  height: 12px;
  border: solid #fff;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}
.chk:indeterminate::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 7px;
  width: 12px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
}
.chk:disabled { opacity: 0.35; cursor: not-allowed; }
.chk:focus-visible { outline: 2px solid #5eead4; outline-offset: 2px; }

/* ============================================================
   予約日時（月・日・時・分）
   PC: 上向きに開く専用プルダウン / スマホ: 標準の選択画面
   ============================================================ */
.dt-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}
.dt-cell { position: relative; }
.dt-native {
  width: 100%;
  background-color: #0f172a;
  color: #e2e8f0;
  border: 1px solid #334155;
  border-radius: 0.5rem;
  padding: 0.7rem 0.25rem;
  font-size: 1.35rem;
  font-weight: 700;
  text-align: center;
  text-align-last: center;
}
.dt-btn {
  display: none;
  width: 100%;
  align-items: baseline;
  justify-content: center;
  gap: 0.25rem;
  background-color: #0f172a;
  color: #f1f5f9;
  border: 1px solid #334155;
  border-radius: 0.5rem;
  padding: 0.6rem 0.25rem;
  cursor: pointer;
}
.dt-btn:hover { border-color: #5eead4; }
.dt-btn:focus-visible { outline: 2px solid #5eead4; outline-offset: 2px; }
.dt-btn.is-open { border-color: #008080; }
.dt-num { font-size: 1.6rem; font-weight: 700; line-height: 1.2; }
.dt-unit { font-size: 0.95rem; color: #94a3b8; }
.dt-list {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 6px);
  max-height: 240px;
  overflow-y: auto;
  background-color: #1e293b;
  border: 1px solid #475569;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  z-index: 50;
  padding: 4px;
}
.dt-list.is-open { display: block; }
.dt-list.down { bottom: auto; top: calc(100% + 6px); }
.dt-item {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.25rem;
  width: 100%;
  padding: 0.45rem 0.25rem;
  border-radius: 0.375rem;
  color: #e2e8f0;
  cursor: pointer;
}
.dt-item .dt-num { font-size: 1.3rem; }
.dt-item:hover, .dt-item.is-active { background-color: #334155; }
.dt-item[aria-selected="true"] { background-color: #008080; color: #fff; }
.dt-item[aria-selected="true"] .dt-unit { color: #e6fffb; }
@media (hover: hover) and (pointer: fine) {
  .dt-row.dt-enhanced .dt-native { display: none; }
  .dt-row.dt-enhanced .dt-btn { display: flex; }
}

/* ============================================================
   分析画面：絞り込み・グラフ
   ============================================================ */
.seg-group {
  display: inline-flex;
  border: 1px solid #334155;
  border-radius: 0.5rem;
  overflow: hidden;
}
.seg-btn {
  padding: 0.45rem 0.9rem;
  font-size: 0.75rem;
  color: #cbd5e1;
  background-color: transparent;
  cursor: pointer;
  border-right: 1px solid #334155;
}
.seg-btn:last-child { border-right: 0; }
.seg-btn:hover { background-color: #334155; }
.seg-btn.is-on, .seg-btn.is-on:hover { background-color: #008080; color: #fff; font-weight: 700; }
.seg-btn:focus-visible { outline: 2px solid #5eead4; outline-offset: -2px; }

.viz-box { position: relative; transition: opacity 0.15s ease; }
.viz-box.is-loading { opacity: 0.5; }
.viz-tip {
  position: absolute;
  z-index: 20;
  pointer-events: none;
  min-width: 128px;
  padding: 8px 10px;
  background-color: #1e293b;
  border: 1px solid #475569;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  font-size: 12px;
  color: #cbd5e1;
  display: none;
}
.viz-tip.is-on { display: block; }
.viz-tip strong { color: #f1f5f9; font-size: 14px; margin-right: 6px; }
.viz-tip .tip-head { color: #94a3b8; margin-bottom: 4px; }
.viz-tip .tip-row { display: flex; align-items: center; gap: 6px; line-height: 1.7; }
.viz-tip .tip-key { display: inline-block; width: 14px; height: 3px; border-radius: 2px; }
.viz-tip .tip-key.box { height: 10px; width: 10px; border-radius: 2px; }
.viz-seg { cursor: default; transition: filter 0.12s ease; }
.viz-seg:hover, .viz-seg:focus { filter: brightness(1.18); outline: none; }
.viz-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12px; color: #cbd5e1; }
.viz-legend .key { display: inline-block; vertical-align: middle; margin-right: 6px; }
.viz-legend .key.line { width: 16px; height: 3px; border-radius: 2px; }
.viz-legend .key.box { width: 10px; height: 10px; border-radius: 2px; }
.viz-empty { padding: 48px 0; text-align: center; font-size: 12px; color: #94a3b8; }

/* ============================================================
   自動返信：アクション条件カード・投稿選択
   ============================================================ */
.act-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.95rem 1rem;
  background-color: #1e293b;
  border: 1px solid #334155;
  border-radius: 0.6rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: #f1f5f9;
  cursor: pointer;
}
.act-card:hover { border-color: #5eead4; }
.act-card:has(.chk:checked) { border-color: #008080; background-color: #0b2a2e; }
.act-card .chk { width: 26px; height: 26px; }
.act-card .chk:checked::after { left: 8px; top: 2px; width: 7px; height: 14px; }
.pick-list {
  max-height: 280px;
  overflow-y: auto;
  background-color: #1e293b;
  border: 1px solid #334155;
  border-radius: 0.5rem;
}
.pick-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  padding: 0.6rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid #334155;
  cursor: pointer;
}
.pick-row:last-child { border-bottom: 0; }
.pick-row:hover { background-color: #334155; }
.pick-row.is-chosen, .pick-row.is-chosen:hover { background-color: #008080; }
.pick-row:focus-visible { outline: 2px solid #5eead4; outline-offset: -2px; }
.pick-at { flex-shrink: 0; font-size: 0.75rem; color: #94a3b8; padding-top: 0.15rem; min-width: 6.5rem; }
.pick-row.is-chosen .pick-at { color: #e6fffb; }
.pick-text { font-size: 0.9rem; color: #e2e8f0; word-break: break-all; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pick-row.is-chosen .pick-text { color: #fff; }
.pick-chosen {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid #008080;
  border-radius: 0.5rem;
  background-color: #0b2a2e;
}
.pick-chosen.hidden { display: none; }

/* ============================================================
   ツリー投稿（右側）
   ============================================================ */
.tree-card { animation: fadeIn 0.2s ease-in-out; }
#treeAddBtn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ===== v3.6：グラフの文字は白／切り替えボタン／ドーナツ凡例 ===== */
.viz-legend { color: #ffffff; }
.viz-toggle {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; font-size: 12px; color: #ffffff;
  background: #0f172a; border: 1px solid #64748b; border-radius: 999px; cursor: pointer; transition: opacity 0.12s ease, background-color 0.12s ease;
}
.viz-toggle:hover { background: #1e293b; }
.viz-toggle.is-on { background: #334155; border-color: #cbd5e1; font-weight: 700; }
.viz-toggle:not(.is-on) { opacity: 0.55; }
.viz-toggle:focus-visible { outline: 2px solid #5eead4; outline-offset: 2px; }
.viz-donut-legend { list-style: none; margin: 0; padding: 0; font-size: 12px; color: #ffffff; display: grid; gap: 8px; }
.viz-donut-legend li { display: flex; align-items: center; gap: 8px; color: #ffffff; }
.viz-donut-legend strong { color: #ffffff; }
.viz-donut-legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }
.msg-err { color: #fca5a5; }

/* ===== v3.6：数値を表で見る（見出しの行を固定） ===== */
.st-wrap { max-height: 288px; overflow: auto; }
.st-table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 12px; color: #ffffff; text-align: right; }
.st-table th, .st-table td { padding: 6px 8px; color: #ffffff; border-bottom: 1px solid #334155; white-space: nowrap; }
.st-table thead th { position: sticky; top: 0; z-index: 2; background: #0f172a; font-weight: 700; border-bottom: 2px solid #475569; }
.st-table th:first-child { text-align: left; position: sticky; left: 0; background: #0f172a; z-index: 1; }
.st-table thead th:first-child { z-index: 3; }
.st-table tbody tr:hover td, .st-table tbody tr:hover th { background: #273449; }

/* ===== v3.7：X 投稿 詳細 分析 ===== */
.pa-wrap { max-height: calc(100vh - 290px); overflow-y: auto; overflow-x: hidden; border: 1px solid #334155; border-radius: 10px; }
.pa-table { width: 100%; table-layout: fixed; border-collapse: collapse; color: #ffffff; font-size: 15px; }
/* 列の幅は割合で決める（余った幅が投稿文だけに偏らないようにする） */
.pa-table col.c-text { width: 24%; } .pa-table col.c-img { width: 9%; } .pa-table col.c-time { width: 11%; }
.pa-table col.c-num1 { width: 11%; } .pa-table col.c-num2 { width: 13%; } .pa-table col.c-num3 { width: 8%; }
.pa-table col.c-num4 { width: 8%; } .pa-table col.c-num5 { width: 7%; } .pa-table col.c-view { width: 9%; }
.pa-table thead th {
  position: sticky; top: 0; z-index: 2; background: #0f172a; color: #ffffff; font-size: 14px; font-weight: 700; line-height: 1.25;
  padding: 10px 4px; text-align: left; border-bottom: 2px solid #475569; user-select: none; white-space: nowrap;
}
.pa-table thead th:first-child { padding-left: 10px; }
.pa-table thead th.num { text-align: right; padding-right: 8px; }
.pa-table thead th.ctr, .pa-table td.ctr { text-align: center; }
.pa-table thead th.pa-sort { cursor: pointer; }
.pa-table thead th.pa-sort:hover { background: #1e293b; }
.pa-table thead th.pa-sort:focus-visible { outline: 2px solid #5eead4; outline-offset: -2px; }
.pa-arrow { color: #ff8c00; font-size: 13px; font-weight: 700; margin-left: 2px; }
.pa-table td { height: 108px; padding: 6px 4px; color: #ffffff; border-bottom: 1px solid #334155; vertical-align: middle; }
.pa-table td:first-child { padding-left: 10px; padding-right: 8px; }
.pa-table td.num { text-align: right; padding-right: 8px; font-size: 17px; font-variant-numeric: tabular-nums; }
.pa-table td.num.imp { font-size: 20px; font-weight: 700; }
.pa-table tbody tr:hover td { background: #273449; }
.pa-table td.pa-empty, p.pa-empty { padding: 40px 0; text-align: center; color: #ffffff; }
.pa-text {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  line-height: 1.5; max-height: 4.5em; word-break: break-word; color: #ffffff;
}
.pa-thumb {
  position: relative; display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px;
  border-radius: 6px; overflow: hidden; background: #0f172a; color: #ffffff; font-size: 13px; flex-shrink: 0;
}
.pa-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pa-thumb.video { border: 1px solid #475569; }
.pa-more { position: absolute; right: 0; bottom: 0; background: rgba(15, 23, 42, 0.85); color: #ffffff; font-size: 11px; font-weight: 700; padding: 0 3px; border-top-left-radius: 4px; }
.btn-view {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 46px; padding: 0 6px;
  background: #008080; color: #ffffff; font-weight: 700; font-size: 14px; border-radius: 8px; text-decoration: none; transition: background-color 0.15s ease;
}
.btn-view:hover { background: #006666; }
.btn-view:focus-visible { outline: 2px solid #5eead4; outline-offset: 2px; }
.pa-sortbar { display: none; align-items: center; gap: 8px; }
.pa-sortbar select { background: #0f172a; color: #ffffff; border: 1px solid #475569; border-radius: 8px; padding: 6px 8px; font-size: 14px; }
.pa-cards { display: none; }
@media (max-width: 1279px) {
  .pa-wrap { display: none; }
  .pa-sortbar { display: flex; }
  .pa-cards { display: grid; gap: 10px; }
}
.pa-card { background: #0f172a; border: 1px solid #334155; border-radius: 10px; padding: 12px; color: #ffffff; display: grid; gap: 10px; }
.pa-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 15px; }
.pa-card-top .btn-view { width: auto; min-width: 110px; }
.pa-card-mid { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; min-height: 84px; }
.pa-card-nums { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; text-align: center; }
.pa-card-nums .l { display: block; color: #ffffff; font-size: 11px; line-height: 1.2; }
.pa-card-nums strong { display: block; color: #ffffff; font-size: 16px; margin-top: 2px; }
@media (max-width: 420px) { .pa-card-nums { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ===== v3.8：確認・お知らせの画面（画面の中央に表示） ===== */
.ui-modal {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(2, 6, 23, 0.72);
}
.ui-modal-box {
  width: 100%; max-width: 460px; max-height: calc(100vh - 32px); background: #1e293b; border: 1px solid #475569;
  border-radius: 14px; padding: 22px; color: #ffffff; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}
.ui-modal-msg { white-space: pre-line; font-size: 15px; line-height: 1.7; color: #ffffff; margin: 0 0 22px; max-height: 60vh; overflow: auto; word-break: break-word; }
.ui-modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
.ui-modal-btn { padding: 10px 24px; font-size: 14px; font-weight: 700; color: #ffffff; border-radius: 8px; cursor: pointer; }
.ui-modal-btn:focus-visible { outline: 3px solid #5eead4; outline-offset: 2px; }

/* ===== v3.8：自動返信 保存 ===== */
.rule-act { display: inline-block; margin: 0 4px 4px 0; padding: 2px 8px; border-radius: 999px; border: 1px solid #475569; background: #0f172a; color: #ffffff; font-size: 12px; white-space: nowrap; }
.rule-on { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #008080; color: #ffffff; font-size: 12px; font-weight: 700; }
.rule-off { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #475569; color: #ffffff; font-size: 12px; font-weight: 700; }


/* ===== v3.9：自動返信の作成（警告の点滅）／ ユーザー管理 ===== */
.act-warn { color: #ff0000; font-weight: 700; font-size: 14px; line-height: 1.4; animation: actBlink 1.2s ease-in-out infinite; }
@keyframes actBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.15; } }
@media (prefers-reduced-motion: reduce) { .act-warn { animation: none; } }   /* 「視覚効果を減らす」設定の端末では、点滅させない */
.um-table col.c-user { width: 16%; } .um-table col.c-r { width: 14%; } .um-table col.c-view { width: 14%; }
.um-table .btn-view { white-space: nowrap; padding-left: 8px; padding-right: 8px; }
.um-table thead th { white-space: nowrap; }
.act-warn { margin-left: 12px; }
.um-table td { height: 84px; }
.um-name { display: grid; gap: 2px; min-width: 0; }
.um-handle { font-size: 16px; font-weight: 700; color: #ffffff; overflow-wrap: anywhere; }
.um-disp { font-size: 12px; color: #cbd5e1; overflow-wrap: anywhere; }
.um-table td.num { line-height: 1.25; }
.um-n { display: block; font-size: 20px; font-weight: 700; }
.um-at { display: block; font-size: 12px; color: #cbd5e1; font-weight: 400; }
.um-none { color: #94a3b8; }
.pa-card-top .um-name { flex: 1; }

/* ダッシュボード詳細アナリティクス：数値の内訳は、円グラフの下に文字で内訳を表示する */
.viz-donut-wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.viz-donut-wrap .viz-donut-legend { width: 100%; max-width: 340px; font-size: 14px; gap: 10px; }
.viz-donut-wrap .viz-donut-legend li { justify-content: flex-start; }
.viz-donut-wrap .viz-donut-legend li span:nth-child(2) { flex: 1; }
.viz-donut-wrap .viz-donut-legend li strong { min-width: 4.5em; text-align: right; }
.viz-donut-wrap .viz-donut-legend li span:last-child { min-width: 3.8em; text-align: right; }

/* ===== v4.0：上向きの選択メニュー（削除期限・クレジット更新時刻）／ ダッシュボード ===== */
.um-keep-menu { position: absolute; left: 0; bottom: calc(100% + 6px); z-index: 40; min-width: 100%; display: grid; background: #0f172a; border: 1px solid #475569; border-radius: 8px; padding: 4px; box-shadow: 0 8px 24px rgba(0,0,0,.45); max-height: 280px; overflow-y: auto; }
.um-keep-menu.hidden { display: none; }
.um-keep-item { text-align: left; white-space: nowrap; padding: 6px 14px; border-radius: 6px; font-size: 12px; color: #ffffff; background: transparent; }
.um-keep-item:hover { background: #1e293b; }
.um-keep-item.is-on { background: #008080; font-weight: 700; }
.dash-grid { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dash-card { background: #1e293b; border: 1px solid #334155; border-radius: 12px; padding: 20px; min-width: 0; }
.dash-card.wide2 { grid-column: span 2; }
.dash-card.wide4 { grid-column: span 4; }
.dash-label { font-size: 12px; color: #cbd5e1; font-weight: 500; }
.dash-num { font-size: 28px; font-weight: 700; color: #ffffff; margin-top: 4px; line-height: 1.2; }
.dash-num small { font-size: 12px; font-weight: 400; color: #cbd5e1; margin-left: 4px; }
.dash-sub { font-size: 12px; color: #cbd5e1; margin-top: 6px; }
.dash-scroll { max-height: 210px; overflow-y: auto; margin-top: 8px; font-size: 12px; }
.dash-scroll table { width: 100%; border-collapse: collapse; }
.dash-scroll td { padding: 5px 6px; border-bottom: 1px solid #334155; color: #e2e8f0; vertical-align: top; }
.dash-scroll td.usd { text-align: right; white-space: nowrap; }
.dash-err { overflow-x: auto; margin-top: 8px; }
.dash-err table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 12px; text-align: left; }
.dash-err th { background: #0f172a; color: #cbd5e1; padding: 8px; white-space: nowrap; }
.dash-err td { padding: 8px; border-bottom: 1px solid #334155; color: #e2e8f0; vertical-align: top; overflow-wrap: anywhere; }
.dash-cnt { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #dc2626; color: #fff; font-size: 11px; font-weight: 700; }
.dash-empty { color: #94a3b8; padding: 8px 0; font-size: 12px; }
.heading-count { font-weight: 700; color: #ffffff; font-size: 14px; }
@media (max-width: 1023px) { .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash-card.wide4 { grid-column: span 2; } }
@media (max-width: 639px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } .dash-card.wide2, .dash-card.wide4 { grid-column: span 1; } }

/* ===== v4.1：クレジット更新時刻のメニューは下向き／ユーザー管理の選択列の幅 ===== */
.um-keep-menu.down { bottom: auto; top: calc(100% + 6px); }
.um-table col.c-chk { width: 9%; } .um-table col.c-user { width: 17%; } .um-table col.c-r { width: 11%; } .um-table col.c-view { width: 15%; }
.um-table .um-chk-head, .um-table .um-chk-cell { text-align: center; padding-left: 6px; padding-right: 6px; }

/* ===== v4.2：クレジット欄の更新時刻ボタンは、カードの右下に置く ===== */
.dash-card.credit { display: flex; flex-direction: column; position: relative; }
.dash-card.credit .credit-hour { margin-top: auto; padding-top: 12px; display: flex; justify-content: flex-end; }
.dash-card.credit .um-keep-menu.down { left: auto; right: 0; }

/* ===== v4.3：投稿分析の一括選択列 ／ 削除期限メニューは下向き ===== */
.pa-table col.c-chk2 { width: 8%; } .pa-table col.c-text { width: 22%; } .pa-table col.c-img { width: 8%; } .pa-table col.c-time { width: 10%; }
.pa-table col.c-num1 { width: 10%; } .pa-table col.c-num2 { width: 12%; } .pa-table col.c-num3 { width: 7%; } .pa-table col.c-num4 { width: 7%; } .pa-table col.c-num5 { width: 7%; } .pa-table col.c-view { width: 9%; }
.um-table col.c-chk { width: 9%; } .um-table col.c-user { width: 17%; } .um-table col.c-r { width: 11%; } .um-table col.c-view { width: 15%; }
.pa-table .pa-chk-head, .pa-table .pa-chk-cell { text-align: center; padding-left: 6px; padding-right: 6px; }

/* ===== v4.4：クレジット欄の更新時刻ボタンは、カードの右上に置く ===== */
.dash-card.credit .credit-hour { position: absolute; top: 14px; right: 14px; margin: 0; padding: 0; }

/* ===== v4.5：Bazz 将軍（ロゴ）／ダッシュボードの配置／自動削除の注記／パスワードの目／スマホ表示 ===== */

/* ロゴ（画像だけ。丸く切り抜き、金色のやわらかい光） */
.brand-logo, .login-logo { display: block; object-fit: contain; }   /* 切り抜かず、透明のまま表示 */
.brand-text { display: none; }
.brand-logo { width: 112px; height: 112px; }
.login-logo { width: 216px; height: 216px; }
.brand-box { padding-top: 22px; padding-bottom: 22px; }

/* 自動削除の注記 */
.auto-note { font-size: 13px; font-weight: 700; color: #fbbf24; margin: 0; }
.pa-purge { display: block; font-size: 11px; color: #fbbf24; margin-top: 3px; line-height: 1.3; font-weight: 400; }

/* ダッシュボード */
.dash-note { font-size: 16px; color: #ffffff; text-align: left; margin: 0; }
.dash-card.dash-count { min-height: 160px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.dash-count .dash-label { font-size: 16px; color: #ffffff; margin: 0; }
.dash-count .dash-num { font-size: 30px; margin-top: 8px; }
.dash-count .dash-num small { font-size: 30px; font-weight: 700; color: #ffffff; margin-left: 2px; }
.dash-card.credit { display: flex; flex-direction: column; position: relative; }
.dash-card.credit .dash-label.c { font-size: 16px; color: #ffffff; text-align: center; margin: 0; }
.dash-card.credit .dash-num.c { text-align: center; }
.dash-card.credit .dash-subs { margin-top: 18px; text-align: left; }
.dash-card.credit .dash-sub { font-size: 12px; text-align: left; margin-top: 4px; }
.dash-sub-top { margin-top: 2px; }

/* パスワードの目のアイコン */
.pw-wrap { position: relative; }
.pw-wrap .pw-input { padding-right: 48px; }
.pw-eye { position: absolute; top: 0; right: 0; bottom: 0; width: 46px; display: flex; align-items: center; justify-content: center; background: transparent; border: 0; color: #cbd5e1; cursor: pointer; font-size: 16px; border-radius: 0 8px 8px 0; }
.pw-eye:hover { color: #ffffff; }
.pw-eye:focus-visible { outline: 2px solid #5eead4; outline-offset: -2px; }

/* メニューのボタン・背景（スマホ以外では出さない） */
.menu-btn { display: none; }
.menu-backdrop { display: none; }

/* ============================ スマホ（767px以下だけ） ============================ */
@media (max-width: 767px) {
  html, body { overflow-x: clip; }   /* hiddenだと、固定表示（sticky）が効かなくなるため clip */
  body.menu-open { overflow: hidden; }

  /* ドロワー（ハンバーガーメニュー） */
  #sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: 288px; max-width: 86vw; min-height: 0 !important; height: 100%; z-index: 60; overflow-y: auto; transform: translateX(-102%); transition: transform 0.22s ease; border-right: 1px solid #334155; box-shadow: none; }
  body.menu-open #sidebar { transform: none; box-shadow: 8px 0 30px rgba(0, 0, 0, 0.5); }
  .menu-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.55); display: block; opacity: 0; pointer-events: none; transition: opacity 0.2s ease; }
  body.menu-open .menu-backdrop { opacity: 1; pointer-events: auto; }
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 8px; border: 1px solid #475569; background: #0f172a; color: #ffffff; font-size: 18px; flex-shrink: 0; }
  .brand-logo { width: 96px; height: 96px; }
  #sidebar nav a, #sidebar nav button { min-height: 44px; }
  #sidebar nav { font-size: 15px; }

  /* ヘッダー */
  .app-header { height: 56px !important; padding: 0 12px !important; position: sticky; top: 0; z-index: 40; }
  .app-header h1 { font-size: 18px !important; }

  /* 横の余白をなくす（カードは画面いっぱい。上下の区切り線は残す） */
  .main-pad.p-6 { padding: 0 !important; }
  .main-pad > section, .main-pad > section.content-section { border-left: 0 !important; border-right: 0 !important; border-radius: 0 !important; padding: 12px !important; }
  .main-pad .p-5 { padding: 10px !important; }
  .main-pad .rounded-xl { border-radius: 0; }
  .dash-card { border-left: 0; border-right: 0; border-radius: 0; padding: 12px; }
  #sec-dashboard { padding: 0 !important; }
  #sec-dashboard .dash-note { padding: 12px 12px 0; }
  .dash-grid { gap: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-card.credit, .dash-card.wide2, .dash-card.wide4 { grid-column: span 2; }
  .dash-card.dash-count { min-height: 130px; border-top: 1px solid #334155; }

  /* 文字：本文・表は14px以上、見出しは18px */
  .main-pad h2 { font-size: 18px !important; line-height: 1.35; }
  .main-pad h3 { font-size: 16px !important; }
  .main-pad .text-xs, .main-pad .text-\[11px\], .main-pad .text-\[10px\], .main-pad label, .main-pad td, .main-pad th { font-size: 14px !important; }
  .main-pad input:not([type=checkbox]), .main-pad select, .main-pad textarea { font-size: 16px !important; }   /* 16px未満だと、iPhoneが入力時に画面を拡大してしまう */
  /* 小さい灰色の説明文は、白・14px・行間広め */
  .main-pad .text-slate-400, .main-pad .text-slate-500, .main-pad .text-slate-300 { color: #ffffff !important; }
  .main-pad p.text-slate-400, .main-pad p.text-slate-500, .main-pad span.text-slate-400, .main-pad span.block.text-slate-400, .main-pad .text-\[11px\] { font-size: 14px !important; line-height: 1.6; }
  .auto-note { font-size: 14px; }
  .pa-purge { font-size: 13px; color: #fbbf24; }
  .dash-sub, .dash-empty, .pa-card-nums .l { color: #ffffff; }
  .dash-sub { font-size: 14px; }
  .dash-card.credit .dash-sub { font-size: 14px; }
  .dash-scroll { font-size: 14px; }
  .dash-note { font-size: 16px; }
  .dash-label { font-size: 14px; color: #ffffff; }

  /* ボタン：高さ36px前後、間隔8px */
  .main-pad button.btn-primary, .main-pad button.btn-danger, .main-pad button.btn-accent, .main-pad button.btn-neutral,
  .main-pad a.btn-primary, .main-pad a.btn-accent { min-height: 36px; }
  .main-pad .m-cards .btn-primary, .main-pad .m-cards .btn-danger, .main-pad .m-cards .btn-accent { min-height: 32px; }

  /* チェックボックス：見た目20px、押せる範囲40px */
  .chk { width: 20px; height: 20px; }
  .chk::before { content: ''; position: absolute; left: -10px; top: -10px; right: -10px; bottom: -10px; }
  .chk:checked::after { left: 5px; top: 0; width: 6px; height: 11px; }
  .chk:indeterminate::after { left: 2px; top: 6px; width: 12px; }

  /* 上のボタン：全幅・同じ大きさ・中央 */
  .top-actions { flex-direction: column; align-items: stretch !important; gap: 8px !important; }
  .top-actions > button, .top-actions > div, .top-actions .seg-group { width: 100%; }
  .top-actions > button, .top-actions #umKeepBtn { justify-content: center; text-align: center; min-height: 40px; }
  .top-actions #umKeepWrap { display: block; }
  .top-actions #umKeepBtn { width: 100%; }
  .top-actions .seg-group { display: flex; }
  .top-actions .seg-btn { flex: 1 1 0; white-space: nowrap; min-height: 40px; padding-left: 4px; padding-right: 4px; }
  #sec-analytics-summary h2 { font-size: clamp(14px, 5vw, 18px) !important; white-space: nowrap; word-break: keep-all; }

  /* 並び替え：ラベルを上、選択を全幅 */
  .pa-sortbar { flex-direction: column; align-items: stretch; gap: 6px; }
  .pa-sortbar label { color: #ffffff !important; }
  .pa-sortbar select { width: 100%; min-height: 40px; }

  /* 選択中：N件 と 削除ボタンは2段、ボタンは中央 */
  .bulk-bar { flex-direction: column; align-items: stretch !important; gap: 8px !important; }
  .bulk-bar > p { text-align: left; }
  .bulk-bar > button { width: 100%; justify-content: center; min-height: 40px; }

  /* 表 → 縦のカード（予約投稿管理／自動返信 保存／自動返信 履歴） */
  .m-cards, .m-cards tbody, .m-cards tr, .m-cards td { display: block; width: 100%; }
  .m-cards { border: 0; }
  .m-cards thead { display: block; }
  .m-cards thead tr { display: block; background: transparent; border: 0; padding: 0; margin: 0 0 8px; }
  .m-cards thead th { display: none; }
  .m-cards thead th:first-child { display: flex; align-items: center; justify-content: flex-start; gap: 12px; padding: 4px 0 !important; text-align: left; background: transparent; }
  .m-cards thead th:first-child .block { display: inline !important; margin: 0 !important; font-size: 14px !important; }
  .m-cards tbody { border: 0 !important; }
  .m-cards tbody > tr { background: #0f172a; border: 1px solid #334155 !important; border-radius: 10px; margin: 0 0 10px; padding: 10px; }
  .m-cards td { padding: 5px 0 !important; border: 0 !important; white-space: normal !important; max-width: none !important; text-align: left !important; overflow-wrap: anywhere; display: block; }
  .m-cards td[data-label]::before { content: attr(data-label); display: block; color: #cbd5e1; font-size: 13px; margin-bottom: 1px; }
  .m-cards td > * { max-width: 100%; }
  .m-cards td.mc-chk { display: flex; justify-content: flex-start; padding-bottom: 8px !important; border-bottom: 1px solid #334155 !important; margin-bottom: 4px; }
  .m-cards td.mc-empty { display: none; }
  .m-cards td.mc-ops { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding-top: 10px !important; }
  .m-cards td.mc-ops > * { margin: 0 !important; flex: 1 1 110px; text-align: center; justify-content: center; }
  .m-cards td[colspan] { display: block; text-align: center !important; }
  .m-cards img, .m-cards video { height: 64px; }

  /* 予約日時：4つの選択を2×2 */
  .dt-row { display: grid !important; grid-template-columns: 1fr 1fr; gap: 10px; }
  .dt-native { font-size: 18px !important; min-height: 48px; width: 100%; }
  .dt-btn { width: 100%; }

  /* アカウント連携 */
  .cb-url { overflow-wrap: anywhere; word-break: break-all; }
  .cb-url span { word-break: break-all; }
  .acc-row { flex-direction: column; align-items: stretch !important; gap: 10px; }
  .acc-btns { justify-content: flex-start; gap: 8px; }
  .acc-btns > * { margin: 0 !important; }

  /* 投稿分析・ユーザー管理のカード */
  .pa-card { padding: 10px; }
  .pa-card-top { flex-wrap: wrap; }
  .pa-card-top .btn-view, .um-card-btns { order: 5; width: 100%; }
  .um-card-btns { display: flex; gap: 8px; justify-content: center; }
  .um-card-btns .btn-view { flex: 1 1 0; width: auto; min-width: 0; }
  .pa-card-top > .btn-view { height: 40px; }
  .pa-card-time { flex: 1; font-size: 15px; }
  .pa-card-mid:has(.pa-thumb.empty) .pa-thumb.empty { display: none; }
  .pa-card-mid { min-height: 0; }
  .pa-thumb.empty { display: none; }
  .pa-card-nums .l { font-size: 13px; }

  /* グラフ */
  #lineChart, #donutChart { max-width: 100%; overflow: hidden; }
  #lineChart svg { max-width: 100%; height: auto; }
  .viz-toggle { min-height: 36px; }

  /* エラー報告：縦に積む */
  .dash-err table { min-width: 0; }
  .dash-err thead { display: none; }
  .dash-err table, .dash-err tbody, .dash-err tr, .dash-err td { display: block; width: 100%; }
  .dash-err tr { background: #0f172a; border: 1px solid #334155; border-radius: 10px; padding: 8px 10px; margin-bottom: 10px; }
  .dash-err td { border: 0 !important; padding: 4px 0 !important; font-size: 14px; }
  .dash-err td[data-label]::before { content: attr(data-label); display: block; color: #cbd5e1; font-size: 13px; }
  .dash-err td .btn-danger { min-height: 36px; width: 100%; }
  .dash-scroll td { font-size: 14px; }
}

/* ログイン画面（スマホは大きく） */
@media (max-width: 767px) {
  .login-body { align-items: flex-start; padding: 0 !important; }
  .login-card { max-width: none !important; border-radius: 0 !important; border-left: 0 !important; border-right: 0 !important; min-height: 100vh; padding: 24px !important; box-shadow: none; display: flex; flex-direction: column; justify-content: center; }
  .login-logo { width: 192px; height: 192px; }
  .login-guide { margin-top: 16px; font-size: 15px !important; color: #ffffff !important; line-height: 1.6; }
  .login-label { font-size: 16px !important; margin-bottom: 6px !important; color: #ffffff !important; }
  .login-input { font-size: 18px !important; height: 56px; }
  .login-btn { font-size: 18px !important; height: 56px; }
  .login-card .pw-eye { width: 56px; font-size: 20px; }
  .login-card .text-xs { font-size: 15px !important; }
}
@media (max-width: 767px) { .um-card-btns > :not(a) { display: none; } }
.dash-note { margin-bottom: 6px; }


/* ===== v4.6：メニュー（右から開く・メニュー文字）／総合更新／新規フォロー／確認のチェック欄 ===== */
.refresh-all { min-height: 44px; font-size: 15px; }
.refresh-all[disabled] { opacity: 0.7; cursor: wait; }
.um-table col.c-user { width: 26%; }
.fl-table col.c-chk { width: 12%; } .fl-table col.c-user { width: 36%; } .fl-table col.c-time2 { width: 30%; } .fl-table col.c-view { width: 22%; }
.fl-table td { height: 72px; }
.fl-card-time { font-size: 14px; color: #ffffff; }
.dash-card.credit { align-self: start; }
.ui-modal-check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #ffffff; margin: -8px 0 18px; cursor: pointer; }
.ui-modal-check .chk { flex-shrink: 0; }
.menu-btn-label { display: none; }
.menu-close { display: none; }

@media (max-width: 767px) {
  /* メニューは、右から開く */
  #sidebar { left: auto; right: 0; transform: translateX(102%); border-right: 0; border-left: 1px solid #334155; width: 310px; max-width: 90vw; }
  body.menu-open #sidebar { transform: none; box-shadow: -8px 0 30px rgba(0, 0, 0, 0.5); }
  /* メニューの一番上は「Bazz 将軍」（白・16px）。画像は出さない。メニュー内でスクロールしても固定 */
  .brand-box { position: sticky; top: 0; z-index: 3; background: #1e293b; padding: 14px 16px !important; justify-content: center; }
  .menu-close { display: block; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); height: 36px; padding: 0 14px; border: 1px solid #475569; border-radius: 8px; background: #008080; color: #ffffff; font-size: 14px; font-weight: 700; cursor: pointer; }
  .brand-box { position: sticky; }
  .brand-logo { display: none; }
  .brand-text { display: block; color: #ffffff; font-size: 16px; font-weight: 700; letter-spacing: 0.04em; }
  /* 操作アカウントは、固定しない（メニューの中身と一緒にスクロール） */
  #sidebar nav { overflow: visible; flex: 0 0 auto; }
  /* 上のバー：ページ名（左）＋ 三本線とメニューの文字（右）。常に固定 */
  .app-header { position: fixed !important; top: 0; left: 0; right: 0; z-index: 40; height: 64px !important; padding: 6px 12px !important; align-items: center; }
  main { padding-top: 64px; }
  .app-header > div { min-width: 0; flex: 1 1 auto; }
  .app-header > div:first-child { justify-content: center; padding-left: 66px; }   /* ページ名を画面の中央に（右のメニューボタンの幅ぶん左を空ける） */
  .app-header h1 { text-align: center; }
  .app-header h1 { white-space: nowrap; overflow: hidden; text-overflow: clip; font-size: clamp(15px, 4.8vw, 18px) !important; }
  .op-chip { display: none !important; }
  .menu-btn { order: 2; flex-direction: column; width: 56px; height: 52px; gap: 2px; padding: 0; margin-left: 10px; }
  .menu-btn-label { display: block; font-size: 12px; line-height: 1; color: #ffffff; font-weight: 700; }
  /* メニューの文字は、親18px・配下17px・改行しない */
  #sidebar nav a, #sidebar nav button:not(.refresh-all) { font-size: 18px; white-space: nowrap; display: flex; align-items: center; }
  #sidebar nav .nav-sub { font-size: 17px; min-height: 48px; display: flex; align-items: center; padding-top: 0; padding-bottom: 0; }
  #sidebar nav .nav-item, #sidebar nav .accordion-group > button { min-height: 52px; }
  #sidebar nav .refresh-all { font-size: 17px; min-height: 52px; margin-bottom: 4px; }
  #sidebar .text-xs { font-size: 14px; }
  #accountSelector { font-size: 17px; min-height: 48px; }
  /* 新規フォローのカード */
  .fl-card-time { padding: 2px 0; }
  .ui-modal-check { font-size: 15px; }
  .ui-modal-btn { min-height: 48px; flex: 1 1 0; }
  .ui-modal-actions { gap: 10px; }
  .ui-modal-box { width: 92vw; max-width: 92vw; }
}


/* ===== v5.0：グラフ上の項目ボタンを、同じ幅で端を揃えて並べる ===== */
@media (max-width: 767px) {
  #lineToggles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  #lineToggles .viz-toggle { width: 100%; min-width: 0; justify-content: flex-start; white-space: nowrap; }
}
@media (min-width: 768px) {
  #lineToggles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; max-width: 620px; }
  #lineToggles .viz-toggle { width: 100%; justify-content: flex-start; white-space: nowrap; }
}

/* ===== v5.1：「プロフアクセス」を、改行せず1行で表示 ===== */
.pa-card-nums .l { white-space: nowrap; }
@media (max-width: 767px) { .pa-card-nums .l { font-size: 12px; letter-spacing: -0.02em; } }

/* ===== v5.2：自動返信 履歴の「自動返信文」（PCだけ、行の高さを約2倍にして最大140文字を表示） ===== */
@media (min-width: 768px) {
  td.hist-reply { white-space: normal; width: 27rem; min-width: 27rem; max-width: 27rem; line-height: 1.5; word-break: break-all; vertical-align: middle; height: 96px; }
}

/* ===== v5.3：自動返信 履歴（スマホだけ）日時／自動返信文／種類／結果／ボタンを、薄い横線で区切って縦に並べる ===== */
@media (max-width: 767px) {
  #sec-auto-reply-history .m-cards tbody > tr { padding: 4px 12px 12px; }
  #sec-auto-reply-history .m-cards td:not(.mc-chk) { padding: 12px 0 !important; border-bottom: 1px solid rgba(148, 163, 184, 0.25) !important; }
  #sec-auto-reply-history .m-cards td[data-label="日時"] { font-size: 16px; }
  #sec-auto-reply-history .m-cards td[data-label="自動返信文"] { font-size: 15px; line-height: 1.7; }
  #sec-auto-reply-history .m-cards td[data-label="種類"],
  #sec-auto-reply-history .m-cards td[data-label="結果"] { display: flex; align-items: baseline; gap: 16px; font-size: 16px; }
  #sec-auto-reply-history .m-cards td[data-label="種類"]::before,
  #sec-auto-reply-history .m-cards td[data-label="結果"]::before { display: inline-block; min-width: 3em; margin: 0; font-size: 14px; }
  #sec-auto-reply-history .m-cards td[data-label="結果"] { border-bottom: 0 !important; padding-bottom: 0 !important; }   /* 結果が、カードの最後の行 */
}

/* ===== v5.4：自動返信 履歴の日時（スマホだけ「10月15日 18:01分」を、見出しと同じ1行に） ===== */
.dt-sp { display: none; }
@media (max-width: 767px) {
  .dt-pc { display: none; }
  .dt-sp { display: inline; }
  #sec-auto-reply-history .m-cards td[data-label="日時"] { display: flex; align-items: baseline; gap: 16px; font-size: 16px; }
  #sec-auto-reply-history .m-cards td[data-label="日時"]::before { display: inline-block; min-width: 3em; margin: 0; font-size: 14px; }
}

/* ===== v5.5：自動返信 保存（スマホだけ）名前／投稿時間／アクション条件／返信の種類と自動返信文／実行状況を、薄い横線で区切って縦に並べる。ONは右上 ===== */
.st-sp, .rp-sp { display: none; }
@media (max-width: 767px) {
  #sec-auto-reply-saved .m-cards td.mc-empty-sp { display: none; }
  #sec-auto-reply-saved .m-cards td.mc-chk { align-items: center; justify-content: space-between; }
  .st-sp { display: inline-block; }
  .st-pc, .rp-pc { display: none; }
  #sec-auto-reply-saved .m-cards tbody > tr { padding: 4px 12px 12px; }
  #sec-auto-reply-saved .m-cards td:not(.mc-chk):not(.mc-ops) { padding: 12px 0 !important; border-bottom: 1px solid rgba(148, 163, 184, 0.25) !important; font-size: 16px; }
  #sec-auto-reply-saved .m-cards td[data-label="返信の種類・内容"]::before { content: "返信の種類"; display: inline-block; margin: 0 16px 0 0; min-width: 5.5em; font-size: 14px; }
  #sec-auto-reply-saved .m-cards td[data-label="返信の種類・内容"] .rp-type { display: inline; }
  #sec-auto-reply-saved .m-cards .rp-sp { display: block; margin-top: 10px; font-size: 15px; line-height: 1.7; }
  #sec-auto-reply-saved .m-cards .rp-sp::before { content: "自動返信文"; display: block; color: #cbd5e1; font-size: 14px; margin-bottom: 2px; }
  #sec-auto-reply-saved .m-cards td[data-label="状態"]::before { display: none; }
  #sec-auto-reply-saved .m-cards td[data-label="状態"] { font-size: 15px; line-height: 1.7; }
  #sec-auto-reply-saved .m-cards td[data-label="状態"] .block { font-size: 15px !important; color: #ffffff; }
}

/* ===== v5.6：自動返信 保存（PC）スマホと同じ、縦並びのカード（画面の幅に合わせて、1〜3列に並べる） ===== */
@media (min-width: 768px) {
  #sec-auto-reply-saved .overflow-x-auto { overflow: visible; }
  #sec-auto-reply-saved .m-cards, #sec-auto-reply-saved .m-cards tbody, #sec-auto-reply-saved .m-cards tr, #sec-auto-reply-saved .m-cards td { display: block; width: 100%; }
  #sec-auto-reply-saved .m-cards { border: 0; }
  #sec-auto-reply-saved .m-cards thead { display: block; }
  #sec-auto-reply-saved .m-cards thead tr { display: block; background: transparent; border: 0; padding: 0; margin: 0 0 8px; }
  #sec-auto-reply-saved .m-cards thead th { display: none; }
  #sec-auto-reply-saved .m-cards thead th:first-child { display: flex; align-items: center; justify-content: flex-start; gap: 12px; padding: 4px 0 !important; text-align: left; background: transparent; }
  #sec-auto-reply-saved .m-cards thead th:first-child .block { display: inline !important; margin: 0 !important; font-size: 14px !important; }
  #sec-auto-reply-saved .m-cards tbody { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; border: 0 !important; }
  #sec-auto-reply-saved .m-cards tbody > tr { background: #0f172a; border: 1px solid #334155 !important; border-radius: 10px; margin: 0; padding: 4px 14px 14px; }
  #sec-auto-reply-saved .m-cards td { white-space: normal !important; max-width: none !important; text-align: left !important; overflow-wrap: anywhere; }
  #sec-auto-reply-saved .m-cards td[data-label]::before { content: attr(data-label); display: block; color: #cbd5e1; font-size: 13px; margin-bottom: 1px; }
  #sec-auto-reply-saved .m-cards td[colspan] { grid-column: 1 / -1; text-align: center !important; }
  #sec-auto-reply-saved .m-cards td.mc-chk { display: flex; align-items: center; justify-content: space-between; padding: 10px 0 !important; border-bottom: 1px solid #334155 !important; }
  #sec-auto-reply-saved .m-cards td.mc-empty-sp { display: none; }
  #sec-auto-reply-saved .m-cards td.mc-ops { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding-top: 12px !important; }
  #sec-auto-reply-saved .m-cards td.mc-ops > * { margin: 0 !important; flex: 1 1 110px; text-align: center; justify-content: center; padding: 8px 0 !important; }
  #sec-auto-reply-saved .m-cards td:not(.mc-chk):not(.mc-ops) { padding: 12px 0 !important; border-bottom: 1px solid rgba(148, 163, 184, 0.25) !important; font-size: 15px; }
  #sec-auto-reply-saved .dt-pc, #sec-auto-reply-saved .st-pc, #sec-auto-reply-saved .rp-pc { display: none; }
  #sec-auto-reply-saved .dt-sp { display: inline; }
  #sec-auto-reply-saved .st-sp { display: inline-block; }
  #sec-auto-reply-saved .m-cards td[data-label="返信の種類・内容"]::before { content: "返信の種類"; display: inline-block; margin: 0 16px 0 0; min-width: 5.5em; font-size: 14px; }
  #sec-auto-reply-saved .m-cards td[data-label="返信の種類・内容"] .rp-type { display: inline; }
  #sec-auto-reply-saved .m-cards .rp-sp { display: block; margin-top: 10px; font-size: 15px; line-height: 1.7; }
  #sec-auto-reply-saved .m-cards .rp-sp::before { content: "自動返信文"; display: block; color: #cbd5e1; font-size: 14px; margin-bottom: 2px; }
  #sec-auto-reply-saved .m-cards td[data-label="状態"]::before { display: none; }
  #sec-auto-reply-saved .m-cards td[data-label="状態"] .block { font-size: 15px !important; color: #ffffff; }
}

/* ===== v5.7：自動返信 保存 — 返信の種類の下に出ていた、短い本文（重複）を、PC・スマホともに消す ===== */
#sec-auto-reply-saved .rp-pc { display: none !important; }

/* ===== 操作アカウント：先頭の印を、オレンジの四角（🟧）に。スマホは、上の余白を広げてバランスを取る ===== */
.acc-sq { position: absolute; left: 12px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 3px; background: #f97316; pointer-events: none; }
@media (max-width: 767px) {
  #sidebar .acc-box { padding-top: 24px !important; padding-bottom: 20px !important; }
}

/* ===== X 投稿 詳細 分析（スマホのカード）日時 → 数値 → 文章 → ボタン の順に、薄い横線で区切る ===== */
.pa-card.pa-post { gap: 0; padding: 4px 12px 12px; }
.pa-card.pa-post > div { padding: 12px 0; border-top: 1px solid rgba(148, 163, 184, 0.25); }
.pa-card.pa-post > div:first-child { border-top: 0; }
.pa-card.pa-post > .pa-card-btn { padding-bottom: 0; }
.pa-card-btn .btn-view { display: block; width: 100%; text-align: center; height: 44px; line-height: 44px; }
.pa-card-img:has(.pa-thumb.empty) { display: none; }
.pa-card.pa-post > .pa-card-img { display: block; }
.pa-card.pa-post > .pa-card-img:has(.pa-thumb.empty) { display: none; }
.acc-chev { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: 12px; line-height: 1; display: flex; align-items: center; }

/* ===== 自動返信文：1行で表示し、右端の「もっと見る」で全文を開く ===== */
.rp-sp .rp-text { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-sp .rp-more { flex: 0 0 auto; margin-left: 10px; padding: 0; border: 0; background: transparent; color: #5eead4; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap; text-decoration: underline; }
.rp-row { display: flex; align-items: flex-start; }
.rp-sp.open .rp-text { white-space: pre-line; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
@media (min-width: 768px) {
  #sec-auto-reply-saved .m-cards .rp-sp { display: block; }
  #sec-auto-reply-history .hr-sp { display: none !important; }
}
@media (max-width: 767px) {
  #sec-auto-reply-history .hr-pc { display: none; }
  #sec-auto-reply-history .m-cards .hr-sp { display: block; margin-top: 0; font-size: 15px; line-height: 1.7; }
  #sec-auto-reply-history .m-cards .hr-sp::before { display: none; }
}
.rp-sp .rp-close { display: none; }
.rp-sp.open .rp-more { display: none; }
.rp-sp.open .rp-close { display: block; margin: 12px auto 0; padding: 8px 28px; border: 1px solid #64748b; border-radius: 8px; background: #334155; color: #ffffff; font-size: 14px; font-weight: 700; cursor: pointer; }
#accountSelector { padding-left: 29px !important; }   /* 🟧と@の間を、半角スペースくらいに */
.pa-card.pa-post > .um-card-btns { padding-bottom: 0; }

/* ===== スマホ：ボタンの上には、必ず薄い横線 ===== */
.pa-card.pa-post > .um-card-btns { padding-top: 12px; }
@media (max-width: 767px) {
  #sec-post-status .m-cards td.mc-ops { border-top: 1px solid rgba(148, 163, 184, 0.25) !important; margin-top: 8px; padding-top: 12px !important; }
  #sec-auto-reply-saved .m-cards td.mc-ops { border-top: 1px solid rgba(148, 163, 184, 0.25) !important; margin-top: 0; padding-top: 12px !important; }
  .acc-row .acc-btns { border-top: 1px solid rgba(148, 163, 184, 0.25); padding-top: 12px; }
}

/* ===== スマホ：登録済みアカウントの表示名は、どんなに長くても1行（はみ出す分は「…」） ===== */
@media (max-width: 767px) {
  .acc-row > div:first-child { min-width: 0; width: 100%; }
  .acc-row > div:first-child > p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 767px) {
  .acc-row .acc-btns { flex-wrap: nowrap; white-space: nowrap; }   /* 選択中・切替 と 削除 は、1行 */
  .acc-row .acc-btns > * { flex: 0 0 auto; }
}

/* ===== スマホ：箱の中に、さらに箱がある所の、左右の余白をなくす（画面の左右の余白は12pxだけ） ===== */
@media (max-width: 767px) {
  #sec-account-manage > .bg-dark-card { padding-left: 0 !important; padding-right: 0 !important; border: 0 !important; background: transparent !important; }
  #sec-post-create .bg-dark-card.p-5 { padding-left: 0 !important; padding-right: 0 !important; border-left: 0 !important; border-right: 0 !important; border-radius: 0 !important; }
  #sec-auto-reply-manage > .bg-dark-bg.p-5, #sec-auto-reply-manage .bg-dark-bg.p-5 { padding-left: 0 !important; padding-right: 0 !important; border-left: 0 !important; border-right: 0 !important; border-radius: 0 !important; }
}

/* ===== スマホ：チェックボックスは、全カードで左上 ===== */
@media (max-width: 767px) {
  .pa-card-top { align-items: flex-start !important; }
  .pa-card-top > .chk, .pa-card-top > input[type="checkbox"], .pa-card-top > label { margin-top: 2px; flex-shrink: 0; }
  .m-cards td.mc-chk { align-items: flex-start; }
}

/* ===== スマホ：「選択中：N件」と削除ボタンは、上のバーの下に固定（スクロールしても消えない） ===== */
@media (max-width: 767px) {
  .main-pad, main, .content-section { overflow: visible !important; }
  .bulk-bar { position: sticky; top: 64px; z-index: 35; background: #1e293b; padding: 8px 0 10px !important; margin: 0 !important; border-bottom: 1px solid rgba(148, 163, 184, 0.25); }
}

/* ===== メニュー：配下の項目の緑の帯を、親の項目（ダッシュボードなど）と同じ幅に（文字の位置は、そのまま） ===== */
#sidebar nav div:has(> .nav-sub) { padding-left: 0 !important; padding-right: 0 !important; }
#sidebar nav .nav-sub { padding-left: 44px !important; padding-right: 14px !important; }
.rule-extra { white-space: normal; }

/* ===== 自動返信 保存：見出し（名前・投稿時間・アクション条件）と中身の間を、しっかり1行あける（PC・スマホ） ===== */
#sec-auto-reply-saved .m-cards td[data-label="管理名称"]::before,
#sec-auto-reply-saved .m-cards td[data-label="投稿時間"]::before,
#sec-auto-reply-saved .m-cards td[data-label="アクション条件"]::before { display: block; margin-bottom: 10px; font-size: 14px; }
#sec-auto-reply-saved .m-cards .rp-sp::before { margin-bottom: 10px; }

/* ===== 自動返信 保存（PC）：ボタンの位置と、カード下の余白を、どのカードでも同じにする ===== */
@media (min-width: 768px) {
  #sec-auto-reply-saved .m-cards tbody > tr { display: flex; flex-direction: column; padding-bottom: 14px; }
  #sec-auto-reply-saved .m-cards tbody > tr > td.mc-ops { margin-top: auto; border-top: 1px solid rgba(148, 163, 184, 0.25) !important; padding: 14px 0 0 !important; }
  #sec-auto-reply-saved .m-cards tbody > tr > td[data-label="状態"] { border-bottom: 0 !important; padding-bottom: 14px !important; }
}

/* ===== 自動返信 履歴（PC）：表の文字（見出し・日時・自動返信文・種類・結果・ボタン）を、すべて同じ大きさに ===== */
@media (min-width: 768px) {
  #sec-auto-reply-history table th,
  #sec-auto-reply-history table td,
  #sec-auto-reply-history table td .btn-primary,
  #sec-auto-reply-history table td .hr-pc { font-size: 14px !important; line-height: 1.5; }
}

/* v61: クレジット残高・本日の消費は「〇〇円　$0.00」を1行で */
.dash-card.credit .dash-num.c { white-space: nowrap; font-size: 24px; }
.dash-card.credit .dash-sub.fx-note { white-space: nowrap; font-size: 11.5px; }
@media (max-width:767px){ .dash-card.credit .dash-sub.fx-note { font-size: 14px; } }

/* v62: 予約投稿管理（モバイルだけ）本文プレビュー1行＋「もっと見る」、ボタンは 削除 → 今すぐ投稿 */
.pv-sp { display: none; }
@media (max-width: 767px) {
  #sec-post-status .m-cards .pv-pc { display: none; }
  #sec-post-status .m-cards .pv-sp { display: block; margin-top: 2px; font-size: 16px; line-height: 1.7; }
  #sec-post-status .m-cards td.mc-ops .btn-danger { order: -1; }
}

/* v63: 予約投稿管理の No. ＝ PCは「6」、モバイルは「No.6」を横一列（#なし） */
.no-sp { display: none; }
@media (max-width: 767px) {
  #sec-post-status .m-cards td.mc-no::before { display: none !important; }
  #sec-post-status .m-cards td.mc-no .no-pc { display: none; }
  #sec-post-status .m-cards td.mc-no .no-sp { display: inline; }
}

/* v64: 予約投稿管理の注意書き ＝ PCは1行に横並び、モバイルは2行 */
.auto-note-2 { display: flex; flex-wrap: wrap; column-gap: 32px; row-gap: 4px; }
@media (max-width: 767px) { .auto-note-2 { flex-direction: column; } }

/* v65: 予約投稿作成・ツリーの画像の注意書きは、モバイルだけ左揃え */
@media (max-width: 767px) { .drop-zone .dz-note { text-align: left; } }

/* v66: 新規フォローの説明文は左揃え（モバイル・PC） */
#sec-new-follow > p { text-align: left; }

/* v67: 新規フォロー更新ボタン／確認画面の左揃えと外部リンク */
.ui-modal-box.ui-left .ui-modal-msg { text-align: left; }
.ui-modal-link { display: flex; justify-content: center; margin-top: 14px; }
.ui-modal-link .ui-modal-btn { display: inline-block; text-align: center; text-decoration: none; }
/* PC：見出しの行の、まん中にボタン（3列：見出し／ボタン／空き） */
.nf-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding-bottom: 12px; border-bottom: 1px solid #334155; }
.nf-title { margin: 0; }
.nf-btn-row { display: flex; justify-content: center; }
.nf-btn { white-space: nowrap; }
/* モバイル：見出し ／ 薄い線 ／ ボタン（中央） ／ 薄い線 */
@media (max-width: 767px) {
  .nf-head { display: block; padding-bottom: 0; border-bottom: 0; }
  .nf-title { padding-bottom: 12px; border-bottom: 1px solid rgba(148, 163, 184, 0.25); }
  .nf-btn-row { padding: 14px 0; border-bottom: 1px solid rgba(148, 163, 184, 0.25); }
  .nf-btn { min-height: 48px; padding-left: 28px; padding-right: 28px; font-size: 16px; }
}
.ui-modal-link .ui-modal-btn { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; }

/* v68: 費用上限の入力欄は、数字の前に「$」を最初から表示 */
.usd-field { display: flex; align-items: center; gap: 8px; }
.usd-mark { font-size: 16px; font-weight: 700; color: #ffffff; flex: 0 0 auto; }

/* v69: 費用上限の入力欄の横に、円を自動表示 */
.usd-yen { flex: 0 0 auto; font-size: 15px; font-weight: 700; color: #ffffff; white-space: nowrap; }

/* v70: クレジット上限設定の保存ボタン ＝ モバイルは中央、PCは左 */
.limit-save-row { display: flex; justify-content: flex-start; }
@media (max-width: 767px) { .limit-save-row { justify-content: center; } }

/* ===== v71 ユーザー管理（スマホ）：見つけた日時 と 削除日 ===== */
.um-dates { display: none; }
@media (max-width: 767px) {
  .pa-card.pa-post > .um-dates { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; color: #ffffff; white-space: nowrap; }
}

/* ===== v72 ユーザー管理（PC）：削除日の行ぶん、縦幅を増やす ===== */
.um-table td { height: 104px; }

/* ===== v73 「新規フォロー更新」ボタン：背景 #006eb0／文字 白（このボタンだけ） ===== */
#nfUpdateBtn:not(:disabled) { background-color: #006eb0; color: #ffffff; }
#nfUpdateBtn:not(:disabled):hover { background-color: #005a91; }

/* ===== v74 新着通知：全ページの上・中央。背景 #c70067／文字 白 ===== */
.nt-bar { display: flex; justify-content: center; }
.nt-bar[hidden] { display: none; }
.nt-btn { background-color: #c70067; color: #ffffff; font-weight: 700; font-size: 15px; padding: 10px 28px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,.35); white-space: nowrap; }
.nt-btn:hover { background-color: #a8005a; }
@media (max-width: 767px) { .nt-bar { padding: 12px 12px 0; } .nt-btn { min-height: 44px; font-size: 16px; } }

/* ===== v75 自動返信：止め方の一行／文面の追加／停止リスト ===== */
.opt-row { padding: 12px 0; border-top: 1px solid rgba(148, 163, 184, 0.25); border-bottom: 1px solid rgba(148, 163, 184, 0.25); }
.alt-row { display: grid; gap: 6px; }
.alt-row .alt-del { justify-self: end; }
#altAddBtn[hidden] { display: none; }
.stop-box { margin-top: 8px; padding-top: 16px; border-top: 1px solid rgba(148, 163, 184, 0.25); display: grid; gap: 8px; }
.stop-rows { display: grid; gap: 0; }
.stop-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid rgba(148, 163, 184, 0.18); }
.stop-name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; font-weight: 700; color: #ffffff; }
.stop-at { font-size: 12px; color: #cbd5e1; white-space: nowrap; }

/* ===== v76 ダッシュボード：クレジットの2枚を横いっぱいに、その下に消費明細（本日／直近6日）を縦に ===== */
.dash-card.credit { grid-column: span 2; }
@media (max-width: 639px) { .dash-card.credit { grid-column: span 1; } }

/* v77 PC：本日の明細と直近6日の明細を、横に2つ並べる */
@media (min-width: 1024px) { .dash-card.wide4.half { grid-column: span 2; } }

/* v77 PC：メニューは画面に固定する（ページをスクロールしても、メニューを押しても、メニューの位置が動かない。長いときはメニューの中だけスクロール） */
@media (min-width: 768px) {
  #sidebar { position: sticky; top: 0; align-self: flex-start; height: 100vh; min-height: 0 !important; overflow-y: auto; }
  /* メニューの中のスクロールバーは、細くして残す（下のカテゴリがあることが分かる。細いので、「分析・データ管理機能」は2行にならない） */
  #sidebar, #sidebar nav { scrollbar-width: thin; scrollbar-color: #475569 transparent; }
  #sidebar nav::-webkit-scrollbar { width: 6px; }
  #sidebar nav::-webkit-scrollbar-thumb { background: #475569; border-radius: 3px; }
  #sidebar nav::-webkit-scrollbar-track { background: transparent; }
  /* メニューを少し小さくして、下のカテゴリまで画面に入りやすくする */
  #sidebar .brand-logo { width: 80px; height: 80px; }
  #sidebar .brand-box { padding-top: 12px; padding-bottom: 12px; }
  #sidebar .acc-box { padding-top: 14px !important; padding-bottom: 12px !important; }
  #sidebar nav .nav-item, #sidebar nav .accordion-group > button { padding-top: 8px; padding-bottom: 8px; }
  #sidebar nav .nav-sub { padding-top: 6px; padding-bottom: 6px; }
  #sidebar nav .accordion-group > button span, #sidebar nav .nav-item span { white-space: nowrap; }
}

/* v77 自動返信の作成：返信テキスト入力欄の縦幅を1.5倍にする（PC：102→153px・スマホ：113→170px。別の返信テキストも1.5倍） */
#ruleContent { height: 153px; }
#ruleAlts textarea { height: 123px; }
@media (max-width: 767px) { #ruleContent { height: 170px; } #ruleAlts textarea { height: 137px; } }

/* v77 エラー報告：削除ボタンは右はしに、赤い背景・白い文字で、1行で表示する（PC） */
@media (min-width: 768px) {
  .dash-err td:last-child:not(.dash-empty), .dash-err th:last-child { width: 1%; white-space: nowrap; text-align: right; padding-right: 12px; }
  .dash-err td:last-child:not(.dash-empty) button { white-space: nowrap; background-color: #dc2626; color: #ffffff; padding: 6px 16px; }
  .dash-err td:last-child:not(.dash-empty) button:hover { background-color: #b91c1c; }
}

/* v77 エラー報告（スマホ）：削除ボタンは、カードの右上に、小さい赤い背景・白い文字で置く */
@media (max-width: 767px) {
  .dash-err tr { position: relative; }
  .dash-err td:last-child:not(.dash-empty) { position: absolute; top: 8px; right: 10px; width: auto; padding: 0 !important; }
  .dash-err td:last-child:not(.dash-empty) .btn-danger { width: auto; min-height: 34px; padding: 0 16px; white-space: nowrap; background-color: #dc2626; color: #ffffff; }
  .dash-err td[data-label="日時"] { padding-right: 90px !important; }
}

/* v80 PC：画面の高さが低い時は、メニューをさらに小さくして、下のカテゴリまで全部画面に入れる */
@media (min-width: 768px) and (max-height: 900px) {
  #sidebar .brand-logo { width: 56px; height: 56px; }
  #sidebar .brand-box { padding-top: 8px; padding-bottom: 8px; }
  #sidebar .acc-box { padding-top: 8px !important; padding-bottom: 8px !important; }
  #sidebar nav { padding-top: 10px; padding-bottom: 10px; }
  #sidebar nav > * + * { margin-top: 4px; }
  #sidebar nav .nav-item, #sidebar nav .accordion-group > button { padding-top: 5px; padding-bottom: 5px; }
  #sidebar nav .nav-sub { padding-top: 4px; padding-bottom: 4px; }
  #sidebar nav .refresh-all { padding-top: 8px; padding-bottom: 8px; }
  #sidebar nav > div.pt-4 { padding-top: 6px; margin-top: 6px; }
}
@media (min-width: 768px) and (max-height: 700px) {
  #sidebar .brand-logo { display: none; }
}

/* v81 モバイル：クレジット残高／本日のクレジット消費を、縦1列（各横いっぱい）に */
@media (max-width: 767px) { .dash-card.credit { grid-column: 1 / -1 !important; } }

/* v83 クレジット上限設定：入力欄の横幅を5ケタ分に（PC・モバイル共通） */
.lim-in { width: 8.5em; max-width: 100%; flex: 0 0 auto; }

/* v85 ログイン：ロゴを「枠の上端」と「ユーザーIDの見出し」の真ん中に置く（上の空き＝下の空き） */
.login-head { padding: 16px 0 24px; }   /* PC：枠の内側余白32px＋16px ＝ 下の48px（見出しとの間隔24px＋24px） */
.login-head .login-guide { margin-top: 16px; }
@media (max-width: 767px) {
  /* スマホ：「画面の上端」から「下の線（フォームの上端）」までを1つの枠にして、ロゴをその真ん中に置く */
  .login-head { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; padding: 24px 0; margin: -24px 0 0; }
  .login-card > form { margin-top: 12px !important; }
}

/* v86 ログイン：スマホのアドレスバー等を引いた「今見えている高さ」に合わせる（どの機種でもロゴが縦の真ん中） */
@supports (height: 100dvh) {
  .login-body { min-height: 100dvh; }
  @media (max-width: 767px) { .login-card { min-height: 100dvh; } }
}

/* v87 ID・パスワード変更：入力欄の薄い案内文（5ケタ以上／6ケタ以上） */
#new_user::placeholder, #new_pass::placeholder { color: #64748b; opacity: 1; }

/* v88 新着通知：スクロールしても画面の上に固定。押すと消える（固定も解除）。押すまで出続ける */
.nt-bar { position: sticky; top: 8px; z-index: 45; padding: 24px 0 0; pointer-events: none; }   /* ボタンの上下の余白をそろえる（下は、ページの余白24pxがある） */   /* 帯の部分は、下の画面を押せる */
.nt-btn { pointer-events: auto; }
@media (max-width: 767px) { .nt-bar { top: 64px; padding: 8px 12px 8px; } }   /* スマホは、上の固定バー（64px）の下 */

/* v89 ダッシュボードの案内文：2つの文の間に、薄い線 */
.dash-note-line { height: 0; border-top: 1px solid rgba(148, 163, 184, 0.3); margin: 8px 0 8px; }
@media (max-width: 767px) { .dash-note-line { margin: 10px 0 0; } }

/* v90 モバイルのダッシュボード：横幅いっぱいの区切り線を #ffdc00 に（予約件数の下の線、残高・消費・明細の各枠の線） */
@media (max-width: 767px) {
  #sec-dashboard .dash-card.credit,
  #sec-dashboard .dash-card.wide4 { border-top-color: #ffdc00; border-bottom-color: #ffdc00; }
  #sec-dashboard .dash-card.dash-count:nth-child(n+3) { border-bottom-color: #ffdc00; }
}


/* v92（v94で、動きを減らす設定でも白くなるように変更） 「全データ最新に更新」「新規フォロー更新」で更新が始まる時：画面全体が、1秒だけ、やわらかく白くなる（約0.5秒で濃さ50%、約1秒で元に戻る） */
.flash-ov { position: fixed; inset: 0; z-index: 2147483000; background: #f4f6f8; pointer-events: none; opacity: 0; animation: flashSoft 1s ease-in-out forwards; }
@keyframes flashSoft { 0% { opacity: 0; } 50% { opacity: 0.5; } 100% { opacity: 0; } }

/* v93 Xアカウント管理：名前 → 薄い線 → @ID → 薄い線 */
.acc-row > div:first-child { flex: 1 1 auto; min-width: 0; }
.acc-line { height: 0; border-top: 1px solid rgba(148, 163, 184, 0.3); margin: 8px 0; }

/* 反応 ユーザー（スマホ）：ユーザー・いいね・リポスト・リプライを1行に横並び */
.um-row { display: grid; grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(0, 1fr)); gap: 6px; align-items: center; }
.um-row .pa-card-top { min-width: 0; flex-wrap: nowrap; }
.um-row .pa-card-nums { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-column: span 3; }
.um-row .pa-card-nums .um-at-m { white-space: nowrap; font-size: 11px; color: #cbd5e1; }
.um-row .pa-card-nums .um-q-m { white-space: nowrap; font-size: 11px; }
.um-row .um-handle { font-size: 14px; }
.um-row .um-disp { display: none; }

/* 返信対象の投稿：「予約中の投稿」「Xに投稿したポスト」（PC：横に2つ／スマホ：縦に並べて、薄い線ではさむ） */
.pick-btns { display: flex; flex-direction: column; }
.pick-btn-wrap { padding: 8px 0; border-bottom: 1px solid rgba(148, 163, 184, 0.25); }
.pick-btn-wrap .pick-btn { display: block; width: 100%; height: 44px; }
.pick-btn.pick-on { box-shadow: 0 0 0 2px #ffffff; }
@media (min-width: 768px) {
  .pick-btns { flex-direction: row; gap: 8px; }
  .pick-btn-wrap { padding: 0; border-bottom: 0; }
  .pick-btn-wrap .pick-btn { width: auto; height: auto; }
}

/* PC：選んでいる方だけ緑、もう一方はグレー（元の色）。白い枠は、スマホだけ */
@media (min-width: 768px) {
  .pick-btn.pick-on { box-shadow: none; }
  .pick-btn:not(.pick-on) { background-color: #475569; }
  .pick-btn:not(.pick-on):hover { background-color: #334155; }
}
/* 「予約中の投稿から選択」ボタン：赤 #ba2636・文字白。選んでいる時は、PCもスマホも白い枠 */
#pickBtn-sched, #pickBtn-sched:not(.pick-on) { background-color: #ba2636; color: #ffffff; }
#pickBtn-sched:hover, #pickBtn-sched:not(.pick-on):hover { background-color: #9a1f2d; }
#pickBtn-sched.pick-on { box-shadow: 0 0 0 2px #ffffff; }
/* X 投稿 詳細 分析：投稿文章の大きさ（PC・スマホとも 15px → 13px、マイナス2px） */
.pa-text { font-size: 13px; }

/* 返信対象の投稿：一覧を閉じるボタン（PCは右端／スマホは縦の3つ目） */
.pick-close { display: block; width: 100%; height: 44px; background-color: transparent; color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.6); }
.pick-close:hover { background-color: rgba(148, 163, 184, 0.15); color: #ffffff; }
@media (min-width: 768px) {
  .pick-close-wrap { margin-left: auto; }
  .pick-close { width: auto; height: auto; }
}

/* 返信対象の投稿ボタンの並び：スマホは「予約中の投稿」が上、PCは「投稿したポスト」が左 */
.pick-w-sched { order: 1; }
.pick-w-done { order: 2; }
.pick-close-wrap { order: 3; }
@media (min-width: 768px) {
  .pick-w-sched, .pick-w-done, .pick-close-wrap { order: 0; }
}

/* 自動返信 保存：「いいね等…」と「送信済み…」の間を、1行あける */
/* 「リプライ・DM受信」と「いいね等」の間を1行あける。「送信済み」の上には薄い線を入れる */
#sec-auto-reply-saved .rule-extra + .rule-extra { margin-top: 1.5em !important; }
/* 件数の欄の上の、重なっていた薄い線を消す（上の欄の下線だけ残す）。上下の余白は、同じにする */
#sec-auto-reply-saved .rule-count { margin-top: 0 !important; padding-top: 0; border-top: 0; }
#sec-auto-reply-saved .rule-extra + .rule-count { margin-top: 10px !important; }

/* 自動返信 保存（スマホ）：状態の列の黄色の文（「対象の予約の投稿を待っています…」など）を、PCと同じ黄色にする */
#sec-auto-reply-saved .m-cards td[data-label="状態"] .block.text-amber-400 { color: #fbbf24 !important; }

/* X 投稿 詳細 分析：「返信」の列を消したぶん、投稿文の列を広げる（合計 100%） */
.pa-table col.c-text { width: 29%; }

/* ===== 反応 ユーザー（PC）：いいね・リプライ・リポストを左へ寄せ、リポストと「投稿ページ」の間をあける ===== */
@media (min-width: 768px) {
  #sec-user-manage .um-table col.c-chk { width: 7%; }
  #sec-user-manage .um-table col.c-user { width: 21%; }
  #sec-user-manage .um-table col.c-r { width: 11%; }
  #sec-user-manage .um-table col.c-view { width: 19.5%; }
  /* いいね・リプライ・リポストの数字と日時は、列の真ん中。「投稿を見る」「ユーザーを見る」は、同じ幅（列の幅が同じ） */
  #sec-user-manage .um-table thead th.num, #sec-user-manage .um-table td.num { text-align: center; padding-left: 4px; padding-right: 4px; }
}
/* ユーザー名（@…）と、表示名（🟧 Hana 🟧）の間を、1行あける */
#sec-user-manage .um-name { row-gap: 14px; }

/* ===== 反応 ユーザー（スマホだけ）：上の段「☐ @ユーザー名」→ 薄い線 → 下の段「いいね　リプライ　リポスト」→ 薄い線（下の線は、日時の行の上線） ===== */
.um-row { display: block; }
.um-row .pa-card-top { padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid rgba(148, 163, 184, 0.25); }
.um-row .um-handle { font-size: 15px; overflow-wrap: anywhere; }
.um-row .pa-card-nums { grid-column: auto; }

/* ===== 予約投稿管理（スマホだけ）：
   ☐
   No.1  投稿 内容 ／ 薄い線 ／ 投稿文 ／ 薄い線 ／ 予約日時 → 改行 → 11月01日  10:40分 ／ 薄い線 ／ 投稿 状況  完了 → 11月02日  10:40分 自動削除 ／ 薄い線 ／ ボタン
   文字の大きさは、すべて「自動削除」の行（14px）と同じ ===== */
.no-lbl { white-space: pre; }
@media (max-width: 767px) {
  #sec-post-status .m-cards td, #sec-post-status .m-cards td *:not(i) { font-size: 14px !important; line-height: 1.7; }
  #sec-post-status .m-cards td:not(.mc-chk):not(.mc-ops):not(.mc-empty) { padding: 12px 0 !important; border-bottom: 1px solid rgba(148, 163, 184, 0.25) !important; }
  #sec-post-status .m-cards td[data-label]::before { font-size: 14px !important; }
  /* 「投稿 内容」の見出しは、No. の行へ移したので、投稿文の上には出さない */
  #sec-post-status .m-cards td[data-label="投稿 内容"]::before { display: none; }
  #sec-post-status .m-cards .pv-sp { margin-top: 0; }
  /* 予約日時：見出し → 改行 → 日時 */
  #sec-post-status .m-cards td[data-label="予約日時"]::before { display: block; margin-bottom: 2px; }
  /* 投稿 状況：見出しと「完了」を同じ行に、その下に「自動削除」の行 */
  #sec-post-status .m-cards td[data-label="投稿 状況"]::before { display: inline-block; margin: 0 1.2em 0 0; }
  #sec-post-status .m-cards td[data-label="投稿 状況"] { border-bottom: 0 !important; padding-bottom: 14px !important; }
  #sec-post-status .m-cards td[data-label="投稿 状況"] .block { display: block; margin-top: 2px; }
}

/* 自動返信 保存：「自動 返信 済み ○件 …」の行は、「履歴の日時から7日後 自動削除」と同じ黄色（#fbbf24）。PC・スマホとも */
#sec-auto-reply-saved .rule-count,
#sec-auto-reply-saved .m-cards td[data-label="状態"] .block.rule-count { color: #fbbf24 !important; }

/* 反応 ユーザー（スマホ・タブレット）：カードの上に「一括選択 ☐」（PCの表では、表の見出しにある） */
.um-allbar { display: none; }
@media (max-width: 1279px) {
  .um-allbar { display: flex; align-items: center; justify-content: flex-start; gap: 12px; padding: 8px 4px; margin: 0 0 8px; background: #0f172a; color: #ffffff; font-size: 14px; font-weight: 700; }
}

/* X 投稿 詳細 分析（スマホだけ）：2列で
     表示回数　　プロフアクセス
     いいね　　　クリック          の並び */
@media (max-width: 767px) {
  #paCards .pa-card-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; }
  #paCards .pa-n-imp { order: 1; }
  #paCards .pa-n-prof { order: 2; }
  #paCards .pa-n-like { order: 3; }
  #paCards .pa-n-click { order: 4; }
}

/* ===== 自動返信 保存（PCだけ）：右側に「選んだ自動返信を削除」→ 改行 →「Excelで保存」を縦に並べる。削除ボタンの文字は白 ===== */
.xl-pc { display: none; }
.bulk-right { display: contents; }
@media (min-width: 768px) {
  #sec-auto-reply-saved .xl-sp { display: none; }
  #sec-auto-reply-saved .xl-pc { display: inline-flex; }
  #sec-auto-reply-saved .bulk-right { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
  #sec-auto-reply-saved #ruleBulkDeleteBtn, #sec-auto-reply-saved #ruleBulkDeleteBtn span, #sec-auto-reply-saved #ruleBulkDeleteBtn i { color: #ffffff !important; }
  #sec-auto-reply-saved #ruleBulkDeleteBtn:disabled { opacity: 1; }
}
@media (max-width: 767px) {
  .bulk-bar > .bulk-right > button { width: 100%; justify-content: center; min-height: 40px; }   /* スマホは今まで通り：削除ボタンは横いっぱい */
}

/* 反応 ユーザー（PC）：「投稿を見る」「ユーザーを見る」の文字を 14px → 16px（+2px） */
#sec-user-manage .um-table .btn-view { font-size: 16px; }

/* 反応 ユーザー（PC）：「投稿を見る」「ユーザーを見る」の横幅を約30%減らし（277px→約190px）、2つのボタンの間を約24px空ける */
@media (min-width: 768px) {
  #sec-user-manage .um-table col.c-chk { width: 7%; }
  #sec-user-manage .um-table col.c-user { width: 25%; }
  #sec-user-manage .um-table col.c-r { width: 12.3%; }
  #sec-user-manage .um-table col.c-view { width: 15.55%; }
  #sec-user-manage .um-table .btn-view { width: calc(100% - 32px); margin-left: auto; margin-right: auto; }
}

/* 自動返信 保存（PC）：件数の2行の文字の大きさは、「投稿時間」の文字と同じ（15px） */
@media (min-width: 768px) {
  #sec-auto-reply-saved .m-cards td[data-label="状態"] .block.rule-count { font-size: 15px !important; line-height: 1.7; }
  #sec-auto-reply-saved .m-cards td[data-label="投稿時間"] { font-size: 15px; }
}

/* 件数の欄：上の線から文字までの余白を、線の上の余白とそろえる */
#sec-auto-reply-saved .m-cards td[data-label="状態"]:not(.mc-chk):not(.mc-ops) { padding-top: 10px !important; }

/* X 投稿 詳細 分析（PCの表）：見出しと数字（表示回数・プロフアクセス・クリック・いいね）を、列の真ん中にそろえる */
#sec-post-analytics .pa-table thead th.num, #sec-post-analytics .pa-table td.num { text-align: center; padding-left: 4px; padding-right: 4px; }

/* v120 スマホ：メニューを一番下までスクロールできるようにする
   iPhone の Safari は、下のツールバーの裏にメニューの下側が隠れるため、見えている高さ（dvh）に合わせる。
   さらに、一番下に空きを足す（Safari は、スクロールする枠の下の余白を無視するので、空きは ::after で作る） */
@media (max-width: 767px) {
  #sidebar { height: 100vh; height: 100dvh; max-height: 100dvh; bottom: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
  #sidebar::after { content: ""; display: block; flex: 0 0 calc(env(safe-area-inset-bottom, 0px) + 72px); }
}

/* v121 反応 ユーザー：ボタンの下に「対象・最終更新」と説明文 */
#sec-user-manage .um-head-info { display: block; }
#sec-user-manage .um-head-info #umInfo { margin: 0 0 6px; }
#sec-user-manage .um-head-info .um-note { margin: 0; }
#sec-user-manage .um-i-acc + .um-i-time::before { content: "　"; }   /* PC：1行で「対象：…　最終更新：…」 */
@media (max-width: 767px) {
  /* スマホ：削除期限／薄い線／Excelで保存／薄い線／対象／最終更新／説明文／薄い線 */
  #sec-user-manage .top-actions { display: flex; flex-direction: column; align-items: stretch; gap: 0 !important; }
  #sec-user-manage .top-actions > #umKeepWrap { padding-bottom: 12px; border-bottom: 1px solid rgba(148, 163, 184, 0.25); }
  #sec-user-manage .top-actions > #umExportBtn { margin-top: 12px; }
  #sec-user-manage .um-head-info { border-top: 1px solid rgba(148, 163, 184, 0.25); border-bottom: 1px solid rgba(148, 163, 184, 0.25); padding: 12px 0; }
  #sec-user-manage .um-i-acc, #sec-user-manage .um-i-time { display: block; }
  #sec-user-manage .um-i-acc + .um-i-time::before { content: none; }
  #sec-user-manage .um-head-info #umInfo { margin-bottom: 10px; }
}

/* v122 スマホ：反応 ユーザーの「削除期限」の選択肢を、ボタンのすぐ下（6px）に出す（下の余白12pxの分を差し引く） */
@media (max-width: 767px) {
  #sec-user-manage .top-actions > #umKeepWrap .um-keep-menu.down { top: calc(100% - 12px + 6px); }
}

/* v123 反応 ユーザー：「対象」「最終更新」と説明文2行の行の間隔を、全部同じにする（PC・スマホ共通） */
#sec-user-manage .um-head-info #umInfo, #sec-user-manage .um-head-info .um-note { font-size: 12px; line-height: 1.6; margin: 0 !important; }
@media (max-width: 767px) {
  #sec-user-manage .um-head-info #umInfo, #sec-user-manage .um-head-info .um-note { font-size: 14px; line-height: 1.6; margin: 0 !important; }
}

/* v124 スマホ：反応 ユーザーの「最終更新」と説明文の間、説明文の2つの文の間に、1行分の空き（PCは今まで通り） */
@media (max-width: 767px) {
  #sec-user-manage .um-head-info #umInfo { margin-bottom: 1.6em !important; }
  #sec-user-manage .um-note br { display: none; }
  #sec-user-manage .um-note .um-n1, #sec-user-manage .um-note .um-n2 { display: block; }
  #sec-user-manage .um-note .um-n2 { margin-top: 1.6em; }
}

/* v125 スマホ：メニューは、常にスクロールできる枠にする（auto だと、iPhone で1回目の指の動きが効かないことがあるため） */
@media (max-width: 767px) {
  #sidebar { overflow-y: scroll; }
  .menu-backdrop { touch-action: none; }   /* 暗い所を指で動かした時は、メニューのスクロールに回す */
}

/* v126 Android：メニューを開いている間は、下に引っ張って再読み込み（引っ張って更新）が起きないようにする */
@media (max-width: 767px) {
  html:has(body.menu-open), body.menu-open { overscroll-behavior: none; }
}

/* v127 スマホ・タブレット（指で操作する画面）：入力欄・選択欄は16px以上にする
   （iPhone の Safari は、16px未満の欄を押すと画面が勝手に拡大され、戻らなくなるため） */
@media (hover: none) and (pointer: coarse), (max-width: 767px) {
  :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]), select, textarea):is(.text-xs, .text-sm, .text-\[11px\], .text-\[12px\], .text-\[13px\], .text-\[14px\], .text-\[15px\], .prem-sel), .pa-sortbar select { font-size: 16px !important; }
}
/* 横向きのスマホ・タブレット（左にメニューが出る幅）：メニューの端までスクロールしても、後ろのページが一緒に動かない */
@media (min-width: 768px) {
  #sidebar, #sidebar nav { overscroll-behavior: contain; }
}

/* v128 X 投稿 詳細 分析：上の説明
   PC   ：「対象：…　数値の最終更新：…　更新できる投稿：…」を1行、説明文も今まで通り1つの文章
   スマホ：対象／（空き）／数値の最終更新／（空き）／更新できる投稿／（空き）／説明文3行 */
#sec-post-analytics .pa-i + .pa-i::before { content: "　"; }
@media (max-width: 767px) {
  #sec-post-analytics #paInfo, #sec-post-analytics .pa-note { font-size: 14px; line-height: 1.6; }
  #sec-post-analytics .pa-i { display: block; }
  #sec-post-analytics .pa-i + .pa-i { margin-top: 1.6em; }
  #sec-post-analytics .pa-i + .pa-i::before { content: none; }
  #sec-post-analytics .pa-note { margin-top: 1.6em !important; }
  #sec-post-analytics .pa-note .pa-n { display: block; }
  #sec-post-analytics .pa-note .pa-dot { display: none; }
}

/* v129 X 投稿 詳細 分析：スマホだけ、上の説明を差し替え
   対象／（空き）／数値の最終更新／（空き）／並び替え…／（空き）／最新データは…／（空き）／100件まで… */
#sec-post-analytics .pa-sp, #sec-post-analytics .pa-note-sp { display: none; }
@media (max-width: 767px) {
  #sec-post-analytics .pa-pc, #sec-post-analytics .pa-note { display: none !important; }
  #sec-post-analytics .pa-i.pa-sp { display: block; }
  #sec-post-analytics .pa-note-sp { display: block; margin-top: 1.6em !important; font-size: 14px; line-height: 1.6; }
  #sec-post-analytics .pa-note-sp .pa-n { display: block; }
  #sec-post-analytics .pa-note-sp .pa-n + .pa-n { margin-top: 1.6em; }
}

/* v130 反応 ユーザー／X 投稿 詳細 分析（スマホ・タブレット）：「☐ 一括選択」…チェック欄を左に */
.um-allbar input.chk { order: -1; }

/* v131 自動返信 保存（PC・スマホ共通）：「☐ 一括選択」…チェック欄を左に */
#sec-auto-reply-saved #selectAllRules { order: -1; }

/* v132 予約投稿管理（スマホだけ）：「☐ 一括選択」…チェック欄を左に（PCは表の見出しのまま） */
@media (max-width: 767px) {
  #sec-post-status #selectAllPosts { order: -1; }
}

/* v133 「☐ 一括選択」の ☐ と文字の間を広げる（4画面とも同じ間隔） */
.um-allbar input.chk, #sec-auto-reply-saved #selectAllRules { margin-right: 10px; }
@media (max-width: 767px) {
  #sec-post-status #selectAllPosts { margin-right: 10px; }
}

/* v134 スマホ：「☐ 一括選択」の ☐ を、下のカードの ☐ と縦一列にそろえる */
.um-allbar input.chk { margin-left: 9px; }   /* 反応 ユーザー／X 投稿 詳細 分析（カード表示の時だけ出る欄） */
@media (max-width: 767px) {
  #sec-auto-reply-saved #selectAllRules { margin-left: 13px; }
  #sec-post-status #selectAllPosts { margin-left: 11px; }
}

/* v135 自動返信 保存（PC・タブレット 768px以上）：「☐ 一括選択」の ☐ を、下のカードの ☐ と縦一列にそろえる */
@media (min-width: 768px) {
  #sec-auto-reply-saved #selectAllRules { margin-left: 15px; }
}

/* v136 X アナリティクス：対象と最終更新
   PC：1行「対象：…　最終更新：11-01 13:16」／スマホ：「対象：…」改行「最終更新：11月01日 13:16分」 */
#statScopeLabel .st-sp { display: none; }
#statScopeLabel .st-i + .st-i::before { content: "　"; }
@media (max-width: 767px) {
  #statScopeLabel .st-i.st-pc { display: none; }
  #statScopeLabel .st-i { display: block; }
  #statScopeLabel .st-i + .st-i::before { content: none; }
}
/* スマホ：上と下に薄い線 */
@media (max-width: 767px) {
  #statScopeLabel { display: block; width: 100%; flex-basis: 100%; border-top: 1px solid rgba(148, 163, 184, 0.25); border-bottom: 1px solid rgba(148, 163, 184, 0.25); padding: 12px 0; font-size: 14px; line-height: 1.6; }
}

/* v137 新規フォロー
   PC   ：1行「対象：…　最終更新：11-01 13:16　削除期限：7日」（今まで通り）
   スマホ：薄い線／対象／最終更新：11月01日 13:16分／自動 削除 期限：7日後／薄い線 */
#flInfo .fl-sp { display: none; }
#flInfo .fl-i + .fl-i::before { content: "　"; }
@media (max-width: 767px) {
  /* 上の薄い線は、「新規フォロー更新」ボタンの下の線をそのまま使う（線が2本並ばないように） */
  #flInfo { border-bottom: 1px solid rgba(148, 163, 184, 0.25); padding: 0 0 16px; font-size: 14px; line-height: 1.6; }
  #flInfo .fl-i.fl-pc { display: none; }
  #flInfo .fl-i { display: block; }
  #flInfo .fl-i + .fl-i::before { content: none; }
}

/* v138 新規フォロー（スマホ）：説明文を差し替え（左寄せ・下に薄い線。上の薄い線は、対象・最終更新の下の線）
   まだ誰もいない時の文は、2行に分ける */
#sec-new-follow .fl-note-sp { display: none; }
@media (max-width: 767px) {
  #sec-new-follow .fl-note { display: none !important; }
  #sec-new-follow .fl-note-sp { display: block; text-align: left; font-size: 14px; line-height: 1.6; padding-bottom: 16px; border-bottom: 1px solid rgba(148, 163, 184, 0.25); }
  #sec-new-follow .fl-empty { text-align: left; }
}

/* v139 予約投稿管理（PCのみ）：全ての列（見出しも中身も）を、真ん中に揃える。
   「投稿 内容」と「画像」の間を広げる（その分、「Xで見る」「削除」は右に寄る） */
@media (min-width: 768px) {
  #sec-post-status .m-cards thead th,
  #sec-post-status .m-cards tbody td { text-align: center; }
}
/* 間を広げるのは、横幅が足りる画面（1280px以上）だけ。狭いタブレットでは、横スクロールを増やさない */
@media (min-width: 1280px) {
  #sec-post-status .m-cards thead th:nth-child(3) { min-width: 340px; }
  #sec-post-status .m-cards thead th:nth-child(4) { min-width: 140px; }
  #sec-post-status .m-cards thead th:nth-child(7) { min-width: 170px; }
}

/* v141 自動返信 保存：「削除」ボタンは、色 #d9333f で、横幅いっぱいに表示（PC・スマホ共通） */
#sec-auto-reply-saved .m-cards td.mc-ops { text-align: center; justify-content: stretch; }
#sec-auto-reply-saved .m-cards td.mc-ops > * { flex: 1 1 100%; width: 100%; min-width: 0; }
#sec-auto-reply-saved .m-cards td.mc-ops .btn-danger { background: #d9333f; }
#sec-auto-reply-saved .m-cards td.mc-ops .btn-danger:hover { background: #c22d38; }

/* v142 自動返信の返信内容：右上に文字数（予約投稿の作成の「0 / 140」と同じ見た目） */
.rl-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.rl-head .rl-count { white-space: nowrap; }

/* v142 自動返信の作成（PCのみ）：「DM送信 120文字」「部分一致」のプルダウンと、管理名称・フォロワー数・キーワードの入力欄は、横幅を半分にして、同じ幅にそろえる */
@media (min-width: 768px) {
  #autoReplyFormContainer #ruleType,
  #autoReplyFormContainer #kwMatch,
  #autoReplyFormContainer #ruleName,
  #autoReplyFormContainer #minFollowers,
  #autoReplyFormContainer #kwWords { width: 50% !important; min-width: 300px; max-width: 100%; }   /* 狭い画面（タブレット）では、文字が切れないよう、最低300px */
}

/* v142 自動返信の作成（PCのみ）：キーワード欄の縦幅は、「フォロワー数の条件」の入力欄と同じ高さにする（入りきらない時は、中で動く・下の角で広げられる） */
@media (min-width: 1024px) {
  #autoReplyFormContainer #kwWords { height: 42px; min-height: 42px; box-sizing: border-box; overflow-y: auto; }
}

/* v143 自動返信の作成（スマホのみ）：文が2行以上に折り返した時の行間を、広げる（1.33 → 2.2）。
   根拠：W3C「日本語組版処理の要件」＋制作会社の記事など、本文の行間は1.5〜1.8が目安。1.7は、どの資料の範囲にも入る */
@media (max-width: 767px) {
  #autoReplyFormContainer label:not(.ar-keep),
  #autoReplyFormContainer p:not(.ar-keep),
  #autoReplyFormContainer .opt-row span,
  #autoReplyFormContainer .rl-count { line-height: 2.2; }
}

/* v143 返信内容の見出し（スマホのみ）：「登録できます。」のあとで改行して、2行にする（PCは1行のまま） */
.rl-br { display: none; }
@media (max-width: 767px) { .rl-br { display: inline; } }

/* v143 自動返信の作成（スマホのみ）：「返信の種類」から「返信内容」までの文の、行と行の間（改行幅）を、さらに広げる（→ 2.2） */
@media (max-width: 767px) {
  #autoReplyFormContainer .ar-lh { line-height: 2.2; }
}

/* v143 自動返信の作成（PC・スマホ共通）：見出しと入力欄の間は、全て同じ間（10px）にする */
#autoReplyFormContainer .ar-gap { margin-bottom: 10px !important; }
#autoReplyFormContainer .rl-head { margin-bottom: 10px; }
#autoReplyFormContainer .rl-head label { margin-bottom: 0 !important; }
#autoReplyFormContainer .alt-row .rl-head { margin-bottom: 4px; }   /* 文面2〜5は、行の間（6px）があるので、合わせて10px */

/* v143 自動返信の作成（PCのみ）：文の行間を、広げる（1.33〜1.63 → 1.8） */
@media (min-width: 768px) {
  #autoReplyFormContainer label:not(.ar-keep),
  #autoReplyFormContainer p:not(.ar-keep),
  #autoReplyFormContainer .opt-row span,
  #autoReplyFormContainer .rl-count { line-height: 1.8; }
}

/* v143 自動返信の作成：クラス「ar-keep」の文（自動確認／送るタイミング／注意の4行／返信対象の投稿／返信のアクション条件）は、行間を変えない（もとの行間のまま） */

/* v143 返信内容の文字数（スマホのみ）：見出しの右上から、下に移す。
   返信内容 → 右下（「文面を追加」ボタンと同じ行の右端）／文面2〜5 → 各欄の下（「この文面を消す」ボタンの左）。PCは、今までどおり右上 */
@media (max-width: 767px) {
  #autoReplyFormContainer .rl-wrap { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; align-items: center; }
  #autoReplyFormContainer .rl-wrap > .rl-head,
  #autoReplyFormContainer .alt-row > .rl-head { display: contents; }
  #autoReplyFormContainer .rl-wrap > .rl-head > label { grid-column: 1 / -1; margin-bottom: 10px !important; }
  #autoReplyFormContainer .rl-wrap > #ruleContent,
  #autoReplyFormContainer .rl-wrap > #ruleAlts { grid-column: 1 / -1; }
  #autoReplyFormContainer .rl-wrap > #altAddBtn { grid-column: 1; grid-row: auto; order: 10; justify-self: start; }
  #autoReplyFormContainer .rl-wrap > .rl-head > .rl-count { grid-column: 2; order: 11; justify-self: end; margin-top: 8px; }
  #autoReplyFormContainer .alt-row { grid-template-columns: 1fr auto; column-gap: 12px; align-items: center; }
  #autoReplyFormContainer .alt-row > .rl-head > label { grid-column: 1 / -1; margin-bottom: 4px !important; }
  #autoReplyFormContainer .alt-row > textarea { grid-column: 1 / -1; }
  #autoReplyFormContainer .alt-row > .rl-head > .rl-count { grid-column: 1; order: 9; justify-self: end; }
  #autoReplyFormContainer .alt-row > .alt-del { grid-column: 2; order: 10; justify-self: end; }
}

/* v143 文面2〜5（スマホのみ）：入力欄の下の「文字数」と「この文面を消す」ボタンは、出さない（空にした文面は、保存の時に無視される） */
@media (max-width: 767px) {
  #autoReplyFormContainer .alt-row > .rl-head > .rl-count,
  #autoReplyFormContainer .alt-row > .alt-del { display: none !important; }
}

/* v143 PCも：「この文面を消す」ボタンは出さない */
#autoReplyFormContainer .alt-row > .alt-del { display: none !important; }

/* v143 スマホのみ：「返信を送るタイミングは…」の行間を広げる（他の「ar-keep」の文は、そのまま） */
@media (max-width: 767px) {
  #autoReplyFormContainer p.ar-m22 { line-height: 2.2 !important; }
}

/* v143 スマホのみ：「返信のアクション条件」と、下のチェック枠（リプライ／リポスト…）の間を、8px → 16px に広げる */
@media (max-width: 767px) {
  #autoReplyFormContainer .ar-ac { margin-bottom: 16px !important; }
}

/* v143 PC・スマホ共通：すべての入力欄（文字入力・数字・日時・プルダウン・複数行）の枠線を #8a8a8a に。入力中（フォーカス）の色と、チェック・ラジオ・ファイル・ボタンは対象外 */
@media all {
  input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=color]):not([type=hidden]):not([type=button]):not([type=submit]):not([type=reset]):not([type=image]):not(:focus),
  textarea:not(:focus),
  select:not(:focus) { border-color: #8a8a8a !important; }
}

/* v145 Xアナリティクス「今日」ボタン：PCは「今日・7日・30日」の順で横1列。スマホは「今日」を横いっぱいの1段目、「7日・30日」を2段目に */
@media (max-width: 767px) {
  #sec-analytics-summary .seg-group[aria-label="期間"] { flex-wrap: wrap; }
  #sec-analytics-summary .seg-group[aria-label="期間"] .seg-btn.st-today { flex: 0 0 100%; width: 100%; border-right: 0; border-bottom: 1px solid #334155; }
}

/* v146 PC：「反応 ユーザー」「X 投稿 詳細 分析」の表の「一括選択」の▢を、下の行の▢に合わせる（1px 左へ） */
@media (min-width: 768px) {
  .um-table .um-chk-head .chk, .pa-table .pa-chk-head .chk { position: relative; left: -1px; }
}

/* v147 スマホのみ：Xアナリティクスの「今日・7日・30日」の文字を 12px → 15px（+3px）。上の段の「選択中のアカウント・全アカウント」は、そのまま */
@media (max-width: 767px) {
  #sec-analytics-summary .seg-group[aria-label="期間"] .seg-btn { font-size: 15px; }
}

/* v147 PC：「新規フォロー」の表の「一括選択」の▢を、下の行の▢に合わせる（2px 左へ） */
@media (min-width: 768px) {
  .fl-table .um-chk-head .chk { position: relative; left: -2px; }
}

/* v149 スマホ：X アナリティクス「数値を表で見る」。日付の列を、横にスクロールする表から切りはなす。
   ・「日付」の列は動かない表、数字の列だけ横に動く表の2つを並べる（position: sticky を使わないので、なぞっても上下にずれない）
   ・行の高さを同じにそろえて、2つの表の行が必ず横に並ぶようにする
   ・PC は今までの1つの表（見出し・日付の列を固定）のまま */
.st-split { display: none; }
@media (max-width: 767px) {
  .st-wrap { display: none; }
  .st-split { display: flex; align-items: flex-start; }
  .st-dates { flex: 0 0 auto; border-right: 1px solid #475569; }
  .st-scroll { flex: 1 1 auto; min-width: 0; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: none; }
  .st-mt { border-collapse: separate; border-spacing: 0; font-size: 12px; color: #ffffff; }
  .st-mt th, .st-mt td { box-sizing: border-box; height: 36px; padding: 0 8px; line-height: 20px; vertical-align: middle; white-space: nowrap; color: #ffffff; border-bottom: 1px solid #334155; background: #0f172a; }
  .st-mt thead th { height: 40px; font-weight: 700; border-bottom: 2px solid #475569; }
  .st-mt td { text-align: right; }
  .st-mt thead th { text-align: right; }
  .st-dates .st-mt th { text-align: left; }
  .st-scroll .st-mt { min-width: 100%; }
  .st-mt tbody tr:active td, .st-mt tbody tr:active th { background: #273449; }
}

/* v150 X アナリティクス：数値カードの並び。PCは HTML の順（表示回数・クリック数・プロフアクセス・いいね・リプライ・リポスト）。
   スマホ（2列）は 表示回数・クリック数／いいね・プロフアクセス／リプライ・リポスト */
@media (max-width: 767px) {
  .sc-imp { order: 1; } .sc-click { order: 2; } .sc-like { order: 3; }
  .sc-prof { order: 4; } .sc-reply { order: 5; } .sc-repost { order: 6; }
}
/* 円グラフの内訳の最後：平均エンゲージメント率 */
.viz-donut-legend .viz-eng { border-top: 1px solid #334155; padding-top: 8px; }
.viz-donut-legend .viz-eng span:nth-child(2) { white-space: nowrap; }
.viz-donut-legend .viz-eng .sw { background: transparent !important; border: 2px solid #ffffff; box-sizing: border-box; }   /* 白い枠の四角（⬜）。表示回数の色（白ぬり）と区別する */
