@charset "UTF-8";

/* ============================================
   Google Fonts
   ============================================ */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Noto+Sans+JP:wght@400;500;600;700&display=swap");

/* ============================================
   CSS Custom Properties - Light Mode (default)
   ============================================ */
:root {
  /* --- Neutral Colors --- */
  --color-black: #000000;
  --color-gray-dark: #586266;
  --color-gray-middle: #b4bec2;
  --color-gray-pale: #dfe5e8;
  --color-gray-tint: #f3f4f5;
  --color-white: #ffffff;

  /* --- Brand Colors --- */
  --color-primary: #00a85a;
  --color-secondary: #cceede;
  --color-gradient-start: #c6fbe2;
  --color-gradient-end: #00bc64;

  /* --- Semantic Colors --- */
  --color-bg: #f3f4f5;
  --color-bg-secondary: #f3f4f5;
  --color-bg-surface: #ffffff;
  --color-text: #000000;
  --color-text-secondary: #586266;
  --color-text-muted: #b4bec2;
  --color-border: #b4bec2;
  --color-border-light: #dfe5e8;

  /* --- Typography --- */
  --font-family: "Inter", sans-serif;

  /* --- CTA Section --- */
  --color-cta-bg: #000000;
  --color-cta-text: #ffffff;

  /* --- Bubble --- */
  --color-bubble-bg: rgba(255, 255, 255, 0.5);

  /* --- Gradient Border --- */
  --gradient-border: conic-gradient(
    from 0deg at 50% 50%,
    #00bc64 0deg,
    #6be8a8 45deg,
    #00bc64 70deg,
    #00bc64 110deg,
    #6be8a8 135deg,
    #00bc64 160deg,
    #00bc64 245deg,
    #6be8a8 270deg,
    #00bc64 295deg,
    #00bc64 360deg
  );

  /* --- Shadow --- */
  --shadow-sm: 0px 4px 12px rgba(13, 10, 44, 0.08);
  --shadow-md: 0px 5px 14px rgba(20, 20, 43, 0.05);
}

/* ============================================
   CSS Custom Properties - Dark Mode
   ============================================ */
body.dark {
  --color-black: #ffffff;
  --color-gray-dark: #b4bec2;
  --color-gray-middle: #586266;
  --color-gray-pale: #2a2d31;
  --color-gray-tint: #1a1d21;
  --color-white: #121517;

  --color-primary: #00c96b;
  --color-secondary: #1a3d2b;
  --color-gradient-start: #1a3d2b;
  --color-gradient-end: #00c96b;

  --color-bg: #121517;
  --color-bg-secondary: #1a1d21;
  --color-bg-surface: #1e2226;
  --color-text: #ffffff;
  --color-text-secondary: #b4bec2;
  --color-text-muted: #6b7280;
  --color-border: #3a3f45;
  --color-border-light: #2a2d31;

  --color-cta-bg: #1e2226;
  --color-cta-text: #ffffff;

  --color-bubble-bg: rgba(30, 34, 38, 0.5);

  --shadow-sm: 0px 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0px 5px 14px rgba(0, 0, 0, 0.25);
}

/* ============================================
   Base (extends reset.css)
   ============================================ */
body {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
}

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

svg {
  display: block;
}

/* SVG logo color inversion for dark mode */
body.dark .header__logo img,
body.dark .footer__logo img,
body.dark .kv__logo img {
  filter: invert(1);
}

.is-sp {
  display: none;
  @media (max-width: 767px) {
    display: block;
  }
}
.is-pc {
  display: block;
  @media (max-width: 767px) {
    display: none;
  }
}

/* ============================================
   Theme Toggle (utility)
   ============================================ */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background-color: var(--color-bg-secondary);
  color: var(--color-text);
  cursor: pointer;
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* ============================================
   Header
   ============================================ */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 40px;

  @media (max-width: 767px) {
    padding: 12px 16px;
  }
}

.header__logo {
  display: block;
  width: 120px;

  @media (max-width: 767px) {
    width: 120px;
  }
}

.header__logo img {
  width: 100%;
}

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

/* ============================================
   Footer
   ============================================ */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 40px;
  border-top: 1px solid var(--color-border-light);
}

.footer__logo {
  display: block;
  width: 148px;

  @media (max-width: 767px) {
    width: 111px;
  }
}

.footer__logo img {
  width: 100%;
}

.footer__copyright {
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-text);
}

/* ============================================
   Button - Login
   ============================================ */
.button-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 16px 24px;
  background-color: var(--color-primary);
  color: #ffffff;
  border-radius: 999px;
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.button-login:hover {
  opacity: 0.85;
}

/* ============================================
   Utility - Inner Container
   ============================================ */
.inner {
  max-width: calc(1200px + 40px * 2);
  margin-left: auto;
  margin-right: auto;
  padding-inline: 40px;

  @media (max-width: 767px) {
    max-width: 600px;
    padding-inline: 24px;
  }
}

/* ============================================
   KV (Hero) Section
   ============================================ */
.kv {
  position: relative;
  overflow: hidden;
  padding: 24px 40px 100px;

  @media (max-width: 767px) {
    padding: 24px 16px 80px;
  }
}

.kv__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  @media (max-width: 767px) {
    gap: 24px;
  }
}

.kv__title {
  font-size: 56px;
  font-size: clamp(42px, calc(56 / 1440 * 100vw), 56px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 2.8px;
  color: var(--color-text);

  @media (max-width: 767px) {
    font-size: 32px;
    text-align: center;
  }
}

.kv__logo {
  width: 360px;

  @media (max-width: 767px) {
    width: 180px;
  }
}

.kv__description {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--color-text);
  text-align: center;

  @media (max-width: 767px) {
    font-size: 14px;
  }
}

/* KV Chat */
.kv__area {
  width: 100%;
  height: 373px;
  position: relative;
  margin-top: 40px;
  transform: translateX(-170px);

  @media (max-width: 767px) {
    margin-top: 24px;
    height: 350px;
    transform: none;
  }
}

.kv-chat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  height: fit-content;
  position: absolute;

  /* 1: 左端・上 */
  &:nth-child(1) {
    top: 8px;
    left: calc(50% - 680px);
    scale: 0.8;
    .kv-chat__bubble { width: 228px; }
    .kv-chat__user { width: 190px; }
    @media (max-width: 767px) {
      top: 0;
      left: inherit;
      right: calc(50% + 20px);
      scale: 0.5;
      transform-origin: top right;
    }
  }
  /* 2: 左端・下 */
  &:nth-child(2) {
    flex-direction: column-reverse;
    bottom: 0;
    left: calc(50% - 580px);
    scale: 0.95;
    .kv-chat__bubble { width: 240px; }
    .kv-chat__user { width: 200px; }
    @media (max-width: 767px) { display: none; }
  }
  /* 3: 左・上 */
  &:nth-child(3) {
    top: 30px;
    left: calc(50% - 460px);
    scale: 0.9;
    .kv-chat__bubble { width: 245px; }
    .kv-chat__user { width: 210px; }
    @media (max-width: 767px) {
      top: 110px;
      left: inherit;
      right: calc(50% + 40px);
      scale: 0.5;
      transform-origin: top right;
    }
  }
  /* 4: 左・下 */
  &:nth-child(4) {
    flex-direction: column-reverse;
    bottom: 5px;
    left: calc(50% - 350px);
    scale: 1.05;
    .kv-chat__bubble { width: 250px; }
    .kv-chat__user { width: 215px; }
    @media (max-width: 767px) {
      top: inherit;
      bottom: 0;
      left: inherit;
      right: calc(50% - 34px);
      scale: 0.6;
      transform-origin: bottom right;
    }
  }
  /* 5: 左中央・上 */
  &:nth-child(5) {
    top: 10px;
    left: calc(50% - 220px);
    scale: 0.85;
    .kv-chat__bubble { width: 235px; }
    .kv-chat__user { width: 195px; }
    @media (max-width: 767px) {
      top: 0;
      left: inherit;
      right: calc(50% - 26px);
      scale: 0.6;
      transform-origin: top right;
    }
  }
  /* 6: 左中央・下 */
  &:nth-child(6) {
    flex-direction: column-reverse;
    bottom: 0;
    left: calc(50% - 110px);
    scale: 1.1;
    .kv-chat__bubble { width: 252px; }
    .kv-chat__user { width: 218px; }
    @media (max-width: 767px) { display: none; }
  }
  /* 7: 中央・上 */
  &:nth-child(7) {
    top: 40px;
    left: calc(50% - 10px);
    scale: 0.9;
    .kv-chat__bubble { width: 240px; }
    .kv-chat__user { width: 205px; }
    @media (max-width: 767px) {
      top: 60px;
      left: calc(50% - 30px);
      scale: 0.6;
      transform-origin: top left;
    }
  }
  /* 8: 右中央・下 */
  &:nth-child(8) {
    flex-direction: column-reverse;
    bottom: 5px;
    left: calc(50% + 110px);
    scale: 1.05;
    .kv-chat__bubble { width: 248px; }
    .kv-chat__user { width: 212px; }
    @media (max-width: 767px) {
      top: 16px;
      left: calc(50% + 32px);
      scale: 0.5;
      transform-origin: top left;
    }
  }
  /* 9: 右中央・上 */
  &:nth-child(9) {
    top: 15px;
    left: calc(50% + 220px);
    scale: 0.85;
    .kv-chat__bubble { width: 236px; }
    .kv-chat__user { width: 198px; }
    @media (max-width: 767px) { display: none; }
  }
  /* 10: 右・下 */
  &:nth-child(10) {
    flex-direction: column-reverse;
    bottom: 0;
    left: calc(50% + 340px);
    scale: 1.0;
    .kv-chat__bubble { width: 244px; }
    .kv-chat__user { width: 208px; }
    @media (max-width: 767px) {
      top: inherit;
      bottom: 5px;
      left: calc(50% - 36px);
      scale: 0.7;
      transform-origin: bottom left;
    }
  }
  /* 11: 右・上 */
  &:nth-child(11) {
    top: 25px;
    left: calc(50% + 460px);
    scale: 0.9;
    .kv-chat__bubble { width: 240px; }
    .kv-chat__user { width: 200px; }
    @media (max-width: 767px) { display: none; }
  }
  /* 12: 右端・下 */
  &:nth-child(12) {
    flex-direction: column-reverse;
    bottom: 0;
    left: calc(50% + 570px);
    scale: 0.95;
    .kv-chat__bubble { width: 238px; }
    .kv-chat__user { width: 200px; }
    @media (max-width: 767px) { display: none; }
  }
  /* 13: 右端・上 */
  &:nth-child(13) {
    top: 45px;
    left: calc(50% + 680px);
    scale: 0.8;
    .kv-chat__bubble { width: 230px; }
    .kv-chat__user { width: 190px; }
    @media (max-width: 767px) { display: none; }
  }
  /* 14: 左寄り補助・下 */
  &:nth-child(14) {
    flex-direction: column-reverse;
    bottom: 15px;
    left: calc(50% - 530px);
    scale: 0.85;
    .kv-chat__bubble { width: 232px; }
    .kv-chat__user { width: 192px; }
    @media (max-width: 767px) { display: none; }
  }
  /* 15: 右寄り補助・上 */
  &:nth-child(15) {
    top: 5px;
    left: calc(50% + 120px);
    scale: 0.8;
    .kv-chat__bubble { width: 228px; }
    .kv-chat__user { width: 188px; }
    @media (max-width: 767px) { display: none; }
  }

  &.--reverse {
    flex-direction: column-reverse;
  }
}

.kv-chat__agent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.kv-chat__avatar {
  width: 64px;
  flex-shrink: 0;
}

.kv-chat__avatar img {
  width: 100%;
  height: auto;
  border-radius: 2px;
}

.kv-chat__bubble {
  background: var(--color-bubble-bg);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 8px;
}

.kv-chat__bubble-inner {
  background: var(--color-gray-pale);
  border-radius: 12px;
  padding: 24px;
}

.kv-chat__bubble-text {
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-text);
}

.kv-chat__user {
  --border-width: 2px;
  padding: var(--border-width);
  border-radius: 12px;
  background: var(--gradient-border);
}

.kv-chat__user p {
  font-size: 12px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg-surface);
  padding: 18px;
  border-radius: 10px;
}

/* ============================================
   Section - Common
   ============================================ */

.c-section__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.c-section__title {
  font-size: 40px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--color-text);
  text-align: center;

  @media (max-width: 767px) {
    font-size: 24px;
  }
}

.c-section__title-line {
  width: 56px;
  height: 4px;
  background-color: var(--color-primary);
  @media (max-width: 767px) {
    height: 2px;
  }
}

/* ============================================
   What Is Section
   ============================================ */
.what-is__content {
  margin-top: -40px;
  display: flex;
  gap: 24px;
  align-items: center;

  @media (max-width: 767px) {
    flex-direction: column;
    gap: 0px;
    margin-top: 0;
  }
}

.what-is__visual {
  width: calc(812 / 1200 * 100%);
  margin-left: -72px;
  margin-left: calc(-72px / 1440 * 100vw);
  position: relative;
  @media (max-width: 767px) {
    width: min(100vw, 390px);
    margin-left: 0;
  }
}

.what-is__visual-link {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: min(calc(12 / 1200 * 100vw), 12px) min(calc(16 / 1200 * 100vw), 16px);
  gap: 8px;
  background: var(--color-text);
  box-shadow: 0px 0px 20px var(--color-gradient-end);
  border-radius: 9999px;
  position: absolute;
  transition: 0.3s;

  &:hover {
    opacity: 0.8;
  }
  @media (max-width: 767px) {
    padding: 6px 8px;
    gap: 4px;
    box-shadow: 0px 0px 10px var(--color-gradient-end);
    border-radius: 12px;
  }

  &.--left {
    bottom: min(calc(94 / 1200 * 100vw), 94px);
    left: min(calc(74 / 1200 * 100vw), 74px);
    @media (max-width: 767px) {
      bottom: 50px;
      left: calc(50% - 120px);
    }
  }

  &.--right {
    background: var(--color-bg-surface);
    bottom: min(calc(94 / 1200 * 100vw), 94px);
    right: min(calc(60 / 1200 * 100vw), 60px);
    @media (max-width: 767px) {
      bottom: 50px;
      right: calc(50% - 130px);
    }

    .what-is__visual-link-text {
      color: var(--color-text);
    }
  }
}

.what-is__visual-link-icon {
  display: inline-block;
  width: min(calc(24 / 1200 * 100vw), 24px);
  height: min(calc(24 / 1200 * 100vw), 24px);
  @media (max-width: 767px) {
    width: 12px;
    height: 12px;
  }
}

.what-is__visual-link-text {
  font-family: var(--font-family);
  font-weight: 600;
  font-size: min(calc(16 / 1200 * 100vw), 16px);
  line-height: 150%;
  color: var(--color-bg);
  @media (max-width: 767px) {
    font-size: 8px;
  }
}

.what-is__text {
  flex: 1;
  min-width: 0;
}

.what-is__text p {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-text);
  @media (max-width: 767px) {
    font-size: 14px;
  }
}

.what-is__highlight {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--color-gradient-end);
  text-decoration-thickness: 20%;
  text-underline-offset: 3px;
}

/* ============================================
   Features Section
   ============================================ */
.features {
  padding-top: 40px;
  margin-top: 40px;
  @media (max-width: 767px) {
    padding-top: 80px;
    padding-bottom: 20px;
    margin-top: 0;
    overflow: hidden;
  }
}

.features__list {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 120px;

  @media (max-width: 767px) {
    gap: 24px;
    margin-top: 12px;
  }
}

.feature {
  display: flex;
  gap: 48px;
  align-items: center;

  @media (max-width: 767px) {
    flex-direction: column-reverse;
    gap: 0px;
  }
}

.feature--reverse {
  flex-direction: row-reverse;

  @media (max-width: 767px) {
    flex-direction: column-reverse;
  }

  .feature__content {
    @media (max-width: 767px) {
      margin-top: -40px;
    }
  }
}

.feature__content {
  flex: 1;
  min-width: 0;
  @media (max-width: 767px) {
    width: 100%;
  }
}

.feature__sub {
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 16px;
  line-height: 150%;
  color: var(--color-primary);
}

.feature__title {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 32px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--color-text);
  margin-top: 12px;

  @media (max-width: 767px) {
    gap: 8px;
    font-size: 18px;
  }
}

.feature__title-icon {
  width: 40px;
  height: 40px;
  svg {
    width: 100%;
    height: 100%;
  }
  @media (max-width: 767px) {
    width: 28px;
    height: 28px;
  }
}

.feature__description {
  margin-top: 24px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-text);

  @media (max-width: 767px) {
    font-size: 14px;
  }
}

.feature__description p + p {
  margin-top: 0.5em;
}

/* Agent Cards */
.feature__agents-wrap {
  @media (max-width: 767px) {
    padding-left: 24px;
    margin-inline: -24px;
  }
}

.feature__agents {
  margin-top: 24px;
  display: flex;
  gap: 16px;

  @media (max-width: 767px) {
    overflow-x: auto;
  }
}

.feature__agent-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--color-gray-pale);
  border-radius: 8px;
  flex-shrink: 0;
  @media (max-width: 767px) {
    width: 150px;
  }
}

.feature__agent-avatar {
  width: 64px;
  aspect-ratio: 1;
  border-radius: 4px;
  overflow: hidden;
}

.feature__agent-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--color-text);
  white-space: nowrap;
  @media (max-width: 767px) {
    font-size: 12px;
  }
}

.feature__agent-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 24px;
  background: var(--color-bg-surface);
  border: 2px solid var(--color-gray-middle);
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  color: var(--color-gray-middle);
  line-height: 1.7;
  transition: 0.3s;
  &:hover {
    color: var(--color-gray-dark);
    border-color: var(--color-gray-dark);
  }
  @media (max-width: 767px) {
    padding: 4px 24px;
  }
}

/* Feature Illustration */
.feature__visual {
  flex: 1;
  min-width: 0;
  @media (max-width: 767px) {
    width: min(100vw, 390px);
  }
}

/* Feature CTA */
.feature__cta {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  @media (max-width: 767px) {
    margin-top: 24px;
  }
}

.feature__cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 400px;
  max-width: 100%;
  padding: 20px 40px;
  background: var(--color-primary);
  border: 2px solid var(--color-bg-surface);
  color: #ffffff;
  border-radius: 999px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.7;
  box-shadow: 0 0 20px rgba(0, 188, 100, 0.5);
  transition: 0.3s;

  @media (max-width: 767px) {
    width: 100%;
    max-width: 400px;
    font-size: 14px;
    padding: 14px 32px;
  }
}

.feature__cta-btn:hover {
  opacity: 0.7;
}

.feature__cta-btn svg {
  width: 24px;
  aspect-ratio: 1;
  fill: currentColor;
}

/* ============================================
   CTA Section
   ============================================ */
.cta-section {
  padding-inline: 40px;
  padding-block: 40px;
  @media (max-width: 767px) {
  padding-inline: 20px;
    padding-block: 60px 80px;
  }
}

.cta {
  background: var(--color-cta-bg);
  border-radius: 16px;
  padding: 40px 80px;
  text-align: center;

  @media (max-width: 767px) {
    padding: 40px 16px;
  }
}

.cta__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  @media (max-width: 767px) {
    gap: 24px;
  }
}

.cta__title {
  font-size: 40px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--color-cta-text);

  @media (max-width: 767px) {
    font-size: 24px;
  }
}

.cta__description {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.7;
  color: var(--color-cta-text);

  @media (max-width: 767px) {
    font-size: 14px;
  }
}

.cta__input {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 640px;
  max-width: 100%;

  --border-width: 4px;
  padding: var(--border-width);
  background: var(--gradient-border);
  border-radius: 999px;
  box-shadow: 0 0 20px rgba(0, 188, 100, 0.5);
}

.cta__input-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 24px;
  background: var(--color-bg-surface);
  border-radius: 999px;
  width: 100%;
  @media (max-width: 767px) {
    padding: 20px;
  }
}

.cta__input-icon {
  display: inline-block;
  flex-shrink: 0;
  width: 24px;
  aspect-ratio: 1;
  color: var(--color-gray-middle);
}

.cta__input-icon svg {
  width: 24px;
  aspect-ratio: 1;
  fill: currentColor;
}

.cta__input-field {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-family);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.7;
  color: var(--color-text);
  @media (max-width: 767px) {
    font-size: 14px;
  }

  &::placeholder {
    color: var(--color-gray-middle);
  }
}

/* ============================================
   Material Symbols - size adjustment
   ============================================ */
.material-symbols-outlined {
  font-variation-settings:
    "FILL" 0,
    "wght" 300,
    "GRAD" 0,
    "opsz" 24;
}

/* ============================================
   Chat Layout
   ============================================ */
.chat-layout {
  display: flex;
  height: 100vh;
  background: #f3f4f5;

  @media (max-width: 767px) {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
  }
}

/* ============================================
   Chat Sidebar
   ============================================ */
.chat-sidebar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 240px;
  flex-shrink: 0;
  border-right: 1px solid #dfe5e8;
  background: #f3f4f5;
  overflow: hidden;
  transition: width 0.25s ease;

  @media (max-width: 767px) {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
}

.chat-sidebar.is-closed {
  width: 76px;

  .chat-sidebar__logo,
  .chat-sidebar__item-label,
  .chat-sidebar__list {
    display: none;
  }

  .chat-sidebar__header {
    justify-content: center;
    padding: 0 16px;
  }

  .chat-sidebar__toggle {
    margin: 0 auto;
  }

  .chat-sidebar__toggle .material-symbols-outlined {
    transform: scaleX(-1);
  }

  .chat-sidebar__nav {
    padding: 0 12px;
    align-items: center;
  }

  .chat-sidebar__group {
    align-items: center;
    padding: 0;
    gap: 16px;
  }

  .chat-sidebar__item {
    justify-content: center;
    padding: 0;
    width: 36px;
    height: 36px;
  }

  .chat-sidebar__bottom {
    padding: 0 12px;
    justify-content: center;
  }

  .chat-sidebar__item--new {
    justify-content: center;
    padding: 0;
    width: 36px;
    height: 36px;
  }
}

.chat-sidebar.is-open-sp {
  @media (max-width: 767px) {
    transform: translateX(0);
  }
}

.chat-sidebar__top {
  flex: 1;
  overflow-y: auto;
}

.chat-sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 20px;
  overflow: hidden;
}

.chat-sidebar__logo {
  display: block;
  width: 120px;
  flex-shrink: 0;
}

.chat-sidebar__logo img {
  width: 100%;
}

.chat-sidebar__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: none;
  border: none;
  cursor: pointer;
  color: #000000;
  flex-shrink: 0;
}

.chat-sidebar__toggle:hover {
  background: #dfe5e8;
}

.chat-sidebar__nav {
  display: flex;
  flex-direction: column;
  padding: 0 12px;
}

.chat-sidebar__group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-sidebar__list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid #dfe5e8;
  padding: 16px 0;
  margin-top: 16px;
}

.chat-sidebar__item {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 8px;
  border-radius: 999px;
  font-family: "Inter", "Noto Sans JP", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.7;
  color: #000000;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: background 0.15s;
}

.chat-sidebar__item:hover {
  background: #dfe5e8;
}

.chat-sidebar__item--active {
  background: #dfe5e8;
  font-weight: 500;
}

.chat-sidebar__item-icon {
  font-size: 24px;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-sidebar__item-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-sidebar__agent-avatar {
  width: 36px;
  height: 36px;
  border-radius: 2.5px;
  overflow: hidden;
  flex-shrink: 0;
}

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

.chat-sidebar__bottom {
  border-top: 1px solid #dfe5e8;
  padding: 8px 12px;
  height: 56px;
  display: flex;
  align-items: center;
}

.chat-sidebar__item--new .chat-sidebar__item-icon {
  font-size: 20px;
}

/* ============================================
   Chat Overlay (SP)
   ============================================ */
.chat-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 99;
}

.chat-overlay.is-active {
  display: block;
}

/* ============================================
   Chat Main
   ============================================ */
.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #ffffff;

  @media (max-width: 767px) {
    width: 100%;
  }
}

/* ============================================
   Chat Header
   ============================================ */
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #dfe5e8;
  flex-shrink: 0;
  height: 60px;

  @media (max-width: 767px) {
    justify-content: space-between;
  }
}

.chat-header__menu {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  color: #000000;

  @media (max-width: 767px) {
    display: flex;
  }
}

.chat-header__logo {
  display: none;

  @media (max-width: 767px) {
    display: block;
    width: 120px;
  }
}

.chat-header__logo img {
  width: 100%;
}

.chat-header__left {
  display: flex;
  align-items: center;
  gap: 16px;

  @media (max-width: 767px) {
    display: none;
  }
}

.chat-header__title {
  font-family: "Inter", "Noto Sans JP", sans-serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
  color: #000000;
  white-space: nowrap;
}

.chat-header__members {
  display: flex;
  align-items: center;
  padding-right: 8px;
}

.chat-header__member {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #ffffff;
  margin-right: -8px;
  position: relative;
}

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

.chat-header__member--add {
  background: #d9d9d9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-header__member--add .material-symbols-outlined {
  font-size: 18px;
  color: #586266;
}

.chat-header__right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.chat-header__right .chat-header__action {
  @media (max-width: 767px) {
    display: none;
  }
}

.chat-header__action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: none;
  border: none;
  cursor: pointer;
  color: #000000;
}

.chat-header__action:hover {
  background: #f3f4f5;
}

.chat-header__user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

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

/* ============================================
   Chat Sub Header (SP)
   ============================================ */
.chat-subheader {
  display: none;

  @media (max-width: 767px) {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f5;
    flex-shrink: 0;
  }
}

.chat-subheader .chat-header__title {
  font-size: 20px;
}

.chat-subheader .chat-header__action {
  margin-left: auto;
}

/* ============================================
   Chat Area
   ============================================ */
.chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
}

.chat-area--empty {
  justify-content: center;
  align-items: center;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px 80px;
  display: flex;
  flex-direction: column;
  gap: 24px;

  @media (max-width: 767px) {
    padding: 24px 16px;
  }
}

/* ============================================
   Chat Message Group
   ============================================ */
.chat-message-group {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #dfe5e8;
}

/* ============================================
   Chat Message
   ============================================ */
.chat-message {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.chat-message--user {
  justify-content: flex-end;
}

.chat-message--agent {
  justify-content: flex-start;
}

.chat-message__avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  overflow: hidden;
}

.chat-message--user .chat-message__avatar {
  border-radius: 50%;
}

.chat-message--agent .chat-message__avatar {
  border-radius: 2.5px;
}

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

.chat-message__content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-message--user .chat-message__content {
  align-items: flex-end;

  @media (max-width: 767px) {
    flex: 1;
    min-width: 0;
  }
}

.chat-message--agent .chat-message__content {
  align-items: flex-start;
  flex: 1;
  min-width: 0;
}

.chat-message__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}

.chat-message__name {
  font-family: "Inter", "Noto Sans JP", sans-serif;
  font-weight: 400;
  color: #000000;
}

.chat-message__time {
  font-family: "Inter", sans-serif;
  font-weight: 400;
  color: #b4bec2;
}

/* User bubble */
.chat-message__bubble {
  background: #f3f4f5;
  border-radius: 16px;
  padding: 16px 24px;

  @media (max-width: 767px) {
    width: 100%;
  }
}

.chat-message__bubble p {
  font-family: "Inter", "Noto Sans JP", sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.7;
  color: #000000;
}

/* Agent text (no bubble) */
.chat-message__text {
  font-family: "Inter", "Noto Sans JP", sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.7;
  color: #000000;
  width: 100%;
}

.chat-message__text p + p {
  margin-top: 0;
}

/* Actions */
.chat-message__actions {
  display: flex;
  align-items: center;
}

.chat-message__action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: none;
  border: none;
  cursor: pointer;
  color: #b4bec2;
  transition: color 0.15s, background 0.15s;
}

.chat-message__action-btn:hover {
  color: #586266;
  background: #f3f4f5;
}

.chat-message__action-btn .material-symbols-outlined {
  font-size: 20px;
}

/* ============================================
   Chat Input
   ============================================ */
.chat-input {
  padding: 0 80px 24px;
  flex-shrink: 0;

  @media (max-width: 767px) {
    padding: 0 16px 24px;
  }
}

.chat-area--empty .chat-input {
  padding: 0;
  width: 640px;
  max-width: calc(100% - 32px);

  @media (max-width: 767px) {
    width: 334px;
    max-width: calc(100% - 56px);
  }
}

.chat-input__inner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 24px;
  background: #ffffff;
  border: 4px solid #00bc64;
  border-radius: 999px;
  box-shadow: 0 0 20px rgba(0, 188, 100, 0.5);

  @media (max-width: 767px) {
    padding: 20px;
  }
}

.chat-input__icon {
  font-size: 24px;
  color: #dfe5e8;
  flex-shrink: 0;
}

.chat-input__field {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: "Inter", "Noto Sans JP", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: #000000;
}

.chat-input__field::placeholder {
  color: #b4bec2;
}

/* ============================================
   Chat Footer (SP)
   ============================================ */
.chat-footer {
  display: none;

  @media (max-width: 767px) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 40px;
  }
}

/* ============================================
   Sidebar Item Wrap (hover + context menu)
   ============================================ */
.chat-sidebar__item-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

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

.chat-sidebar__more {
  display: none;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  color: #586266;
  padding: 0;
  flex-shrink: 0;
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 4px;
}

.chat-sidebar__more:hover {
  background: rgba(0, 0, 0, 0.08);
}

.chat-sidebar__more .material-symbols-outlined {
  font-size: 18px;
}

.chat-sidebar__item-wrap:hover .chat-sidebar__more {
  display: flex;
}

.chat-sidebar__item-wrap:hover .chat-sidebar__item {
  background: #dfe5e8;
  padding-right: 28px;
}

/* ============================================
   Context Menu (chat history item)
   ============================================ */
.chat-context-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 50;
  background: #ffffff;
  border: 1px solid #b4bec2;
  border-radius: 4px;
  padding: 8px;
  min-width: 180px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.chat-context-menu.is-open {
  display: block;
}

.chat-context-menu__item {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 8px;
  border-radius: 999px;
  font-family: "Inter", "Noto Sans JP", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.7;
  color: #000000;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s;
}

.chat-context-menu__item:hover {
  background: #dfe5e8;
}

.chat-context-menu__item .material-symbols-outlined {
  font-size: 20px;
  color: #586266;
}

/* ============================================
   Account Dropdown Menu
   ============================================ */
.chat-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 50;
  background: #ffffff;
  border: 1px solid #b4bec2;
  border-radius: 4px;
  padding: 0 8px;
  min-width: 180px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.chat-dropdown.is-open {
  display: block;
}

.chat-dropdown__group {
  padding: 8px 0;
}

.chat-dropdown__group + .chat-dropdown__group {
  border-top: 1px solid #dfe5e8;
}

.chat-dropdown__item {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 8px;
  border-radius: 999px;
  font-family: "Inter", "Noto Sans JP", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.7;
  color: #000000;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s;
}

.chat-dropdown__item:hover {
  background: #dfe5e8;
}

.chat-header__right {
  position: relative;
}

.chat-header__user-avatar {
  cursor: pointer;
}

/* ============================================
   Modal (Search / Invite / Share)
   ============================================ */
.chat-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.chat-modal.is-open {
  display: flex;
}

.chat-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
}

.chat-modal__panel {
  position: relative;
  background: #ffffff;
  border: 1px solid #b4bec2;
  border-radius: 4px;
  width: 640px;
  max-width: calc(100% - 32px);
  max-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
}

.chat-modal__panel--share {
  width: 480px;
}

.chat-modal__panel--invite {
  width: 480px;
}

.chat-modal__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 24px;
  border-bottom: 1px solid #dfe5e8;
}

.chat-modal__title {
  flex: 1;
  font-family: "Inter", "Noto Sans JP", sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  color: #000000;
}

.chat-modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: none;
  border: none;
  cursor: pointer;
  color: #000000;
}

.chat-modal__close:hover {
  background: #f3f4f5;
}

.chat-modal__body {
  flex: 1;
  overflow-y: auto;
}

/* Search Modal */
.chat-modal__search-results {
  display: flex;
  flex-direction: column;
}

.chat-modal__search-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 24px;
  text-decoration: none;
  transition: background 0.15s;
}

.chat-modal__search-item:hover {
  background: #f3f4f5;
}

.chat-modal__search-item-title {
  font-family: "Inter", "Noto Sans JP", sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  color: #000000;
}

.chat-modal__search-item-text {
  font-family: "Inter", "Noto Sans JP", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: #586266;
}

.chat-modal__search-footer {
  display: flex;
  justify-content: center;
  padding: 24px;
}

.chat-modal__search-all {
  font-family: "Inter", "Noto Sans JP", sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  color: #00a85a;
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 999px;
  transition: background 0.15s;
}

.chat-modal__search-all:hover {
  background: #daf7e9;
}

/* Invite Modal */
.chat-modal__agent-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 0;
}

.chat-modal__agent-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 24px;
  font-family: "Inter", "Noto Sans JP", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.7;
  color: #000000;
  text-decoration: none;
  transition: background 0.15s;
}

.chat-modal__agent-item:hover {
  background: #f3f4f5;
}

.chat-modal__agent-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #b4bec2;
  border-radius: 2.5px;
  font-family: "New Astro Soft", sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #586266;
  flex-shrink: 0;
}

/* Share Modal */
.chat-modal__share-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 24px;
}

.chat-modal__share-label {
  font-family: "Inter", "Noto Sans JP", sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  color: #b4bec2;
  text-align: center;
  width: 100%;
}

.chat-modal__qr {
  width: 120px;
  aspect-ratio: 1;
}

.chat-modal__share-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid #dfe5e8;
  border-radius: 4px;
  width: 100%;
}

.chat-modal__share-link-url {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: #000000;
}

.chat-modal__share-link-url .material-symbols-outlined {
  font-size: 20px;
  color: #586266;
  flex-shrink: 0;
}

.chat-modal__share-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  background: #00a85a;
  border: none;
  border-radius: 999px;
  font-family: "Inter", "Noto Sans JP", sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  color: #ffffff;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s;
}

.chat-modal__share-copy:hover {
  background: #00bd64;
}
