:root {
  --bg: #eef4ff;
  --bg-soft: rgba(255, 255, 255, 0.72);
  --panel: rgba(255, 255, 255, 0.88);
  --line: rgba(73, 103, 158, 0.14);
  --ink: #1f2a44;
  --muted: #687692;
  --brand: #224f89;
  --brand-strong: #163d71;
  --accent: #2f5f9f;
  --shadow: 0 30px 90px rgba(73, 103, 158, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Be Vietnam Pro", sans-serif;
  color: var(--ink);
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(97, 142, 220, 0.24), transparent 23%),
    radial-gradient(circle at left 60%, rgba(125, 163, 229, 0.14), transparent 34%),
    radial-gradient(circle at right 62%, rgba(125, 163, 229, 0.14), transparent 34%),
    linear-gradient(180deg, #f4f8ff 0%, #eef4ff 100%);
}

button,
textarea {
  font: inherit;
}

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(10px);
  pointer-events: none;
}

.ambient-a {
  inset: 2% auto auto 14%;
  width: 320px;
  height: 320px;
  background: rgba(126, 165, 235, 0.18);
}

.ambient-b {
  inset: auto 10% 8% auto;
  width: 360px;
  height: 360px;
  background: rgba(188, 210, 246, 0.3);
}

.intro-screen {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(240, 246, 255, 0.72);
  backdrop-filter: blur(12px);
  z-index: 10;
  transition: opacity 220ms ease;
}

.intro-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.intro-card,
.brand-card,
.hero-card,
.suggest-card,
.chat-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.intro-card {
  width: min(640px, calc(100vw - 48px));
  max-width: 640px;
  border-radius: 36px;
  padding: 28px 28px 24px;
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(252, 253, 255, 0.9) 100%);
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.intro-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 20px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, #edf2fb 0%, #dfe8f7 100%);
  color: #234c86;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.intro-poster-shell {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.intro-poster {
  position: relative;
  width: min(192px, 42vw);
  aspect-ratio: 1;
  border-radius: 24px;
  padding: 14px;
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 244, 225, 0.95), rgba(255, 252, 248, 0.94) 56%, rgba(255, 230, 189, 0.68) 74%, rgba(227, 43, 43, 0.9) 100%),
    linear-gradient(180deg, #d81927 0%, #f04f38 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.42),
    0 14px 24px rgba(50, 71, 119, 0.11);
  overflow: hidden;
}

.intro-poster::before,
.intro-poster::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 140%;
  height: 140%;
  border-radius: 50%;
  transform: translateX(-50%);
  border: 2px solid rgba(240, 187, 94, 0.24);
}

.intro-poster::before {
  top: 4%;
}

.intro-poster::after {
  top: 14%;
}

.intro-poster-top {
  position: absolute;
  top: 10px;
  left: 50%;
  z-index: 2;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.poster-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ef4d4d 0%, #c71826 100%);
  box-shadow: inset 0 0 0 3px rgba(255, 240, 214, 0.72);
}

.poster-mark.alt {
  background: linear-gradient(180deg, #ff9e36 0%, #f46220 100%);
}

.intro-poster-bot {
  position: absolute;
  inset: 24% 15% 18% 15%;
  display: grid;
  place-items: center;
}

.bot-halo {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(124, 192, 255, 0.68) 0%, rgba(124, 192, 255, 0.15) 34%, transparent 56%),
    repeating-linear-gradient(
      90deg,
      rgba(74, 144, 226, 0.1) 0,
      rgba(74, 144, 226, 0.1) 14px,
      transparent 14px,
      transparent 32px
    );
  filter: blur(0.4px);
}

.bot-core {
  position: relative;
  z-index: 1;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #61ebff;
  font-size: 20px;
  font-weight: 800;
  background:
    radial-gradient(circle at 35% 30%, #36475d 0%, #10192b 66%, #070c16 100%);
  box-shadow:
    0 12px 30px rgba(34, 65, 107, 0.35),
    inset 0 0 0 4px rgba(126, 213, 255, 0.12);
}

.intro-poster-bottom {
  position: absolute;
  right: 12px;
  bottom: 10px;
  z-index: 2;
  color: #1d59b6;
  font-size: clamp(16px, 2.2vw, 24px);
  font-weight: 900;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  -webkit-text-stroke: 3px rgba(255, 248, 236, 0.96);
  paint-order: stroke fill;
}

.seal {
  width: 88px;
  height: 88px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 26px;
  color: white;
  font-size: 30px;
  font-weight: 800;
  background: linear-gradient(145deg, var(--brand) 0%, var(--brand-strong) 100%);
}

.seal.small {
  width: 60px;
  height: 60px;
  margin: 0;
  font-size: 22px;
}

.intro-card h1,
.hero-card h3,
.section-head h3,
.chat-header h2 {
  margin: 0;
}

.intro-card h1 {
  font-size: clamp(28px, 3.4vw, 38px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.intro-desc,
.intro-sub,
.brand-org,
.hero-card p,
.group-item small {
  color: var(--muted);
}

.intro-desc {
  width: min(520px, 100%);
  margin: 14px auto 0;
  font-size: clamp(14px, 1.6vw, 16px);
  line-height: 1.6;
}

.intro-sample-label {
  margin-top: 18px;
  color: #7a86a1;
  font-size: 14px;
  font-weight: 700;
}

.intro-samples,
.quick-chips,
.chip-grid,
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.intro-samples {
  justify-content: center;
  margin-top: 12px;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1680px, calc(100vw - 64px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 470px minmax(0, 1fr);
  gap: 24px;
  padding: 30px 0 20px;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

.sidebar {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 22px;
  align-content: start;
  min-height: 0;
  overflow: hidden;
}

.brand-card,
.hero-card,
.suggest-card,
.chat-panel {
  border-radius: 34px;
  padding: 24px;
}

.brand-card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  border-radius: 32px;
  padding: 30px 22px 18px;
}

.brand-logo {
  flex: 0 0 auto;
}

.brand-logo-frame {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
  border: 1px solid rgba(191, 204, 230, 0.72);
  box-shadow: 0 10px 30px rgba(111, 139, 191, 0.14);
}

.brand-logo-inner {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #1b5cb3;
  font-size: 20px;
  font-weight: 900;
  background:
    radial-gradient(circle at 50% 30%, #fff7ec 0%, #ffe1b6 52%, #e53935 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75);
}

#brandTitle {
  margin: 10px 0 0;
  font-size: 21px;
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.hero-card h3 {
  font-size: 20px;
  line-height: 1.35;
}

.brand-org {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.45;
}

.hero-card {
  padding: 26px 24px 26px;
  background:
    radial-gradient(circle at 80% 8%, rgba(168, 198, 247, 0.4), transparent 34%),
    linear-gradient(180deg, rgba(247, 251, 255, 0.96) 0%, rgba(243, 248, 255, 0.92) 100%);
}

.hero-card p {
  margin: 10px 0 22px;
  font-size: 14px;
  line-height: 1.55;
}

.hero-tags span,
.chip,
.ghost-btn,
.primary-btn {
  border-radius: 999px;
}

.hero-tags span,
.chip {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.75);
}

.hero-tags span {
  padding: 8px 14px;
  color: #234e87;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(136, 164, 214, 0.12);
}

.suggest-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
  align-content: start;
  padding: 24px 22px 22px;
  min-height: 0;
  overflow: hidden;
}

.section-head p {
  margin: 0;
}

.section-head h3 {
  margin-top: 8px;
  font-size: 16px;
}

.section-head .section-kicker {
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: none;
}

.group-list {
  display: grid;
  gap: 14px;
  min-height: 0;
  overflow: auto;
  padding-right: 6px;
}

.group-item {
  border: 1px solid rgba(205, 217, 238, 0.92);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(251, 253, 255, 0.96) 0%, rgba(246, 249, 255, 0.94) 100%);
  padding: 16px 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.group-item summary {
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  list-style: none;
}

.group-item summary::-webkit-details-marker {
  display: none;
}

.group-icon-wrap {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
  border: 1px solid rgba(210, 221, 240, 0.88);
}

.group-icon {
  font-size: 20px;
}

.group-text {
  min-width: 0;
  flex: 1;
}

.group-item strong,
.group-item small {
  display: block;
}

.group-item strong {
  font-size: 15px;
  letter-spacing: -0.02em;
}

.group-item small {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.35;
}

.group-arrow {
  color: #687692;
  font-size: 17px;
  line-height: 1;
}

.chip-grid {
  padding-top: 16px;
}

.chat-panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: calc(100vh - 50px);
  height: 100%;
  padding: 0;
  overflow: hidden;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 24px 24px 18px;
  border-bottom: 1px solid rgba(199, 214, 239, 0.78);
}

.chat-header h2 {
  font-size: 21px;
  letter-spacing: -0.03em;
}

.chat-subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.chat-body {
  padding: 18px 24px;
  overflow: auto;
  min-height: 0;
  background:
    radial-gradient(circle at 28% 40%, rgba(192, 213, 246, 0.12), transparent 26%),
    radial-gradient(circle at 68% 16%, rgba(192, 213, 246, 0.16), transparent 18%),
    linear-gradient(180deg, rgba(248, 251, 255, 0.88) 0%, rgba(245, 249, 255, 0.8) 100%);
}

.message {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 20px;
}

.message.user {
  grid-template-columns: minmax(0, 1fr) 54px;
}

.message.user .message-badge {
  order: 2;
}

.message.user .message-content {
  display: grid;
  justify-items: end;
}

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

.message.user .message-bubble {
  margin-left: auto;
  background: linear-gradient(180deg, #295d9d 0%, #214d87 100%);
  color: white;
  border-color: rgba(33, 77, 135, 0.3);
}

.message-badge {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  font-size: 22px;
  font-weight: 800;
  color: #d54f39;
  background: linear-gradient(180deg, #ffffff 0%, #f3f7ff 100%);
  border: 1px solid rgba(207, 219, 238, 0.92);
  box-shadow: 0 8px 20px rgba(120, 149, 199, 0.12);
}

.message-content {
  display: grid;
  gap: 10px;
}

.message-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  color: #7f8ca7;
  font-size: 13px;
}

.message-name {
  color: #2b3a57;
  font-size: 15px;
  font-weight: 800;
}

.message-bubble {
  max-width: 760px;
  padding: 14px 18px;
  border-radius: 22px;
  line-height: 1.58;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(212, 220, 235, 0.9);
  box-shadow: 0 12px 32px rgba(158, 179, 216, 0.12);
}

.message-bubble p {
  margin: 0;
}

.message-bubble ul {
  margin: 12px 0 0;
  padding-left: 20px;
}

.compose-zone {
  display: grid;
  gap: 14px;
  padding: 18px 24px 22px;
  border-top: 1px solid rgba(199, 214, 239, 0.78);
  background: linear-gradient(180deg, rgba(251, 253, 255, 0.94) 0%, rgba(247, 250, 255, 0.98) 100%);
}

.compose-tip {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 10px 16px;
  border-radius: 999px;
  color: #5b6f93;
  font-size: 13px;
  font-weight: 700;
  background: linear-gradient(180deg, rgba(240, 245, 252, 0.96) 0%, rgba(231, 238, 249, 0.98) 100%);
}

.quick-chips {
  padding: 0;
}

.composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.composer-input-shell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 88px;
  padding: 10px 12px 10px 16px;
  border-radius: 28px;
  border: 1px solid rgba(203, 216, 238, 0.95);
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    inset 0 0 0 5px rgba(238, 244, 252, 0.92),
    0 10px 28px rgba(158, 179, 216, 0.08);
}

.composer-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: #8fa0bf;
  font-size: 22px;
}

textarea {
  width: 100%;
  min-height: 52px;
  max-height: 180px;
  resize: none;
  padding: 10px 8px 10px 0;
  border-radius: 0;
  border: none;
  outline: none;
  color: #33425f;
  font-size: 15px;
  line-height: 1.45;
  background: transparent;
}

textarea:focus {
  box-shadow: none;
}

.chip,
.ghost-btn,
.primary-btn {
  border: none;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.chip {
  padding: 10px 16px;
  color: #2b3c5a;
  font-size: 13px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 249, 255, 0.98) 100%);
  border: 1px solid rgba(203, 216, 238, 0.95);
  box-shadow: 0 6px 18px rgba(158, 179, 216, 0.08);
}

.chip:hover,
.ghost-btn:hover,
.primary-btn:hover {
  transform: translateY(-1px);
}

.chip.intro {
  min-height: 46px;
  padding: 0 18px;
  color: #33425f;
  border: 1px solid rgba(179, 192, 219, 0.7);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(247, 250, 255, 0.95) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  font-size: 13px;
}

.ghost-btn {
  padding: 12px 18px;
  color: #9a2f39;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid rgba(242, 198, 202, 0.9);
  background: linear-gradient(180deg, rgba(255, 244, 245, 0.98) 0%, rgba(255, 236, 238, 0.96) 100%);
}

.primary-btn {
  padding: 14px 20px;
  color: white;
  background: linear-gradient(180deg, #2d5d99 0%, #224e89 100%);
}

.send-btn {
  width: 60px;
  height: 60px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 20px;
  font-size: 28px;
  line-height: 1;
  box-shadow: 0 14px 30px rgba(37, 74, 127, 0.2);
}

.intro-start-btn {
  width: 100%;
  min-height: 56px;
  margin-top: 14px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  box-shadow: 0 16px 28px rgba(37, 74, 127, 0.22);
}

.intro-sub {
  margin: 18px auto 0;
  width: min(560px, 100%);
  font-size: 13px;
  line-height: 1.55;
}

a {
  color: inherit;
}

@media (max-width: 980px) {
  body {
    overflow: auto;
  }

  .app-shell {
    width: min(100%, calc(100vw - 28px));
    grid-template-columns: 1fr;
    height: auto;
    max-height: none;
    padding-top: 16px;
  }

  .sidebar,
  .suggest-card,
  .group-list {
    overflow: visible;
  }

  .chat-panel {
    min-height: auto;
    height: auto;
  }

  .compose-tip {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding: 14px;
  }

  .intro-card,
  .brand-card,
  .hero-card,
  .suggest-card,
  .chat-panel {
    border-radius: 24px;
    padding: 18px;
  }

  .intro-card {
    border-radius: 30px;
    padding: 22px 18px 20px;
  }

  .intro-badge {
    min-height: 38px;
    padding: 8px 18px;
    margin-bottom: 18px;
    font-size: 13px;
  }

  .intro-desc {
    font-size: 15px;
  }

  .intro-sample-label {
    margin-top: 20px;
  }

  .intro-start-btn {
    min-height: 54px;
    font-size: 16px;
  }

  .brand-card,
  .hero-card,
  .suggest-card {
    border-radius: 28px;
    padding: 20px 18px;
  }

  .chat-header {
    padding: 20px 18px 16px;
  }

  .chat-body,
  .compose-zone {
    padding-left: 18px;
    padding-right: 18px;
  }

  .composer {
    grid-template-columns: 1fr auto;
    align-items: end;
  }

  .composer-input-shell {
    min-height: 88px;
    border-radius: 26px;
  }

  .send-btn {
    width: 60px;
    height: 60px;
    border-radius: 20px;
    font-size: 26px;
  }

  .compose-tip,
  .chip,
  .group-item small,
  .brand-org,
  .chat-subtitle,
  .message-bubble,
  textarea {
    font-size: 16px;
  }

  .message,
  .message.user {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .message.user .message-badge {
    order: 0;
  }

  .message.user .message-bubble {
    order: 0;
  }

  .message-badge {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    font-size: 16px;
  }

  .message-name {
    font-size: 16px;
  }
}
