:root {
  --hdsc-gold: #e9bd48;
  --hdsc-gold-soft: #f6d879;
  --hdsc-bg: #0b0b0b;
  --hdsc-panel: #121212;
  --hdsc-line: rgba(226, 179, 57, .27);
  --hdsc-muted: #aaa69b;
}
.hdsc-root, .hdsc-root * { box-sizing: border-box; }
.hdsc-root { position: fixed; right: 22px; bottom: max(20px, env(safe-area-inset-bottom)); z-index: 12000; color: #f4f0e5; font-family: inherit; direction: rtl; }
.hdsc-launcher {
  display: flex; align-items: center; gap: 11px; min-height: 58px; padding: 9px 15px 9px 17px;
  border: 1px solid rgba(238, 193, 71, .64); border-radius: 999px; color: var(--hdsc-gold-soft);
  background: linear-gradient(145deg, #1c1a13 0%, #090909 72%); box-shadow: 0 9px 34px rgba(0,0,0,.48), 0 0 25px rgba(223,173,49,.12);
  cursor: pointer; font: inherit; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.hdsc-launcher:hover { transform: translateY(-2px); border-color: var(--hdsc-gold-soft); box-shadow: 0 12px 36px rgba(0,0,0,.54), 0 0 30px rgba(223,173,49,.18); }
.hdsc-launcher:focus-visible, .hdsc-panel button:focus-visible, .hdsc-panel a:focus-visible, .hdsc-panel textarea:focus-visible { outline: 2px solid var(--hdsc-gold-soft); outline-offset: 3px; }
.hdsc-launcher-icon { width: 31px; height: 31px; display: grid; place-items: center; color: var(--hdsc-gold); flex: 0 0 auto; }
.hdsc-launcher-icon svg, .hdsc-avatar svg { width: 100%; height: 100%; display: block; fill: currentColor; }
.hdsc-launcher-copy { display: grid; gap: 2px; text-align: right; }
.hdsc-launcher-copy strong { font-size: 13px; font-weight: 800; line-height: 1.4; }
.hdsc-launcher-copy small { color: #b9b1a0; font-size: 10px; line-height: 1.3; }
.hdsc-launcher-dot { width: 7px; height: 7px; margin-inline-start: 1px; border-radius: 50%; background: #69d39b; box-shadow: 0 0 0 4px rgba(105,211,155,.10); }
.hdsc-panel {
  position: absolute; right: 0; bottom: 73px; display: flex; flex-direction: column; width: min(390px, calc(100vw - 28px));
  height: min(610px, calc(100dvh - 116px)); min-height: 390px; overflow: hidden; border: 1px solid var(--hdsc-line);
  border-radius: 21px; background: radial-gradient(ellipse at 95% 0%, rgba(215,166,45,.12), transparent 38%), #101010;
  box-shadow: 0 20px 70px rgba(0,0,0,.66), 0 0 28px rgba(201,153,42,.12); transform-origin: bottom right; animation: hdsc-open .22s ease both;
}
.hdsc-panel[hidden] { display: none; }
@keyframes hdsc-open { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
.hdsc-header { display: flex; align-items: center; gap: 11px; padding: 14px 15px; border-bottom: 1px solid rgba(225,177,54,.2); background: linear-gradient(110deg, rgba(222,177,56,.13), rgba(16,16,16,.82)); }
.hdsc-avatar { width: 39px; height: 39px; display: grid; place-items: center; padding: 7px; flex: 0 0 auto; border: 1px solid rgba(232,188,68,.38); border-radius: 13px; color: var(--hdsc-gold); background: rgba(214,169,53,.08); }
.hdsc-header-copy { min-width: 0; flex: 1; display: grid; gap: 3px; text-align: right; }
.hdsc-header-copy strong { color: #f5d77d; font-size: 13px; font-weight: 800; }
.hdsc-header-copy small { color: var(--hdsc-muted); font-size: 10px; }
.hdsc-close { width: 32px; height: 32px; flex: 0 0 auto; border: 1px solid rgba(255,255,255,.11); border-radius: 10px; color: #d7d0c1; background: rgba(255,255,255,.045); cursor: pointer; font: inherit; font-size: 20px; line-height: 1; }
.hdsc-log { flex: 1; min-height: 0; overflow: auto; padding: 15px 13px 10px; display: flex; flex-direction: column; gap: 11px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(218,174,64,.36) transparent; }
.hdsc-message { display: flex; width: 100%; }
.hdsc-message-user { justify-content: flex-start; }
.hdsc-message-assistant { justify-content: flex-end; }
.hdsc-bubble { max-width: 92%; padding: 10px 12px; border: 1px solid rgba(255,255,255,.075); border-radius: 14px 14px 4px 14px; background: #191919; color: #e9e5da; font-size: 12px; line-height: 1.9; white-space: pre-line; overflow-wrap: anywhere; }
.hdsc-message-user .hdsc-bubble { color: #1a160d; background: linear-gradient(135deg, #f4d579, #d7a936); border-color: rgba(250,220,142,.5); border-radius: 14px 14px 14px 4px; }
.hdsc-section-label { margin: 2px 1px -4px; color: #d2b45f; font-size: 10px; font-weight: 800; }
.hdsc-quick-list, .hdsc-category-grid, .hdsc-question-list { display: grid; gap: 7px; width: 100%; }
.hdsc-category-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
.hdsc-choice {
  width: 100%; padding: 9px 10px; border: 1px solid rgba(224,178,61,.24); border-radius: 11px; color: #e6d6a1;
  background: linear-gradient(135deg, rgba(201,157,47,.085), rgba(255,255,255,.025)); cursor: pointer; text-align: right; font: inherit; font-size: 11px; line-height: 1.65; transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.hdsc-choice:hover { border-color: rgba(239,198,83,.65); background: rgba(219,172,52,.14); transform: translateY(-1px); }
.hdsc-choice small { display: block; margin-top: 2px; color: #999184; font-size: 9px; }
.hdsc-question-list .hdsc-choice { background: #171717; }
.hdsc-back { align-self: flex-start; padding: 6px 9px; border: 0; color: var(--hdsc-gold-soft); background: transparent; cursor: pointer; font: inherit; font-size: 10px; }
.hdsc-feedback { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: -4px; padding: 8px 9px; border: 1px solid rgba(255,255,255,.07); border-radius: 12px; background: rgba(255,255,255,.025); }
.hdsc-feedback span { flex: 1 0 100%; color: #bdb5a5; font-size: 10px; }
.hdsc-feedback button { padding: 6px 9px; border: 1px solid rgba(224,178,61,.28); border-radius: 8px; color: #e8d69c; background: rgba(220,173,54,.07); cursor: pointer; font: inherit; font-size: 10px; }
.hdsc-compose { display: grid; gap: 8px; padding: 10px 12px 11px; border-top: 1px solid rgba(224,178,61,.18); background: rgba(0,0,0,.2); }
.hdsc-compose[hidden] { display: none; }
.hdsc-compose label { color: #d5bd76; font-size: 10px; }
.hdsc-compose textarea { width: 100%; min-height: 76px; max-height: 130px; resize: vertical; padding: 10px 11px; border: 1px solid rgba(224,178,61,.24); border-radius: 11px; outline: none; color: #f3eee2; background: #090909; font: inherit; font-size: 12px; line-height: 1.8; }
.hdsc-compose textarea::placeholder { color: #777164; }
.hdsc-compose-actions { display: flex; align-items: center; gap: 8px; }
.hdsc-submit { flex: 1; min-height: 37px; border: 0; border-radius: 10px; color: #181307; background: linear-gradient(135deg, #f2d174, #d9aa37); cursor: pointer; font: inherit; font-size: 11px; font-weight: 800; }
.hdsc-submit:disabled { opacity: .58; cursor: wait; }
.hdsc-cancel-compose { padding: 8px 9px; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; color: #c5bda9; background: #171717; cursor: pointer; font: inherit; font-size: 10px; }
.hdsc-status { min-height: 0; margin: 0; color: #c9bd9a; font-size: 10px; line-height: 1.6; }
.hdsc-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 13px 11px; border-top: 1px solid rgba(255,255,255,.06); }
.hdsc-footer button, .hdsc-footer a { padding: 4px 0; border: 0; color: #d9b955; background: transparent; cursor: pointer; text-decoration: none; font: inherit; font-size: 10px; }
.hdsc-footer a { color: #a9a191; }
.hdsc-ticket-link { display: inline-flex; align-items: center; gap: 5px; color: var(--hdsc-gold-soft); text-decoration: underline; text-underline-offset: 3px; }
.hdsc-root[dir="ltr"] .hdsc-launcher-copy, .hdsc-root[dir="ltr"] .hdsc-header-copy { text-align: left; }
.hdsc-root[dir="ltr"] .hdsc-bubble { border-radius: 14px 14px 14px 4px; }
.hdsc-root[dir="ltr"] .hdsc-message-user .hdsc-bubble { border-radius: 14px 14px 4px 14px; }
.hdsc-root[dir="ltr"] .hdsc-choice { text-align: left; }
body.member-body .hdsc-root { bottom: max(94px, calc(78px + env(safe-area-inset-bottom))); }
body.member-body .hdsc-panel { bottom: 73px; }
@media (max-width: 560px) {
  .hdsc-root { right: 13px; bottom: max(14px, env(safe-area-inset-bottom)); }
  .hdsc-launcher { min-height: 53px; padding: 8px 12px; gap: 8px; }
  .hdsc-launcher-icon { width: 28px; height: 28px; }
  .hdsc-launcher-copy strong { font-size: 12px; }
  .hdsc-panel { right: 0; bottom: 64px; width: calc(100vw - 26px); height: min(600px, calc(100dvh - 108px)); min-height: 360px; border-radius: 18px; }
  body.member-body .hdsc-root { bottom: max(88px, calc(78px + env(safe-area-inset-bottom))); }
  body.member-body .hdsc-panel { bottom: 64px; }
  .hdsc-log { padding: 12px 10px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .hdsc-launcher, .hdsc-choice { transition: none; }
  .hdsc-panel { animation: none; }
}
