.lemon-mascot {
  inset: 50% auto auto 16px;
  transform: translateY(-50%);
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}
body:not(.is-home) .lemon-mascot { display: grid; }
.lemon-mascot svg { display: block; width: 62px; }
.lemon-mascot > span { display: block; margin-top: 0; padding: 5px 9px; font-size: 11px; font-weight: 700; }
.lemon-mascot:hover > span { background: #f4efaa; }

#lemon-assistant {
  width: min(100% - 24px, 540px);
  max-height: min(88dvh, 720px);
  margin: auto auto auto max(12px, 2vw);
  padding: 0;
  overflow: hidden;
  border: 1px solid #d9e4d7;
  border-radius: 20px;
  background: #fcfdf7;
  color: #1e382e;
  box-shadow: 0 18px 70px #172d3450;
}
#lemon-assistant[open] { display: flex; flex-direction: column; }
#lemon-assistant::backdrop { background: #13292159; }
#lemon-assistant [hidden] { display: none !important; }
#lemon-assistant button { font: inherit; cursor: pointer; }
#lemon-assistant button:disabled { cursor: wait; opacity: .62; }
#lemon-assistant :focus-visible { outline: 2px solid #327850; outline-offset: 2px; }
.assistant-header {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 13px 16px;
  background: #eaf2de;
}
.assistant-header img { object-fit: contain; }
.assistant-header h2 { flex: 1; margin: 0; font-size: clamp(17px, 4vw, 21px); }
.assistant-close { width: 36px; min-height: 36px; border: 0; border-radius: 50%; background: #fff9; color: #264239; }
.assistant-modes { display: flex; gap: 8px; padding: 10px 16px 7px; }
.assistant-modes button,
.assistant-examples button,
.assistant-selection button,
.assistant-photos button {
  padding: 7px 10px;
  border: 1px solid #d7e2cf;
  border-radius: 9px;
  background: #f7faf1;
  color: #294838;
}
.assistant-modes button[aria-pressed="true"] { background: #e3edaa; border-color: #adbe63; font-weight: 750; }
.assistant-body { min-height: 0; overflow: auto; padding: 6px 16px 16px; }
.assistant-body > p { margin: 1px 0 9px; font-size: 14px; }
.assistant-examples { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; }
.assistant-message {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #edf3e8;
  overflow-wrap: anywhere;
}
.assistant-message.is-user { margin-left: 12%; background: #e8edc8; }
.assistant-message p { margin: 0; white-space: pre-wrap; line-height: 1.55; font-size: .9rem; }
.assistant-message a { display: block; margin-top: 5px; color: #285941; text-decoration: underline; font-size: .82rem; }
.assistant-message small { display: block; margin-bottom: 5px; color: #466454; }
.assistant-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #dbe5d7;
}
.assistant-form textarea, .assistant-search {
  box-sizing: border-box;
  width: 100%;
  padding: 9px;
  border: 1px solid #a8bdac;
  border-radius: 9px;
  background: white;
  color: #172e27;
  font: inherit;
  font-size: max(16px, 1rem);
}
.assistant-form textarea { resize: vertical; max-height: 112px; }
#lemon-assistant .assistant-submit {
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  background: #244738;
  color: white;
  font-size: .85rem;
  font-weight: 730;
}
.assistant-privacy, .assistant-status { grid-column: 1 / -1; margin: 0; color: #52685c; font-size: .75rem; }
.assistant-status[data-error="true"] { color: #8c3027; }
.assistant-references summary { margin: 4px 0 10px; cursor: pointer; font-weight: 700; }
.assistant-photos { display: grid; gap: 6px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 8px 0; }
#lemon-assistant .assistant-photos button { min-width: 0; overflow-wrap: anywhere; text-align: left; font-size: .75rem; }
.assistant-photos img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 5px; margin-bottom: 4px; }
.assistant-back { grid-column: 1 / -1; }
.assistant-selection { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: .82rem; }
.assistant-selection img { width: 42px; height: 56px; object-fit: cover; border-radius: 6px; }
.assistant-selection strong { flex: 1; }
.assistant-output { margin: 12px 0 0; }
.assistant-output img { display: block; max-width: 100%; max-height: 380px; border-radius: 10px; }
.assistant-output figcaption { margin: 6px 0; font-size: .8rem; }
.assistant-output a { color: #245842; text-decoration: underline; }
.assistant-sr-only { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }

@media (max-width: 680px) {
  .lemon-mascot { inset-inline-start: 9px; }
  .lemon-mascot svg { width: 46px; }
  .lemon-mascot > span { font-size: 10px; }
  #lemon-assistant { width: calc(100% - 16px); margin: auto; }
}
