/* ======================================
   SellSync — Help center (디버그 · 데모 · 운영 공통 · js/help-center.js)
   html[data-help-center="1"] 일 때만 의미 있음
   ====================================== */

/* ---------- Sidebar ? ---------- */
.nav-help-btn {
  margin-left: auto;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-tertiary);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: help;
  padding: 0;
  opacity: 0.55;
  transition: opacity var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast),
    background var(--transition-fast);
}
.nav-help-btn + .nav-pin-btn {
  margin-left: 0;
}
.nav-item:hover .nav-help-btn,
.nav-help-btn:focus-visible {
  opacity: 1;
}
.nav-help-btn:hover,
.nav-help-btn:focus-visible {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  outline: none;
}
body.sidebar-collapsed .sidebar .nav-help-btn {
  display: none;
}
body.sidebar-collapsed .nav-group-children.flyout-visible .nav-help-btn {
  display: inline-flex;
}

/* ---------- Floating tooltip ---------- */
.hc-tooltip {
  position: fixed;
  z-index: 99995; /* 도우미(99980) 위, 토스트(99999)·로그인(100000) 아래 */
  max-width: 280px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-lg);
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.5;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hc-tooltip[hidden] {
  display: none;
}
.hc-tooltip strong {
  font-size: 13px;
  color: var(--primary-light);
}
.hc-tooltip em {
  font-style: normal;
  font-size: 11px;
  color: var(--text-tertiary);
}

/* ---------- Header button ---------- */
.hc-header-btn {
  width: auto !important;
  gap: 6px;
  padding: 0 10px !important;
  font-size: 13px;
  font-weight: 600;
}
.hc-header-btn[aria-expanded='true'] {
  color: var(--primary-light);
  background: var(--primary-alpha);
}
@media (max-width: 768px) {
  .hc-header-label {
    display: none;
  }
}

/* ---------- 「튜토리얼 모드」 목록 (헤더 버튼 아래) ---------- */
.hc-tour-menu {
  position: fixed;
  z-index: 99985;
  width: min(360px, calc(100vw - 16px));
  max-height: min(70vh, 560px);
  overflow-y: auto;
  padding: 12px;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-lg);
  color: var(--text-primary);
}
.hc-tm-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
}
.hc-tm-sub,
.hc-tm-none {
  margin: 6px 0 4px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.hc-tm-label {
  margin: 12px 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
}
.hc-tm-group {
  margin: 10px 0 4px;
  font-size: 11px;
  color: var(--text-tertiary);
}
.hc-tm-list {
  display: grid;
  gap: 4px;
}
.hc-tm-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  text-align: left;
  font: inherit;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
}
.hc-tm-item:hover,
.hc-tm-item:focus-visible {
  background: var(--bg-card-hover);
  border-color: var(--border-default);
  outline: none;
}
.hc-tm-item.is-here {
  border-color: var(--primary);
  background: var(--primary-alpha);
}
.hc-tm-item strong {
  font-size: 13px;
}
.hc-tm-item span {
  font-size: 12px;
  color: var(--text-secondary);
}
.hc-draft {
  display: inline-block;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  vertical-align: 1px;
  color: var(--text-tertiary) !important;
  border: 1px solid var(--border-default);
}

/* ---------- 도우미 말풍선 안 탭 (💬 도우미 | 📘 매뉴얼) ---------- */
.hc-asst-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border-subtle);
}
.hc-asst-tab {
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  cursor: pointer;
}
.hc-asst-tab.is-active {
  color: var(--primary-light);
  background: var(--primary-alpha);
  border-color: var(--primary-alpha-strong);
}
.hc-asst-tabs .hc-badge {
  margin-left: auto;
}
.hc-asst-manual {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}
.ai-assistant-panel.hc-mode-manual {
  width: min(460px, calc(100vw - 32px));
  max-height: min(680px, calc(100vh - 140px));
  height: min(680px, calc(100vh - 140px));
}
.ai-assistant-panel.hc-mode-manual > .hc-asst-manual {
  display: flex;
}
.ai-assistant-panel.hc-mode-manual > .ai-assistant-hints,
.ai-assistant-panel.hc-mode-manual > .ai-assistant-messages,
.ai-assistant-panel.hc-mode-manual > .ai-assistant-input-row {
  display: none !important;
}
.hc-asst-manual .hc-body {
  flex: 1;
  min-height: 0;
}

.hc-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.hc-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 12px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.hc-tab {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  border-bottom: 2px solid transparent;
  cursor: pointer;
}
.hc-tab.is-active {
  color: var(--primary-light);
  border-bottom-color: var(--primary);
}

.hc-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px 32px;
  font-size: 14px;
  line-height: 1.65;
}
.hc-title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
}
.hc-sec {
  margin-top: 18px;
}
.hc-sec h3 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: none;
}
.hc-when {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--primary-alpha);
  color: var(--text-primary);
}
.hc-body ol,
.hc-body ul {
  margin: 0;
  padding-left: 22px;
}
.hc-body ol li {
  margin-bottom: 8px;
  padding-left: 4px;
}
.hc-body ol li::marker {
  color: var(--primary-light);
  font-weight: 700;
}
.hc-ui {
  font-weight: 700;
  color: var(--primary-light);
  background: var(--primary-alpha);
  padding: 0 4px;
  border-radius: 4px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.hc-tips {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(16, 185, 129, 0.1);
}
.hc-caution {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(239, 68, 68, 0.1);
}
.hc-caution p {
  margin: 0;
}
.hc-muted {
  margin: 0;
  color: var(--text-tertiary);
  font-size: 13px;
}
.hc-video {
  width: 100%;
  border-radius: var(--radius-md);
  background: #000;
  aspect-ratio: 16 / 9;
}
.hc-video-slot {
  border: 1px dashed var(--border-default);
  border-radius: var(--radius-md);
  padding: 10px;
}
.hc-video-slot:has(video) {
  border: none;
  padding: 0;
}
.hc-go,
.hc-link {
  border: 1px solid var(--border-default);
  background: var(--bg-card);
  color: var(--primary-light);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  margin-top: 4px;
}

.hc-search {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 14px;
  margin-bottom: 8px;
}
.hc-group {
  margin: 18px 0 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-tertiary);
  letter-spacing: 0.04em;
}
.hc-cards {
  display: grid;
  gap: 8px;
}
.hc-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  cursor: pointer;
  font: inherit;
}
.hc-card:hover {
  border-color: var(--primary);
  background: var(--bg-card-hover);
}
.hc-card strong {
  font-size: 14px;
}
.hc-card span {
  font-size: 12px;
  color: var(--text-secondary);
}
.hc-glossary dt,
.hc-mini dt {
  font-weight: 700;
  margin-top: 12px;
  color: var(--primary-light);
}
.hc-glossary dd,
.hc-mini dd {
  margin: 2px 0 0;
  color: var(--text-secondary);
}

/* ======================================
   튜토리얼 모드 (js/help-tour.js)
   ====================================== */
.ht-spot {
  position: fixed;
  z-index: 99996;
  border-radius: 10px;
  pointer-events: none;
  box-shadow: 0 0 0 3px var(--primary), 0 0 0 9999px rgba(5, 6, 12, 0.62);
  transition: left 0.18s ease, top 0.18s ease, width 0.18s ease, height 0.18s ease;
  animation: ht-pulse 1.6s ease-in-out infinite;
}
.ht-spot--none {
  box-shadow: 0 0 0 9999px rgba(5, 6, 12, 0.62);
  animation: none;
}
@keyframes ht-pulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--primary), 0 0 0 9999px rgba(5, 6, 12, 0.62); }
  50% { box-shadow: 0 0 0 7px rgba(108, 99, 255, 0.55), 0 0 0 9999px rgba(5, 6, 12, 0.62); }
}
.ht-block {
  position: fixed;
  z-index: 99997;
  background: transparent;
}
.ht-card {
  position: fixed;
  z-index: 99998;
  width: min(360px, calc(100vw - 16px));
  padding: 14px 16px 12px;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--primary);
  box-shadow: var(--shadow-lg);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
}
.ht-card--warn {
  border-color: #f59e0b;
}
.ht-shake {
  animation: ht-shake 0.35s;
}
@keyframes ht-shake {
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}
@media (prefers-reduced-motion: reduce) {
  .ht-spot { animation: none; transition: none; }
  .ht-shake { animation: none; }
}
.ht-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
}
.ht-title {
  color: var(--primary-light);
}
.ht-count {
  color: var(--text-tertiary);
  white-space: nowrap;
}
.ht-bar {
  height: 4px;
  margin: 8px 0 10px;
  border-radius: 4px;
  background: var(--border-default);
  overflow: hidden;
}
.ht-bar i {
  display: block;
  height: 100%;
  background: var(--primary);
  transition: width 0.25s;
}
.ht-text {
  margin: 0;
  font-size: 15px;
}
.ht-ui {
  font-weight: 700;
  color: var(--primary-light);
  background: var(--primary-alpha);
  padding: 0 4px;
  border-radius: 4px;
}
.ht-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--text-secondary);
}
.ht-hint--warn {
  color: #f59e0b;
}
.ht-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
}
.ht-spacer {
  flex: 1;
}
.ht-btn {
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  cursor: pointer;
  border: 1px solid var(--border-default);
  background: transparent;
  color: var(--text-secondary);
}
.ht-btn--primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.ht-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* 매뉴얼 드로어의 튜토리얼 모드 진입 버튼 */
.hc-tour-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 10px 12px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.hc-tour-btn:hover {
  background: var(--primary-dark);
}

/* ======================================
   마스코트 「박스봇」 — 도우미 버튼 (js/help-center.js decorateMascot)
   96px · 둥실 + 무작위 동작(깡총·갸웃·안테나·손 인사) · 볼터치 · 말풍선/설명 카드
   ====================================== */
.ai-assistant-fab.hc-mascot-fab {
  width: 96px;
  height: 96px;
  padding: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
.ai-assistant-fab.hc-mascot-fab:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow: none;
}
.ai-assistant-fab.hc-mascot-fab[aria-expanded='true'] {
  box-shadow: none;
}
.hc-bot {
  width: 96px;
  height: 96px;
  overflow: visible;
  filter: drop-shadow(0 8px 18px rgba(82, 73, 214, 0.5));
}
.hc-bot-shadow {
  fill: #000;
  opacity: 0.28;
  transform-origin: 32px 60px;
  animation: hc-bot-shadow 2.8s ease-in-out infinite;
}
.hc-bot-body {
  transform-origin: 32px 52px;
  animation: hc-bot-bob 2.8s ease-in-out infinite;
}
.hc-bot-head {
  transform-origin: 32px 40px;
  transition: transform 0.3s ease;
}
.hc-bot-antenna {
  transform-origin: 32px 13px;
}
.hc-bot-light {
  fill: #ffd166;
  animation: hc-bot-light 2.2s ease-in-out infinite;
}
.hc-bot-cheek {
  fill: #ff8fb1;
  opacity: 0.35;
  transition: opacity 0.25s ease;
}
.hc-bot-eyes {
  transition: transform 0.15s ease-out;
}
.hc-bot-eyes-open {
  fill: #5eead4;
  transform-origin: 32px 29px;
  animation: hc-bot-blink 4.6s infinite;
}
.hc-bot-eyes-happy {
  display: none;
  fill: none;
  stroke: #5eead4;
  stroke-width: 2.2;
  stroke-linecap: round;
}
.hc-bot-mouth {
  fill: none;
  stroke: #5eead4;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.hc-bot-arm-r {
  transform-origin: 54px 31px;
}
.hc-bot-arm-l {
  transform-origin: 10px 31px;
}
/* 마우스를 올리거나 패널이 열려 있으면: 웃는 눈 + 볼 빨개짐 + 통통 */
.hc-mascot-fab:hover .hc-bot-eyes-open,
.ai-assistant-wrap.is-open .hc-bot-eyes-open {
  display: none;
}
.hc-mascot-fab:hover .hc-bot-eyes-happy,
.ai-assistant-wrap.is-open .hc-bot-eyes-happy {
  display: inline;
}
.hc-mascot-fab:hover .hc-bot-cheek {
  opacity: 0.9;
}
.hc-mascot-fab:hover .hc-bot-body {
  animation: hc-bot-bounce 0.6s ease-in-out infinite;
}
.hc-mascot-fab:hover .hc-bot-arm-r {
  animation: hc-bot-wave 1.1s ease-in-out infinite;
}
/* 무작위 동작 */
.hc-mascot-fab.is-waving .hc-bot-arm-r {
  animation: hc-bot-wave 1.1s ease-in-out;
}
.hc-mascot-fab.is-hop .hc-bot-body {
  animation: hc-bot-hop 0.9s cubic-bezier(0.3, 0.7, 0.4, 1);
}
.hc-mascot-fab.is-hop .hc-bot-shadow {
  animation: hc-bot-hop-shadow 0.9s ease;
}
.hc-mascot-fab.is-tilt .hc-bot-head {
  animation: hc-bot-tilt 1.3s ease-in-out;
}
.hc-mascot-fab.is-wiggle .hc-bot-antenna {
  animation: hc-bot-wiggle 1s ease-in-out;
}
.hc-mascot-fab.is-wiggle .hc-bot-arm-l,
.hc-mascot-fab.is-wiggle .hc-bot-arm-r {
  animation: hc-bot-flap 0.5s ease-in-out 2;
}
@keyframes hc-bot-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
@keyframes hc-bot-bounce {
  0%, 100% { transform: translateY(0) scale(1, 1); }
  50% { transform: translateY(-4px) scale(1.03, 0.97); }
}
@keyframes hc-bot-hop {
  0% { transform: translateY(0) scale(1, 1); }
  15% { transform: translateY(1px) scale(1.12, 0.86); }
  45% { transform: translateY(-14px) scale(0.92, 1.1); }
  70% { transform: translateY(0) scale(1.1, 0.9); }
  85% { transform: translateY(-2px) scale(0.97, 1.03); }
  100% { transform: translateY(0) scale(1, 1); }
}
@keyframes hc-bot-hop-shadow {
  0%, 100% { transform: scaleX(1); opacity: 0.28; }
  45% { transform: scaleX(0.6); opacity: 0.12; }
}
@keyframes hc-bot-tilt {
  0%, 100% { transform: rotate(0deg); }
  30% { transform: rotate(-10deg); }
  65% { transform: rotate(8deg); }
}
@keyframes hc-bot-wiggle {
  0%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(-22deg); }
  45% { transform: rotate(18deg); }
  70% { transform: rotate(-10deg); }
}
@keyframes hc-bot-flap {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-18deg); }
}
@keyframes hc-bot-shadow {
  0%, 100% { transform: scaleX(1); opacity: 0.28; }
  50% { transform: scaleX(0.82); opacity: 0.18; }
}
@keyframes hc-bot-light {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
@keyframes hc-bot-blink {
  0%, 92%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.12); }
}
@keyframes hc-bot-wave {
  0%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(-38deg); }
  40% { transform: rotate(-12deg); }
  60% { transform: rotate(-38deg); }
  80% { transform: rotate(-12deg); }
}

/* 누르면 하트·반짝이 */
.hc-bot-heart {
  position: absolute;
  bottom: 78px;
  font-size: 18px;
  pointer-events: none;
  animation: hc-heart-up 1.1s ease-out forwards;
}
@keyframes hc-heart-up {
  from { opacity: 0; transform: translateY(8px) scale(0.6); }
  25% { opacity: 1; transform: translateY(-6px) scale(1.15); }
  to { opacity: 0; transform: translateY(-46px) scale(0.9); }
}

/* 말풍선: 평소 한 줄 안내 → 마우스를 올리면 설명 카드 */
.hc-bot-bubble {
  position: absolute;
  right: 4px;
  bottom: 104px;
  width: max-content;
  max-width: 300px;
  padding: 10px 14px;
  border-radius: 16px 16px 4px 16px;
  background: var(--bg-elevated);
  border: 1.5px solid var(--primary);
  box-shadow: var(--shadow-lg), 0 0 0 4px var(--primary-alpha);
  color: var(--text-primary);
  pointer-events: auto;
  cursor: pointer;
  transition: max-width 0.22s ease, padding 0.22s ease, opacity 0.2s ease, transform 0.2s ease;
  animation: hc-bubble-float 3.2s ease-in-out infinite;
}
.hc-bot-bubble::after {
  content: '';
  position: absolute;
  right: 30px;
  bottom: -8px;
  width: 14px;
  height: 14px;
  background: var(--bg-elevated);
  border-right: 1.5px solid var(--primary);
  border-bottom: 1.5px solid var(--primary);
  transform: rotate(45deg);
}
.hc-bot-bubble.is-hidden {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}
@keyframes hc-bubble-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
.hc-bb-compact {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.45;
  padding-right: 10px;
}
.hc-bb-compact.is-in {
  animation: hc-bb-in 0.35s ease-out;
}
@keyframes hc-bb-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
.hc-bb-close {
  position: absolute;
  top: 2px;
  right: 4px;
  width: 20px;
  height: 20px;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
}
.hc-bb-close:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}
.hc-bb-card {
  display: none;
}
.hc-bot-bubble.is-expanded {
  max-width: 300px;
  width: 300px;
  padding: 14px 16px;
  cursor: default;
  animation: none;
}
.hc-bot-bubble.is-expanded .hc-bb-compact {
  display: none;
}
.hc-bot-bubble.is-expanded .hc-bb-card {
  display: block;
  animation: hc-bb-in 0.2s ease-out;
}
.hc-bb-title {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--primary-light);
}
.hc-bb-desc {
  margin: 6px 0 10px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-secondary);
}
.hc-bb-actions {
  display: grid;
  gap: 6px;
}
.hc-bb-actions button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: var(--bg-card);
  color: var(--text-primary);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.hc-bb-actions button span {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-tertiary);
}
.hc-bb-actions button:hover,
.hc-bb-actions button:focus-visible {
  border-color: var(--primary);
  background: var(--primary-alpha);
  outline: none;
}
@media (max-width: 640px) {
  .ai-assistant-fab.hc-mascot-fab, .hc-bot { width: 76px; height: 76px; }
  .hc-bot-bubble { bottom: 84px; max-width: 200px; }
  .hc-bot-bubble.is-expanded { width: min(300px, calc(100vw - 32px)); }
}
@media (prefers-reduced-motion: reduce) {
  .hc-bot-body, .hc-bot-shadow, .hc-bot-light, .hc-bot-eyes-open, .hc-bot-head, .hc-bot-antenna,
  .hc-bot-arm-l, .hc-bot-arm-r, .hc-bot-heart, .hc-bot-bubble, .hc-bb-compact.is-in, .hc-bb-card,
  .hc-mascot-fab:hover .hc-bot-body, .hc-mascot-fab:hover .hc-bot-arm-r {
    animation: none !important;
  }
  .hc-bot-eyes { transition: none; }
}

/* 다크 네온 시안: 라임 배경 위 텍스트는 어두운 잉크 */
html[data-skin="dark-neon"] .nav-help-btn:hover,
html[data-skin="dark-neon"] .nav-help-btn:focus-visible,
html[data-skin="dark-neon"] .hc-tour-btn,
html[data-skin="dark-neon"] .ht-btn--primary {
  color: var(--skin-neon-ink, #0a0c10);
}

/* 튜토리얼 모드 안 「🎬 영상」 미니 플레이어 (왼쪽 아래, 스포트라이트 위) */
.ht-video {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 99998;
  width: min(480px, calc(100vw - 32px));
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--primary);
  box-shadow: var(--shadow-lg);
}
.ht-video video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
}
.ht-video.is-resizing {
  user-select: none;
}
.ht-video.is-resizing video {
  pointer-events: none;
}
/* 크게 보기 / 원래 크기 */
.ht-video-size {
  position: absolute;
  top: 6px;
  right: 60px;
  z-index: 1;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.ht-video-size:hover,
.ht-video-close:hover {
  background: var(--primary);
}
/* 오른쪽 위 크기 조절 손잡이 (왼쪽 아래에 붙어 있으므로 오른쪽·위로 끌어 키움) */
.ht-video-grip {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  width: 18px;
  height: 18px;
  cursor: nesw-resize;
  touch-action: none;
  background:
    linear-gradient(225deg, var(--primary) 0 3px, transparent 3px) top right / 18px 18px no-repeat,
    linear-gradient(45deg, transparent 0 9px, rgba(255, 255, 255, 0.85) 9px 10.5px, transparent 10.5px 13px, rgba(255, 255, 255, 0.85) 13px 14.5px, transparent 14.5px);
  border-top-right-radius: var(--radius-lg);
}
.ht-video-close {
  position: absolute;
  top: 6px;
  right: 26px;
  z-index: 1;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  cursor: pointer;
}

/* ======================================
   도우미 창 한 화면 (탭·선택 없이): 대화 → 이 화면 사용법(영상·튜토리얼) → 목차·용어 → 입력칸
   ====================================== */
.ai-assistant-panel.hc-unified {
  width: min(440px, calc(100vw - 32px));
  /* 아래쪽에 캐릭터(96px)·간격·화면 여백이 있어 그만큼 빼야 위가 잘리지 않음 */
  max-height: min(680px, calc(100vh - 240px));
}
.hc-asst-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.hc-asst-scroll > .ai-assistant-messages {
  flex: none;
  min-height: 0;
  max-height: none;
  overflow: visible;
}
.ai-assistant-panel.hc-unified .hc-asst-manual {
  display: block;
  border-top: 1px solid var(--border-subtle);
  margin-top: 6px;
}
.hc-sec-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--primary-light);
}
.hc-sec-label .hc-badge {
  margin-left: auto;
}
.hc-asst-manual .hc-body {
  overflow: visible;
  padding-bottom: 8px;
}
.hc-more {
  margin: 0 18px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}
.hc-more > summary {
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.hc-more > div {
  padding: 0 12px 12px;
}

/* 도우미 제목 옆 「DB·규칙」 배지는 초보자에게 의미가 없어 숨김 */
html[data-help-center='1'] #aiAssistantBadge {
  display: none;
}
