.omt-chat {
  position: fixed;
  z-index: 900;
  inset-inline-end: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  font: 400 14px/1.45 system-ui, sans-serif;
  color: #234938;
}
.omt-chat-panel[hidden] { display: none; }
.omt-chat button {
  font: inherit;
  cursor: pointer;
}
.omt-chat :is(button, a, input):focus-visible {
  outline: 2px solid #35674e;
  outline-offset: 3px;
}
.omt-chat-toggle,
.omt-chat-send {
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid #234938;
  border-radius: 999px;
  background: #234938;
  color: white;
  font-weight: 700;
}
.omt-chat-panel {
  position: absolute;
  inset-inline-end: 0;
  bottom: calc(100% + 10px);
  box-sizing: border-box;
  width: min(390px, calc(100vw - 32px));
  max-height: calc(100vh - 90px);
  max-height: calc(100dvh - 90px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 16px;
  border: 1px solid #d6e1d7;
  border-radius: 18px;
  background: #fcfbf8;
  box-shadow: 0 14px 46px #183c2b30;
}
.omt-chat-heading,
.omt-chat-modes,
.omt-chat-choices,
.omt-chat-form > div {
  display: flex;
  gap: 8px;
}
.omt-chat-heading {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.omt-chat-heading h2 {
  margin: 0;
  font: 700 17px/1.25 system-ui, sans-serif;
}
.omt-chat-close {
  flex: 0 0 44px;
  height: 44px;
  border: 1px solid #d6e1d7;
  border-radius: 50%;
  background: white;
  color: #234938;
  font-size: 20px;
}
.omt-chat-modes,
.omt-chat-choices { flex-wrap: wrap; }
.omt-chat-modes button,
.omt-chat-choices button {
  min-height: 40px;
  padding: 6px 12px;
  border: 1px solid #d6e1d7;
  border-radius: 10px;
  background: white;
  color: #234938;
  text-align: start;
}
.omt-chat-modes button[aria-pressed="true"] {
  border-color: #35674e;
  background: #e7f0e7;
  font-weight: 700;
}
.omt-chat-intro,
.omt-chat-privacy { margin: 10px 0; }
.omt-chat-privacy {
  color: #516456;
  font-size: 12px;
}
.omt-chat-answer:not(:empty) {
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #e7f0e7;
}
.omt-chat-answer p { margin: 0; }
.omt-chat-answer a {
  display: inline-block;
  margin-top: 6px;
  color: #234938;
  font-weight: 700;
}
.omt-chat-form { margin-top: 12px; }
.omt-chat-question {
  display: block;
  margin-bottom: 4px;
}
.omt-chat-form input {
  box-sizing: border-box;
  min-width: 0;
  flex: 1;
  padding: 8px;
  border: 1px solid #849d8a;
  border-radius: 8px;
  background: white;
  color: #234938;
  font: inherit;
  font-size: 16px;
}

.omt-chat-panel { width:min(430px,calc(100vw - 32px)); padding:18px; }
.omt-chat-modes { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
.omt-chat-modes button { padding-inline:6px; text-align:center; font-size:13px; }
.omt-chat-choices { display:grid; gap:7px; }
.omt-chat-choices button { display:flex; justify-content:space-between; align-items:center; gap:10px; }
.omt-chat-choices button:hover { border-color:#548369; background:#f0f5ee; }
.omt-chat-choices button::after { content:"→"; }
.omt-chat-answer:not(:empty) { padding:14px; border-inline-start:3px solid #548369; }

/* Make the chat launcher easy to spot and tap in every language. */
.omt-chat-toggle {
  display: inline-flex;
  min-width: 218px;
  min-height: 66px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 14px 24px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #9a5b4f;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  box-shadow: 0 7px 22px #142d2452;
}
.omt-chat-toggle:hover { background: #7d473f; }
.omt-chat-toggle::before {
  width: 18px;
  height: 14px;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-radius: 5px;
  content: "";
}
@media (max-width: 520px) {
  /* Compact launcher: leave CTAs and form controls visible on small screens. */
  .omt-chat { inset-inline-end: max(12px, env(safe-area-inset-right)); }
  .omt-chat-toggle {
    width: auto;
    min-width: 0;
    min-height: 48px;
    max-width: 176px;
    padding: 9px 15px;
    gap: 8px;
    font-size: 14px;
    line-height: 1.25;
    white-space: normal;
    text-align: center;
    box-shadow: 0 5px 14px #142d2440;
  }
  .omt-chat-toggle::before { width: 16px; height: 12px; }
}

.omt-chat-notice { margin:12px 0; padding:11px 13px; border-inline-start:3px solid #9a5b4f; border-radius:5px; background:#fbf2ef; color:#4a3935; font-size:13px; line-height:1.5; }

.omt-chat-profile {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
}
.omt-chat-profile[hidden],
.omt-chat-content[hidden] { display: none; }
.omt-chat-profile-title { margin: 0; font-size: 18px; line-height: 1.3; }
.omt-chat-profile-intro { margin: 0 0 4px; color: #516456; font-size: 13px; }
.omt-chat-profile > label:not(.omt-chat-consent) { font-weight: 650; }
.omt-chat-profile > input,
.omt-chat-profile > select {
  box-sizing: border-box;
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #849d8a;
  border-radius: 8px;
  background: #fff;
  color: #234938;
  font: inherit;
}
.omt-chat-consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 5px 0;
  color: #43574a;
  font-size: 12px;
  line-height: 1.45;
}
.omt-chat-consent input { flex: 0 0 auto; margin-top: 3px; }
.omt-chat-profile-submit {
  min-height: 44px;
  padding: 9px 14px;
  border: 0;
  border-radius: 9px;
  background: #234938;
  color: white;
  font: inherit;
  font-weight: 700;
}
.omt-chat-profile-submit:disabled { opacity: .65; cursor: wait; }
.omt-chat-profile-status { margin: 0; color: #8a3026; font-size: 13px; }

.omt-chat-sensitive-consent,
.omt-chat-transfer-consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 5px 0;
  color: #43574a;
  font-size: 12px;
  line-height: 1.45;
}
.omt-chat-sensitive-consent[hidden],
.omt-chat-transfer-consent[hidden],
.omt-chat-transfer-info[hidden] { display: none; }
.omt-chat-sensitive-consent input,
.omt-chat-transfer-consent input { flex: 0 0 auto; margin-top: 3px; }
.omt-chat-transfer-info { padding: 10px 12px; border: 1px solid #c8d4cb; border-radius: 8px; background: #f7faf7; font-size: 12px; line-height: 1.55; }
.omt-chat-transfer-summary { cursor: pointer; color: #234938; font-weight: 700; }
.omt-chat-transfer-details { margin: 8px 0 0; color: #43574a; }
.omt-chat-transfer-links { margin: 8px 0 0; padding-inline-start: 20px; }
.omt-chat-transfer-links a { color: #234938; text-decoration: underline; }

/* Compact informed-consent presentation */
.omt-chat-profile .omt-chat-consent { display:flex; align-items:flex-start; gap:9px; margin-top:12px; line-height:1.45; }
.omt-chat-profile .omt-chat-consent input { flex:none; width:18px; height:18px; margin:2px 0 0; accent-color:#1B4332; }
.omt-chat-policy-link { display:inline-block; margin:5px 0 9px 27px; color:#1B4332; text-decoration:underline; text-underline-offset:2px; font-weight:600; }
.omt-chat-ai-warning { font-size:12px; line-height:1.45; color:#516456; margin:0 0 10px; }
.omt-chat-question-consent[hidden], .omt-chat-sensitive-consent[hidden], .omt-chat-transfer-consent[hidden], .omt-chat-transfer-info[hidden] { display:none !important; }

/* Anonymous chat: one short consent, not a demographic onboarding form. */
.omt-chat-inline-consent { display:flex; align-items:center; gap:9px; margin:10px 0 0; font-size:13px; font-weight:600; line-height:1.4; color:#234938; }
.omt-chat-inline-consent input { width:18px; height:18px; flex:none; margin:0; accent-color:#1B4332; }
.omt-chat-inline-policy { display:inline-block; font-size:12px; color:#1B4332; text-decoration:underline; margin:3px 0 11px 27px; }
.omt-chat-inline-consent[hidden],.omt-chat-inline-policy[hidden] { display:none!important; }
