:host {
  position: fixed;
  z-index: 2200;
  top: var(--wqxt-info-tip-top, 0);
  left: var(--wqxt-info-tip-left, 0);
  display: block;
  width: min(420px, calc(100vw - 16px));
  color: #f3eee6;
  pointer-events: none;
  font-family: var(--wqxt-info-sans, Inter, "Noto Sans SC", sans-serif);
}
:host([hidden]) { display: none; }
:host([open]:not([data-positioned])) { visibility: hidden; }
.info-tip {
  box-sizing: border-box;
  width: 100%;
  padding: 16px;
  border: 1px solid rgba(230, 222, 207, .3);
  border-top: 2px solid var(--wqxt-info-accent, #dfbd78);
  border-radius: 6px;
  background: rgba(14, 15, 20, .97);
  box-shadow: 0 18px 52px rgba(0, 0, 0, .58);
  pointer-events: auto;
}
:host([data-template="term"]) { width: min(360px, calc(100vw - 16px)); }
:host([data-template="term"]) .info-tip { padding: 12px; }
.info-tip__header { min-width: 0; display: grid; grid-template-columns:auto minmax(0,1fr) auto; align-items: center; gap: 12px; }
.info-tip__header > div { min-width: 0; display: grid; gap: 4px; }
.info-tip__icon { width: 48px; height: 48px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0,0,0,.48)); }
.info-tip__category { color: var(--wqxt-info-accent, #dfbd78); font: 600 10px/1.2 var(--wqxt-info-sans, Inter, "Noto Sans SC", sans-serif); letter-spacing: .08em; }
.info-tip__title { margin: 0; overflow: hidden; color: #f5f0e8; font: 600 17px/1.3 var(--wqxt-info-serif, "Noto Serif SC", "Songti SC", serif); text-overflow: ellipsis; white-space: nowrap; }
.info-tip__meta { align-self: start; color: #aaa7a3; font: 600 11px/1.2 var(--wqxt-info-mono, "DM Mono", monospace); white-space: nowrap; }
.info-tip__description { margin: 12px 0 0; color: #bdb9b3; font: 400 12px/1.65 var(--wqxt-info-serif, "Noto Serif SC", "Songti SC", serif); }
.info-tip__rows { margin: 12px 0 0; padding-top: 10px; display: grid; gap: 7px; border-top: 1px solid rgba(230,222,207,.16); }
.info-tip__rows > div { min-width: 0; display: grid; grid-template-columns:minmax(76px,auto) minmax(0,1fr); align-items: baseline; gap: 14px; }
.info-tip__rows dt { color: #878581; font: 500 10px/1.4 var(--wqxt-info-sans, Inter, "Noto Sans SC", sans-serif); }
.info-tip__rows dd { margin: 0; color: #e4dfd7; font: 500 11px/1.45 var(--wqxt-info-serif, "Noto Serif SC", "Songti SC", serif); text-align: right; }
:host([data-template="term"]) .info-tip__header { grid-template-columns:minmax(0,1fr); }
:host([data-template="term"]) .info-tip__category,
:host([data-template="term"]) .info-tip__icon,
:host([data-template="term"]) .info-tip__meta { display: none; }
:host([data-template="term"]) .info-tip__title { font-size: 12px; }
:host([data-template="term"]) .info-tip__description { margin-top: 8px; font-family: var(--wqxt-info-sans, Inter, "Noto Sans SC", sans-serif); font-size: 11px; line-height: 1.5; }

@media (max-width: 1000px), (max-height: 560px) {
  :host { width: min(380px, 72vw); }
  :host([data-template="term"]) { width: min(340px, 72vw); }
  .info-tip { padding: 12px; }
  .info-tip__header { gap: 10px; }
  .info-tip__icon { width: 42px; height: 42px; }
  .info-tip__title { font-size: 15px; }
  .info-tip__description { margin-top: 8px; font-size: 11px; line-height: 1.55; }
  .info-tip__rows { margin-top: 8px; padding-top: 8px; gap: 5px; }
  .info-tip__rows dt { font-size: 9px; }
  .info-tip__rows dd { font-size: 10px; }
}

@media (prefers-reduced-motion: no-preference) {
  :host([open]) .info-tip { animation: wqxt-info-tip-in 140ms ease-out; transform-origin: center top; }
  @keyframes wqxt-info-tip-in { from { opacity: 0; transform: translateY(-4px); } }
}

/* 独立信息入口只提供标准热区，业务页面可定位，不得改内部轮廓。 */
.wqxt-info-trigger { width: 44px; height: 44px; display: inline-grid; place-items: center; padding: 0; border: 0; background: transparent; color: #ddd5c8; }
.wqxt-info-trigger svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.wqxt-info-trigger:focus-visible { outline: 2px solid #5eead4; outline-offset: 2px; }
