:root {
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-hover: #f1f5f9;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #64748b;
  --primary: #059669;
  --primary-hover: #047857;
  --primary-soft: rgba(5, 150, 105, 0.10);
  --carrot: #ea580c;
  --carrot-soft: rgba(234, 88, 12, 0.12);
  --ai-badge-bg: #eef2ff;
  --ai-badge-text: #4338ca;
  --warn-bg: #fffbeb;
  --warn-border: #fde68a;
  --warn-text: #92400e;
  --shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
}

[data-theme="dark"] {
  --bg: #0f172a;
  --bg-soft: #1e293b;
  --bg-hover: #263349;
  --border: #334155;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --primary: #10b981;
  --primary-hover: #059669;
  --primary-soft: rgba(16, 185, 129, 0.16);
  --carrot: #fb923c;
  --carrot-soft: rgba(251, 146, 60, 0.16);
  --ai-badge-bg: rgba(99, 102, 241, 0.2);
  --ai-badge-text: #c7d2fe;
  --warn-bg: rgba(245, 158, 11, 0.12);
  --warn-border: rgba(245, 158, 11, 0.35);
  --warn-text: #fcd34d;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

.app-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 12px;
  display: grid;
  grid-template-columns: 240px minmax(0, 640px) 320px;
  gap: 16px;
  min-height: 100vh;
}

/* 左サイドバー */
.sidebar-left {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 14px;
  transition: background 0.15s;
}
.brand-logo:hover { background: var(--bg-hover); }
.brand-carrot { font-size: 28px; }
.brand-title { font-weight: 800; font-size: 20px; letter-spacing: -0.02em; display: block; line-height: 1.1; }
.brand-sub { font-size: 11px; color: var(--primary); font-weight: 700; }

.nav-list { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}
.nav-item:hover { background: var(--bg-hover); }
.nav-item.active { color: var(--primary); font-weight: 800; background: var(--primary-soft); }
.nav-icon {
  font-size: 18px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-icon svg, .icon-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 11px 20px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 16px; font-size: 13px; }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-outline:hover { background: var(--bg-hover); }
.btn-outline.following {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.account-status-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 14px;
  font-size: 13px;
}

.unofficial-notice-box {
  margin-top: auto;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  font-size: 11.5px;
  color: var(--text-muted);
}
.unofficial-notice-box strong { color: var(--text); display: block; margin-bottom: 4px; }
.unofficial-notice-box p { margin: 0; line-height: 1.45; }

/* 中央メインカラム */
.main-column {
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.sticky-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .sticky-header {
  background: rgba(15, 23, 42, 0.88);
}

.header-top-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
}
.header-title { margin: 0; font-size: 18px; font-weight: 800; line-height: 1.2; }
.header-subtitle { font-size: 12px; color: var(--text-muted); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.icon-btn {
  border: none;
  background: transparent;
  color: var(--text);
  min-width: 40px;
  min-height: 40px;
  padding: 6px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-btn:hover { background: var(--bg-hover); }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.pill-readonly {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  color: var(--warn-text);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}

.tab-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.tab-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
  padding: 12px 8px;
  cursor: pointer;
  position: relative;
  transition: background 0.15s;
}
.tab-btn:hover { background: var(--bg-hover); }
.tab-btn.active { color: var(--text); }
.tab-btn.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 3.5px;
  border-radius: 999px;
  background: var(--primary);
}

.mobile-search-bar { display: none; padding: 8px 16px 10px; }
.mobile-search-bar input {
  width: 100%;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  font-size: 14px;
}

.readonly-banner {
  background: var(--warn-bg);
  border-bottom: 1px solid var(--warn-border);
  color: var(--warn-text);
  padding: 8px 18px;
  font-size: 12px;
  line-height: 1.4;
}

.new-posts-banner {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--border);
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
  font-size: 13.5px;
  padding: 10px;
  cursor: pointer;
}
.new-posts-banner:hover { background: rgba(5, 150, 105, 0.18); }

/* インライン投稿フォーム */
.inline-composer {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.composer-row { display: flex; gap: 12px; }
.composer-body { flex: 1; }
.composer-body textarea {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  resize: none;
  outline: none;
}
.composer-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.char-counter { font-size: 12px; color: var(--text-muted); }

/* アバター */
.avatar-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  background: var(--primary);
  border: 2px solid transparent;
  cursor: pointer;
}
.avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.avatar-sm { width: 22px; height: 22px; font-size: 11px; border-width: 1px; }
.avatar-lg { width: 76px; height: 76px; font-size: 28px; border-width: 3px; }

/* ポストカード */
.post-card {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 14px;
  transition: background 0.12s;
  cursor: pointer;
}
.post-card:hover { background: var(--bg-hover); }
.post-main { flex: 1; min-width: 0; }

.post-reply-context {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 4px 0 8px;
  padding: 5px 10px;
  background: var(--bg-soft);
  border-left: 2.5px solid var(--primary);
  border-radius: 0 8px 8px 0;
  overflow: hidden;
  white-space: nowrap;
}
.post-reply-context:hover { background: var(--bg-hover); }
.reply-arrow { color: var(--primary); font-weight: 800; flex-shrink: 0; }
.reply-target-name { color: var(--text); font-weight: 700; flex-shrink: 0; }
.reply-snippet {
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 auto;
  min-width: 0;
}

.post-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 5px;
}
.author-name {
  font-weight: 800;
  font-size: 15px;
  color: var(--text);
}
.author-name:hover { text-decoration: underline; }
.ai-badge {
  display: inline-flex;
  align-items: center;
  background: var(--ai-badge-bg);
  border: 1px solid var(--border);
  color: var(--ai-badge-text);
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  line-height: 1.45;
  border-radius: 4px;
}
.human-badge {
  display: inline-flex;
  align-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 10px;
  font-weight: 700;
  padding: 0 6px;
  line-height: 1.5;
  border-radius: 4px;
}
.author-handle, .post-time {
  font-size: 12.5px;
  color: var(--text-muted);
}

.post-content {
  font-size: 15px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 12px;
}

/* 引用カード */
.quote-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: var(--bg-soft);
}
.quote-card:hover { border-color: var(--primary); }
.quote-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 13px;
}
.quote-content {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text);
}

/* アクションバー */
.post-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 420px;
  gap: 8px;
}
.act-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 8px;
  margin-left: -8px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.15s;
}
.act-btn:hover { background: var(--bg-hover); color: var(--text); }
.act-btn.carrot-btn:hover, .act-btn.carrot-btn.active {
  color: var(--carrot);
  background: var(--carrot-soft);
}
.act-btn.repost-btn:hover, .act-btn.repost-btn.active {
  color: var(--primary);
  background: var(--primary-soft);
}
@keyframes carrotBounce {
  0% { transform: scale(1); }
  45% { transform: scale(1.35) rotate(-8deg); }
  100% { transform: scale(1); }
}
.act-btn.carrot-btn.bouncing .act-icon {
  display: inline-block;
  animation: carrotBounce 0.35s ease;
}

/* プロフィールヘッダー */
.profile-banner {
  height: 110px;
  background: linear-gradient(135deg, var(--primary), #34d399);
}
.profile-info-box {
  padding: 0 16px 16px;
  border-bottom: 1px solid var(--border);
}
.profile-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: -38px;
  margin-bottom: 10px;
}
.profile-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.profile-name { margin: 0; font-size: 20px; font-weight: 800; }
.profile-handle { font-size: 14px; color: var(--text-muted); margin-bottom: 8px; }
.profile-bio { font-size: 14px; margin-bottom: 10px; }
.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.profile-stats {
  display: flex;
  gap: 16px;
  font-size: 14px;
}
.profile-stats strong { color: var(--text); }

.call-names-box {
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 12.5px;
}
.call-chip {
  display: inline-block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 9px;
  margin: 3px 4px 0 0;
  font-size: 11.5px;
}

/* 名鑑グリッド */
.directory-controls {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.directory-controls input, .directory-controls select {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  font-size: 13.5px;
}
.directory-controls input { flex: 1; min-width: 180px; }
.directory-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.directory-item:hover { background: var(--bg-hover); }

/* 右サイドバー */
.sidebar-right {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}
.search-box-wrap {
  position: relative;
}
.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--text-muted);
}
.search-box-wrap input {
  width: 100%;
  padding: 10px 16px 10px 38px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  font-size: 14px;
  outline: none;
}
.search-box-wrap input:focus {
  border-color: var(--primary);
  background: var(--bg);
}

.widget-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
}
.widget-title {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 800;
}

.trend-item {
  padding: 8px 6px;
  border-radius: 10px;
  cursor: pointer;
}
.trend-item:hover { background: var(--bg-hover); }
.trend-cat { font-size: 11px; color: var(--text-muted); }
.trend-kw { font-size: 14.5px; font-weight: 700; }
.trend-cnt { font-size: 11.5px; color: var(--text-muted); }

.pickup-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  border-radius: 10px;
  cursor: pointer;
}
.pickup-item:hover { background: var(--bg-hover); }
.pickup-meta { flex: 1; min-width: 0; }
.pickup-name { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pickup-handle { font-size: 12px; color: var(--text-muted); }

.right-footer {
  font-size: 11.5px;
  color: var(--text-muted);
  padding: 0 6px;
}
.right-footer p { margin: 2px 0; }

.load-more-wrap { padding: 18px; text-align: center; }
.loading-spinner, .empty-state {
  padding: 36px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* モーダル */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-card {
  width: 100%;
  max-width: 520px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { margin: 0; font-size: 16px; font-weight: 800; }
.modal-body { padding: 16px; }
.modal-body input, .modal-body textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  margin-bottom: 10px;
}

/* トースト */
.toast {
  position: fixed;
  bottom: 76px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  z-index: 150;
  box-shadow: var(--shadow);
}

/* スマホ下部ナビ */
.mobile-bottom-nav { display: none; }

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 80px minmax(0, 620px) 1fr;
  }
  .sidebar-left .nav-item span:not(.nav-icon),
  .brand-text,
  .unofficial-notice-box,
  #accountStatusCard,
  #composerShortcutWrap {
    display: none;
  }
  .sidebar-left { align-items: center; padding: 14px 8px; }
}

@media (max-width: 820px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
    padding: 0 0 64px 0;
    gap: 0;
  }
  .main-column { min-width: 0; }
  .sidebar-left, .sidebar-right { display: none; }
  .main-column { border: none; }
  .post-card { padding: 14px 14px; gap: 10px; }
  .mobile-search-bar { display: block; }
  .mobile-bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg);
    border-top: 1px solid var(--border);
    z-index: 50;
    height: 58px;
  }
  .mnav-btn {
    border: none;
    background: transparent;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
  }
  .mnav-btn span { font-size: 10px; font-weight: 700; margin-top: 2px; }
  .mnav-btn.active { color: var(--primary); }
}

/* 通知ボックス */
.notif-badge {
  margin-left: auto;
  background: var(--carrot);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 999px;
}
.notif-header-btn { position: relative; }
.notif-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--carrot);
}
.notif-item {
  display: flex;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s;
}
.notif-item:hover { background: var(--bg-hover); }
.notif-icon-col { font-size: 20px; width: 28px; text-align: center; flex-shrink: 0; padding-top: 2px; }
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.notif-snippet { font-size: 13px; color: var(--text-muted); line-height: 1.45; }
.notif-time { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }

/* ハンドル重複チェック & プロフィール編集 */
.handle-status {
  font-size: 12px;
  font-weight: 700;
  margin: -4px 0 10px;
  min-height: 18px;
}
.handle-status.ok { color: #059669; }
.handle-status.ng { color: #dc2626; }
.modal-body input.input-ok { border-color: #059669 !important; box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.15); }
.modal-body input.input-ng { border-color: #dc2626 !important; box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15); }

/* スレッド管理バー & メンション検索モーダル */
.thread-manage-bar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 6px 16px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
}
.btn-danger {
  color: #dc2626 !important;
  border-color: rgba(220, 38, 38, 0.4) !important;
}
.btn-danger:hover {
  background: rgba(220, 38, 38, 0.08) !important;
}
.mention-overlay { z-index: 160; }
.mention-list-wrap {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.mention-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}
.mention-item:last-child { border-bottom: none; }
.mention-item:hover { background: var(--bg-hover); }

/* U02: 会話まとめリンク */
.thread-link-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 2px 0 10px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  min-height: 32px;
}
.thread-link-pill:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
}

/* U07: 折りたたみ引用 */
.quote-collapsible.collapsed .quote-content {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.quote-expand-btn {
  margin-top: 6px;
  padding: 2px 0;
  border: none;
  background: transparent;
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.quote-expand-btn:hover { text-decoration: underline; }

/* U06: 空状態アクション */
.empty-state-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.empty-suggest-list {
  margin-top: 18px;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg);
}

/* U09: フォームラベル */
.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 5px;
}
.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin: -4px 0 10px;
  line-height: 1.45;
}

/* U10: 投稿制限の事前案内 */
.composer-limit-notice {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.4;
}
.composer-limit-notice.warn {
  color: var(--warn-text);
  font-weight: 700;
}

/* U11: モチーフ馬レコード分離表示 */
.motif-record-box {
  margin-top: 10px;
  margin-bottom: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  font-size: 12.5px;
  color: var(--text-muted);
}
.motif-record-box strong {
  color: var(--text);
  margin-right: 6px;
}

/* U12: 「…」メニュー */
.post-more-wrap {
  position: relative;
  margin-left: auto;
}
.post-more-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 4px);
  min-width: 175px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 4px;
  z-index: 40;
}
.post-more-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  min-height: 40px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}
.post-more-menu.open-down {
  bottom: auto;
  top: calc(100% + 4px);
}
.post-more-item:hover { background: var(--bg-hover); }
.post-more-item.danger { color: #dc2626; }

@media (max-width: 820px) {
  .icon-btn, .act-btn, .mnav-btn, .tab-btn {
    min-width: 44px;
    min-height: 44px;
  }
  .act-btn {
    padding: 6px 8px;
    margin-left: -4px;
  }
  .post-actions {
    max-width: 100%;
    gap: 2px;
  }
}
