.help-widget { --help-bottom: 24px; --help-side: 24px; font-family: var(--font); }
.help-widget button, .help-inbox button { cursor: pointer; }
.help-widget :focus-visible, .help-inbox :focus-visible { outline: 2px solid #b6a4ff; outline-offset: 3px; }
.help-launch {
  position: fixed; right: var(--help-side); bottom: calc(var(--help-bottom) + env(safe-area-inset-bottom)); z-index: 45;
  display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 18px; border: 1px solid #9e88ff;
  border-radius: 16px; background: linear-gradient(125deg, #4c46c0, #733fce); color: white;
  font-size: 14px; font-weight: 800; box-shadow: 0 14px 36px #09051cb8;
}
.help-launch:hover { background: linear-gradient(125deg, #5b54ce, #804cdb); }
#adConsent:not([hidden]) ~ .help-widget .help-launch { left: var(--help-side); right: auto; }
.help-symbol { position: relative; display: inline-block; flex: 0 0 auto; width: 20px; height: 15px; border: 2px solid currentColor; border-radius: 5px; }
.help-symbol::before { content: ''; position: absolute; bottom: -4px; left: 3px; width: 5px; height: 5px; border-left: 2px solid currentColor; transform: skewY(-36deg); }
.help-symbol::after { content: ''; position: absolute; top: 5px; left: 3px; width: 2px; height: 2px; border-radius: 50%; background: currentColor; box-shadow: 4px 0 currentColor, 8px 0 currentColor; }
.help-badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 8px; background: #c6b5ff; color: #17112e; font: 800 11px/1 var(--font); }
.help-chat {
  position: fixed; z-index: 62; right: var(--help-side); bottom: calc(24px + env(safe-area-inset-bottom));
  width: min(410px, calc(100vw - 32px)); height: min(580px, calc(100vh - 44px)); height: min(580px, calc(100dvh - 44px));
  display: flex; flex-direction: column; overflow: hidden; border-radius: 22px; border: 1px solid #514674;
  background: #111225; box-shadow: 0 24px 84px #060413cb;
}
.help-chat-head {
  display: flex; align-items: center; flex-wrap: nowrap; gap: 12px; padding: 15px 17px; border-bottom: 1px solid #33314d;
  background: radial-gradient(ellipse at 0 0, #332953, transparent 75%), #1b1b32;
}
.help-chat-head h2 { color: #f5f2ff; font-size: 17px; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.help-chat-head p { color: #c1bcdb; margin-top: 2px; font-size: 12px; overflow-wrap: anywhere; }
.help-chat-head > .help-icon-button:last-child { margin-left: auto; }
.help-avatar { width: 42px; height: 42px; display: inline-grid; flex-shrink: 0; place-items: center; border-radius: 13px; border: 1px solid #69568d; background: #372959; color: #e6dcff; font-size: 17px; font-weight: 800; }
.help-avatar .help-symbol { margin-top: -3px; }
.help-icon-button { display: grid; place-items: center; flex-shrink: 0; width: 39px; height: 39px; border: 1px solid #43405c; border-radius: 10px; background: #24243a; color: #dfdbf4; font-size: 22px; line-height: 1; }
.help-icon-button:hover { background: #34314e; }
.help-transcript {
  display: flex; flex: 1; min-height: 0; flex-direction: column; align-items: stretch; gap: 13px; padding: 16px;
  overflow-y: auto; overscroll-behavior: contain; scrollbar-color: #504768 #14152a; scrollbar-width: thin;
  background: radial-gradient(ellipse at 100% 0, #24203c 0%, transparent 62%), #121325;
}
.help-msg { min-width: 0; max-width: 84%; align-self: flex-start; }
.help-msg.is-outgoing { align-self: flex-end; }
.help-msg p { width: fit-content; padding: 9px 12px; border: 1px solid #353650; border-radius: 4px 13px 13px 13px; background: #21223a; color: #f1eeff; font-size: 14px; line-height: 1.52; white-space: pre-wrap; overflow-wrap: anywhere; }
.help-msg.is-outgoing p { margin-left: auto; border-color: #67549b; border-radius: 13px 4px 13px 13px; background: #382c62; }
.help-msg time { display: block; margin: 4px 3px 0; color: #a9a4c6; font-size: 11px; }
.help-msg.is-outgoing time { text-align: right; }
.help-companion { margin: auto 0; padding: 20px 12px; color: #c5bddf; text-align: center; font-size: 14px; line-height: 1.55; }
.help-companion .help-avatar { margin-bottom: 12px; }
.help-compose { display: flex; align-items: flex-end; gap: 9px; padding: 12px; border-top: 1px solid #35334f; background: #1a1b30; }
.help-compose textarea { flex: 1; min-width: 0; min-height: 47px; max-height: 128px; resize: vertical; padding: 10px; border: 1px solid #464362; border-radius: 11px; background: #121326; color: #f0edff; font: 16px/1.35 var(--font); }
.help-compose textarea::placeholder { color: #a5a0bd; }
.help-send { display: inline-grid; place-items: center; flex: 0 0 auto; min-height: 44px; padding: 0 13px; border: 1px solid #8b70e6; border-radius: 11px; background: #6648c6; color: white; font: 800 13px/1 var(--font); }
.help-send:hover { background: #7655da; }
.help-send:disabled, .help-status-button:disabled { opacity: .55; cursor: default; }
.help-feedback, .help-closed { padding: 8px 13px; font-size: 13px; background: #24213c; color: #e3d8ff; overflow-wrap: anywhere; }
.help-feedback { color: #ffc0ce; }

.adm-links button[aria-pressed="true"] { border-color: #8977d7; background: #33285b; color: #f3eaff; }
.help-overview-links { margin: 0 0 18px; }
.help-inbox {
  display: grid; grid-template-columns: minmax(245px, 32%) minmax(0, 1fr); height: min(690px, 74vh); min-height: 470px;
  overflow: hidden; border: 1px solid #49415f; border-radius: 20px; background: #17182b; box-shadow: 0 18px 55px #06051571;
}
.help-inbox-sidebar, .help-inbox-pane { min-width: 0; min-height: 0; }
.help-inbox-sidebar { display: flex; flex-direction: column; border-right: 1px solid #35334f; background: #18192d; }
.help-list-head { padding: 19px 15px 13px; border-bottom: 1px solid #33314e; }
.help-list-head h2 { margin: 0 0 16px; color: #f3eeff; font: 800 19px/1.25 var(--font-d); }
.help-filter { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 8px; color: #c7bedf; font-size: 13px; font-weight: 700; }
.help-filter select { min-height: 36px; max-width: 100%; padding: 6px 8px; border: 1px solid #464362; border-radius: 9px; background: #24243b; color: #ebe7ff; font: 14px var(--font); }
.help-threads { overflow: auto; padding: 8px; }
.help-thread-link { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: start; gap: 9px; width: 100%; padding: 10px 8px; border: 1px solid transparent; border-radius: 11px; background: transparent; color: #efebff; text-align: left; }
.help-thread-link:hover { background: #24233c; }
.help-thread-link[aria-current="true"] { border-color: #675591; background: #2d2549; }
.help-thread-link .help-avatar { width: 36px; height: 36px; border-radius: 11px; font-size: 13px; }
.help-thread-link b, .help-thread-link small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.help-thread-link b { font-size: 14px; }
.help-thread-link small, .help-thread-link time { color: #b3adce; font-size: 11px; }
.help-thread-link .help-thread-side { display: grid; justify-items: end; gap: 4px; }
.help-thread-link .help-badge { height: 18px; min-width: 18px; border-radius: 6px; }
.help-empty { display: grid; height: 100%; place-content: center; justify-items: center; gap: 12px; padding: 18px; background: radial-gradient(ellipse at 50% 35%, #292340, transparent 60%), #131427; color: #c4bddd; text-align: center; }
.help-thread { height: 100%; display: flex; flex-direction: column; }
.help-thread-person { flex: 1; min-width: 0; }
.help-status-button { flex-shrink: 0; min-height: 39px; padding: 0 10px; border: 1px solid #4a4265; border-radius: 9px; background: #26233d; color: #e8defc; font: 700 12px var(--font); }
.help-inbox-feedback { grid-column: 1 / -1; }
.help-back { display: none; }

@media (max-width: 820px) {
  .help-widget { --help-side: 13px; --help-bottom: 14px; }
  .help-launch {
    justify-content: center; width: 48px; height: 48px; min-height: 0; padding: 0; border-radius: 50%;
    bottom: max(calc(var(--help-bottom) + env(safe-area-inset-bottom)), var(--help-lift, 0px));
  }
  .help-launch-label { display: none; }
  .help-launch .help-badge { position: absolute; top: -5px; right: -5px; }
  #adConsent:not([hidden]) ~ .help-widget .help-launch { right: var(--help-side); left: auto; }
}

@media (max-width: 700px) {
  .help-chat { right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); width: calc(100vw - 16px); height: min(620px, calc(100vh - 25px)); height: min(620px, calc(100dvh - 25px)); }
  .help-inbox { grid-template-columns: minmax(0, 1fr); min-height: 435px; }
  .help-inbox-sidebar { border-right: 0; }
  .help-inbox:not(.has-thread) .help-inbox-pane, .help-inbox.has-thread .help-inbox-sidebar { display: none; }
  .help-back { display: grid; }
  .help-chat-head { padding: 12px; gap: 8px; }
  .help-thread .help-avatar { display: none; }
}
