:root {
  --red: #d95a64;
  --red-strong: #bd3e49;
  --red-deep: #8e2830;
  --red-soft: #ffe1df;
  --warm-white: #fff8f3;
  --white: #ffffff;
  --ink: #231b1d;
  --muted: #7a686b;
  --line: #efd9d7;
  --yellow: #ffc83d;
  --green: #16805b;
  --pink: #e97992;
  --shadow: 0 20px 50px rgba(142, 40, 48, 0.11);
  --radius: 22px;
  --radius-lg: 30px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 9% 12%, rgba(255, 200, 61, 0.22), transparent 23rem),
    radial-gradient(circle at 92% 28%, rgba(233, 121, 146, 0.18), transparent 24rem),
    repeating-linear-gradient(112deg, rgba(217, 90, 100, 0.035) 0 1px, transparent 1px 28px),
    var(--warm-white);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

.background-decor {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.decor {
  position: absolute;
  display: block;
  opacity: 0.34;
  filter: drop-shadow(0 10px 16px rgba(35, 27, 29, 0.08));
}

.decor--flag {
  width: clamp(68px, 8vw, 116px);
}

.decor--flag-one {
  right: 39vw;
  top: 112px;
  rotate: -8deg;
  opacity: 0.42;
}

.decor--flag-two {
  right: 4vw;
  bottom: 12vh;
  rotate: 11deg;
  opacity: 0.32;
}

.decor--heart {
  width: 34px;
  height: 34px;
  rotate: -45deg;
  border-radius: 9px 9px 4px 9px;
  background: var(--red);
}

.decor--heart::before,
.decor--heart::after {
  content: "";
  position: absolute;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: inherit;
}

.decor--heart::before {
  left: 17px;
  top: 0;
}

.decor--heart::after {
  left: 0;
  top: -17px;
}

.decor--heart-one {
  right: 30vw;
  top: 43vh;
  scale: 0.72;
  opacity: 0.25;
}

.decor--heart-two {
  left: 10vw;
  top: 18vh;
  scale: 0.55;
  opacity: 0.23;
}

.decor--heart-three {
  right: 10vw;
  top: 58vh;
  scale: 0.62;
  opacity: 0.24;
}

.decor--star {
  width: 46px;
  height: 46px;
  background: var(--red);
  clip-path: polygon(50% 0, 61% 34%, 97% 34%, 68% 55%, 79% 91%, 50% 69%, 21% 91%, 32% 55%, 3% 34%, 39% 34%);
}

.decor--star-one {
  left: 43vw;
  top: 100px;
  rotate: 14deg;
  opacity: 0.24;
}

.decor--star-two {
  right: 30vw;
  bottom: 13vh;
  rotate: -18deg;
  scale: 0.72;
  opacity: 0.14;
}

.decor--star-three {
  left: 6vw;
  top: 64vh;
  rotate: 23deg;
  scale: 0.58;
  opacity: 0.16;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

.icon {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem clamp(1rem, 4vw, 2.5rem);
  border-bottom: 1px solid rgba(142, 40, 48, 0.11);
  background: rgba(255, 248, 243, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.brand__symbol {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(142, 40, 48, 0.15);
}

.brand__copy {
  display: grid;
  line-height: 1.1;
}

.brand__copy strong {
  color: var(--red-deep);
  font-size: 1.25rem;
}

.brand__copy span {
  color: var(--muted);
  font-size: 0.82rem;
}

.topbar__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.topbar__nav a {
  border-radius: 999px;
  padding: 0.45rem 0.7rem;
}

.topbar__nav a:hover,
.topbar__nav a:focus-visible {
  background: rgba(217, 90, 100, 0.11);
  color: var(--red-deep);
  outline: none;
}

.topbar__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 42px;
  padding: 0.65rem 0.95rem;
  border: 1px solid rgba(142, 40, 48, 0.14);
  border-radius: 999px;
  background: var(--red-strong);
  color: var(--white);
  font-weight: 750;
  box-shadow: 0 10px 22px rgba(189, 62, 73, 0.2);
}

.topbar__action:hover,
.topbar__action:focus-visible {
  background: var(--red-deep);
  outline: none;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0.2rem 0 2rem;
}

.hero-band {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 430px);
  align-items: center;
  gap: clamp(1rem, 4vw, 3rem);
  margin-bottom: 0.25rem;
  min-height: 208px;
}

.hero-band__text {
  max-width: 660px;
  padding-top: 0;
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--red-deep);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-band h1 {
  margin: 0;
  max-width: 610px;
  font-size: clamp(1.5rem, 2.15vw, 2.45rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.hero-band p:not(.eyebrow) {
  margin: 0.85rem 0 0;
  max-width: 540px;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.18rem);
  font-weight: 650;
}

.hero-band__visual {
  display: grid;
  align-items: end;
}

.dandaria-diary {
  width: min(100%, 405px);
  justify-self: end;
  transform: rotate(1.5deg);
  filter: drop-shadow(0 18px 26px rgba(35, 27, 29, 0.12));
}

.side-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 0.55rem;
  margin: 0;
  position: relative;
  z-index: 2;
}

.side-stats div {
  display: grid;
  place-content: center;
  text-align: center;
  min-height: 78px;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(142, 40, 48, 0.11);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(10px);
  box-shadow: 0 16px 30px rgba(142, 40, 48, 0.08);
}

.side-stats strong,
.side-stats span {
  display: block;
}

.side-stats strong {
  color: var(--red-deep);
  font-size: 1.35rem;
  line-height: 1.05;
}

.side-stats span {
  margin-top: 0.22rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1rem;
  align-items: start;
}

.chat-panel,
.info-card {
  border: 1px solid rgba(142, 40, 48, 0.13);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.chat-panel {
  height: clamp(560px, calc(100vh - 112px), 760px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  overflow: hidden;
}

.chat-panel__header {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(255, 200, 61, 0.2), transparent 42%),
    linear-gradient(135deg, rgba(255, 225, 223, 0.9), rgba(255, 255, 255, 0.96));
}

.chat-panel__header::after {
  content: "";
  position: absolute;
  right: 8.5rem;
  top: 1.25rem;
  width: 30px;
  height: 30px;
  rotate: -45deg;
  border-radius: 8px 8px 3px 8px;
  background: var(--red);
  opacity: 0.13;
}

.chat-panel__header::before {
  content: "";
  position: absolute;
  right: 9.2rem;
  top: 0.85rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 15px 15px 0 var(--red);
  opacity: 0.13;
}

.assistant-card {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.assistant-card__avatar {
  width: 54px;
  height: 54px;
  border-radius: 18px;
}

.assistant-card h2,
.info-card h2 {
  margin: 0;
  line-height: 1.1;
}

.assistant-card h2 {
  font-size: 1.35rem;
}

.status-pill {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  white-space: nowrap;
  padding: 0.42rem 0.7rem;
  border-radius: 999px;
  background: rgba(22, 128, 91, 0.1);
  color: #0d6547;
  font-size: 0.8rem;
  font-weight: 750;
}

.status-pill span {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--green);
}

.messages {
  position: relative;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  background:
    radial-gradient(circle at 93% 11%, rgba(255, 200, 61, 0.14), transparent 13rem),
    linear-gradient(180deg, rgba(255, 248, 243, 0.68), rgba(255, 255, 255, 0.96)),
    var(--white);
}

.messages::before {
  content: "";
  position: absolute;
  right: 3.5rem;
  top: 6.5rem;
  width: 128px;
  height: 96px;
  background: url("./assets/brazil-flag-sticker.svg") center / contain no-repeat;
  opacity: 0.11;
  transform: rotate(-10deg);
  pointer-events: none;
}

.messages::after {
  content: "";
  position: absolute;
  right: 12.5rem;
  top: 12rem;
  width: 52px;
  height: 52px;
  background: var(--red);
  clip-path: polygon(50% 0, 61% 34%, 97% 34%, 68% 55%, 79% 91%, 50% 69%, 21% 91%, 32% 55%, 3% 34%, 39% 34%);
  opacity: 0.1;
  rotate: 16deg;
  pointer-events: none;
}

.message {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.7rem;
  max-width: 92%;
}

.message--user {
  align-self: end;
  grid-template-columns: minmax(0, 1fr);
}

.message__bubble {
  position: relative;
  min-width: 0;
  padding: 0.95rem;
  border: 1px solid rgba(142, 40, 48, 0.11);
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 10px 24px rgba(35, 27, 29, 0.06);
}

.message--assistant .message__bubble::before,
.message--user .message__bubble::before {
  content: "";
  position: absolute;
  top: 18px;
  width: 18px;
  height: 18px;
  background: inherit;
  border: inherit;
  transform: rotate(45deg);
}

.message--assistant .message__bubble::before {
  left: -7px;
  border-top: 0;
  border-right: 0;
}

.message--user .message__bubble::before {
  right: -7px;
  border-bottom: 0;
  border-left: 0;
}

.message--user .message__bubble {
  grid-column: 1;
  justify-self: end;
  background: var(--red-strong);
  color: var(--white);
  border-color: var(--red-strong);
}

.message__bubble p {
  margin: 0;
}

.message__bubble p + p {
  margin-top: 0.65rem;
}

.popular-list button {
  min-height: 40px;
  border: 1px solid rgba(217, 90, 100, 0.22);
  border-radius: 999px;
  background: #fffafa;
  color: var(--red-deep);
  font-weight: 760;
  cursor: pointer;
}

.popular-list button:hover,
.popular-list button:focus-visible {
  border-color: var(--red);
  background: rgba(217, 90, 100, 0.1);
  outline: none;
}

.composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 0.6rem;
  padding: 0.9rem 1rem 0.65rem;
  border-top: 1px solid var(--line);
  background: var(--white);
}

.composer input {
  width: 100%;
  min-height: 48px;
  padding: 0 1rem;
  border: 1px solid rgba(142, 40, 48, 0.16);
  border-radius: 999px;
  background: #fffafa;
  color: var(--ink);
  outline: none;
}

.composer input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(217, 90, 100, 0.12);
}

.composer button {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--red-strong);
  color: var(--white);
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(189, 62, 73, 0.2);
}

.composer button:hover,
.composer button:focus-visible {
  background: var(--red-deep);
  outline: none;
}

.ai-notice {
  margin: 0;
  padding: 0 1rem 0.9rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 200, 61, 0.22);
  color: #6d4d00;
  font-size: 0.78rem;
  font-weight: 780;
}

.tag--paid {
  background: rgba(22, 128, 91, 0.12);
  color: #0d6547;
}

.message-sources {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.32rem;
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.message-sources span:first-child {
  font-weight: 750;
}

.message-sources a {
  color: var(--red-deep);
  font-weight: 760;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.typing {
  display: inline-flex;
  gap: 0.25rem;
  align-items: center;
}

.typing span {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: var(--red);
  animation: pulse 0.9s infinite ease-in-out;
}

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

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

.side-panel {
  display: grid;
  gap: 1rem;
}

.info-card {
  padding: 1rem;
}

.info-card p {
  margin: 0.65rem 0 0;
  color: var(--muted);
}

.info-card--red {
  background: linear-gradient(135deg, #de6670, var(--red-strong));
  color: var(--white);
  border-color: rgba(142, 40, 48, 0.12);
}

.info-card--red .eyebrow,
.info-card--red p {
  color: rgba(255, 255, 255, 0.86);
}

.info-card--soft {
  background:
    linear-gradient(135deg, rgba(255, 200, 61, 0.2), rgba(232, 75, 114, 0.1)),
    var(--white);
}

.popular-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.popular-list button {
  padding: 0.52rem 0.6rem;
}

.check-list {
  display: grid;
  gap: 0.52rem;
  margin: 0.85rem 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 1.45rem;
  color: var(--muted);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.38rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 3px rgba(255, 200, 61, 0.2);
}

code {
  display: inline-block;
  max-width: 100%;
  padding: 0.12rem 0.3rem;
  border-radius: 5px;
  background: rgba(142, 40, 48, 0.08);
  color: var(--red-deep);
  overflow-wrap: anywhere;
}

@keyframes pulse {
  0%,
  80%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }

  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

@media (max-width: 980px) {
  .hero-band,
  .workspace {
    grid-template-columns: 1fr;
  }

  .hero-band {
    min-height: auto;
    margin-bottom: 1rem;
  }

  .side-stats {
    width: 100%;
    transform: none;
  }

  .side-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .topbar {
    padding: 0.7rem 0.85rem;
  }

  .topbar__nav {
    display: none;
  }

  .topbar__action {
    width: 42px;
    padding: 0;
    font-size: 0;
  }

  .page-shell {
    width: min(100% - 1rem, 680px);
    padding-top: 0.55rem;
  }

  .hero-band {
    gap: 0.65rem;
    margin-bottom: 0.65rem;
  }

  .hero-band h1 {
    max-width: 96%;
    font-size: clamp(1.34rem, 6.1vw, 1.72rem);
    line-height: 1.12;
  }

  .dandaria-diary {
    width: min(100%, 360px);
    justify-self: center;
    transform: rotate(1deg);
  }

  .side-stats {
    grid-template-columns: 1fr 1fr;
  }

  .chat-panel {
    height: clamp(500px, calc(100vh - 86px), 760px);
    height: clamp(500px, calc(100dvh - 86px), 760px);
  }

  .chat-panel__header {
    align-items: start;
    flex-direction: column;
  }

  .message {
    max-width: 100%;
  }

  .message__bubble {
    border-radius: 22px;
  }

  .side-panel {
    grid-template-columns: 1fr;
  }

  .popular-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 440px) {
  .brand__copy span {
    display: none;
  }

  .side-stats {
    grid-template-columns: 1fr;
  }

  .brand__symbol {
    width: 40px;
    height: 40px;
  }

  .brand__copy strong {
    font-size: 1.1rem;
  }

  .hero-band h1 {
    font-size: clamp(1.24rem, 6vw, 1.55rem);
  }

  .dandaria-diary {
    width: min(100%, 340px);
  }

  .assistant-card__avatar {
    width: 46px;
    height: 46px;
  }

  .assistant-card h2 {
    font-size: 1.15rem;
  }

  .composer {
    grid-template-columns: minmax(0, 1fr) 46px;
    padding-inline: 0.75rem;
  }

  .messages {
    padding-inline: 0.75rem;
  }

  .messages {
    gap: 0.8rem;
  }

  .message {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.55rem;
  }
}
