:root {
  --ink: #1e293b;
  --gray: #64748b;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --q-bg: #ffffff;
  --a-bg: #eff6ff;
  --a-border: #bfdbfe;
  --accent: #2563eb;
  --maxw: 720px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "Noto Sans JP", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.85;
  font-size: 15px;
}

img { max-width: 100%; display: block; }

.demo-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 14px 20px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.demo-header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.demo-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--accent);
}

.demo-header h1 {
  font-size: 18px;
  font-weight: 800;
}

.demo-header a {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.demo-main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 20px 72px;
}

.demo-intro {
  margin-bottom: 28px;
}

.demo-intro h2 {
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 800;
  margin-bottom: 10px;
}

.demo-intro p {
  color: var(--gray);
  font-size: 14px;
}

.chat-faq {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px 18px 28px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, .06);
}

.chat-faq-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.chat-faq-item {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  max-width: 92%;
}

.chat-faq-item--q {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-faq-item--a {
  align-self: flex-start;
}

.chat-faq-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 48px;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .12);
}

.chat-faq-bubble {
  position: relative;
  padding: 14px 16px;
  border-radius: 18px;
  font-size: 14.5px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.chat-faq-bubble::before,
.chat-faq-bubble::after {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
}

.chat-faq-item--q .chat-faq-bubble {
  background: var(--q-bg);
  border: 1px solid var(--line);
}

.chat-faq-item--q .chat-faq-bubble::before {
  right: -9px;
  bottom: 13px;
  border-width: 7px 0 7px 9px;
  border-color: transparent transparent transparent var(--line);
}

.chat-faq-item--q .chat-faq-bubble::after {
  right: -7px;
  bottom: 14px;
  border-width: 6px 0 6px 8px;
  border-color: transparent transparent transparent var(--q-bg);
}

.chat-faq-item--a .chat-faq-bubble {
  background: var(--a-bg);
  border: 1px solid var(--a-border);
}

.chat-faq-item--a .chat-faq-bubble::before {
  left: -9px;
  bottom: 13px;
  border-width: 7px 9px 7px 0;
  border-color: transparent var(--a-border) transparent transparent;
}

.chat-faq-item--a .chat-faq-bubble::after {
  left: -7px;
  bottom: 14px;
  border-width: 6px 8px 6px 0;
  border-color: transparent var(--a-bg) transparent transparent;
}

.chat-faq-bubble p + p {
  margin-top: 8px;
}

.demo-note {
  margin-top: 28px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
}

@media (max-width: 680px) {
  .chat-faq { padding: 18px 12px 22px; }
  .chat-faq-item { max-width: 100%; }
  .chat-faq-icon { width: 40px; height: 40px; flex-basis: 40px; }
}
