/* A calm blue chat surface keeps the panda, messages and accessible controls in focus. */
:root {
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #203044;
  background: #edf7ff;
  font-synthesis: none;
  font-size: 15px;
  --blue: #c3e6ff;
  --line: #cbdfee;
  --muted: #657b8f;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
a,
input,
textarea,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 0;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
a {
  color: #326f9a;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #439cdb;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.shell {
  max-width: 1120px;
  margin: auto;
  padding: 38px 28px 18px;
}
.chat-window {
  height: calc(100dvh - 112px);
  min-height: 540px;
  max-height: 960px;
  background: #fff;
  border: 1px solid #b6d7ef;
  border-radius: 19px;
  box-shadow: 0 12px 35px #b3cfe329;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: clip;
}
.chat-header {
  min-height: 80px;
  padding: 15px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #1f2b3c;
  min-width: 0;
}
.brand:hover {
  text-decoration: none;
}
.brand h1 {
  font-size: 20px;
  letter-spacing: -0.5px;
  margin: 0;
  font-weight: 750;
}
.brand img {
  object-fit: contain;
}
.header-actions {
  display: flex;
  gap: 17px;
  align-items: center;
}
.connection {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.connection.connected:before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #62bd86;
  margin-right: 7px;
}
.outline,
.primary {
  padding: 11px 18px;
  border-radius: 9px;
  transition: background 0.15s;
}
.outline {
  background: white;
  border: 1px solid #85b7dc;
}
.outline:hover {
  background: #f0f8fe;
}
.primary {
  background: var(--blue);
  border: 1px solid #9bd0f5;
  font-weight: 600;
}
.primary:hover {
  background: #afdfff;
}
.menu {
  position: relative;
}
.menu summary {
  list-style: none;
  cursor: pointer;
  font-size: 25px;
  line-height: 1;
  padding: 7px;
  border-radius: 5px;
}
.menu summary::-webkit-details-marker {
  display: none;
}
.menu[open] summary {
  background: #edf7ff;
}
.menu nav {
  z-index: 10;
  position: absolute;
  right: 0;
  top: 45px;
  min-width: 230px;
  padding: 7px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 30px #2030441a;
}
.menu nav a,
.menu nav button {
  display: block;
  padding: 13px 12px;
  font-size: 14px;
  text-align: left;
  width: 100%;
  background: none;
  border-radius: 6px;
}
.menu nav a:hover,
.menu nav button:hover {
  background: #edf7ff;
  text-decoration: none;
}
.notice {
  background: #fff8e8;
  color: #805c20;
  padding: 11px 24px;
  font-size: 13px;
  border-bottom: 1px solid #f0e1bd;
}
.messages {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 35px 28px 16px;
  display: none;
  flex-direction: column;
  gap: 19px;
  scroll-behavior: smooth;
}
.chat-window.has-history .messages {
  display: flex;
}
.empty {
  flex: 1;
  min-height: 0;
  overflow: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  gap: 16px;
}
.mascot {
  width: 138px;
  height: 138px;
  object-fit: contain;
  margin-bottom: 2px;
}
.empty h2 {
  font-size: 25px;
  letter-spacing: -0.6px;
  margin: 4px 0 0;
}
.empty p {
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
  max-width: 500px;
}
.empty small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  max-width: 390px;
  line-height: 1.7;
}
.login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 255px;
  margin-top: 6px;
  color: #203044;
}
.login:hover {
  text-decoration: none;
}
.google {
  font-weight: 800;
  background: white;
  color: #3178bf;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  line-height: 25px;
}
.dots {
  display: flex;
  gap: 9px;
  margin: 7px;
}
.dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #75bcef;
  animation: pulse 1.5s infinite;
}
.dots i:nth-child(2) {
  animation-delay: 0.2s;
}
.dots i:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes pulse {
  50% {
    opacity: 0.3;
    transform: translateY(-3px);
  }
}
.conversation-note {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 15px 24px 0;
  order: 0;
}
.messages {
  order: 1;
}
.empty {
  order: 1;
}
.composer-area {
  order: 3;
  padding: 17px 22px 15px;
}
#composer {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
textarea {
  resize: none;
  border: 1px solid #b9cee0;
  background: #fff;
  border-radius: 12px;
  padding: 15px 17px;
  width: 100%;
  height: 53px;
  max-height: 120px;
  line-height: 21px;
}
textarea:disabled {
  background: #f0f5fa;
}
textarea::placeholder {
  color: #91a1b2;
}
.send {
  width: 57px;
  padding: 12px;
  flex-shrink: 0;
  border-radius: 12px;
}
.send svg {
  width: 25px;
  height: 25px;
  stroke: #203044;
  fill: none;
  stroke-width: 1.7;
}
.chat-footer {
  font-size: 10px;
  line-height: 1.6;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 13px;
}
.below {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  color: #70889a;
  padding: 15px 5px;
}
.bubble {
  max-width: 78%;
  background: #eff4f8;
  border-radius: 15px;
  padding: 12px 17px;
  align-self: flex-start;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.6;
  font-size: 15px;
}
.bubble.mine {
  background: #cceaff;
  align-self: flex-end;
}
.bubble time {
  font-size: 9px;
  color: #6f879b;
  display: block;
  text-align: right;
  margin-top: 5px;
}
.bubble.failed {
  border: 1px solid #d6a1a1;
}
.retry {
  display: block;
  border: 0;
  background: none;
  text-decoration: underline;
  padding: 5px 0;
  color: #934e4e;
  font-size: 12px;
}
dialog {
  width: min(430px, calc(100vw - 32px));
  max-height: 90dvh;
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 26px;
  color: #203044;
  box-shadow: 0 20px 60px #20304425;
}
dialog::backdrop {
  background: #233a5359;
  backdrop-filter: blur(3px);
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.dialog-heading h2 {
  font-size: 20px;
  margin: 0;
}
.icon {
  background: none;
  padding: 0 6px;
  font-size: 29px;
  line-height: 1;
}
.muted,
dialog > p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
form label {
  display: block;
  font-size: 13px;
  margin-top: 18px;
}
input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  margin-top: 7px;
  background: #fff;
}
input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
}
.check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  line-height: 1.6;
}
.form-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.form-row > label {
  flex: 1;
}
.form-row > input {
  min-width: 0;
}
dialog form > .primary {
  width: 100%;
  margin-top: 10px;
}
.form-error {
  color: #a24848;
  font-size: 12px;
  line-height: 1.7;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.document {
  max-width: 730px;
  margin: 35px auto;
  padding: 32px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  line-height: 1.9;
}
.document h1 {
  font-size: 27px;
}
.document h2 {
  font-size: 19px;
}
.document nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 12px;
}
.document .brand {
  font-weight: 700;
}
@media (max-width: 700px) {
  .shell {
    padding: 12px;
  }
  .chat-window {
    height: calc(100dvh - 61px);
    min-height: 400px;
    border-radius: 14px;
  }
  .chat-header {
    min-height: 70px;
    padding: 12px;
    gap: 8px;
  }
  .brand {
    gap: 6px;
  }
  .brand img {
    width: 31px;
    height: 31px;
  }
  .brand h1 {
    font-size: 15px;
    letter-spacing: -0.3px;
  }
  .header-actions {
    gap: 6px;
  }
  .header-actions .outline {
    padding: 8px;
    font-size: 11px;
  }
  .connection {
    display: none;
  }
  .menu summary {
    font-size: 23px;
    padding: 5px;
  }
  .menu nav {
    right: 0;
    top: 40px;
  }
  .empty {
    padding: 20px 16px;
    gap: 15px;
  }
  .mascot {
    width: 115px;
    height: 115px;
  }
  .empty h2 {
    font-size: 21px;
  }
  .empty p {
    font-size: 13px;
  }
  .composer-area {
    padding: 12px;
  }
  .chat-footer {
    font-size: 9px;
    flex-wrap: wrap;
    gap: 3px;
  }
  .messages {
    padding: 20px 14px;
    gap: 15px;
  }
  .bubble {
    max-width: 88%;
    font-size: 14px;
    padding: 10px 14px;
  }
  .below {
    font-size: 9px;
    padding: 12px 2px;
  }
  .conversation-note {
    font-size: 10px;
    padding: 12px 14px 0;
  }
  .document {
    margin: 12px;
    padding: 22px;
  }
  .document h1 {
    font-size: 23px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

.peer-bar {
  padding: 12px 24px;
  border-bottom: 1px solid #e7f0f7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.peer-identity {
  display: flex;
  gap: 10px;
  align-items: center;
}
.peer-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: #eff6fb;
  border-radius: 50%;
  font-size: 22px;
  color: #7791a5;
}
.peer-identity strong {
  display: block;
  font-size: 13px;
}
.peer-identity small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}
.peer-rating {
  display: flex;
  gap: 7px;
}
.peer-rating button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid #dce5ec;
  border-radius: 50%;
  background: white;
  color: #7e8c99;
}
.peer-rating svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.peer-rating #like[aria-pressed="true"] {
  color: #c96f85;
  background: #fff2f5;
  border-color: #edc5cf;
}
.peer-rating #like[aria-pressed="true"] svg {
  fill: #e49aad;
}
.peer-rating #dislike[aria-pressed="true"] {
  background: #edf0f3;
  color: #54616e;
  border-color: #a5b0bb;
}
.conversation-actions {
  order: 2;
  text-align: center;
}
.conversation-actions:has(button:not([hidden])) {
  padding: 10px;
}
.typing {
  order: 2;
  min-height: 22px;
  padding: 4px 24px;
  color: #7b8d9e;
  font-size: 12px;
  font-style: italic;
}
.message-row {
  align-self: flex-start;
  max-width: 82%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.message-row.mine {
  align-self: flex-end;
  align-items: flex-end;
}
.message-row .bubble {
  max-width: 100%;
  align-self: auto;
}
.message-tools {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
}
.message-row.mine .message-tools {
  flex-direction: row-reverse;
}
.reaction-menu {
  position: relative;
}
.react-trigger {
  display: grid;
  place-items: center;
  list-style: none;
  color: #939da7;
  cursor: pointer;
  border-radius: 50%;
  width: 27px;
  height: 27px;
  opacity: 0;
}
.react-trigger::-webkit-details-marker {
  display: none;
}
.react-trigger svg,
.emoji-toggle svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}
.message-row:hover .react-trigger,
.message-row:focus-within .react-trigger,
.reaction-menu[open] .react-trigger {
  opacity: 1;
}
.react-trigger:hover {
  background: #f0f2f4;
}
.reaction-options {
  position: absolute;
  bottom: 32px;
  left: 0;
  z-index: 5;
  display: flex;
  gap: 2px;
  background: white;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 5px 20px #20304414;
}
.message-row.mine .reaction-options {
  right: 0;
  left: auto;
}
.reaction-options button,
.emoji-picker button {
  background: none;
  border-radius: 50%;
  font-size: 21px;
  width: 33px;
  height: 33px;
  padding: 3px;
}
.reaction-options button:hover,
.emoji-picker button:hover {
  background: #edf7ff;
}
.reaction-chips {
  display: flex;
  gap: 4px;
}
.reaction-chips button {
  border: 1px solid #e1e8ed;
  background: white;
  border-radius: 14px;
  padding: 3px 7px;
  font-size: 12px;
}
.reaction-chips button[aria-pressed="true"] {
  background: #e4f3ff;
  border-color: #95c7e9;
}
.reaction-chips button:disabled {
  opacity: 1;
}
.composer-area {
  position: relative;
  padding-left: 59px;
}
.emoji-control {
  position: absolute;
  left: 19px;
  top: 27px;
}
.emoji-toggle {
  display: grid;
  place-items: center;
  background: none;
  color: #8a97a3;
  padding: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
}
.emoji-toggle svg {
  width: 23px;
  height: 23px;
}
.emoji-picker {
  position: absolute;
  bottom: 46px;
  left: 0;
  display: grid;
  grid-template-columns: repeat(6, 33px);
  gap: 4px;
  padding: 10px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 5px 25px #20304420;
  z-index: 6;
}
@media (hover: none) {
  .react-trigger {
    opacity: 1;
  }
}
@media (max-width: 700px) {
  .peer-bar {
    padding: 10px 14px;
  }
  .message-row {
    max-width: 88%;
  }
  .message-row .bubble {
    max-width: 100%;
  }
  .composer-area {
    padding-left: 47px;
  }
  .emoji-control {
    left: 11px;
    top: 25px;
  }
  .typing {
    padding: 4px 15px;
  }
  .peer-rating button {
    width: 34px;
    height: 34px;
  }
  .reaction-options button {
    width: 30px;
    height: 30px;
  }
  .reaction-options {
    gap: 0;
  }
}
