/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{#hd2t-chat-root{--tw-color-white:#fff;--tw-spacing:.25rem;--tw-font-weight-semibold:600;--tw-font-weight-bold:700;--tw-leading-relaxed:1.625;--tw-radius-md:.375rem;--tw-radius-lg:.5rem;--tw-radius-xl:.75rem;--tw-animate-bounce:bounce 1.4s infinite;--tw-default-transition-duration:.15s;--tw-default-transition-timing-function:cubic-bezier(.4, 0, .2, 1)}}@layer base,components;@layer utilities{.tw\:pointer-events-auto{pointer-events:auto!important}.tw\:pointer-events-none{pointer-events:none!important}.tw\:absolute{position:absolute!important}.tw\:fixed{position:fixed!important}.tw\:relative{position:relative!important}.tw\:right-0{right:0!important}.tw\:right-6{right:calc(var(--tw-spacing) * 6)!important}.tw\:-bottom-0\.5{bottom:calc(var(--tw-spacing) * -.5)!important}.tw\:bottom-0{bottom:0!important}.tw\:bottom-6{bottom:calc(var(--tw-spacing) * 6)!important}.tw\:-left-0\.5{left:calc(var(--tw-spacing) * -.5)!important}.tw\:z-\[110\]{z-index:110!important}.tw\:z-\[120\]{z-index:120!important}.tw\:ml-3{margin-left:calc(var(--tw-spacing) * 3)!important}.tw\:ml-4{margin-left:calc(var(--tw-spacing) * 4)!important}.tw\:block{display:block!important}.tw\:flex{display:flex!important}.tw\:grid{display:grid!important}.tw\:h-1\.5{height:calc(var(--tw-spacing) * 1.5)!important}.tw\:h-2\.5{height:calc(var(--tw-spacing) * 2.5)!important}.tw\:h-3{height:calc(var(--tw-spacing) * 3)!important}.tw\:h-4{height:calc(var(--tw-spacing) * 4)!important}.tw\:h-5{height:calc(var(--tw-spacing) * 5)!important}.tw\:h-8{height:calc(var(--tw-spacing) * 8)!important}.tw\:h-9{height:calc(var(--tw-spacing) * 9)!important}.tw\:h-10{height:calc(var(--tw-spacing) * 10)!important}.tw\:h-14{height:calc(var(--tw-spacing) * 14)!important}.tw\:h-\[34px\]{height:34px!important}.tw\:h-full{height:100%!important}.tw\:max-h-24{max-height:calc(var(--tw-spacing) * 24)!important}.tw\:min-h-0{min-height:0!important}.tw\:min-h-\[160px\]{min-height:160px!important}.tw\:w-1\.5{width:calc(var(--tw-spacing) * 1.5)!important}.tw\:w-2\.5{width:calc(var(--tw-spacing) * 2.5)!important}.tw\:w-3{width:calc(var(--tw-spacing) * 3)!important}.tw\:w-4{width:calc(var(--tw-spacing) * 4)!important}.tw\:w-8{width:calc(var(--tw-spacing) * 8)!important}.tw\:w-9{width:calc(var(--tw-spacing) * 9)!important}.tw\:w-10{width:calc(var(--tw-spacing) * 10)!important}.tw\:w-14{width:calc(var(--tw-spacing) * 14)!important}.tw\:w-\[34px\]{width:34px!important}.tw\:w-full{width:100%!important}.tw\:max-w-\[260px\]{max-width:260px!important}.tw\:min-w-0{min-width:0!important}.tw\:min-w-5{min-width:calc(var(--tw-spacing) * 5)!important}.tw\:flex-1{flex:1!important}.tw\:shrink-0{flex-shrink:0!important}.tw\:scale-110{--tw-scale-x:110%!important;--tw-scale-y:110%!important;--tw-scale-z:110%!important;scale:var(--tw-scale-x) var(--tw-scale-y)!important}.tw\:animate-bounce{animation:var(--tw-animate-bounce)!important}.tw\:resize-none{resize:none!important}.tw\:flex-col{flex-direction:column!important}.tw\:place-items-center{place-items:center!important}.tw\:items-center{align-items:center!important}.tw\:items-end{align-items:flex-end!important}.tw\:items-start{align-items:flex-start!important}.tw\:justify-between{justify-content:space-between!important}.tw\:justify-center{justify-content:center!important}.tw\:justify-end{justify-content:flex-end!important}.tw\:justify-start{justify-content:flex-start!important}.tw\:gap-1{gap:var(--tw-spacing)!important}.tw\:gap-1\.5{gap:calc(var(--tw-spacing) * 1.5)!important}.tw\:gap-2{gap:calc(var(--tw-spacing) * 2)!important}.tw\:gap-2\.5{gap:calc(var(--tw-spacing) * 2.5)!important}.tw\:gap-3{gap:calc(var(--tw-spacing) * 3)!important}.tw\:self-center{align-self:center!important}.tw\:self-end{align-self:flex-end!important}.tw\:self-start{align-self:flex-start!important}.tw\:truncate{text-overflow:ellipsis!important;white-space:nowrap!important;overflow:hidden!important}.tw\:overflow-hidden{overflow:hidden!important}.tw\:overflow-y-auto{overflow-y:auto!important}.tw\:rounded{border-radius:.25rem!important}.tw\:rounded-full{border-radius:3.40282e38px!important}.tw\:rounded-lg{border-radius:var(--tw-radius-lg)!important}.tw\:rounded-md{border-radius:var(--tw-radius-md)!important}.tw\:rounded-xl{border-radius:var(--tw-radius-xl)!important}.tw\:border{border-style:var(--tw-border-style)!important;border-width:1px!important}.tw\:border-t{border-top-style:var(--tw-border-style)!important;border-top-width:1px!important}.tw\:border-b{border-bottom-style:var(--tw-border-style)!important;border-bottom-width:1px!important}.tw\:border-b-2{border-bottom-style:var(--tw-border-style)!important;border-bottom-width:2px!important}.tw\:object-cover{object-fit:cover!important}.tw\:px-1{padding-inline:var(--tw-spacing)!important}.tw\:px-1\.5{padding-inline:calc(var(--tw-spacing) * 1.5)!important}.tw\:px-2{padding-inline:calc(var(--tw-spacing) * 2)!important}.tw\:px-3{padding-inline:calc(var(--tw-spacing) * 3)!important}.tw\:px-4{padding-inline:calc(var(--tw-spacing) * 4)!important}.tw\:px-6{padding-inline:calc(var(--tw-spacing) * 6)!important}.tw\:px-8{padding-inline:calc(var(--tw-spacing) * 8)!important}.tw\:py-0\.5{padding-block:calc(var(--tw-spacing) * .5)!important}.tw\:py-1{padding-block:var(--tw-spacing)!important}.tw\:py-2{padding-block:calc(var(--tw-spacing) * 2)!important}.tw\:py-2\.5{padding-block:calc(var(--tw-spacing) * 2.5)!important}.tw\:py-3{padding-block:calc(var(--tw-spacing) * 3)!important}.tw\:py-4{padding-block:calc(var(--tw-spacing) * 4)!important}.tw\:pt-4{padding-top:calc(var(--tw-spacing) * 4)!important}.tw\:pb-4{padding-bottom:calc(var(--tw-spacing) * 4)!important}.tw\:text-center{text-align:center!important}.tw\:text-left{text-align:left!important}.tw\:text-\[11px\]{font-size:11px!important}.tw\:text-\[12px\]{font-size:12px!important}.tw\:text-\[13px\]{font-size:13px!important}.tw\:text-\[14px\]{font-size:14px!important}.tw\:text-\[17px\]{font-size:17px!important}.tw\:leading-relaxed{--tw-leading:var(--tw-leading-relaxed)!important;line-height:var(--tw-leading-relaxed)!important}.tw\:font-bold{--tw-font-weight:var(--tw-font-weight-bold)!important;font-weight:var(--tw-font-weight-bold)!important}.tw\:font-semibold{--tw-font-weight:var(--tw-font-weight-semibold)!important;font-weight:var(--tw-font-weight-semibold)!important}.tw\:break-words{overflow-wrap:break-word!important}.tw\:whitespace-pre-wrap{white-space:pre-wrap!important}.tw\:text-\[\#0B0D12\]{color:#0b0d12!important}.tw\:opacity-0{opacity:0!important}.tw\:opacity-100{opacity:1!important}.tw\:shadow-\[0_8px_28px_rgba\(0\,0\,0\,0\.55\)\]{--tw-shadow:0 8px 28px var(--tw-shadow-color,#0000008c)!important;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)!important}.tw\:ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor)!important;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)!important}.tw\:transition-all{transition-property:all!important;transition-timing-function:var(--tw-ease,var(--tw-default-transition-timing-function))!important;transition-duration:var(--tw-duration,var(--tw-default-transition-duration))!important}.tw\:transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to!important;transition-timing-function:var(--tw-ease,var(--tw-default-transition-timing-function))!important;transition-duration:var(--tw-duration,var(--tw-default-transition-duration))!important}.tw\:transition-transform{transition-property:transform,translate,scale,rotate!important;transition-timing-function:var(--tw-ease,var(--tw-default-transition-timing-function))!important;transition-duration:var(--tw-duration,var(--tw-default-transition-duration))!important}.tw\:duration-150{--tw-duration:.15s!important;transition-duration:.15s!important}.tw\:duration-200{--tw-duration:.2s!important;transition-duration:.2s!important}.tw\:outline-none{--tw-outline-style:none!important;outline-style:none!important}.tw\:placeholder\:text-\[rgba\(139\,148\,163\,0\.9\)\]::placeholder{color:#8b94a3e6!important}@media (hover:hover){.tw\:hover\:scale-105:hover{--tw-scale-x:105%!important;--tw-scale-y:105%!important;--tw-scale-z:105%!important;scale:var(--tw-scale-x) var(--tw-scale-y)!important}.tw\:hover\:bg-white\/10:hover{background-color:var(--tw-color-white)!important}@supports (color:color-mix(in lab, red, red)){.tw\:hover\:bg-white\/10:hover{background-color:color-mix(in oklab, var(--tw-color-white) 10%, transparent)!important}}.tw\:hover\:bg-white\/\[0\.04\]:hover{background-color:var(--tw-color-white)!important}@supports (color:color-mix(in lab, red, red)){.tw\:hover\:bg-white\/\[0\.04\]:hover{background-color:color-mix(in oklab, var(--tw-color-white) 4%, transparent)!important}}.tw\:hover\:bg-white\/\[0\.06\]:hover{background-color:var(--tw-color-white)!important}@supports (color:color-mix(in lab, red, red)){.tw\:hover\:bg-white\/\[0\.06\]:hover{background-color:color-mix(in oklab, var(--tw-color-white) 6%, transparent)!important}}.tw\:hover\:brightness-110:hover{--tw-brightness:brightness(110%)!important;filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)!important}}.tw\:focus\:border-\[var\(--cw-accent\)\]:focus{border-color:var(--cw-accent)!important}.tw\:focus\:outline-none:focus{--tw-outline-style:none!important;outline-style:none!important}.tw\:focus-visible\:ring-1:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor)!important;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)!important}.tw\:focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor)!important;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)!important}.tw\:focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px!important;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important}.tw\:disabled\:cursor-not-allowed:disabled{cursor:not-allowed!important}.tw\:disabled\:opacity-40:disabled{opacity:.4!important}}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:"*";inherits:false}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@keyframes bounce{0%,to{transform:translateY(0)}50%{transform:translateY(-4px)}}
/**
 * Scope reset.
 *
 * The host page (hd2t.cn) ships Mantine, whose Preflight resets button/input
 * styling globally. The widget renders into that page, so every element it owns
 * is normalised here first. `#hd2t-chat-root` has higher specificity than any
 * element-level reset the host can ship, and inline styles still win over this
 * because inline declarations outrank stylesheet rules.
 */
#hd2t-chat-root *,
#hd2t-chat-root *::before,
#hd2t-chat-root *::after {
  box-sizing: border-box;
  border: 0 solid;
  margin: 0;
  padding: 0;
  font: inherit;
  font-family: inherit;
  color: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  text-align: inherit;
  text-transform: none;
  text-decoration: none;
  background: none;
  box-shadow: none;
  list-style: none;
  cursor: inherit;
  opacity: 1;
}

#hd2t-chat-root button {
  background: none;
  border: 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

#hd2t-chat-root button:focus-visible {
  outline: 2px solid rgba(240, 180, 41, 0.7);
  outline-offset: 1px;
}

#hd2t-chat-root input,
#hd2t-chat-root textarea {
  background: none;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
}

#hd2t-chat-root textarea {
  resize: none;
  white-space: pre-wrap;
}

#hd2t-chat-root svg {
  display: block;
  flex-shrink: 0;
}

#hd2t-chat-root img {
  display: block;
  max-width: 100%;
}

/* panel geometry: desktop values come from inline styles on the element */
.chat-widget-panel {
  --cw-ring: #0f1218;
}

/*
 * Stacking notes (verified against the live site):
 *   `isolation: isolate` creates a stacking context, so the panel's own z-index
 *   (110) is only compared *inside* this root.
 *   `z-index` alone does nothing on a static element — it stays in the normal-flow
 *   paint layer, which the host's `position:relative; z-index:1` hero grid and
 *   `position:fixed; z-index:30` #dock both paint over. `position: relative` is
 *   what makes the high z-index actually apply.
 */
#hd2t-chat-root {
  isolation: isolate;
  position: relative;
  z-index: 2147483000;
}

/* Anchored mode: the launcher is placed under a host element (the hero redeem
   form). The root then spans the document and the bubble scrolls with the page
   instead of staying pinned to the viewport. */
#hd2t-chat-root.is-anchored {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0;
}

#hd2t-chat-root.is-anchored #hd2t-chat-launcher {
  position: absolute;
}

/* Keep the panel inside short viewports: top 70 + height 720 overflows a 768px
   laptop, so cap it to the space actually available. */
.chat-widget-panel {
  max-height: calc(100vh - 180px);
}

/*
 * Launcher placement. The host page owns the bottom-right corner (hd2t.cn parks
 * its #dock video widget at right/bottom 16px, 320px wide), so the bubble is
 * offset to the left of it. Override --hd2t-chat-launcher-right on the host to
 * move it without rebuilding the bundle.
 */
#hd2t-chat-launcher {
  right: var(--hd2t-chat-launcher-right, 24px);
}

/*
 * Draggable bubble. `touch-action: none` stops the page from scrolling while a
 * finger drags the bubble on touch devices, and `user-select: none` prevents the
 * gesture from selecting the label text underneath it.
 *
 * The selector carries two ids on purpose: the scope reset above sets
 * `cursor: pointer` on `#hd2t-chat-root button`, and a single id would lose to
 * that id+type pair.
 */
#hd2t-chat-root #hd2t-chat-launcher {
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

#hd2t-chat-root #hd2t-chat-launcher[data-dragging="1"] {
  cursor: grabbing;
}

/* Nothing to dodge on small screens: the host dock is hidden and the panel is
   full-bleed, so the bubble returns to the corner. */
@media (max-width: 900px) {
  #hd2t-chat-launcher {
    right: 24px;
  }
}

/* Anchored mode: the launcher is placed under a host element (the hero redeem
   form). The root then spans the document and the bubble scrolls with the page
   instead of staying pinned to the viewport. */
#hd2t-chat-root.is-anchored {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0;
}

#hd2t-chat-root.is-anchored #hd2t-chat-launcher {
  position: absolute;
}

/* Full-bleed on small screens. Inline width/height/inset would otherwise win. */
@media (max-width: 640px) {
  .chat-widget-panel {
    inset: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    border-radius: 0 !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  #hd2t-chat-root *,
  #hd2t-chat-root *::before,
  #hd2t-chat-root *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
/* hd2t:scope-reset */
/**
 * Scope reset.
 *
 * The host page (hd2t.cn) ships Mantine, whose Preflight resets button/input
 * styling globally. The widget renders into that page, so every element it owns
 * is normalised here first. `#hd2t-chat-root` has higher specificity than any
 * element-level reset the host can ship, and inline styles still win over this
 * because inline declarations outrank stylesheet rules.
 */
#hd2t-chat-root *,
#hd2t-chat-root *::before,
#hd2t-chat-root *::after {
  box-sizing: border-box;
  border: 0 solid;
  margin: 0;
  padding: 0;
  font: inherit;
  font-family: inherit;
  color: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  text-align: inherit;
  text-transform: none;
  text-decoration: none;
  background: none;
  box-shadow: none;
  list-style: none;
  cursor: inherit;
  opacity: 1;
}

#hd2t-chat-root button {
  background: none;
  border: 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

#hd2t-chat-root button:focus-visible {
  outline: 2px solid rgba(240, 180, 41, 0.7);
  outline-offset: 1px;
}

#hd2t-chat-root input,
#hd2t-chat-root textarea {
  background: none;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
}

#hd2t-chat-root textarea {
  resize: none;
  white-space: pre-wrap;
}

#hd2t-chat-root svg {
  display: block;
  flex-shrink: 0;
}

#hd2t-chat-root img {
  display: block;
  max-width: 100%;
}

/* panel geometry: desktop values come from inline styles on the element */
.chat-widget-panel {
  --cw-ring: #0f1218;
}

/*
 * Stacking notes (verified against the live site):
 *   `isolation: isolate` creates a stacking context, so the panel's own z-index
 *   (110) is only compared *inside* this root.
 *   `z-index` alone does nothing on a static element — it stays in the normal-flow
 *   paint layer, which the host's `position:relative; z-index:1` hero grid and
 *   `position:fixed; z-index:30` #dock both paint over. `position: relative` is
 *   what makes the high z-index actually apply.
 */
#hd2t-chat-root {
  isolation: isolate;
  position: relative;
  z-index: 2147483000;
}

/* Anchored mode: the launcher is placed under a host element (the hero redeem
   form). The root then spans the document and the bubble scrolls with the page
   instead of staying pinned to the viewport. */
#hd2t-chat-root.is-anchored {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0;
}

#hd2t-chat-root.is-anchored #hd2t-chat-launcher {
  position: absolute;
}

/* Keep the panel inside short viewports: top 70 + height 720 overflows a 768px
   laptop, so cap it to the space actually available. */
.chat-widget-panel {
  max-height: calc(100vh - 180px);
}

/*
 * Launcher placement. The host page owns the bottom-right corner (hd2t.cn parks
 * its #dock video widget at right/bottom 16px, 320px wide), so the bubble is
 * offset to the left of it. Override --hd2t-chat-launcher-right on the host to
 * move it without rebuilding the bundle.
 */
#hd2t-chat-launcher {
  right: var(--hd2t-chat-launcher-right, 24px);
}

/*
 * Draggable bubble. `touch-action: none` stops the page from scrolling while a
 * finger drags the bubble on touch devices, and `user-select: none` prevents the
 * gesture from selecting the label text underneath it.
 *
 * The selector carries two ids on purpose: the scope reset above sets
 * `cursor: pointer` on `#hd2t-chat-root button`, and a single id would lose to
 * that id+type pair.
 */
#hd2t-chat-root #hd2t-chat-launcher {
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

#hd2t-chat-root #hd2t-chat-launcher[data-dragging="1"] {
  cursor: grabbing;
}

/* Nothing to dodge on small screens: the host dock is hidden and the panel is
   full-bleed, so the bubble returns to the corner. */
@media (max-width: 900px) {
  #hd2t-chat-launcher {
    right: 24px;
  }
}

/* Anchored mode: the launcher is placed under a host element (the hero redeem
   form). The root then spans the document and the bubble scrolls with the page
   instead of staying pinned to the viewport. */
#hd2t-chat-root.is-anchored {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0;
}

#hd2t-chat-root.is-anchored #hd2t-chat-launcher {
  position: absolute;
}

/* Full-bleed on small screens. Inline width/height/inset would otherwise win. */
@media (max-width: 640px) {
  .chat-widget-panel {
    inset: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    border-radius: 0 !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  #hd2t-chat-root *,
  #hd2t-chat-root *::before,
  #hd2t-chat-root *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}