.kevin-launcher {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1000;
  width: 4rem;
  height: 4rem;
  border: 0;
  border-radius: 50%;
  background: #06182b;
  color: #fff;
  box-shadow: 0 12px 30px rgba(6, 24, 43, .28);
  cursor: pointer;
  font-size: 1.5rem;
}

.kevin-launcher[hidden] {
  display: none;
}

.kevin-shell {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  background: #f4f7fb;
  color: #102033;
}

.kevin-shell[hidden] {
  display: none;
}

.kevin-header {
  min-height: 4.25rem;
  padding: .75rem 1rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  background: #06182b;
  color: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .12);
}

.kevin-header-main {
  min-width: 0;
  flex: 1;
}

.kevin-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.kevin-subtitle {
  margin: .1rem 0 0;
  opacity: .72;
  font-size: .78rem;
}

.kevin-icon-button {
  width: 2.6rem;
  height: 2.6rem;
  flex: 0 0 2.6rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  cursor: pointer;
  font-size: 1.1rem;
}

.kevin-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1rem;
  scroll-behavior: smooth;
}

.kevin-welcome {
  max-width: 34rem;
  margin: 12vh auto 2rem;
  text-align: center;
}

.kevin-mark {
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #06182b;
  color: #fff;
  font-size: 2rem;
  box-shadow: 0 12px 30px rgba(6, 24, 43, .2);
}

.kevin-welcome h2 {
  margin: 0 0 .45rem;
  color: #06182b;
}

.kevin-welcome p {
  margin: 0;
  color: #607086;
  line-height: 1.5;
}

.kevin-messages {
  width: min(100%, 52rem);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: .8rem;
}

.kevin-message {
  max-width: 86%;
  padding: .75rem .9rem;
  border-radius: 1rem;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.kevin-message-user {
  align-self: flex-end;
  background: #06182b;
  color: #fff;
  border-bottom-right-radius: .3rem;
}

.kevin-message-assistant {
  align-self: flex-start;
  background: #fff;
  color: #17283c;
  border: 1px solid #dfe6ee;
  border-bottom-left-radius: .3rem;
  box-shadow: 0 3px 12px rgba(20, 40, 60, .05);
}

.kevin-message-error {
  align-self: center;
  max-width: 100%;
  background: #fff3f3;
  color: #8b2020;
  border: 1px solid #efcaca;
}

.kevin-composer-wrap {
  flex: 0 0 auto;
  padding: .65rem .75rem calc(.65rem + env(safe-area-inset-bottom));
  background: rgba(244, 247, 251, .96);
  border-top: 1px solid #dce4ed;
}

.kevin-composer {
  width: min(100%, 52rem);
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  gap: .5rem;
  padding: .45rem;
  border: 1px solid #cad5e1;
  border-radius: 1.35rem;
  background: #fff;
  box-shadow: 0 4px 18px rgba(20, 40, 60, .07);
}

.kevin-input {
  flex: 1;
  min-height: 2.7rem;
  max-height: 9rem;
  resize: none;
  border: 0;
  outline: 0;
  padding: .7rem .65rem;
  font: inherit;
  background: transparent;
  color: #102033;
}

.kevin-send {
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 2.75rem;
  border: 0;
  border-radius: 50%;
  background: #06182b;
  color: #fff;
  cursor: pointer;
  font-size: 1.05rem;
}

.kevin-send:disabled,
.kevin-icon-button:disabled {
  opacity: .45;
  cursor: default;
}

.kevin-call-note {
  padding: .2rem 0 0;
  text-align: center;
  color: #7b8796;
  font-size: .7rem;
}

@media (min-width: 800px) {
  .kevin-shell {
    inset: 1.5rem;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(6, 24, 43, .25);
  }

  .kevin-message {
    max-width: 72%;
  }

  .kevin-welcome {
    margin-top: 16vh;
  }
}

.kevin-history {
  flex: 0 0 auto;
  max-height: 42vh;
  overflow-y: auto;
  background: #ffffff;
  border-bottom: 1px solid #dce4ed;
  box-shadow: 0 6px 20px rgba(20, 40, 60, .08);
}

.kevin-history[hidden] {
  display: none;
}

.kevin-history-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .8rem 1rem;
  background: #ffffff;
  border-bottom: 1px solid #edf1f5;
}

.kevin-new {
  border: 0;
  border-radius: .8rem;
  padding: .55rem .75rem;
  background: #06182b;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: .8rem;
}

.kevin-conversation-list {
  padding: .5rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.kevin-conversation-item {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .15rem;
  padding: .7rem .8rem;
  border: 0;
  border-radius: .8rem;
  background: transparent;
  color: #17283c;
  text-align: left;
  cursor: pointer;
}

.kevin-conversation-item:hover,
.kevin-conversation-item.active {
  background: #eef3f8;
}

.kevin-conversation-item strong {
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .88rem;
}

.kevin-conversation-item small {
  color: #7b8796;
  font-size: .7rem;
}

.kevin-history-empty {
  margin: 0;
  padding: 1rem;
  color: #7b8796;
  text-align: center;
  font-size: .85rem;
}

@media (min-width: 800px) {
  .kevin-history {
    max-height: 34vh;
  }
}

.kevin-launcher {
  padding: 0;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, .9);
}

.kevin-launcher img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kevin-mark {
  padding: 0;
  overflow: hidden;
  border: 2px solid rgba(6, 24, 43, .12);
  background: #fff;
}

.kevin-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
