/**
 * チャットボット見せ方デモ — 絢捺サイト用。
 * プロトの見た目を cbs- 接頭辞で移植。トークンは theme の :root を継承。
 * フォントサイズは 0.875rem（14px）以上。ヒット領域は原則 44px。
 */

.cbs-shelf,
.cbs-dialog {
  --cbs-device-radius: 2rem;
  --cbs-screen-radius: 1.35rem;
  --cbs-phone-shadow:
    0 2px 4px oklch(20% 0.03 260 / 0.18),
    0 18px 40px -12px oklch(18% 0.04 260 / 0.55),
    0 40px 72px -28px oklch(16% 0.04 260 / 0.4);
  --cbs-skin-a: #c56a3c;
  --cbs-skin-a-soft: #fff0e6;
  --cbs-skin-a-deep: #8a5a3c;
  --cbs-skin-b: #4f7a4a;
  --cbs-skin-b-soft: #eef6ea;
  --cbs-skin-b-deep: #3a5c37;
  --cbs-skin-c: #355f9f;
  --cbs-skin-c-soft: #e8eef8;
  --cbs-skin-c-deep: #274a7a;
  --cbs-skin-d: #2f8f72;
  --cbs-skin-d-soft: #e8f6f1;
  --cbs-skin-d-deep: #217057;
  --cbs-theme-accent: var(--color-accent);
  --cbs-theme-accent-ink: var(--color-accent-ink);
  --cbs-theme-soft: var(--color-paper-2);
  --cbs-theme-screen: #fff;
  --cbs-theme-head: var(--color-paper-2);
  --cbs-theme-user: var(--color-ink);
  --cbs-theme-user-ink: var(--color-ink-inv);
  --cbs-theme-send: var(--color-accent);
  --cbs-theme-send-ink: var(--color-accent-ink);
  --cbs-theme-chip: #fff;
  font-size: max(0.875rem, 14px);
}

/* ── Shelf: horizontal cards, vertical stack (/izumi) ── */

.cbs-shelf {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 0.75rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: var(--space-lg, 1.5rem);
  padding-block: 0.35rem 0.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  align-self: stretch;
}

.spec--chatbots {
  grid-template-columns: minmax(0, 1fr);
}

.spec--chatbots #chatbots {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.spec--chatbots .spec__action {
  margin-top: var(--space-md, 1rem);
  padding-top: 0;
}

@media (max-width: 60rem) {
  .spec--chatbots #chatbots {
    order: 5;
    align-self: stretch;
    overflow: hidden;
    margin-top: var(--space-md, 1rem);
  }
}

/* ── 構築の特徴（デモの下） ─────────────────────────────────
   既定は5つの見出しを格言のように縦に並べるだけ。押すとその項目の
   説明・ひとこと・デモへの入口が上から下へ開く。開くのは常に1つ。
   JS が動かない環境では .is-ready が付かず、全項目が開いたまま読める。 */
.cbs-feats {
  /* スマホでは .spec__body が display: contents になり、この箱が行の格子に
     直接並ぶ。min-width: 0 がないと中身の幅で押し広げられて右端が切れる */
  min-width: 0;
  max-width: 48rem;
  box-sizing: border-box;
  margin-top: var(--space-xl, 2.5rem);
  margin-bottom: var(--space-lg, 1.5rem);
  padding: var(--space-lg, 1.5rem) var(--space-lg, 1.5rem) var(--space-sm, 0.75rem);
  border: var(--rule-hair, 1px) solid var(--color-rule);
  border-radius: 6px;
  background: color-mix(in oklch, var(--color-paper-2) 45%, transparent);
}

.cbs-feats__title {
  font-size: var(--text-xs, 0.8rem);
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--color-muted);
}

.cbs-feats__lede {
  margin-top: var(--space-xs, 0.5rem);
  font-family: var(--font-display);
  font-size: var(--text-lg, 1.5625rem);
  line-height: 1.5;
  color: var(--color-ink);
  /* 「迷わせ／ない。」のような語の途中で折らない（対応しない環境は従来どおり） */
  word-break: auto-phrase;
  text-wrap: balance;
}

.cbs-feats__list {
  margin: var(--space-md, 1rem) 0 0;
  padding: 0;
  list-style: none;
}

.cbs-feat + .cbs-feat {
  border-top: var(--rule-hair, 1px) solid var(--color-rule-2);
}

.cbs-feat__head {
  margin: 0;
  font: inherit;
}

.cbs-feat__toggle {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm, 0.75rem);
  width: 100%;
  min-height: 44px;
  padding: var(--space-sm, 0.75rem) 0;
  background: none;
  border: 0;
  font: inherit;
  color: var(--color-ink);
  text-align: left;
  cursor: pointer;
}

.cbs-feat__num {
  flex: none;
  font-family: var(--font-display);
  font-size: var(--text-xs, 0.8rem);
  letter-spacing: 0.08em;
  color: var(--color-accent);
  font-variant-numeric: tabular-nums;
}

.cbs-feat__name {
  flex: 1;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.6;
  min-width: 0;
  /* 文節で折るが、1文節が行より長いときは途中で折ってはみ出さない */
  word-break: auto-phrase;
  overflow-wrap: anywhere;
}

.cbs-feat__toggle:hover .cbs-feat__name {
  color: var(--color-accent);
}

/* ＋ が開くと − になる */
.cbs-feat__icon {
  position: relative;
  flex: none;
  align-self: center;
  width: 0.75rem;
  height: 0.75rem;
}

.cbs-feat__icon::before,
.cbs-feat__icon::after {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  height: 1.5px;
  margin-top: -0.75px;
  background: var(--color-muted);
  transition: transform var(--dur-mid, 260ms) var(--ease-out, ease);
}

.cbs-feat__icon::after {
  transform: rotate(90deg);
}

.cbs-feat__toggle[aria-expanded="true"] .cbs-feat__icon::after {
  transform: rotate(0deg);
}

/* 高さ 0 → 中身の高さ を grid の行で補間し、上から下へ開く。
   閉じている間は visibility で中のボタンをタブ移動・読み上げから外す */
.is-ready .cbs-feat__panel {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition:
    grid-template-rows var(--dur-mid, 260ms) var(--ease-out, ease),
    visibility 0s linear var(--dur-mid, 260ms);
}

.is-ready .cbs-feat.is-open .cbs-feat__panel {
  grid-template-rows: 1fr;
  visibility: visible;
  transition:
    grid-template-rows var(--dur-mid, 260ms) var(--ease-out, ease),
    visibility 0s linear 0s;
}

.cbs-feat__inner {
  min-height: 0;
  overflow: hidden;
  padding-left: calc(var(--space-sm, 0.75rem) + 1.2em);
}

.cbs-feat__inner > :last-child {
  margin-bottom: var(--space-md, 1rem);
}

.cbs-feat__desc {
  color: var(--color-ink-2);
}

/* キラーフレーズ。本文と書体を変えて、読み流されないようにする */
.cbs-feat__hook {
  margin-top: var(--space-sm, 0.75rem);
  padding-left: var(--space-sm, 0.75rem);
  border-left: 2px solid var(--color-accent);
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-ink);
  word-break: auto-phrase;
  overflow-wrap: anywhere;
}

/* .link の見た目のまま、button の既定の枠・背景だけ外す */
.cbs-feat__try {
  margin-top: var(--space-sm, 0.75rem);
  padding: 0 0 1px;
  background-color: transparent;
  border: 0;
  border-bottom: var(--rule-hair, 1px) solid var(--color-accent);
  border-radius: 0;
  font: inherit;
  font-size: var(--text-xs, 0.8rem);
  color: var(--color-accent);
  text-align: left;
  white-space: normal;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  .is-ready .cbs-feat__panel,
  .is-ready .cbs-feat.is-open .cbs-feat__panel,
  .cbs-feat__icon::before,
  .cbs-feat__icon::after {
    transition: none;
  }
}

@media (max-width: 60rem) {
  .spec--chatbots .cbs-feats {
    order: 6;
  }
}

@media (max-width: 520px) {
  .cbs-feats {
    padding-inline: var(--space-md, 1rem);
  }

  .cbs-feat__inner {
    padding-left: 0;
  }

  /* 「チャットでなくてもかまいません」のような長い文節が1行に収まる大きさ */
  .cbs-feat__name {
    font-size: 1rem;
  }
}

.cbs-shelf__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  box-sizing: border-box;
  flex: 0 0 13.5rem;
  width: 13.5rem;
  height: auto;
  min-height: 0;
  padding: 0.7rem 0.7rem 0.85rem;
  text-align: left;
  color: var(--color-ink);
  background: #fff;
  border: 1.5px solid rgba(28, 25, 22, 0.38);
  border-bottom-width: 4px;
  border-radius: 18px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 6px 14px rgba(28, 25, 22, 0.1);
  cursor: pointer;
  overflow: hidden;
  scroll-snap-align: start;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.cbs-shelf__card:hover {
  transform: translateY(-2px);
  border-color: rgba(28, 25, 22, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 10px 18px rgba(28, 25, 22, 0.14);
}

.cbs-shelf__card:active {
  transform: translateY(1px);
  border-bottom-width: 2px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.cbs-shelf__card:focus-visible {
  outline: 4px solid #000;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #ffd43d;
}

.cbs-shelf__card--hero {
  border-color: rgba(53, 95, 159, 0.55);
  box-shadow:
    0 14px 32px rgba(53, 95, 159, 0.14),
    0 0 0 2px rgba(53, 95, 159, 0.28);
}

.cbs-shelf__visual {
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 1;
  height: auto;
  align-self: stretch;
  border-radius: 12px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--color-rule);
}

.cbs-shelf__visual--cats {
  background: linear-gradient(160deg, #fff0e6, #ffd4b8);
}

.cbs-shelf__visual--article {
  background: linear-gradient(160deg, #eef6ea, #cfe3c6);
}

.cbs-shelf__visual--dx {
  background: #0b0d12;
  color: var(--cbs-skin-c);
}

.cbs-shelf__visual--town {
  background: linear-gradient(160deg, #e6f6f0, #a8dcc8);
}

.cbs-shelf__visual-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.cbs-shelf__mark {
  display: grid;
  place-items: center;
  color: inherit;
}

.cbs-shelf__cats {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
  padding: 8px;
  box-sizing: border-box;
}

.cbs-shelf__cats img {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}

.cbs-shelf__body {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.cbs-shelf__hook {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--color-muted);
}

.cbs-shelf__badge {
  align-self: flex-start;
  margin-top: 4px;
  padding: 3px 8px;
  font-size: 0.875rem;
  font-weight: 700;
  color: #2f8f72;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(47, 143, 114, 0.3);
  border-radius: 999px;
}

/* ── Dialog ── */

body.cbs-modal-open {
  overflow: hidden;
}

.cbs-dialog {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px 12px;
}

.cbs-dialog.is-open {
  display: flex;
}

.cbs-dialog__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  background: rgba(18, 16, 14, 0.58);
}

.cbs-dialog__panel {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-height: calc(100vh - 24px);
  overflow: auto;
  scrollbar-width: none;
}

.cbs-dialog__panel::-webkit-scrollbar {
  display: none;
}

.cbs-dialog__toolbar {
  width: 100%;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 8px;
  color: #f5f0e8;
}

.cbs-dialog__nav {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.cbs-close {
  grid-column: 3;
  justify-self: end;
}

.cbs-nav-btn,
.cbs-close {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.cbs-nav-btn:hover,
.cbs-close:hover {
  background: rgba(255, 255, 255, 0.26);
}

.cbs-nav-btn:focus-visible,
.cbs-close:focus-visible {
  outline: 4px solid #000;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #ffd43d;
}

.cbs-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.cbs-dot {
  width: 10px;
  height: 10px;
  min-width: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  position: relative;
}

.cbs-dot::after {
  content: "";
  position: absolute;
  inset: -17px;
}

.cbs-dot.is-on {
  background: #fff;
  width: 22px;
  border-radius: 99px;
}

.cbs-dot:focus-visible {
  outline: 4px solid #000;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #ffd43d;
}

/* ── Stage: char-rail + phone ── */

.cbs-stage {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.cbs-char-rail {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  max-width: 7.5rem;
  order: 0;
}

.cbs-phone {
  order: 1;
}

.cbs-char-rail[hidden] {
  display: none !important;
}

.cbs-char-rail__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  min-width: 44px;
  padding: 8px 6px;
  border: 1.5px solid rgba(197, 106, 60, 0.3);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--cbs-skin-a-deep);
  cursor: pointer;
  font-family: inherit;
}

.cbs-char-rail__btn.is-on {
  border-color: var(--cbs-skin-a);
  background: var(--cbs-skin-a-soft);
  box-shadow: 0 0 0 2px rgba(197, 106, 60, 0.25);
}

.cbs-char-rail__btn:focus-visible {
  outline: 4px solid #000;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #ffd43d;
}

.cbs-char-rail__img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 50%;
}

.cbs-char-rail__label {
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

/* ── Phone chrome ── */

.cbs-phone {
  width: min(360px, calc(100vw - 120px));
  position: relative;
  flex-shrink: 0;
}

.cbs-phone__side {
  position: absolute;
  background: #1a1a1a;
  border-radius: 2px;
}

.cbs-phone__side--silent {
  left: -3px;
  top: 72px;
  width: 3px;
  height: 18px;
}

.cbs-phone__side--vol-up {
  left: -3px;
  top: 108px;
  width: 3px;
  height: 36px;
}

.cbs-phone__side--vol-down {
  left: -3px;
  top: 152px;
  width: 3px;
  height: 36px;
}

.cbs-phone__side--power {
  right: -3px;
  top: 120px;
  width: 3px;
  height: 52px;
}

.cbs-phone__shell {
  border-radius: 36px;
  padding: 12px;
  background: linear-gradient(165deg, #333 0%, #0e0e0e 55%, #1a1a1a 100%);
  box-shadow:
    var(--cbs-phone-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  position: relative;
}

.cbs-phone.is-slide .cbs-phone__shell {
  animation: cbs-slide-phone 0.42s cubic-bezier(0.22, 0.9, 0.28, 1) both;
}

.cbs-phone__island {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 108px;
  height: 22px;
  background: #0a0a0a;
  border-radius: 12px;
  z-index: 3;
}

.cbs-phone__home {
  width: 96px;
  height: 4px;
  margin: 8px auto 2px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.22);
}

.cbs-screen {
  border-radius: 26px;
  overflow: hidden;
  height: min(680px, 72vh);
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--cbs-theme-screen);
  color: var(--color-ink, #1c1916);
}

/* ── Chat chrome ── */

.cbs-chat-head {
  padding: 36px 14px 10px;
  text-align: center;
  flex-shrink: 0;
  background: var(--cbs-theme-head);
}

.cbs-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 10px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1.5px solid rgba(28, 25, 22, 0.12);
  background: var(--color-paper, #fff);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
}

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

.cbs-avatar__mark {
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  color: var(--cbs-theme-accent);
}

.cbs-bot-name {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.cbs-bot-status {
  font-size: 0.875rem;
  color: var(--color-muted, #6b645c);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.cbs-build-badge {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fff3cd;
  color: #8a6d1d;
  border: 1px solid rgba(138, 109, 29, 0.35);
}

.cbs-faq-pills,
.cbs-town-bar {
  margin-top: 8px;
}

.cbs-faq-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0 8px 6px;
}

.cbs-faq-pill,
.cbs-interest-tog {
  min-height: 44px;
  border: 1.5px solid rgba(53, 95, 159, 0.35);
  background: rgba(255, 255, 255, 0.95);
  color: var(--cbs-skin-c);
  font-size: 0.875rem;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
}

.cbs-faq-pill:hover,
.cbs-interest-tog:hover {
  background: var(--cbs-skin-c-soft);
}

.cbs-faq-pill:focus-visible,
.cbs-interest-tog:focus-visible {
  outline: 4px solid #000;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #ffd43d;
}

.cbs-town-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--cbs-skin-d);
  letter-spacing: 0.04em;
  margin-bottom: 5px;
  text-align: left;
  padding: 0 10px;
}

.cbs-news-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 0 10px 4px;
  scrollbar-width: none;
}

.cbs-news-chips::-webkit-scrollbar {
  display: none;
}

.cbs-news-chip {
  flex: 0 0 auto;
  border: 1px solid rgba(47, 143, 114, 0.3);
  background: #fff;
  color: #2a6b56;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.875rem;
  font-weight: 650;
  white-space: nowrap;
}

.cbs-interest-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
  padding: 0 10px 6px;
  justify-content: center;
}

.cbs-interest-tog {
  border-color: rgba(47, 143, 114, 0.35);
  color: var(--cbs-skin-d);
  border-radius: 999px;
}

.cbs-interest-tog.is-on {
  background: var(--cbs-skin-d);
  color: #fff;
  border-color: var(--cbs-skin-d);
}

.cbs-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: none;
}

.cbs-messages::-webkit-scrollbar {
  display: none;
}

.cbs-letter {
  margin: 0 4px 4px;
  background:
    repeating-linear-gradient(
      transparent,
      transparent 27px,
      rgba(197, 106, 60, 0.14) 27px,
      rgba(197, 106, 60, 0.14) 28px
    ),
    linear-gradient(180deg, #fffdf9, #fff8f0);
  border: 1.5px solid rgba(197, 106, 60, 0.22);
  border-radius: 12px;
  padding: 14px 14px 12px;
  position: relative;
}

.cbs-letter__stamp {
  position: absolute;
  top: 6px;
  left: 8px;
  width: 34px;
  height: 40px;
  border: 2px dashed rgba(197, 106, 60, 0.4);
  border-radius: 3px;
  font-size: 0.875rem;
  color: var(--cbs-skin-a);
  display: grid;
  place-items: center;
  transform: rotate(-8deg);
  background: rgba(255, 240, 230, 0.85);
  line-height: 1.1;
  text-align: center;
  font-weight: 700;
}

.cbs-letter__body {
  padding: 8px 8px 4px 42px;
  font-size: 0.9rem;
  line-height: 1.75;
  color: #5a4032;
}

.cbs-speech {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.cbs-mini-av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--color-rule, rgba(28, 25, 22, 0.12));
  background: var(--color-paper-2, #f7f5f1);
  margin-top: 2px;
}

.cbs-mini-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cbs-bubble {
  background: #fff;
  border-radius: 16px 16px 16px 4px;
  padding: 12px 14px;
  font-size: 0.9rem;
  line-height: 1.65;
  border: 1px solid rgba(28, 25, 22, 0.12);
  max-width: 92%;
  white-space: pre-wrap;
}

.cbs-q-grid,
.cbs-q-grid--stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 12px 0 18px;
}

.cbs-news-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cbs-news-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  line-height: 1.5;
}

.cbs-news-num {
  flex: 0 0 1.75rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #1d6f8a;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
}

.cbs-bubble--town {
  background: #e5f3fb;
  border-color: rgba(29, 111, 138, 0.18);
}

.cbs-intake,
.cbs-memo {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.cbs-intake__lead,
.cbs-memo__lead {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
}

.cbs-intake__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.875rem;
  font-weight: 700;
}

.cbs-intake__field input {
  min-height: 44px;
  padding: 8px 10px;
  font: inherit;
  font-weight: 400;
  font-size: 1rem;
  border: 1.5px solid rgba(28, 25, 22, 0.22);
  border-radius: 8px;
  background: #fff;
}

.cbs-intake__field input:focus-visible,
.cbs-memo__btn:focus-visible,
.cbs-intake__submit:focus-visible {
  outline: 4px solid #000;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #ffd43d;
}

.cbs-intake__submit,
.cbs-memo__btn {
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1.5px solid rgba(28, 25, 22, 0.28);
  background: #fff;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}

.cbs-memo__sample {
  margin: 0;
  padding: 10px 12px;
  font-size: 0.875rem;
  line-height: 1.55;
  background: #fffdf6;
  border: 1px dashed rgba(28, 25, 22, 0.35);
  border-radius: 8px;
}

.cbs-memo__btn--photo {
  background: #f4f7fb;
}

.cbs-source {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.cbs-source__file {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 64px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid rgba(28, 25, 22, 0.2);
  border-radius: 4px 10px 10px 4px;
  box-shadow: 3px 0 0 #c23b3b;
  font-size: 0.875rem;
  font-weight: 700;
}

.cbs-source__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 28px;
  padding: 2px 6px;
  background: #c23b3b;
  color: #fff;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  border-radius: 3px;
}

.cbs-source__pages {
  margin-left: auto;
  font-weight: 500;
  color: #5c564e;
}

.cbs-source__url {
  font-size: 0.875rem;
  line-height: 1.45;
  word-break: break-all;
  color: #1d4e89;
}

.cbs-source__url:focus-visible {
  outline: 4px solid #000;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #ffd43d;
}

.cbs-source__note {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #5c564e;
}

.cbs-q-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  margin: 6px 0;
  text-align: center;
  cursor: pointer;
  background: #fff;
  border: 0;
  border-radius: 999px;
  padding: 16px 22px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  color: inherit;
  box-shadow: 0 8px 18px rgba(28, 25, 22, 0.14);
}

.cbs-q-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(28, 25, 22, 0.18);
}

.cbs-q-card:focus-visible {
  outline: 4px solid #000;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #ffd43d;
}

.cbs-q-card__ico {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 0.875rem;
  font-weight: 700;
  background: var(--cbs-theme-soft);
  border: 1px solid rgba(28, 25, 22, 0.1);
}

.cbs-q-card__txt {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.35;
}

.cbs-q-card__chev {
  display: none;
}

.cbs-bubble-user {
  align-self: flex-end;
  max-width: 85%;
  background: var(--cbs-theme-user);
  color: var(--cbs-theme-user-ink);
  border: 1px solid var(--cbs-theme-user);
  border-radius: 16px 16px 4px 16px;
  padding: 10px 12px;
  font-size: 0.9rem;
  white-space: pre-wrap;
}

.cbs-bubble-bot {
  align-self: flex-start;
  max-width: 90%;
  background: #fff;
  border-radius: 16px 16px 16px 4px;
  padding: 11px 13px;
  font-size: 0.9rem;
  line-height: 1.6;
  border: 1px solid rgba(28, 25, 22, 0.12);
  white-space: pre-wrap;
}

.cbs-composer {
  flex-shrink: 0;
  padding: 8px 12px 14px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.92) 28%, #fff);
  border-top: 1px solid rgba(28, 25, 22, 0.1);
}

.cbs-chip-row-wrap {
  position: relative;
  margin-bottom: 8px;
}

.cbs-chip-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px 2px 10px;
}

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

.cbs-chip-row-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 8px;
  width: 28px;
  background: linear-gradient(90deg, transparent, #fff);
  pointer-events: none;
  opacity: 0;
}

.cbs-chip-row-wrap.has-more::after {
  opacity: 1;
}

.cbs-demo-chip {
  position: relative;
  cursor: pointer;
  flex: 0 0 auto;
  min-height: 44px;
  background: #fff;
  color: var(--cbs-theme-accent);
  border: 1.5px solid currentColor;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.875rem;
  font-weight: 650;
  white-space: nowrap;
  font-family: inherit;
}

.cbs-demo-chip::after {
  content: "";
  position: absolute;
  left: 14px;
  bottom: -6px;
  border: 6px solid transparent;
  border-top-color: currentColor;
}

.cbs-demo-chip:focus-visible {
  outline: 4px solid #000;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #ffd43d;
}

.cbs-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.cbs-input-wrap {
  flex: 1;
  position: relative;
  border-radius: 999px;
}

.cbs-input-wrap input {
  width: 100%;
  min-height: 44px;
  border: 1.5px solid rgba(28, 25, 22, 0.18);
  border-radius: 999px;
  padding: 11px 14px;
  font-size: 0.9rem;
  background: #f7f5f1;
  outline: none;
  font-family: inherit;
  color: inherit;
}

.cbs-input-wrap input:focus {
  border-color: rgba(28, 25, 22, 0.4);
  background: #fff;
}

.cbs-input-wrap input:focus-visible {
  outline: 4px solid #000;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #ffd43d;
}

.cbs-faux-caret {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 1.5px;
  height: 1.05em;
  margin-top: -0.52em;
  background: var(--color-ink, #1c1916);
  border-radius: 1px;
  pointer-events: none;
  opacity: 0;
  animation: cbs-caret-blink 1s step-end infinite;
}

.cbs-input-wrap.show-caret .cbs-faux-caret {
  opacity: 1;
}

.cbs-input-wrap.show-caret input::placeholder {
  color: transparent;
}

.cbs-input-wrap.pulse-ring {
  animation: cbs-input-pulse 0.95s ease-out;
}

.cbs-send {
  min-height: 44px;
  min-width: 44px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  padding: 11px 16px;
  font-weight: 700;
  cursor: pointer;
  color: var(--cbs-theme-send-ink);
  background: var(--cbs-theme-send);
  font-family: inherit;
  font-size: 0.9rem;
}

.cbs-send:disabled {
  opacity: 0.45;
  cursor: default;
}

.cbs-send:focus-visible {
  outline: 4px solid #000;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #ffd43d;
}

.cbs-typing {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 2px 0;
}

.cbs-typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.35;
  display: block;
  animation: cbs-typing-dot 1s infinite ease-in-out;
}

.cbs-typing i:nth-child(2) {
  animation-delay: 0.15s;
}

.cbs-typing i:nth-child(3) {
  animation-delay: 0.3s;
}

/* Cards after answers */

.cbs-article,
.cbs-cite,
.cbs-route,
.cbs-report {
  align-self: stretch;
  border-radius: 12px;
  padding: 12px 14px;
  border: 1.5px solid rgba(28, 25, 22, 0.14);
  background: #fff;
}

.cbs-article {
  background: linear-gradient(135deg, #f7fbf5, #eef6ea);
  border-color: rgba(79, 122, 74, 0.28);
}

.cbs-article__label,
.cbs-route__label,
.cbs-report__label {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
  color: var(--cbs-skin-b);
}

.cbs-article__title {
  font-weight: 700;
  font-size: 0.95rem;
  margin: 0 0 4px;
}

.cbs-article__sum {
  margin: 0 0 10px;
  font-size: 0.875rem;
  color: var(--color-muted, #6b645c);
  line-height: 1.5;
}

.cbs-article__open {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  padding: 7px 14px;
  background: var(--cbs-skin-b);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: default;
  font-family: inherit;
}

.cbs-cite {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f4f7fb;
  border-color: rgba(53, 95, 159, 0.28);
  border-left: 3px solid var(--cbs-skin-c);
  font-size: 0.875rem;
  color: var(--cbs-skin-c);
  font-weight: 650;
}

.cbs-cite__mark {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--cbs-skin-c);
  flex-shrink: 0;
}

.cbs-route {
  background: #f4f7fb;
  border-color: rgba(53, 95, 159, 0.28);
}

.cbs-route__label {
  color: var(--cbs-skin-c);
}

.cbs-route__desk {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 4px;
}

.cbs-route__reason {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--color-muted, #6b645c);
}

.cbs-report {
  background: #f7f8fa;
  border-color: rgba(53, 95, 159, 0.22);
}

.cbs-report__label {
  color: var(--cbs-skin-c);
}

.cbs-report__fields {
  margin: 0 0 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cbs-report__row {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 8px;
  font-size: 0.875rem;
  line-height: 1.45;
}

.cbs-report__row dt {
  font-weight: 700;
  color: var(--color-muted, #6b645c);
}

.cbs-report__row dd {
  margin: 0;
}

.cbs-report__live {
  color: var(--color-muted, #6b645c);
  font-style: italic;
}

.cbs-report__live.is-filled {
  color: inherit;
  font-style: normal;
}

.cbs-report__compose {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cbs-report__compose-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-muted, #6b645c);
}

.cbs-report__textarea {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  font: inherit;
  font-size: 0.875rem;
  border: 1.5px solid rgba(28, 25, 22, 0.18);
  border-radius: 8px;
  resize: vertical;
  background: #fff;
}

.cbs-report__textarea:focus-visible {
  outline: 4px solid #000;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #ffd43d;
}

.cbs-c-list {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  max-width: 7.5rem;
  order: 0;
}

.cbs-c-list[hidden] {
  display: none !important;
}

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

.cbs-c-list__item {
  margin: 0;
}

.cbs-c-list__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 7.5rem;
  min-height: 44px;
  min-width: 44px;
  padding: 8px 6px;
  border: 1.5px solid rgba(53, 95, 159, 0.35);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  color: #1c3f66;
  cursor: pointer;
  font-family: inherit;
}

.cbs-c-list__btn:hover {
  transform: translateY(-2px);
}

.cbs-c-list__btn:focus-visible {
  outline: 4px solid #000;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #ffd43d;
}

.cbs-c-list__name {
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}

.cbs-c-list__name {
  font-size: 0.9rem;
  font-weight: 700;
}

.cbs-c-list__blurb {
  font-size: 0.875rem;
  opacity: 0.82;
  line-height: 1.35;
}

/* ── Theme skins ── */

.cbs-phone.theme-A {
  --cbs-theme-accent: var(--cbs-skin-a);
  --cbs-theme-soft: #ffe8d8;
  --cbs-theme-user: var(--cbs-skin-a);
  --cbs-theme-user-ink: #fff;
  --cbs-theme-send: var(--cbs-skin-a);
  --cbs-theme-send-ink: #fff;
  --cbs-theme-screen: linear-gradient(180deg, #fff6f0 0%, #fffaf6 40%, #fff 100%);
  --cbs-theme-head: linear-gradient(180deg, #ffe8d6 0%, transparent 100%);
}

.cbs-phone.theme-A .cbs-screen {
  background: linear-gradient(180deg, #fff6f0 0%, #fffaf6 40%, #fff 100%);
}

.cbs-phone.theme-A .cbs-chat-head {
  background:
    radial-gradient(circle at 88% 18%, rgba(196, 100, 60, 0.12), transparent 40%),
    linear-gradient(180deg, #ffe8d6 0%, transparent 100%);
}

.cbs-phone.theme-A .cbs-avatar {
  background: radial-gradient(circle at 30% 25%, #ffe0c8, #f4a574);
}

.cbs-phone.theme-A .cbs-mini-av {
  background: #ffd7bd;
}

.cbs-phone.theme-A .cbs-demo-chip {
  color: var(--cbs-skin-a);
}

.cbs-phone.theme-B {
  --cbs-theme-accent: var(--cbs-skin-b);
  --cbs-theme-soft: #e3f0de;
  --cbs-theme-user: var(--cbs-skin-b);
  --cbs-theme-user-ink: #fff;
  --cbs-theme-send: var(--cbs-skin-b);
  --cbs-theme-send-ink: #fff;
}

.cbs-phone.theme-B .cbs-screen {
  background: linear-gradient(180deg, #e7f3e4 0%, #f7fbf6 46%, #fff 100%);
}

.cbs-phone.theme-B .cbs-chat-head {
  background: linear-gradient(180deg, #e8f2e4 0%, transparent 100%);
}

.cbs-phone.theme-B .cbs-avatar {
  background: radial-gradient(circle at 30% 25%, #e5f0df, #8fb887);
}

.cbs-phone.theme-B .cbs-mini-av {
  background: #d7e8d1;
}

.cbs-phone.theme-B .cbs-demo-chip {
  color: var(--cbs-skin-b);
}

.cbs-phone.theme-C {
  --cbs-theme-accent: var(--cbs-skin-c);
  --cbs-theme-soft: #e4ecf8;
  --cbs-theme-user: var(--cbs-skin-c);
  --cbs-theme-user-ink: #fff;
  --cbs-theme-send: var(--cbs-skin-c);
  --cbs-theme-send-ink: #fff;
}

.cbs-phone.theme-C.skin-qa .cbs-screen {
  background: linear-gradient(180deg, #e4eefc 0%, #f5f8fd 42%, #fff 100%);
}

.cbs-phone.theme-C.skin-route .cbs-screen,
.cbs-phone.theme-C.skin-policy .cbs-screen,
.cbs-phone.theme-C.skin-doc .cbs-screen {
  background: linear-gradient(180deg, #f4f6f8 0%, #fff 40%);
}

.cbs-phone.theme-D .cbs-avatar img,
.cbs-shelf__visual--town .cbs-shelf__visual-img {
  object-fit: contain;
  background: #fff;
}

.cbs-phone.theme-C .cbs-chat-head {
  background: linear-gradient(180deg, #dce5f2 0%, transparent 100%);
  border-bottom: 1px solid rgba(53, 95, 159, 0.14);
}

.cbs-phone.theme-C .cbs-avatar {
  background: #0b0d12;
  border-radius: 16px;
}

.cbs-phone.theme-C .cbs-avatar img,
.cbs-phone.theme-C .cbs-mini-av img {
  object-fit: contain;
  background: #0b0d12;
}

.cbs-phone.theme-C .cbs-mini-av {
  background: #0b0d12;
  border-radius: 8px;
}

.cbs-phone.theme-C .cbs-demo-chip {
  color: var(--cbs-skin-c);
  border-radius: 6px;
}

.cbs-phone.theme-C .cbs-send,
.cbs-phone.theme-C .cbs-input-wrap input {
  border-radius: 8px;
}

.cbs-phone.theme-D {
  --cbs-theme-accent: var(--cbs-skin-d);
  --cbs-theme-soft: #def3ea;
  --cbs-theme-user: var(--cbs-skin-d);
  --cbs-theme-user-ink: #fff;
  --cbs-theme-send: var(--cbs-skin-d);
  --cbs-theme-send-ink: #fff;
}

.cbs-phone.theme-D .cbs-screen {
  background: linear-gradient(180deg, #e8f6f1 0%, #fff 40%);
}

.cbs-phone.theme-D .cbs-chat-head {
  background:
    radial-gradient(circle at 20% 80%, rgba(47, 143, 114, 0.1), transparent 50%),
    linear-gradient(180deg, #d4eee5 0%, transparent 100%);
}

.cbs-phone.theme-D .cbs-avatar {
  background: radial-gradient(circle at 30% 25%, #dff5ec, #5cb89a);
}

.cbs-phone.theme-D .cbs-mini-av {
  background: #d4eee5;
}

.cbs-phone.theme-D .cbs-demo-chip {
  color: var(--cbs-skin-d);
}

/* ── Motion ── */

@keyframes cbs-slide-phone {
  from {
    opacity: 0;
    transform: translateX(var(--slide-from, 24px)) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes cbs-caret-blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

@keyframes cbs-input-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(28, 25, 22, 0);
  }
  40% {
    box-shadow: 0 0 0 3px rgba(28, 25, 22, 0.12), 0 0 10px rgba(28, 25, 22, 0.08);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(28, 25, 22, 0);
  }
}

@keyframes cbs-typing-dot {
  0%,
  80%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cbs-phone.is-slide .cbs-phone__shell,
  .cbs-input-wrap.pulse-ring,
  .cbs-faux-caret,
  .cbs-typing i {
    animation: none !important;
  }

  .cbs-input-wrap.show-caret .cbs-faux-caret {
    opacity: 0.7;
  }
}

@media (max-width: 520px) {
  .cbs-stage {
    flex-direction: column;
  }

  .cbs-char-rail:not([hidden]),
  .cbs-c-list:not([hidden]) {
    flex-direction: row;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .cbs-char-rail:not([hidden])::-webkit-scrollbar,
  .cbs-c-list:not([hidden])::-webkit-scrollbar {
    display: none;
  }

  .cbs-c-list:not([hidden]) .cbs-c-list__ul {
    flex-direction: row;
  }

  .cbs-char-rail__btn,
  .cbs-c-list__btn {
    min-width: 4.5rem;
    width: auto;
  }

  .cbs-phone {
    width: min(360px, calc(100vw - 32px));
  }
}
