:root {
  --rail: #0d1a26;
  --nav: #132333;
  --nav-hover: #1e3348;
  --nav-active: #254057;
  --ink: #18293a;
  --ink-soft: #334657;
  --muted: #516271;
  --line: #dde4e9;
  --line-soft: #edf1f4;
  --paper: #f4f7f9;
  --surface: #ffffff;
  --green: #0e7565;
  --green-dark: #0a5d50;
  --green-soft: #e6f4f0;
  --green-ink: #0c5246;
  --amber-bg: #fef4dd;
  --amber-ink: #7d520b;
  --amber-line: #f0d399;
  --danger: #b53434;
  --danger-bg: #fdecec;
  --danger-line: #f2c4c4;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 8px rgba(13, 26, 38, 0.05);
  --shadow-md: 0 10px 30px rgba(13, 26, 38, 0.10);
  --shadow-lg: 0 24px 64px rgba(13, 26, 38, 0.22);
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  word-break: normal;
  line-break: strict;
  overflow-wrap: break-word;
}

input, select, option, textarea { background-color: #fff; color: #18293a; }
input::placeholder, textarea::placeholder { color: #516271; opacity: 1; }
.num, input[type="number"], time, .call-duration { font-family: "Inter", "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif; font-variant-numeric: lining-nums tabular-nums; }
button { white-space: nowrap; }
button[aria-pressed="true"], button[aria-selected="true"] { background: #0a5d50; color: #fff; border-color: #0a5d50; }
button:disabled { opacity: 1; background: #e9edf0; color: #516271; border-color: #c5ced6; }
img.image-error { object-fit: contain; font-size: 11px; }
.profile-cover { display: block; width: 100%; max-height: 180px; object-fit: cover; border-radius: 8px; margin-bottom: 16px; }
.image-preview { max-width: 100%; max-height: 360px; object-fit: contain; }
.url-text, code.secret-code { overflow-wrap: break-word; word-break: normal; }
.transcript-segments p { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 8px; margin: 10px 0; }
.transcript-segments p span { grid-column: 1 / -1; }
.transcript-box summary { cursor: pointer; font-weight: 700; color: #0a5d50; }
.transcript-box textarea { width: 100%; margin: 8px 0; }
#call-dialog { width: min(500px, calc(100vw - 24px)); border: 1px solid #c3d9d3; border-radius: 20px; padding: 28px; color: #18293a; background: #f5fbf8; }
#call-dialog::backdrop { background: #0d1a26a6; }
.call-duration { font-size: 48px; margin: 16px 0; font-weight: 700; }
#incoming-calls { position: fixed; right: 16px; top: 80px; z-index: 120; width: min(370px, calc(100vw - 32px)); }
.incoming-call { border: 2px solid #0a5d50; border-radius: 12px; padding: 16px; background: #fff; box-shadow: 0 10px 30px #0d1a2633; display: grid; gap: 8px; }
audio, video { max-width: 100%; }
progress { accent-color: #0e7565; width: 100%; }
.jp-phrase { display: inline-block; white-space: nowrap; }
.coverage-line { display: block; }
button.secondary[aria-pressed="true"], button.secondary[aria-pressed="true"]:hover { background: #0a5d50; color: #fff; border-color: #0a5d50; }
.stock-grid { grid-template-columns: minmax(0,1fr); }
.mobile-feature-menu { display: none; }
#profile-job-note, #llm-test-result, #recording-status { color: #0a5d50; }
@media (max-width: 780px) {
  .mobile-feature-menu { display: block; width: 150px; min-width: 0; }
  .chat-header { flex-wrap: wrap; }
  .chat-header-actions { flex: 1 0 100%; display: flex; flex-wrap: wrap; gap: 6px; }
  .chat-header-actions button { flex: 0 1 auto; }
  .chat-header h2 { white-space: normal; }
  .transcript-segments p { grid-template-columns: auto minmax(0,1fr); }
  .transcript-segments p span { grid-column: 1 / -1; }
  .record, .card-head { flex-wrap: wrap; }
  .record > div, .record-right { min-width: 0; max-width: 100%; }
  .stock-item { display: flex; flex-direction: column; }
  .stock-item img { width: 100%; max-height: 220px; object-fit: contain; }
  .stock-meta { width: 100%; }
  .page-head-row h2, .page-intro h2, .settings-header h2 { font-size: 22px; line-height: 1.5; }
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

.num,
.chat-time,
.unread-count,
.nav-badge,
.summary-stats strong,
.pin,
.message-time {
  font-variant-numeric: lining-nums tabular-nums;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

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

input:not([type]),
input[type="text"],
input[type="password"],
input[type="number"],
input[type="url"],
input[type="time"],
textarea,
select {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: var(--surface);
  color: var(--ink);
  width: 100%;
  min-width: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(14, 117, 101, 0.12);
}

textarea {
  resize: vertical;
  line-height: 1.65;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  margin: 0 0 12px;
}

label > span {
  display: block;
  margin-bottom: 6px;
}

h1, h2, h3, h4, p {
  margin-top: 0;
}

h1 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0;
}

h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
}

h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
}

p {
  line-height: 1.7;
  margin-bottom: 10px;
}

.muted {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
}

.eyebrow {
  font-size: 10px;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: #5b747a;
  margin: 0 0 4px;
  text-transform: uppercase;
}

/* 共通ボタン */
.primary,
.secondary,
.danger-btn,
.ghost-btn {
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 9px 15px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
}

.primary {
  background: var(--green);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(14, 117, 101, 0.22);
}

.primary:hover:not(:disabled) {
  background: var(--green-dark);
}

.secondary {
  background: #edf2f5;
  color: var(--ink);
  border-color: #dce4e9;
}

.secondary:hover:not(:disabled) {
  background: #e1e9ee;
}

.danger-btn {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: var(--danger-line);
}

.danger-btn:hover:not(:disabled) {
  background: #f9dcdc;
}

.ghost-btn {
  background: transparent;
  color: var(--ink-soft);
  border-color: var(--line);
}

.ghost-btn:hover:not(:disabled) {
  background: var(--paper);
}

.small-btn {
  padding: 6px 11px;
  font-size: 12px;
}

.full-btn {
  width: 100%;
  padding: 12px 18px;
}

.text-btn,
.icon-btn {
  border: 0;
  background: none;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.icon-btn:hover {
  background: #ecf1f4;
  color: var(--ink);
}

.nav-ico {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.search-ico {
  width: 15px;
  height: 15px;
  stroke: var(--muted);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* バッジ・ピル */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.pill.ok {
  background: var(--green-soft);
  color: var(--green-ink);
}

.pill.warn {
  background: var(--amber-bg);
  color: var(--amber-ink);
}

.pill.danger {
  background: var(--danger-bg);
  color: var(--danger);
}

.pill.neutral {
  background: #eaf0f3;
  color: var(--ink-soft);
}

/* ログイン画面 */
.login {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 65% 55% at 15% 10%, rgba(14, 117, 101, 0.16), transparent 60%),
    radial-gradient(ellipse 50% 45% at 88% 85%, rgba(19, 35, 51, 0.10), transparent 60%),
    var(--paper);
}

.login-card {
  width: min(460px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 36px;
  box-shadow: var(--shadow-lg);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.login-brand h1 {
  font-size: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ver-pill {
  font-size: 11px;
  font-weight: 700;
  background: var(--green-soft);
  color: var(--green-ink);
  padding: 3px 8px;
  border-radius: 999px;
}

.login-lead {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 22px;
}

#login-note {
  margin: 14px 0 0;
}

.login-extra {
  margin: 12px 0 18px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  background: #fafcfd;
}

.login-extra summary {
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 600;
}

.login-extra-body {
  padding-top: 12px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  background: linear-gradient(135deg, #0e7565 0%, #159480 100%);
  color: #ffffff;
  font-size: 26px;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(14, 117, 101, 0.25);
}

.brand-mark.small {
  width: 32px;
  height: 32px;
  font-size: 17px;
  border-radius: 9px;
}

/* 左端コンパクト・アカウント切替レール */
.account-rail {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 66px;
  background: var(--rail);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 22;
}

.rail-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  overflow-y: auto;
  width: 100%;
  flex: 1;
  padding: 4px 0;
}

.rail-btn {
  position: relative;
  width: 50px;
  border: 0;
  background: transparent;
  color: #b8c9d8;
  padding: 4px 0;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: background-color 0.15s ease;
}

.rail-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.rail-btn.active .rail-avatar {
  box-shadow: 0 0 0 2.5px #ffffff, 0 0 0 4.5px var(--green);
}

.rail-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  background: #284259;
  position: relative;
  overflow: hidden;
}

.rail-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rail-avatar.all-mark {
  background: linear-gradient(135deg, #0e7565 0%, #1c9b86 100%);
}

.rail-avatar.add-mark {
  background: rgba(255, 255, 255, 0.09);
  color: #d6e4ee;
  font-size: 20px;
  font-weight: 500;
}

.rail-label {
  font-size: 9.5px;
  max-width: 50px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-dot {
  position: absolute;
  right: 4px;
  top: 2px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid var(--rail);
  background: #4cc29c;
}

.rail-dot.off {
  background: #e16d6d;
}

.rail-dot.warn {
  background: #e4a93b;
}

.rail-unread {
  position: absolute;
  left: 3px;
  top: 0;
  background: #d94141;
  color: #ffffff;
  font-size: 9px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  display: grid;
  place-items: center;
}

/* 機能ナビゲーションサイドバー */
.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 66px;
  width: 214px;
  background: var(--nav);
  color: #d7e3ec;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 14px;
  color: #ffffff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-name {
  display: block;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.brand small {
  display: block;
  color: #8ba3b8;
  font-size: 9px;
  letter-spacing: 0.14em;
  margin-top: 2px;
}

.nav-label {
  font-size: 10px;
  font-weight: 700;
  color: #89a1b6;
  letter-spacing: 0.08em;
  margin: 18px 8px 8px;
}

#nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

#nav button {
  padding: 10px 10px;
  background: transparent;
  color: #c7d6e3;
  border: 0;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
  transition: background-color 0.14s ease, color 0.14s ease;
}

#nav button:hover {
  background: var(--nav-hover);
  color: #ffffff;
}

#nav button.active {
  background: var(--nav-active);
  color: #ffffff;
  font-weight: 600;
}

.nav-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  background: var(--green);
  color: #ffffff;
  border-radius: 999px;
  padding: 2px 7px;
  min-width: 20px;
  text-align: center;
}

.nav-badge.soft {
  background: #2f5370;
}

.nav-badge.danger {
  background: #c93b3b;
}

.sidebar-accounts {
  overflow-y: auto;
  flex: 1;
  min-height: 48px;
}

.account-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding: 7px 8px;
  border-radius: 6px;
  color: #d0dde8;
}

.account-row small {
  margin-left: auto;
  color: #8ea6b9;
  font-size: 10px;
  white-space: nowrap;
}

.color-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.sidebar-bottom {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #a6bccd;
  font-size: 11px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  padding-top: 14px;
}

.sidebar-logout {
  margin-left: auto;
  border: 0;
  background: none;
  color: #a6bccd;
  padding: 4px;
  border-radius: 6px;
}

.sidebar-logout:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4cc29c;
  flex-shrink: 0;
}

.status-dot.offline {
  background: #e16d6d;
}

/* メイン領域＆トップバー */
main {
  margin-left: 280px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 68px;
  padding: 0 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 15;
}

.topbar-title {
  min-width: 0;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.private-badge {
  color: var(--green-ink);
  font-size: 11px;
  font-weight: 600;
  background: var(--green-soft);
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.demo-badge {
  color: var(--amber-ink);
  background: var(--amber-bg);
  border: 1px solid var(--amber-line);
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  white-space: nowrap;
}

.owner-avatar {
  border-radius: 50%;
  background: #e7eef3;
  color: var(--ink);
  font-size: 11px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  font-weight: 700;
  flex-shrink: 0;
}

.banner {
  padding: 10px 24px;
  background: var(--amber-bg);
  color: var(--amber-ink);
  font-size: 12.5px;
  font-weight: 600;
  border-bottom: 1px solid var(--amber-line);
}

.banner.danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-bottom-color: var(--danger-line);
}

/* 1. 受信箱レイアウト */
.inbox-layout {
  height: calc(100dvh - 68px);
  display: grid;
  grid-template-columns: 336px minmax(0, 1fr);
  min-height: 0;
}

.conversation-list {
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.mobile-account-strip {
  display: none;
}

.list-top {
  padding: 14px 16px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.list-tabs {
  display: flex;
  gap: 4px;
  background: var(--paper);
  padding: 3px;
  border-radius: 9px;
}

.list-tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 7px;
  white-space: nowrap;
}

.list-tab.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(13, 26, 38, 0.08);
}

.filter-toggle {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.filter-toggle.active {
  background: var(--green);
  border-color: var(--green);
  color: #ffffff;
}

.list-controls {
  padding: 0 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-bottom: 1px solid var(--line-soft);
}

.search-input {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  padding: 2px 10px;
  border-radius: var(--radius-sm);
}

.search-input input {
  border: 0;
  background: transparent;
  font-size: 12.5px;
  padding: 7px 2px;
  box-shadow: none;
}

.compact-select {
  padding: 7px 10px;
  font-size: 12.5px;
}

.compact-input {
  padding: 8px 11px;
  font-size: 13px;
  max-width: 300px;
}

.chat-list-scroll {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.chat-item {
  width: 100%;
  border: 0;
  background: var(--surface);
  display: flex;
  gap: 12px;
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
  position: relative;
  transition: background-color 0.12s ease;
}

.chat-item:hover {
  background: #f7fafb;
}

.chat-item.selected {
  background: #ebf5f1;
}

.chat-item.selected::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--green);
}

.chat-avatar {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 700;
  background: #e3ecf2;
  color: var(--ink);
  overflow: hidden;
}

.chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-info {
  flex: 1;
  min-width: 0;
}

.chat-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chat-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.chat-time {
  color: var(--muted);
  font-size: 11px;
  flex-shrink: 0;
}

.chat-sub-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 3px 0 4px;
}

.account-tag {
  font-size: 11px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.cat-tag {
  font-size: 10px;
  font-weight: 600;
  background: #e9eff4;
  color: #31485c;
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.stage-tag {
  font-size: 10px;
  font-weight: 600;
  background: var(--green-soft);
  color: var(--green-ink);
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.preview-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.chat-preview {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.unread-count {
  font-size: 10.5px;
  font-weight: 700;
  color: #ffffff;
  background: var(--green);
  padding: 2px 7px;
  min-width: 20px;
  text-align: center;
  border-radius: 999px;
  flex-shrink: 0;
}

.list-footer {
  padding: 10px 14px;
  font-size: 11px;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

/* チャットパネル */
.chat-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--paper);
  position: relative;
}

.empty-chat {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px;
  color: var(--muted);
}

.empty-symbol {
  background: var(--green-soft);
  color: var(--green);
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  margin-bottom: 20px;
}

.empty-symbol svg {
  width: 34px;
  height: 34px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

.chat-header {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.chat-header-main {
  min-width: 0;
  flex: 1;
}

.chat-header h2 {
  font-size: 15.5px;
  margin: 0 0 2px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.mobile-back {
  display: none;
}

.chat-policy {
  padding: 7px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 11.5px;
  border-bottom: 1px solid var(--line);
  background: #f8fbfc;
}

.policy-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 26px;
}

.date-divider {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  margin: 10px 0 20px;
}

.date-divider span {
  background: #e6edf2;
  padding: 3px 12px;
  border-radius: 999px;
}

.message {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 16px;
  max-width: 78%;
}

.message.outbound {
  align-items: flex-end;
  margin-left: auto;
}

.message-sender {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 4px 4px;
}

.bubble {
  border: 1px solid #dde6ea;
  background: var(--surface);
  border-radius: 4px 14px 14px 14px;
  padding: 11px 15px;
  font-size: 13.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: normal;
  line-break: strict;
  overflow-wrap: break-word;
  min-width: 48px;
  box-shadow: 0 1px 2px rgba(13, 26, 38, 0.04);
}

.outbound .bubble {
  background: #dff1ea;
  border-color: #c5e3d7;
  border-radius: 14px 4px 14px 14px;
  color: #133930;
}

.message.withdrawn .bubble {
  background: #f1f4f6;
  color: var(--muted);
  font-style: italic;
}

.reply-quote {
  font-size: 11.5px;
  color: var(--ink-soft);
  background: rgba(19, 35, 51, 0.06);
  border-left: 3px solid var(--green);
  padding: 5px 9px;
  border-radius: 5px;
  margin-bottom: 8px;
}

.reply-quote strong {
  display: block;
  font-size: 10.5px;
  color: var(--green-ink);
  margin-bottom: 2px;
}

.sticker-img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  display: block;
}

.bubble img:not(.sticker-img),
.bubble video {
  max-width: min(290px, 100%);
  max-height: 240px;
  border-radius: 8px;
  display: block;
  margin-top: 6px;
}

.bubble audio {
  max-width: 260px;
  display: block;
  margin-top: 6px;
}

.transcript-box {
  margin-top: 8px;
  padding: 8px 10px;
  background: #f3f7f9;
  border-left: 3px solid #3c7ea6;
  border-radius: 6px;
  font-size: 12px;
  color: var(--ink-soft);
}

.transcript-box strong {
  display: block;
  font-size: 10.5px;
  color: #295c7c;
  margin-bottom: 3px;
}

.reactions-bar {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 5px;
}

.reaction-pill {
  font-size: 11px;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  color: var(--ink-soft);
}

.message-time {
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.source-chip {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: #e5eef3;
  color: #2f4b61;
}

.source-chip.ai {
  background: #e3f0fd;
  color: #1c538e;
}

.msg-action-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 4px;
}

.msg-action-btn:hover {
  background: #e5edf1;
  color: var(--ink);
}

.msg-action-btn.danger:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

.file-link {
  color: var(--green-dark);
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  margin-top: 6px;
  font-size: 12.5px;
}

.file-link:hover {
  text-decoration: underline;
}

.acquisition-note {
  font-size: 11.5px;
  color: var(--amber-ink);
  background: var(--amber-bg);
  padding: 6px 9px;
  border-radius: 6px;
  margin-top: 6px;
}

/* コンポーザー */
.composer {
  padding: 12px 20px 16px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.ai-conflict-bar {
  background: #eef6ff;
  border: 1px solid #c5dcf6;
  color: #1e4b7a;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 9px;
}

.composer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 8px;
}

.composer-top strong {
  color: var(--ink);
}

.quick-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-soft);
  margin: 0;
  cursor: pointer;
}

.quick-toggle input {
  width: 15px;
  height: 15px;
  accent-color: var(--green);
}

.composer-box {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  background: #fafcfd;
}

.composer-box textarea {
  border: 0;
  background: transparent;
  resize: none;
  max-height: 140px;
  padding: 6px 4px;
  font-size: 13.5px;
  min-height: 36px;
  box-shadow: none;
}

.composer-bottom {
  margin-top: 8px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

.composer-bottom button {
  font-size: 12px;
  font-weight: 600;
  color: var(--green-dark);
  border: 0;
  background: #eef6f4;
  padding: 4px 10px;
  border-radius: 6px;
}

.composer-bottom button:hover {
  background: #dff0ec;
}

.attachment-chip,
.reply-chip {
  font-size: 12px;
  background: var(--green-soft);
  color: var(--green-ink);
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* ページビュー共通 */
.page-view {
  padding: 28px 32px 48px;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
}

.page-intro {
  margin-bottom: 22px;
}

.page-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 22px;
}

.account-picker-wrap {
  min-width: 240px;
}

.inline-label {
  margin: 0;
  font-size: 12px;
}

.two-col-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.stack-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.sub-card {
  background: #fafcfd;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px;
  min-width: 0;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.card-head h3 {
  margin-bottom: 0;
}

.form-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.inline-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.compact-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tempo-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mini-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.mini-chip {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}

.mini-chip:hover {
  border-color: var(--green);
  color: var(--green-dark);
}

.check-stack {
  margin: 10px 0 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.check-label {
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
  cursor: pointer;
}

.check-label input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--green);
  flex-shrink: 0;
}

.check-label small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  margin: 0;
  cursor: pointer;
}

.inline-check input {
  width: 15px;
  height: 15px;
  accent-color: var(--green);
}

.scope-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 8px 0;
}

.scope-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
}

.button-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.block-title {
  margin: 26px 0 12px;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink);
}

/* AI 回答・下書き・拡張モジュール */
.ai-answer {
  white-space: pre-wrap;
  line-height: 1.75;
  font-size: 13px;
  border-top: 1px solid var(--line);
  margin-top: 16px;
  padding-top: 16px;
}

.ai-answer:empty {
  display: none;
}

.draft-card,
.result-card,
.account-card,
.record {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin: 10px 0;
}

.draft-card pre,
.send-preview {
  white-space: pre-wrap;
  word-break: normal;
  overflow-wrap: break-word;
  font: inherit;
  font-size: 13px;
  line-height: 1.7;
  background: #f2f7f5;
  border: 1px solid #dce9e4;
  border-radius: var(--radius-sm);
  padding: 14px;
  margin: 10px 0 14px;
}

.advanced-summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  padding: 4px 0;
}

.advanced-body {
  padding-top: 18px;
}

.stock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.stock-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
  font-size: 11.5px;
}

.stock-item img {
  width: 100%;
  height: 86px;
  object-fit: cover;
  display: block;
}

.stock-meta {
  padding: 7px;
}

/* 検索・ファイル・連絡先 */
.global-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px 180px auto;
  gap: 10px;
  margin-bottom: 20px;
}

.result-card {
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.result-card:hover {
  border-color: var(--green);
}

.result-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 6px;
}

.toolbar-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

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

.chips button {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}

.chips button.selected {
  background: var(--nav);
  border-color: var(--nav);
  color: #ffffff;
}

.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.file-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.file-art {
  height: 140px;
  background: #edf3f2;
  display: grid;
  place-items: center;
  color: var(--green);
  font-weight: 700;
  font-size: 14px;
}

.file-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-info {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

/* プロフィール＆連絡先 */
.profile-preview-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.profile-avatar-lg {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: #e1ecef;
  color: var(--ink);
  font-size: 24px;
  font-weight: 700;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}

.profile-avatar-lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-upload-btn {
  display: inline-flex;
  cursor: pointer;
}

.qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 12px;
}

.qr-box img {
  width: 196px;
  height: 196px;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.contact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
  background: #fafcfd;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 開発者API・仕様書 */
.secret-reveal {
  margin-top: 12px;
  padding: 12px;
  background: var(--amber-bg);
  border: 1px solid var(--amber-line);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
}

.secret-code {
  display: block;
  margin: 8px 0;
  padding: 8px 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: "Cascadia Mono", Consolas, "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", "Meiryo", monospace;
  font-size: 12px;
  overflow-x: auto;
  white-space: nowrap;
}

.spec-pre {
  background: #101f2d;
  color: #dce9f4;
  border-radius: var(--radius-sm);
  padding: 18px;
  font-family: "Cascadia Mono", Consolas, "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", "Meiryo", monospace;
  font-size: 12px;
  line-height: 1.65;
  max-height: 460px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  margin: 0;
}

/* 設定・接続・統合監視 */

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 14px;
  margin: 12px 0;
}

.stat-tile {
  background: #f6f9fb;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.stat-tile strong {
  display: block;
  font-size: 20px;
  color: var(--ink);
  margin-bottom: 2px;
}

.stat-tile span {
  font-size: 11.5px;
  color: var(--muted);
}

.account-card {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.account-card-info {
  flex: 1 1 200px;
  min-width: 0;
}

.account-reason {
  flex: 1 0 100%;
  color: var(--danger);
  background: var(--danger-bg);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 12.5px;
}

.connection-panel {
  flex: 1 0 100%;
  min-width: 0;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 4px;
}

.connection-list {
  max-height: 240px;
  overflow: auto;
}

.connection-row {
  display: flex;
  gap: 12px;
  padding: 6px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
  flex-wrap: wrap;
}

.record {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 12.5px;
}

.record.failed,
.record.unknown {
  border-color: var(--danger-line);
}

.record-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sticker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.sticker-pick-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.sticker-pick-btn:hover {
  border-color: var(--green);
  background: var(--green-soft);
}

.sticker-pick-btn img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

/* モーダル＆トースト */
dialog {
  border: 0;
  border-radius: var(--radius-lg);
  padding: 26px;
  max-width: 560px;
  width: calc(100vw - 28px);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  max-height: 90dvh;
  overflow-y: auto;
}

dialog::backdrop {
  background: rgba(13, 26, 38, 0.52);
  backdrop-filter: blur(3px);
}

dialog .dialog-close {
  float: right;
  border: 0;
  background: #edf2f5;
  color: var(--ink);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 18px;
  display: grid;
  place-items: center;
}

#qr-img {
  display: block;
  width: 232px;
  height: 232px;
  margin: 18px auto;
}

.pin {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 6px;
  text-align: center;
  margin: 20px 0;
}

.empty-state {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 36px 20px;
  line-height: 1.85;
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  vertical-align: -2px;
  border: 2px solid var(--line);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; }
}

.mobile-nav {
  display: none;
}

#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--nav);
  color: #ffffff;
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  z-index: 100;
  width: max-content;
  max-width: min(560px, calc(100vw - 32px));
}

/* タブレット幅 */
@media (max-width: 1120px) {
  .account-rail {
    width: 58px;
  }
  .sidebar {
    left: 58px;
    width: 192px;
  }
  main {
    margin-left: 250px;
  }
  .inbox-layout {
    grid-template-columns: 290px minmax(0, 1fr);
  }
  .global-search {
    grid-template-columns: 1fr 1fr;
  }
  .two-col-grid {
    grid-template-columns: 1fr;
  }
  .private-badge {
    display: none;
  }
}

/* モバイル幅 (390px 完全最適化・1カラム厳守) */
@media (max-width: 780px) {
  .account-rail,
  .sidebar {
    display: none;
  }
  main {
    margin-left: 0;
  }
  .topbar { height: 100px; padding: 8px 14px; flex-wrap: wrap; align-content: center; gap: 4px; }
  .topbar-title { flex: 1 0 100%; min-width: 0; }
  .topbar-title .eyebrow { display: none; }
  .topbar-title h1 { white-space: nowrap; }
  .top-actions { width: 100%; justify-content: space-between; }
  .topbar h1 {
    font-size: 17px;
  }
  .owner-avatar {
    display: none;
  }
  .mobile-account-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 14px 4px;
    border-bottom: 1px solid var(--line-soft);
  }
  .mobile-acc-chip {
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink-soft);
    border-radius: 999px;
    padding: 5px 11px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .mobile-acc-chip.active {
    background: var(--nav);
    border-color: var(--nav);
    color: #ffffff;
  }
  .inbox-layout {
    height: calc(100dvh - 162px - env(safe-area-inset-bottom));
    display: block;
  }
  .conversation-list {
    height: 100%;
    border-right: 0;
  }
  .chat-panel {
    display: none;
    height: 100%;
  }
  body.chat-open .conversation-list {
    display: none;
  }
  body.chat-open .chat-panel {
    display: flex;
  }
  body.chat-open .topbar,
  body.chat-open #first-time-guide-banner {
    display: none;
  }
  body.chat-open .inbox-layout {
    height: calc(100dvh - 62px - env(safe-area-inset-bottom));
  }
  .mobile-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: #edf2f5;
    color: var(--ink);
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-size: 20px;
    flex-shrink: 0;
  }
  .chat-header {
    padding: 10px 12px;
  }
  .chat-policy {
    padding: 7px 12px;
  }
  .messages {
    padding: 14px 12px;
  }
  .message {
    max-width: 90%;
  }
  .composer {
    padding: 10px 12px;
  }
  .page-view {
    padding: 16px 14px 92px;
  }
  .two-col-grid,
  .settings-grid,
  .inline-pair,
  .global-search {
    grid-template-columns: 1fr;
  }
  .file-grid,
  .contacts-grid,
  .card {
    padding: 16px;
  }
  .login-card {
    padding: 24px;
  }
  .mobile-nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(62px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--surface);
    border-top: 1px solid var(--line);
    z-index: 25;
    justify-content: space-around;
    align-items: center;
  }
  .mobile-nav button {
    border: 0;
    background: none;
    color: var(--muted);
    padding: 6px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 56px;
  }
  .mobile-nav small {
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
  }
  .mobile-nav button.active {
    color: var(--green);
  }
  #toast {
    bottom: 76px;
  }
}

/* グループ既読・未読メンバー表示 */
.read-badge-btn {
  display: inline-flex;
  align-items: center;
  border: 1px solid #b9dfd6;
  background: #edf9f6;
  color: #0b6b5c;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: lining-nums tabular-nums;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  line-height: 1.4;
}

.read-badge-btn:hover {
  background: #dbf2ec;
  border-color: #7cc5b4;
}

.read-badge-btn.all-read {
  background: #dff4ee;
  border-color: #6bbfab;
  color: #075548;
}

.read-badge-btn.zero-read {
  background: #f1f5f7;
  border-color: #d6e0e5;
  color: #4f6473;
}

.read-modal-quote {
  background: #f4f8f9;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  margin: 12px 0;
}

.read-modal-quote-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: break-word;
  word-break: normal;
  line-break: strict;
}

.read-modal-quote-meta {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 4px;
}

.read-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0;
}

.read-summary-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  background: var(--surface);
}

.read-summary-card span {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.read-summary-card strong {
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: lining-nums tabular-nums;
  white-space: nowrap;
}

.read-summary-card.is-read {
  background: #edf9f6;
  border-color: #b9dfd6;
}

.read-summary-card.is-read strong {
  color: #0b6b5c;
}

.read-summary-card.is-unread strong {
  color: var(--ink);
}

.read-sync-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 14px;
}

.read-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin: 14px 0 8px;
}

.read-member-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}

.read-member-list.tall {
  max-height: 380px;
}

.read-member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.read-member-row.has-sub {
  align-items: flex-start;
}

.read-member-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e4eef2;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
}

.read-member-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.read-member-main {
  flex: 1;
  min-width: 0;
}

.read-member-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.read-member-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: normal;
  line-break: strict;
}

.read-member-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 3px;
  overflow-wrap: break-word;
  word-break: normal;
  line-break: strict;
}

.read-member-status {
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: lining-nums tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
  text-align: right;
  margin-left: auto;
}

.read-inline-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: #eef2f5;
  color: #4f6473;
  white-space: nowrap;
}

.read-inline-tag.is-self {
  background: #e2f5ef;
  color: #0b6b5c;
}

.read-empty {
  font-size: 12.5px;
  color: var(--muted);
  padding: 10px 12px;
  background: #f7fafb;
  border-radius: 10px;
  margin: 0;
}

.read-notice {
  font-size: 11.5px;
  color: var(--muted);
  margin: 14px 0 0;
  line-height: 1.6;
}

/* Phase 1: 未確定プレースホルダ警告ガード ＆ 4 点セット感情ガード下書きパネル */
.placeholder-guard {
  margin: 0 0 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #fff4e5;
  border: 1px solid #f59e0b;
  color: #92400e;
  font-size: 12.5px;
  line-height: 1.5;
}

.placeholder-guard-modal {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff4e5;
  border: 1px solid #f59e0b;
  color: #92400e;
  font-size: 13px;
  line-height: 1.55;
}

.guard-override {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-weight: 600;
  cursor: pointer;
}

.intel-card-box {
  margin: 8px 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid var(--line);
  font-size: 12.5px;
}

.intel-card-title {
  font-weight: 700;
  margin-bottom: 6px;
}

.intel-card-list {
  margin: 0;
  padding-left: 18px;
  line-height: 1.6;
}

.intel-hint-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.intel-hint-row input {
  flex: 1;
  min-width: 0;
}

.intel-variant {
  margin-bottom: 12px;
}

.intel-variant-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.intel-note,
.intel-ask {
  margin: 8px 0;
  padding: 8px 10px;
  border-radius: 6px;
  background: #f1f5f9;
  font-size: 12.5px;
  line-height: 1.55;
}

/* Phase 2: スマホ片手「返信待ちトリアージ」ビュー */
.triage-shell {
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.triage-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.triage-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.triage-progress {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: lining-nums tabular-nums;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-ink);
  white-space: nowrap;
}

.triage-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.triage-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.triage-peer {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.triage-acc-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex-shrink: 0;
}

.triage-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.triage-title-row h3 {
  margin: 0;
  font-size: 16px;
}

.triage-reason-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  white-space: nowrap;
}

.triage-nav-btns {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.triage-incoming {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}

.triage-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 4px;
}

.triage-incoming-body {
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: normal;
  overflow-wrap: break-word;
}

.triage-ai-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.triage-textarea {
  width: 100%;
  min-height: 108px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  box-sizing: border-box;
}

.triage-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.triage-send-btn {
  width: 100%;
  min-height: 46px;
  font-size: 15px;
  font-weight: 700;
}

.triage-sub-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.triage-sub-actions button {
  min-height: 40px;
  white-space: nowrap;
}

.triage-empty {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 18px;
  text-align: center;
}

/* Phase 3: 営業動画閉ループ ステータスバー（有効テナントのみ表示） */
.outreach-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 20px;
  background: #f0fdf4;
  border-bottom: 1px solid #bbf7d0;
  font-size: 12.5px;
}

.outreach-status-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.outreach-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  background: #dcfce7;
  color: #166534;
}

.outreach-pill.status-read {
  background: #dbeafe;
  color: #1e40af;
}

.outreach-pill.status-replied {
  background: #fef3c7;
  color: #92400e;
}

/* Phase 4: 10 年過去アーカイブ透過履歴 & 横断検索統合 */
.archive-history-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 6px 0 12px;
}

.archive-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 16px;
  color: #475569;
  font-size: 11.5px;
  font-weight: 600;
}

.archive-divider::before,
.archive-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #cbd5e1;
}

.archive-divider span {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.message.is-archive .bubble {
  opacity: 0.92;
  border: 1px dashed #94a3b8;
}

.archive-tag {
  font-size: 10.5px;
  font-weight: 700;
  color: #334155;
  background: #e2e8f0;
  padding: 1px 6px;
  border-radius: 4px;
  margin-right: 4px;
  white-space: nowrap;
}

.unified-search-summary {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  padding: 8px 12px;
  margin-bottom: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.pill.archive {
  background: #e0e7ff;
  color: #3730a3;
}

.result-card.is-archive-result {
  border-left: 3px solid #4f46e5;
}

/* 営業アプローチ反応率レポート & ランダム幅プリセット */
.mini-chip.is-active {
  background: var(--green);
  border-color: var(--green);
  color: #ffffff;
}

.analytics-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

@media (max-width: 720px) {
  .analytics-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.analytics-kpi {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.analytics-kpi span {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
}

.analytics-kpi strong {
  font-size: 22px;
  line-height: 1.25;
  color: var(--ink);
}

.analytics-kpi small {
  font-size: 11px;
  color: var(--muted);
}

.analytics-kpi.is-read {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.analytics-kpi.is-reply {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.analytics-kpi.is-warn {
  background: #fffbeb;
  border-color: #fde68a;
}

.analytics-product-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.analytics-product-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #ffffff;
}

.analytics-product-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
}

.analytics-product-metrics {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* 初めての方へ・使い方ガイド & インラインヘルプ */
.guide-welcome-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 20px;
  background: #eef6f4;
  border-bottom: 1px solid #cce6df;
  font-size: 13px;
  color: var(--ink);
}

.guide-welcome-text {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.guide-welcome-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.guide-modal-card {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
}

.guide-modal-card h3 {
  margin: 0 0 6px;
  font-size: 15.5px;
}

.guide-step-list {
  margin: 10px 0 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13.5px;
  line-height: 1.6;
}

.inline-help-box {
  margin-bottom: 14px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 12.5px;
}

.inline-help-box summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--green-dark);
}

.inline-help-list {
  margin: 8px 0 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--ink-soft);
  line-height: 1.55;
}

.view-inline-guide {
  margin: 10px 14px 12px;
}

.page-view > .view-inline-guide {
  margin: 0 0 18px;
}

/* フルガイドセンターモーダル */
dialog.guide-dialog-wide {
  max-width: 860px;
  width: min(860px, calc(100vw - 24px));
}

.guide-center-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.guide-center-top h2 {
  margin: 2px 0 0;
}

.guide-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

#guide-search-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 13.5px;
  background: #ffffff;
}

.guide-center-body {
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 2px;
}

.guide-screen-tabs {
  margin-bottom: 12px;
}

.guide-screen-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.guide-subhead {
  margin: 14px 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--green-dark);
}

.guide-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 680px) {
  .guide-feature-grid {
    grid-template-columns: 1fr;
  }
}

.guide-feature-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 12.5px;
  line-height: 1.55;
}

.guide-feature-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  color: var(--ink);
}

.guide-feature-card p {
  margin: 0;
  color: var(--ink-soft);
}

.guide-feature-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.guide-caution-box {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 9px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 12.5px;
  line-height: 1.55;
}

.guide-checklist-wrap,
.guide-faq-list,
.guide-search-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.guide-check-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  font-size: 13px;
}

.guide-check-row.is-done {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.guide-check-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.guide-check-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: #e2e8f0;
  color: #475569;
  flex-shrink: 0;
}

.guide-check-row.is-done .guide-check-mark {
  background: var(--green);
  color: #ffffff;
}

.guide-faq-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #ffffff;
}

.guide-faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 13.5px;
  line-height: 1.5;
}

.guide-faq-item p {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* 実画面スポットライトツアー */
.tour-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 9000;
  pointer-events: none;
}

.tour-highlight-target {
  position: relative !important;
  z-index: 9001 !important;
  box-shadow: 0 0 0 4px #10b981, 0 0 0 8px rgba(16, 185, 129, 0.28) !important;
  border-radius: 10px;
}

.tour-popover {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: min(410px, calc(100vw - 24px));
  background: #ffffff;
  border: 2px solid var(--green);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.28);
  z-index: 9010;
}

@media (max-width: 640px) {
  .tour-popover {
    left: 12px;
    right: 12px;
    bottom: 68px;
    width: auto;
  }
}

.tour-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.tour-step-badge {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--green-dark);
  background: var(--green-soft);
  padding: 2px 9px;
  border-radius: 999px;
}

.tour-progress-bar {
  width: 100%;
  height: 5px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 10px;
}

.tour-progress-fill {
  height: 100%;
  background: var(--green);
  transition: width 0.2s ease;
}

.tour-popover h3 {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.4;
}

.tour-body {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.tour-tip {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 12px;
}

.tour-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* グループ @ メンションピッカー・チップ・ハイライト */
.mention-host {
  position: relative;
}

.mention-picker {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 6px);
  z-index: 45;
  background: var(--surface, #ffffff);
  border: 1px solid var(--line, #d7e2e8);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
  max-height: 240px;
  overflow-y: auto;
  padding: 6px;
}

.mention-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink, #0f172a);
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
}

.mention-option:hover,
.mention-option.is-active {
  background: #e6f4f0;
  color: #0b4f45;
}

.mention-ava {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #0f766e;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mention-option.is-all .mention-ava {
  background: #1d4ed8;
}

.mention-name {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mention-sub {
  font-size: 11.5px;
  color: var(--muted, #5c6f7e);
  white-space: nowrap;
  flex-shrink: 0;
}

.mention-picker-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px 2px;
  margin-top: 4px;
  border-top: 1px solid var(--line, #e2e8f0);
  font-size: 11.5px;
  color: var(--muted, #5c6f7e);
}

.mention-sync-btn {
  font-size: 11.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.mention-empty {
  padding: 10px 12px;
  font-size: 12.5px;
  color: var(--muted, #5c6f7e);
}

.mention-chip-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 12px;
}

.mention-chip-label {
  color: var(--muted, #5c6f7e);
  font-weight: 600;
  white-space: nowrap;
}

.mention-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-weight: 600;
  white-space: nowrap;
}

.mention-chip.is-all {
  background: #dbeafe;
  color: #1e40af;
}

.mention-tag {
  display: inline;
  padding: 0 3px;
  border-radius: 4px;
  background: rgba(14, 116, 144, 0.12);
  color: #0e5a6f;
  font-weight: 700;
}

.mention-tag.is-all {
  background: rgba(29, 78, 216, 0.14);
  color: #1e40af;
}

/* LYP プレミアム: ミュート送信・プレミアム送信取消 UI */
.mute-ico {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.composer-bottom button.mute-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #edf1f8;
  color: #33466b;
  border: 1px solid #d5deef;
  white-space: nowrap;
  flex-shrink: 0;
}

.composer-bottom button.mute-toggle-btn:hover {
  background: #e0e8f6;
}

.composer-bottom button.mute-toggle-btn.active {
  background: #313f6e;
  color: #ffffff;
  border-color: #253057;
}

.composer-box.is-mute {
  border-color: #4f5f94;
  background: #f5f7fc;
}

.primary.is-mute {
  background: #313f6e;
  box-shadow: 0 2px 6px rgba(49, 63, 110, 0.28);
}

.primary.is-mute:hover:not(:disabled) {
  background: #253057;
}

.mute-chip {
  font-size: 12px;
  background: #eceffd;
  color: #26345e;
  border: 1px solid #cfd6f5;
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  line-height: 1.5;
}

.mute-chip span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mute-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: #e9ecfb;
  color: #2c3b6e;
  white-space: nowrap;
  flex-shrink: 0;
}

.source-chip.silent-unsend-chip {
  background: #e8ecf7;
  color: #2b3a67;
  white-space: nowrap;
  flex-shrink: 0;
}

.message.silent-withdrawn .bubble {
  background: #f2f4fa;
  border-color: #d6dcf0;
  color: #455275;
}

.sticker-mute-row {
  margin: 0 0 12px;
  padding: 8px 10px;
  background: #f3f5fc;
  border: 1px solid #d8dff2;
  border-radius: var(--radius-sm);
  display: flex;
}

.unsend-warn {
  font-size: 12px;
  line-height: 1.6;
  color: var(--amber-ink);
  background: var(--amber-bg);
  border: 1px solid #f0d7a8;
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  margin: 10px 0;
}

.unsend-status {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  background: #eef4f7;
  border: 1px solid #d4e1e8;
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  margin: 10px 0;
}

.unsend-status.error {
  color: var(--danger);
  background: var(--danger-bg);
  border-color: var(--danger-line);
}

.unsend-choice-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0 16px;
}

.unsend-choice-btn {
  width: 100%;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  white-space: normal;
  word-break: normal;
  line-break: strict;
  overflow-wrap: break-word;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.unsend-choice-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.unsend-choice-btn.premium {
  border-color: #c5cef0;
  background: #f5f7fe;
}

.unsend-choice-btn.premium:hover:not(:disabled) {
  background: #eaeeff;
  border-color: #8f9fe0;
}

.unsend-choice-btn.danger {
  border-color: var(--danger-line);
  background: #fff7f7;
}

.unsend-choice-btn.danger:hover:not(:disabled) {
  background: var(--danger-bg);
  border-color: #d98282;
}

.unsend-choice-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}

.unsend-choice-btn.premium .unsend-choice-title {
  color: #243263;
}

.unsend-choice-btn.danger .unsend-choice-title {
  color: var(--danger);
}

.unsend-choice-desc {
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
}
