body[data-page='chirpy'] .app-layout {
  width: min(1680px, calc(100% - 32px));
  grid-template-columns: var(--sidebar) minmax(0, 1fr) minmax(250px, 290px);
}

body[data-page='chirpy'] .main-column {
  min-width: 0;
  max-width: none;
}

body[data-page='chirpy'] .rightbar {
  display: grid;
  align-self: start;
  gap: 14px;
}

.chirpy-pro {
  display: grid;
  gap: 16px;
}

/* INTRODUCCIÓN PRIMERO */
.chirpy-pro-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 0;
  padding: 6px 8px;
  background:
    radial-gradient(
      circle at 10% 0%,
      rgba(159, 0, 153, 0.18),
      transparent 22rem
    ),
    radial-gradient(
      circle at 100% 15%,
      rgba(239, 0, 138, 0.12),
      transparent 24rem
    ),
    rgba(255, 255, 255, 0.94);
}

.chirpy-pro-hero::after {
  content: '';
  position: absolute;
  right: -80px;
  bottom: -120px;
  width: 320px;
  height: 320px;
  border-radius: 999px;
  border: 1px solid rgba(239, 0, 138, 0.14);
  background: rgba(255, 241, 247, 0.7);
  display: none;
}

.chirpy-orb {
  position: relative;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: #fff;
  border: 1px solid var(--line-2);
  box-shadow: 0 8px 18px rgba(159, 0, 153, 0.1);
}

.chirpy-orb img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  z-index: 1;
}

.chirpy-orb span {
  position: absolute;
  inset: -3px;
  border-radius: 4px;
  border: 1px solid rgba(159, 0, 153, 0.08);
  pointer-events: none;
}

.chirpy-status {
  width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: #fff;
  color: var(--hot);
  font-size: 11px;
  font-weight: 950;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #17b978;
  box-shadow: 0 0 0 2px rgba(23, 185, 120, 0.12);
}

.chirpy-pro-hero h2 {
  margin: 4px 0 2px;
  font-size: 20px;
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.chirpy-pro-hero p {
  max-width: 980px;
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.quick-help {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.chirpy-pro-hero .chip {
  min-height: 22px;
  padding: 0 8px;
  font-size: 10px;
}

/* MAIN SOLO CHAT */
.chirpy-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* QUÉ PUEDE HACER EN RIGHTBAR */
.chirpy-side {
  align-self: start;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  opacity: 0.92;
}

.chirpy-side h3 {
  margin: 0 0 2px;
  font-size: 22px;
  letter-spacing: -0.04em;
}

.chirpy-capability {
  padding: 12px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.72);
}

.chirpy-capability b {
  display: block;
  color: var(--ink);
}

.chirpy-capability span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
  font-size: 14px;
}

/* CHAT GIGANTE */
.chirpy-chat-pro {
  width: 100%;
  height: 654px;
  min-height: 748px;
  max-height: 748px;
  aspect-ratio: auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.chirpy-chat-giant {
  min-width: 0;
}

.chirpy-chat-head {
  min-height: 82px;
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line-2);
  background: rgba(255, 250, 252, 0.88);
}

.chirpy-mini {
  object-fit: contain;
  background: #fff;
}

.chirpy-messages {
  min-height: 0;
  padding: 24px;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 16px;
  background:
    radial-gradient(circle at 0 0, rgba(159, 0, 153, 0.08), transparent 20rem),
    radial-gradient(
      circle at 100% 100%,
      rgba(239, 0, 138, 0.08),
      transparent 22rem
    ),
    #fff;
}

.chirpy-message {
  max-width: min(88%, 1080px);
  display: grid;
  gap: 8px;
}

.chirpy-message.bot {
  grid-template-columns: 48px minmax(0, 1fr);
}

.chirpy-message.user {
  justify-self: end;
}

.chirpy-message img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.chirpy-message > div {
  padding: 14px 16px;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  background: #fff6fb;
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

.chirpy-message.user > div {
  color: #fff;
  background: var(--pink);
  border-color: var(--pink);
}

.chirpy-message b {
  display: block;
  margin-bottom: 4px;
}

.chirpy-message p {
  margin: 0;
}

.chirpy-compose {
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  border-top: 1px solid var(--line-2);
  background: rgba(255, 250, 252, 0.9);
}

.chirpy-compose input,
.chirpy-compose textarea {
  min-height: 52px;
  font-size: 16px;
}

.chirpy-compose .btn {
  min-height: 52px;
  padding-inline: 20px;
}

.chirpy-thinking {
  opacity: 0.78;
}

.chirpy-thinking p::after {
  content: '…';
  animation: chirpyDots 1s steps(3, end) infinite;
}

@keyframes chirpyDots {
  0% {
    content: '';
  }

  33% {
    content: '.';
  }

  66% {
    content: '..';
  }

  100% {
    content: '...';
  }
}

@media (max-width: 1200px) {
  body[data-page='chirpy'] .app-layout {
    width: min(100%, calc(100% - 24px));
    grid-template-columns: var(--sidebar) minmax(0, 1fr);
  }

  body[data-page='chirpy'] .rightbar {
    display: none;
  }

  .chirpy-chat-pro {
    height: 654px;
    min-height: 654px;
    max-height: 654px;
  }
}

@media (max-width: 860px) {
  body[data-page='chirpy'] .app-layout {
    grid-template-columns: 1fr;
    width: min(100%, calc(100% - 18px));
  }

  .chirpy-pro-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 8px;
  }

  .chirpy-orb {
    width: 62px;
    height: 62px;
  }

  .chirpy-orb img {
    width: 52px;
    height: 52px;
  }

  .chirpy-chat-pro {
    height: auto;
    min-height: calc(100vh - 120px);
    max-height: none;
  }

  .chirpy-messages {
    padding: 14px;
  }

  .chirpy-message {
    max-width: 94%;
  }

  .chirpy-compose {
    grid-template-columns: 1fr;
  }
}

.pagebar {
  display: none;
}
