.roots-welcome {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  color: #edf6ff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  line-height: 1.55;
  max-width: calc(100% - 48px);
}
.roots-welcome * {
  box-sizing: border-box;
}
.roots-welcome button,
.roots-welcome input {
  font: inherit;
}
.roots-welcome button,
.roots-welcome a {
  touch-action: manipulation;
}
.roots-welcome button {
  cursor: pointer;
}
.roots-welcome :focus-visible {
  outline: 2px solid #70f2ff;
  outline-offset: 3px;
}
.roots-welcome [hidden] {
  display: none !important;
}
.roots-welcome img {
  flex-shrink: 0;
  object-fit: contain;
  filter: drop-shadow(0 0 7px #32dfff55);
}
.roots-welcome-launcher {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 10px 18px 10px 12px;
  color: #fff;
  border: 1px solid #33d9f277;
  border-radius: 22px;
  background: linear-gradient(130deg, #072534f5, #1a0c25f5);
  box-shadow:
    0 8px 32px #0008,
    0 0 24px #23d9fa18;
  text-align: left;
  font-weight: 700;
}
.roots-welcome-launcher small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: #b2c7d8;
}
.roots-welcome-panel {
  max-width: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: min(410px, calc(100vw - 32px));
  height: min(680px, calc(100dvh - 48px));
  overflow: hidden;
  border: 1px solid #2fe7ff66;
  border-radius: 24px;
  background: linear-gradient(150deg, #071521, #090c18);
  box-shadow: 0 24px 70px #0009;
}
.roots-welcome-panel > header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  padding: 16px;
  border-bottom: 1px solid #294154;
  background: linear-gradient(110deg, #092331, #1a1027);
}
.roots-welcome-panel > header div {
  flex: 1;
  min-width: 0;
}
.roots-welcome h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
}
.roots-welcome header p {
  margin: 3px 0 0;
  color: #b1c8d7;
  font-size: 12px;
}
.roots-welcome header button {
  border: 0;
  background: transparent;
  color: #b9cfdf;
  font-size: 24px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 12px;
}
.roots-welcome-messages {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.roots-welcome-message {
  flex-shrink: 0;
  max-width: 96%;
  padding: 14px;
  border: 1px solid #244355;
  border-radius: 18px 18px 18px 4px;
  background: #0a1a28;
}
.roots-welcome-message p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.roots-welcome-message.user {
  align-self: flex-end;
  max-width: 88%;
  background: linear-gradient(120deg, #0d5365, #3e2358);
  border-color: #57d9ec44;
  border-radius: 18px 18px 4px 18px;
}
.roots-welcome-choices {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.roots-welcome-choices button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  padding: 10px 12px;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid #326077;
  color: #c2f9ff;
  background: #102a39;
  font-size: 13px;
}
.roots-welcome-choices button:hover {
  border-color: #36e0f3;
  background: #15394a;
}
.roots-welcome-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #1ed8ec;
  color: #03141c !important;
  text-decoration: none !important;
  font-weight: 700;
}
.roots-welcome-panel > footer {
  flex-shrink: 0;
  padding: 12px 16px;
  border-top: 1px solid #244355;
  background: #06101b;
}
.roots-welcome footer form {
  display: flex;
  align-items: center;
  gap: 8px;
}
.roots-welcome input {
  min-width: 0;
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid #31536a;
  background: #0a1928;
  color: #fff;
  font-size: 16px;
}
.roots-welcome footer button {
  flex-shrink: 0;
  width: 48px;
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  background: #1ed8ec;
  color: #04212b;
  font-size: 24px;
}
.roots-welcome button:disabled {
  opacity: 0.45;
  cursor: default;
}
.roots-welcome footer p {
  margin: 10px 0 5px;
  color: #94afc1;
  font-size: 10px;
}
.roots-welcome footer > a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: #8beefa;
  font-size: 12px;
  text-decoration: underline;
}
@media (max-width: 600px) {
  .roots-welcome {
    max-width: calc(100% - 24px);
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
  .roots-welcome-panel {
    width: calc(100vw - 24px);
    height: min(700px, calc(100dvh - 24px - env(safe-area-inset-bottom, 0px)));
    border-radius: 22px;
  }
  .roots-welcome-panel > header {
    padding: 12px;
  }
  .roots-welcome-messages {
    padding: 14px;
  }
  .roots-welcome-launcher {
    min-height: 58px;
  }
}
@media (max-height: 450px) {
  .roots-welcome-panel > header {
    padding: 6px 12px;
  }
  .roots-welcome footer p {
    display: none;
  }
  .roots-welcome footer > a {
    min-height: 30px;
  }
  .roots-welcome-panel > footer {
    padding: 8px 12px;
  }
  .roots-welcome-messages {
    padding: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .roots-welcome * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
