.support-chat {
  --support-accent: #006d91;
  position: fixed;
  z-index: 60;
  right: max(24px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  width: min(390px, calc(100vw - 32px));
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
}

.support-chat[hidden], .support-chat [hidden] { display: none !important; }
.support-chat button, .support-chat input { font: inherit; }
.support-chat button { cursor: pointer; }
.support-chat button:focus-visible, .support-chat a:focus-visible, .support-chat input:focus-visible {
  outline: 3px solid var(--support-accent);
  outline-offset: 3px;
}
.support-chat-launcher {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  margin-left: auto;
  padding: 12px 20px;
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(125deg, #075c80, #087c9e);
  box-shadow: 0 7px 26px rgba(9, 83, 117, .22), inset 0 1px rgba(255, 255, 255, .16);
  font-weight: 800 !important;
}
.support-chat-launcher:hover { background: #075c80; }
.support-chat-panel {
  display: flex;
  flex-direction: column;
  height: min(680px, calc(100vh - 112px));
  height: min(680px, calc(100dvh - 112px));
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid #bedeea;
  border-radius: 22px;
  background: #f8fcff;
  box-shadow: 0 18px 64px rgba(21, 65, 91, .18), 0 3px 12px rgba(21, 65, 91, .06);
  animation: support-chat-enter .18s ease-out;
}
.support-chat-panel:focus { outline: none; }
.support-chat-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  padding: 18px 16px;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(ellipse at top right, #e4f8ff, transparent 75%), #fff;
}
.support-chat-mark {
  display: grid;
  width: 42px;
  height: 46px;
  flex-shrink: 0;
  place-items: center;
  border: 1px solid #b8dde9;
  border-radius: 12px;
  color: var(--support-accent);
  background: linear-gradient(145deg, #fff, #e5f7ff);
  transform: rotate(-5deg);
}
.support-chat-heading { flex: 1; min-width: 0; }
.support-chat-eyebrow { display: block; color: var(--support-accent); font-size: 9px; font-weight: 800; letter-spacing: .15em; }
.support-chat-heading h2 { margin: 2px 0 0; font-family: var(--serif); font-size: 24px; font-weight: 500; line-height: 1.1; }
.support-chat-icon-button { display: grid; flex-shrink: 0; place-items: center; width: 36px; height: 40px; padding: 0; border: 0; border-radius: 10px; color: #446178; background: transparent; }
.support-chat-icon-button:hover { color: var(--support-accent); background: #e1f2f9; }
.support-chat-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 22px 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  background: radial-gradient(ellipse at 0 0, rgba(219, 245, 255, .6), transparent 70%);
}
.support-chat-welcome { margin-bottom: 20px; }
.support-chat-welcome p { margin: 9px 0 4px; font-family: var(--serif); font-size: 25px; line-height: 1.2; letter-spacing: -.02em; }
.support-chat-welcome > span:last-child { color: #4d657c; font-size: 12px; }
.support-chat-topics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.support-chat-topics:empty { display: none; }
.support-chat-topic { min-height: 50px; padding: 10px 12px; border: 1px solid #c7e1ed; border-radius: 12px; color: #23516a; background: rgba(255, 255, 255, .9); text-align: left; font-size: 12px !important; font-weight: 700 !important; line-height: 1.4; }
.support-chat-topic:hover { border-color: #75b8d0; background: #eaf8ff; }
.support-chat-message { width: fit-content; max-width: 100%; margin-bottom: 18px; padding: 13px 15px; border: 1px solid #d7e6ee; border-radius: 4px 15px 15px; background: #fff; overflow-wrap: anywhere; font-size: 14px; }
.support-chat-speaker { display: block; margin-bottom: 7px; color: #526a7d; font-size: 11px; font-weight: 800; }
.support-chat-message p { margin: 0 0 10px; font-weight: 400; line-height: 1.65; white-space: pre-line; }
.support-chat-message p:last-child { margin-bottom: 0; }
.support-chat-message-user { max-width: 90%; margin-left: auto; margin-right: 0; border-color: #075c80; border-radius: 15px 4px 15px 15px; color: #fff; background: linear-gradient(135deg, #075c80, #08738e); }
.support-chat-message-user .support-chat-speaker { color: #d5f2ff; }
.support-chat-message-user p { font-weight: 500; }
.support-chat-message-bot { margin-left: 0; margin-right: auto; }
.support-chat-log:not(:empty) + .support-chat-topics { margin-top: 8px; padding-top: 14px; border-top: 1px solid #c7e1ed; }
.support-chat-message code { padding: 1px 4px; border-color: #cde4ee; color: #065979; background: #eff8fc; font-size: 12px; white-space: normal; }
.support-chat-message a { display: inline-block; color: var(--support-accent); text-decoration: underline; text-underline-offset: 3px; }
.support-chat-footer { flex: 0 0 auto; padding: 14px 16px 12px; border-top: 1px solid var(--line); background: #fff; }
.support-chat-form { display: flex; align-items: center; gap: 7px; padding: 5px; border: 1px solid #c4dce8; border-radius: 13px; background: #f7fbfe; }
.support-chat-form:focus-within { border-color: var(--support-accent); }
.support-chat-form input { min-width: 0; width: 100%; padding: 7px 8px; border: 0; color: var(--ink); background: transparent; font-size: 16px; line-height: 1.5; }
.support-chat-form input::placeholder { color: #62788c; }
.support-chat-form input:focus-visible { outline: none; }
.support-chat-form button { display: grid; place-items: center; width: 38px; height: 38px; flex-shrink: 0; padding: 0; border: 0; border-radius: 9px; color: #fff; background: var(--support-accent); }
.support-chat-form button:disabled { cursor: default; color: #6c8596; background: #e3edf3; }
.support-chat-note { margin: 8px 0 5px; color: #5b7082; text-align: center; font-size: 10px; }
.support-chat-links { display: flex; justify-content: center; align-items: center; gap: 10px; color: #9aafbf; font-size: 11px; }
.support-chat-links a { color: var(--support-accent); text-underline-offset: 3px; }
.support-chat-links a:hover { text-decoration: underline; }
.support-chat-browse { padding: 0; border: 0; color: var(--support-accent); background: transparent; font-size: inherit !important; }
.support-chat-browse:hover { text-decoration: underline; text-underline-offset: 3px; }
.support-chat-browse:disabled { color: #6c8596; cursor: default; }
.support-chat-details { margin: 12px 0; border-top: 1px solid #d7e6ee; }
.support-chat-details summary { padding: 10px 0; color: var(--support-accent); font-weight: 700; cursor: pointer; }
.support-chat-details summary:focus-visible { outline: 2px solid var(--support-accent); outline-offset: 2px; }
.support-chat-category-back { grid-column: 1 / -1; min-height: 36px; color: var(--support-accent); background: #edf8fc; }
.support-chat-choice-heading { grid-column: 1 / -1; margin: 0 0 6px; color: var(--ink); font-family: var(--serif); font-size: 18px; line-height: 1.3; }
.support-chat-suggested { grid-column: 1 / -1; }
.support-chat-search { grid-column: 1 / -1; min-width: 0; margin-bottom: 6px; }
.support-chat-search label { display: block; margin-bottom: 6px; color: #23516a; font-size: 12px; font-weight: 700; }
.support-chat-search input { box-sizing: border-box; display: block; width: 100%; min-width: 0; padding: 11px 12px; border: 1px solid #a5ccdd; border-radius: 11px; color: var(--ink); background: #fff; font-size: 16px; }
.support-chat-search input::placeholder { color: #62788c; }
.support-chat-search p { margin: 7px 0 0; color: #526a7d; font-size: 11px; line-height: 1.5; }
.support-chat-search-results { display: grid; grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.support-chat-search-empty { grid-column: 1 / -1; margin: 3px 0 8px; color: #526a7d; font-size: 13px; line-height: 1.6; }
.support-chat[data-support-choosing="true"] .support-chat-form { display: none; }
.support-chat-guide-nav { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-bottom: 9px; }
.support-chat-guide-nav > :only-child { grid-column: 1 / -1; }
.support-chat-guide-nav .support-chat-topic { min-height: 44px; padding: 10px 8px; text-align: center; }
.support-chat-guide-nav [data-guide-next] { border-color: var(--support-accent); color: #fff; background: var(--support-accent); }
.support-chat-guide-nav [data-guide-next]:hover { background: #075c80; }
.support-chat-progress { color: #006d91; font-size: 11px; font-weight: 800; line-height: 1.5 !important; }
.support-chat-step-title { margin: 4px 0 12px; color: var(--ink); font-family: var(--serif); font-size: 23px; font-weight: 500; line-height: 1.2; }
.support-chat-warning { margin: 8px 0 13px !important; padding: 10px 12px; border: 1px solid #e2c57d; border-left: 3px solid #a16b12; border-radius: 8px; color: #67450f; background: #fff7e4; font-size: 12px; }
.support-chat-command { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 9px; margin: 14px 0 4px; padding: 11px; border: 1px solid #bedeea; border-radius: 11px; background: #f2faff; }
.support-chat-command > code { padding: 0; overflow-wrap: anywhere; user-select: all; font-size: 13px; }
.support-chat-command > button { min-height: 40px; padding: 8px 10px; border: 1px solid #abcfdc; border-radius: 8px; color: #075c80; background: #fff; font-size: 11px; font-weight: 700; }
.support-chat-command > button:disabled { opacity: .6; cursor: wait; }
.support-chat-command > p { grid-column: 1 / -1; margin: 0; color: #526a7d; font-size: 11px; }
.support-chat-form input:disabled { color: #5b7082; cursor: not-allowed; }
.support-chat-status { margin: 12px 0 0; color: #526a7d; font-size: 12px; }
.support-chat-status:empty { display: none; }
.support-chat-retry { margin-top: 12px; padding: 9px 12px; border: 1px solid #a5ccdd; border-radius: 8px; color: var(--support-accent); background: #fff; }
@keyframes support-chat-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 600px) {
  .support-chat { right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); width: calc(100vw - 24px); }
  .support-chat-launcher { min-height: 48px; padding: 10px 16px; font-size: 12px; }
  .support-chat-panel { height: min(680px, calc(100vh - 108px)); height: min(680px, calc(100dvh - 108px)); border-radius: 18px; }
  .support-chat-header { padding: 14px; }
  .support-chat-body { padding: 18px 14px; }
}
@media (max-height: 460px) {
  .support-chat-panel { height: calc(100vh - 104px); height: calc(100dvh - 104px); }
  .support-chat-header { padding: 8px 12px; }
  .support-chat-welcome { display: none; }
  .support-chat-note { display: none; }
  .support-chat-footer { padding: 8px 12px; }
}
@media (max-width: 380px) {
  .support-chat-header { gap: 8px; }
  .support-chat-mark { width: 34px; height: 38px; }
  .support-chat-heading h2 { font-size: 22px; }
  .support-chat-command { grid-template-columns: minmax(0, 1fr); }
  .support-chat-command > button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .support-chat-panel { animation: none; } }
