/* ═════════════════════════════════════════════════════════════════
 *  交互系统样式（InteractionEngine + InteractionEditor）
 * ═════════════════════════════════════════════════════════════════
 */

/* ─────── 工具栏：交互按钮（btnInteract） ─────── */
.widget-actions .btn-interact {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 4px;
  transition: all .2s;
  background: rgba(255, 200, 60, .12);
  border: 1px solid rgba(255, 200, 60, .35);
  color: #ffd86b;
}
.widget-actions .btn-interact:hover {
  background: rgba(255, 200, 60, .22);
  border-color: rgba(255, 200, 60, .55);
  box-shadow: 0 0 10px rgba(255, 200, 60, .3);
}
.widget-actions .btn-interact.has-rules {
  background: linear-gradient(135deg, rgba(255, 200, 60, .25), rgba(255, 100, 200, .18));
  border-color: rgba(255, 200, 60, .6);
  color: #ffe082;
  font-weight: 600;
  position: relative;
}
.widget-actions .btn-interact .btn-interact-count {
  display: inline-block;
  margin-left: 4px;
  padding: 0 5px;
  height: 14px;
  line-height: 14px;
  border-radius: 7px;
  background: rgba(255, 90, 160, .85);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  vertical-align: 1px;
}

/* ─────── widget 已配置交互的视觉提示 ─────── */
.widget.has-interaction {
  cursor: pointer;
}
body.edit-mode .widget.has-interaction {
  cursor: default;
}

/* 仅在演示模式 / 工具栏隐藏时显示左下角的 ⚡ 标记，提示「此组件可交互」。
 * 编辑模式下工具栏中已有「⚡ 交互」按钮，无需再显示徽标。 */
body.presentation-mode .widget.has-interaction::after {
  content: "⚡";
  position: absolute;
  bottom: 6px; right: 7px;
  font-size: 12px;
  color: #ffd86b;
  text-shadow: 0 0 6px rgba(255, 216, 107, .7);
  opacity: .55;
  pointer-events: none;
  z-index: 5;
  animation: ie-twinkle 2.4s ease-in-out infinite;
}

@keyframes ie-twinkle {
  0%, 100% { opacity: .35; transform: scale(.95); }
  50%      { opacity: .85; transform: scale(1.1); }
}

/* ─────── 交互运行时：动效 / 高亮 / 隐藏 ─────── */
.widget.ie-hidden {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: scale(.92);
  transition: all .3s ease;
}

.widget.ie-highlight {
  box-shadow: 0 0 0 2px rgba(255, 220, 80, .9), 0 0 32px 6px rgba(255, 220, 80, .55);
  z-index: 10;
}

@keyframes ie-shake-kf {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-6px); }
  20%, 40%, 60%, 80% { transform: translateX(6px); }
}
.widget.ie-shake { animation: ie-shake-kf .55s ease-in-out; }

@keyframes ie-pulse-kf {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,242,255,.7), 0 0 0 0 rgba(0,242,255,.4); }
  50%      { box-shadow: 0 0 0 6px rgba(0,242,255,.0), 0 0 24px 8px rgba(0,242,255,.45); }
}
.widget.ie-pulse  { animation: ie-pulse-kf 1.1s ease-out; }

@keyframes ie-flash-kf {
  0%, 100% { background: transparent; }
  20%, 60% { background: rgba(255, 255, 255, .15); }
  40%, 80% { background: transparent; }
}
.widget.ie-flash  { animation: ie-flash-kf 1.1s ease-out; }

/* ─────── 运行时弹窗（toast / modal） ─────── */
.ie-toast {
  position: fixed;
  bottom: 64px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 10px 22px;
  background: rgba(8, 16, 32, .92);
  border: 1px solid #00f2ff;
  border-radius: 22px;
  color: #00f2ff;
  font-size: 13px;
  font-weight: 500;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s ease, transform .25s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,.6), 0 0 14px currentColor;
}
.ie-toast.ie-in  { opacity: 1; transform: translateX(-50%) translateY(0); }
.ie-toast.ie-out { opacity: 0; transform: translateX(-50%) translateY(-12px); }

.ie-toast-success { border-color: #4cd964; color: #4cd964; }
.ie-toast-warn    { border-color: #ffb030; color: #ffb030; }
.ie-toast-err     { border-color: #ff4d6b; color: #ff4d6b; }

.ie-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .72);
  z-index: 8000;
  display: none;
  align-items: center; justify-content: center;
  padding: 24px;
  backdrop-filter: blur(3px);
}
.ie-modal-overlay.show { display: flex; animation: ie-fadeIn .22s ease; }
@keyframes ie-fadeIn { from { opacity: 0 } to { opacity: 1 } }

.ie-modal-box {
  background: #0a1528;
  border: 1px solid rgba(0, 242, 255, .45);
  border-radius: 8px;
  width: min(640px, 95vw);
  max-height: 88vh;
  display: flex; flex-direction: column;
  box-shadow: 0 0 40px rgba(0, 242, 255, .25);
  animation: ie-slideUp .26s cubic-bezier(.4, 0, .2, 1);
}
@keyframes ie-slideUp { from { transform: translateY(18px); opacity: 0; } }

.ie-modal-head {
  padding: 12px 18px;
  border-bottom: 1px solid rgba(0, 242, 255, .2);
  display: flex; align-items: center; gap: 10px;
}
.ie-modal-title { color: #00f2ff; font-weight: 600; font-size: 15px; flex: 1; }
.ie-modal-close {
  background: none; border: none; color: rgba(232,244,255,.65);
  font-size: 22px; line-height: 1; padding: 0 6px; cursor: pointer;
  transition: color .15s ease;
}
.ie-modal-close:hover { color: #ff6b8a; }

.ie-modal-body {
  padding: 14px 18px 18px;
  overflow: auto;
  color: #e8f4ff;
  font-size: 13px;
  line-height: 1.6;
}
.ie-mtext { white-space: pre-wrap; word-break: break-word; }
.ie-mimg  { text-align: center; }
.ie-mimg img { max-width: 100%; max-height: 75vh; border-radius: 6px; }
.ie-iframe   { width: 100%; height: 70vh; border: none; border-radius: 4px; background: #fff; }
.ie-mwidget-wrap { width: 100%; height: 60vh; overflow: hidden; }
.ie-mwidget-wrap > div { width: 100% !important; height: 100% !important; }
.ie-empty { text-align: center; padding: 40px; color: rgba(232,244,255,.5); }

/* 跨标签页 modalWidget · 真渲染容器 */
.ie-mwidget-host {
  width: 100%;
  min-height: 60vh;
  height: 100%;
  position: relative;
  background: rgba(255,255,255,.02);
  border-radius: 6px;
  overflow: hidden;
}
.ie-mwidget-host > * { width: 100% !important; }
.ie-mw-render-host canvas,
.ie-mwidget-host canvas { display: block; }

/* fit 尺寸：宽 90%、高 80%，body 撑满 */
.ie-modal-box.ie-modal-fit { max-width: 90vw; max-height: 80vh; height: 80vh; }
.ie-modal-box.ie-modal-fit .ie-modal-body { flex: 1; min-height: 0; padding: 10px 14px 14px; }
.ie-modal-box.ie-modal-fit .ie-mwidget-host { height: 100%; min-height: 0; }

/* 来源标签：本页 → 紫色；跨页 → 青色，紧贴标题右侧 */
.ie-mw-src {
  margin-left: 10px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 10px;
  letter-spacing: .2px;
  background: rgba(0, 242, 255, .12);
  color: #00f2ff;
  border: 1px solid rgba(0, 242, 255, .35);
  vertical-align: middle;
}
.ie-mw-src[data-current="1"] {
  background: rgba(180, 100, 255, .14);
  color: #c79bff;
  border-color: rgba(180, 100, 255, .4);
}

/* 跨标签页选择器（optgroup 视觉清晰化） */
.ie-cross-tab-select optgroup {
  color: #00f2ff;
  font-weight: 600;
  font-style: normal;
  background: rgba(0, 242, 255, .06);
}
.ie-cross-tab-select option { color: #e8f4ff; padding: 4px 6px; }

/* ═════════════════════════════════════════════════════════════════
 *  交互编辑弹窗
 * ═════════════════════════════════════════════════════════════════
 */

.ie-editor-overlay { z-index: 3000; }   /* 高于 modalLibrary 的 2000 */

.ie-editor-modal .modal-header { gap: 10px; align-items: center; }

.ie-editor-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; padding: 2px 9px;
  border: 1px solid rgba(76, 217, 100, .4);
  border-radius: 12px;
  color: #4cd964;
  background: rgba(76, 217, 100, .08);
  font-weight: 500;
}
.ie-editor-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #4cd964;
  box-shadow: 0 0 6px #4cd964;
  animation: ie-twinkle 2s ease-in-out infinite;
}

.ie-editor-toolbar {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 0;
}
.ie-editor-tip {
  font-size: 11px; color: rgba(180,210,255,.55); flex: 1;
}

.ie-btn-primary, .ie-btn-secondary, .ie-btn-ghost {
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 5px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s ease;
  font-family: inherit;
  border: 1px solid;
}
.ie-btn-primary {
  background: linear-gradient(135deg, rgba(0,242,255,.25), rgba(74,158,255,.15));
  border-color: rgba(0, 242, 255, .55);
  color: #00f2ff;
}
.ie-btn-primary:hover {
  background: linear-gradient(135deg, rgba(0,242,255,.4), rgba(74,158,255,.25));
  box-shadow: 0 0 12px rgba(0, 242, 255, .35);
}
.ie-btn-secondary {
  background: rgba(180, 100, 255, .15);
  border-color: rgba(180, 100, 255, .4);
  color: #c080ff;
}
.ie-btn-secondary:hover { background: rgba(180, 100, 255, .25); }

.ie-btn-ghost {
  background: transparent;
  border-color: rgba(180, 210, 255, .25);
  color: rgba(232, 244, 255, .75);
}
.ie-btn-ghost:hover {
  background: rgba(180, 210, 255, .08);
  border-color: rgba(180, 210, 255, .4);
}
.ie-btn-danger {
  border-color: rgba(255, 100, 130, .3) !important;
  color: rgba(255, 130, 150, .85) !important;
}
.ie-btn-danger:hover {
  background: rgba(255, 100, 130, .12) !important;
  border-color: rgba(255, 100, 130, .55) !important;
}
.ie-btn-sm { padding: 3px 10px; font-size: 11px; }

/* ─────── 交互列表 ─────── */
.ie-interaction-list {
  display: flex; flex-direction: column; gap: 8px;
  max-height: 50vh; overflow-y: auto;
  padding-right: 2px;
}

.ie-empty-state {
  text-align: center;
  padding: 32px 20px;
  background: rgba(0, 242, 255, .03);
  border: 1px dashed rgba(0, 242, 255, .25);
  border-radius: 8px;
}
.ie-empty-hints {
  display: inline-flex; flex-direction: column; gap: 4px;
  font-size: 11px; color: rgba(180, 210, 255, .5);
  text-align: left; margin-top: 8px;
}

.ie-int-card {
  background: rgba(0, 12, 28, .55);
  border: 1px solid rgba(0, 242, 255, .25);
  border-radius: 7px;
  overflow: hidden;
  transition: all .18s ease;
}
.ie-int-card:hover { border-color: rgba(0, 242, 255, .45); }
.ie-int-card.expanded { border-color: rgba(0, 242, 255, .65); box-shadow: 0 0 16px rgba(0, 242, 255, .15); }
.ie-int-card.disabled { opacity: .55; }

.ie-int-head {
  padding: 8px 12px;
  display: flex; align-items: center; gap: 10px;
  cursor: pointer;
}
.ie-int-trigger-tag {
  flex-shrink: 0;
  font-size: 12px; font-weight: 600;
  padding: 3px 9px;
  border-radius: 11px;
  background: rgba(0, 242, 255, .15);
  border: 1px solid rgba(0, 242, 255, .4);
  color: #00f2ff;
  white-space: nowrap;
}
.ie-int-summary { flex: 1; overflow: hidden; min-width: 0; }
.ie-int-name {
  font-size: 13px; color: #e8f4ff;
  font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ie-int-actions-summary {
  font-size: 11px; color: rgba(180, 210, 255, .6);
  margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.ie-int-toggle {
  flex-shrink: 0;
  font-size: 11px; padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(76, 217, 100, .4);
  background: rgba(76, 217, 100, .12);
  color: #4cd964;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s ease;
}
.ie-int-toggle:hover { background: rgba(76, 217, 100, .22); }
.ie-int-toggle.off {
  border-color: rgba(180, 210, 255, .25);
  background: rgba(180, 210, 255, .06);
  color: rgba(180, 210, 255, .65);
}
.ie-int-del, .ie-int-fold {
  flex-shrink: 0;
  width: 24px; height: 24px;
  border: 1px solid rgba(180, 210, 255, .2);
  background: rgba(0, 0, 0, .25);
  border-radius: 4px;
  color: rgba(232, 244, 255, .7);
  font-size: 12px;
  cursor: pointer;
  transition: all .15s ease;
}
.ie-int-del:hover { color: #ff6b8a; border-color: rgba(255, 107, 138, .4); }
.ie-int-fold:hover { color: #00f2ff; border-color: rgba(0, 242, 255, .4); }

.ie-int-body {
  padding: 14px 14px 16px;
  border-top: 1px solid rgba(0, 242, 255, .15);
  background: rgba(0, 8, 24, .35);
}

.ie-int-editor {
  display: flex; flex-direction: column; gap: 14px;
}

.ie-field {
  display: flex; flex-direction: column; gap: 6px;
}
.ie-field-label {
  font-size: 12px; color: rgba(180, 210, 255, .75);
  font-weight: 500;
}
.ie-input, .ie-textarea {
  width: 100%; box-sizing: border-box;
  background: rgba(0, 12, 28, .65);
  border: 1px solid rgba(0, 242, 255, .25);
  border-radius: 4px;
  padding: 7px 10px;
  color: #e8f4ff; font-size: 12px; font-family: inherit;
  transition: border-color .15s ease;
}
.ie-input:focus, .ie-textarea:focus {
  outline: none;
  border-color: rgba(0, 242, 255, .65);
  box-shadow: 0 0 0 3px rgba(0, 242, 255, .12);
}
.ie-textarea { resize: vertical; min-height: 56px; line-height: 1.5; }

select.ie-input { appearance: auto; }

.ie-trigger-pills {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.ie-trigger-pill {
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 14px;
  border: 1px solid rgba(180, 210, 255, .25);
  background: rgba(0, 0, 0, .25);
  color: rgba(232, 244, 255, .75);
  cursor: pointer;
  transition: all .15s ease;
  font-family: inherit;
}
.ie-trigger-pill:hover {
  border-color: rgba(0, 242, 255, .45);
  color: #e8f4ff;
}
.ie-trigger-pill.active {
  background: linear-gradient(135deg, rgba(0,242,255,.3), rgba(74,158,255,.18));
  border-color: rgba(0, 242, 255, .65);
  color: #00f2ff;
  font-weight: 600;
  box-shadow: 0 0 8px rgba(0, 242, 255, .3);
}

/* ─────── 添加动作菜单 ─────── */
.ie-acts-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: rgba(180, 210, 255, .75); font-weight: 500;
  padding-top: 6px;
  border-top: 1px dashed rgba(0, 242, 255, .15);
}
.ie-add-action-wrap {
  position: relative;
}
.ie-add-action-menu {
  position: absolute; right: 0; top: 100%;
  margin-top: 4px;
  background: #0a1528;
  border: 1px solid rgba(0, 242, 255, .4);
  border-radius: 6px;
  width: 240px;
  max-height: 320px;
  overflow-y: auto;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .55);
  display: none;
  z-index: 50;
  padding: 4px 0;
}
.ie-add-action-wrap.open .ie-add-action-menu { display: block; }

.ie-add-action-group {
  padding: 6px 12px 3px;
  font-size: 10px; font-weight: 700;
  color: rgba(0, 242, 255, .55);
  letter-spacing: 1px;
  text-transform: uppercase;
  border-top: 1px solid rgba(0, 242, 255, .12);
}
.ie-add-action-group:first-child { border-top: none; }

.ie-add-action-item {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 7px 14px;
  background: transparent;
  border: none; border-left: 2px solid transparent;
  color: #e8f4ff;
  font-size: 12px; font-family: inherit;
  cursor: pointer;
  transition: all .12s ease;
  text-align: left;
}
.ie-add-action-item:hover {
  background: rgba(0, 242, 255, .12);
  border-left-color: #00f2ff;
}
.ie-aa-icon { font-size: 14px; flex-shrink: 0; }

/* ─────── 动作列表（卡片）─────── */
.ie-acts-list {
  display: flex; flex-direction: column; gap: 8px;
}

.ie-act-card {
  background: rgba(0, 8, 24, .55);
  border: 1px solid rgba(180, 100, 255, .3);
  border-radius: 6px;
  overflow: hidden;
}

.ie-act-head {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px;
  background: rgba(180, 100, 255, .08);
  border-bottom: 1px solid rgba(180, 100, 255, .2);
}
.ie-act-icon { font-size: 14px; }
.ie-act-num {
  font-size: 10px;
  background: rgba(0, 0, 0, .4);
  padding: 1px 6px; border-radius: 8px;
  color: rgba(180, 210, 255, .55);
}
.ie-act-name {
  flex: 1;
  font-size: 12px; font-weight: 600;
  color: #c080ff;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ie-act-type-select {
  font-size: 11px;
  padding: 3px 6px;
  background: rgba(0, 12, 28, .8);
  border: 1px solid rgba(180, 100, 255, .35);
  border-radius: 3px;
  color: #c080ff;
  cursor: pointer;
  font-family: inherit;
  max-width: 160px;
}
.ie-act-mv, .ie-act-del {
  width: 22px; height: 22px;
  border: 1px solid rgba(180, 210, 255, .2);
  background: rgba(0, 0, 0, .25);
  border-radius: 3px;
  color: rgba(232, 244, 255, .7);
  font-size: 11px; line-height: 20px;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s ease;
}
.ie-act-mv:hover { color: #00f2ff; border-color: rgba(0, 242, 255, .4); }
.ie-act-del:hover { color: #ff6b8a; border-color: rgba(255, 107, 138, .4); }

.ie-act-fields {
  padding: 10px 10px 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 9px 12px;
}
.ie-act-fields .ie-textarea + .ie-sf-hint,
.ie-act-fields .ie-sf:has(.ie-textarea) { grid-column: 1 / -1; }

.ie-sf {
  display: flex; flex-direction: column; gap: 4px;
}
.ie-sf-label {
  font-size: 11px;
  color: rgba(180, 210, 255, .6);
}
.ie-sf-hint {
  font-size: 10px;
  color: rgba(180, 210, 255, .4);
  margin-top: 2px;
}

.ie-bool {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; color: rgba(232, 244, 255, .85);
  cursor: pointer;
  padding: 6px 0;
}
.ie-bool input { width: 14px; height: 14px; cursor: pointer; }

.ie-int-test {
  display: flex; align-items: center; gap: 10px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px dashed rgba(0, 242, 255, .15);
}
.ie-test-tip {
  font-size: 11px; color: rgba(180, 210, 255, .55);
}

/* 滚动条 */
.ie-interaction-list::-webkit-scrollbar,
.ie-add-action-menu::-webkit-scrollbar {
  width: 6px;
}
.ie-interaction-list::-webkit-scrollbar-thumb,
.ie-add-action-menu::-webkit-scrollbar-thumb {
  background: rgba(0, 242, 255, .25);
  border-radius: 3px;
}
.ie-interaction-list::-webkit-scrollbar-thumb:hover,
.ie-add-action-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 242, 255, .45);
}

/* ═════════════════════════════════════════════════════════════════
 *   元素级交互（itemInteractions）
 * ═════════════════════════════════════════════════════════════════
 */

/* ─── 浏览模式下，已绑定 item 交互的元素显示 hover 提示（轻微高亮） ─── */
body:not(.edit-mode):not(.ie-picker-mode) .widget.has-item-interaction .ie-item:hover,
body:not(.edit-mode):not(.ie-picker-mode) .widget.has-item-interaction .ie-item-auto:hover {
  outline: 1px dashed rgba(255, 200, 60, .6);
  outline-offset: -1px;
  cursor: pointer;
  position: relative;
}

/* widget 已绑定元素交互的徽标（演示模式下） */
body.presentation-mode .widget.has-item-interaction::before {
  content: "🎯";
  position: absolute;
  bottom: 6px; right: 26px;
  font-size: 11px;
  opacity: .55;
  pointer-events: none;
  z-index: 5;
  text-shadow: 0 0 6px rgba(255, 216, 107, .6);
}

/* ─── 拾取模式（PickerService.start） ─── */
body.ie-picker-mode {
  cursor: crosshair !important;
}

body.ie-picker-mode .widget.ie-picking {
  outline: 2px solid rgba(0, 242, 255, .55);
  outline-offset: 4px;
  box-shadow: 0 0 30px 4px rgba(0, 242, 255, .25);
  z-index: 9000;
  position: relative;
}

/* 拾取模式下其他 widget 略微暗淡，引导视线 */
body.ie-picker-mode .widget:not(.ie-picking) {
  opacity: .35;
  filter: saturate(.6);
  pointer-events: none;
  transition: opacity .25s ease;
}

/* 可拾取元素：虚线轮廓 + hover 高亮 */
body.ie-picker-mode .ie-pickable {
  outline: 1.5px dashed rgba(255, 220, 80, .85) !important;
  outline-offset: -1px;
  cursor: pointer !important;
  position: relative;
  z-index: 1;
  transition: all .12s;
}

body.ie-picker-mode .ie-pickable:hover {
  outline: 2px solid #ffd86b !important;
  outline-offset: -2px;
  background: rgba(255, 216, 107, .15) !important;
  box-shadow: 0 0 14px 2px rgba(255, 216, 107, .55);
  z-index: 5;
}

/* 编辑模式下 widget 上拾取按钮触发的标记 */
body.ie-picker-mode .widget.ie-picking::after {
  content: "🎯 点击元素以拾取";
  position: absolute;
  top: -28px; left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 216, 107, .92);
  color: #1a1100;
  font-size: 11px; font-weight: 700;
  padding: 4px 12px;
  border-radius: 14px;
  pointer-events: none;
  white-space: nowrap;
  z-index: 9999;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
}

/* 拾取模式：底部居中提示条 */
.ie-picker-hint {
  position: fixed;
  left: 50%; bottom: 30px;
  transform: translateX(-50%) translateY(20px);
  background: linear-gradient(135deg, rgba(255, 216, 107, .98), rgba(255, 170, 60, .98));
  color: #2a1500;
  font-size: 13px; font-weight: 700;
  padding: 10px 22px;
  border-radius: 24px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 230, 150, .8) inset;
  display: flex; align-items: center; gap: 10px;
  z-index: 100000;
  opacity: 0;
  transition: all .22s cubic-bezier(.22, 1, .36, 1);
  pointer-events: none;
  letter-spacing: .3px;
}
.ie-picker-hint.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.ie-picker-hint-ico {
  font-size: 16px;
}

/* ═════════════════════════════════════════════════════════════════
 *   编辑器：Tab 切换（组件交互 / 元素交互）
 * ═════════════════════════════════════════════════════════════════ */
.ie-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 2px solid rgba(0, 242, 255, .15);
  margin-bottom: -2px;
  flex-shrink: 0;
}

.ie-tab {
  appearance: none;
  background: transparent;
  border: 1px solid transparent;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 8px 16px 9px;
  font-size: 12.5px; font-weight: 600;
  font-family: inherit;
  color: rgba(180, 210, 255, .55);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 6px 6px 0 0;
  transition: all .18s ease;
  position: relative;
}
.ie-tab:hover {
  color: rgba(232, 244, 255, .9);
  background: rgba(0, 242, 255, .05);
}
.ie-tab.active {
  color: #00f2ff;
  background: rgba(0, 242, 255, .1);
  border-color: rgba(0, 242, 255, .3) rgba(0, 242, 255, .3) #00f2ff;
}
.ie-tab-count {
  display: inline-block;
  padding: 0 6px;
  height: 16px; line-height: 16px;
  border-radius: 8px;
  background: rgba(0, 242, 255, .25);
  color: #00f2ff;
  font-size: 10px; font-weight: 700;
  min-width: 16px;
  text-align: center;
}
.ie-tab.active .ie-tab-count {
  background: rgba(255, 216, 107, .3);
  color: #ffd86b;
}

.ie-tab-panel {
  display: none;
  flex-direction: column;
  gap: 10px;
  padding-top: 12px;
}
.ie-tab-panel.active {
  display: flex;
}

/* ═════════════════════════════════════════════════════════════════
 *   匹配（match）配置块
 * ═════════════════════════════════════════════════════════════════ */
.ie-match-block {
  background: linear-gradient(135deg, rgba(255, 216, 107, .04), rgba(255, 100, 200, .03));
  border: 1px dashed rgba(255, 216, 107, .35);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
}

.ie-match-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
  gap: 8px;
}
.ie-match-title {
  font-size: 12px; font-weight: 700;
  color: #ffd86b;
  display: flex; align-items: center; gap: 6px;
}

.ie-match-modes {
  display: flex; gap: 4px; flex-wrap: wrap;
}
.ie-match-mode-btn {
  appearance: none;
  background: rgba(0, 12, 28, .6);
  border: 1px solid rgba(255, 216, 107, .25);
  color: rgba(232, 244, 255, .7);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
}
.ie-match-mode-btn:hover {
  background: rgba(255, 216, 107, .1);
  color: #ffd86b;
}
.ie-match-mode-btn.active {
  background: rgba(255, 216, 107, .22);
  border-color: rgba(255, 216, 107, .7);
  color: #ffd86b;
  font-weight: 700;
}

.ie-match-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px 10px;
}

.ie-pick-summary {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
  padding: 8px 10px;
  background: rgba(0, 12, 28, .55);
  border: 1px solid rgba(0, 242, 255, .2);
  border-radius: 6px;
  font-size: 11.5px;
  color: rgba(232, 244, 255, .85);
}
.ie-pick-summary-ico { font-size: 14px; }
.ie-pick-summary-key {
  color: #00f2ff;
  font-weight: 700;
  background: rgba(0, 242, 255, .1);
  padding: 1px 6px;
  border-radius: 3px;
  font-family: monospace;
}
.ie-pick-summary-empty {
  color: rgba(180, 210, 255, .45);
  font-style: italic;
}

.ie-pick-btn {
  appearance: none;
  background: linear-gradient(135deg, rgba(255, 216, 107, .25), rgba(255, 170, 60, .18));
  border: 1px solid rgba(255, 216, 107, .55);
  color: #ffd86b;
  font-size: 11.5px; font-weight: 700;
  padding: 5px 12px;
  border-radius: 5px;
  cursor: pointer;
  font-family: inherit;
  transition: all .18s;
  display: inline-flex; align-items: center; gap: 5px;
}
.ie-pick-btn:hover {
  background: linear-gradient(135deg, rgba(255, 216, 107, .4), rgba(255, 170, 60, .3));
  box-shadow: 0 0 14px rgba(255, 216, 107, .35);
}

/* 模板变量提示 */
.ie-template-hint {
  font-size: 10.5px;
  color: rgba(180, 210, 255, .5);
  background: rgba(0, 0, 0, .25);
  padding: 6px 10px;
  border-radius: 4px;
  border-left: 2px solid rgba(0, 242, 255, .35);
  line-height: 1.55;
}
.ie-template-hint code {
  background: rgba(0, 242, 255, .1);
  color: #00f2ff;
  padding: 0 4px;
  border-radius: 2px;
  font-size: 10.5px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

/* 字段集（多个表单项行内） */
.ie-field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px 10px;
}

/* 元素列表浏览器 */
.ie-items-browser {
  background: rgba(0, 12, 28, .55);
  border: 1px solid rgba(0, 242, 255, .15);
  border-radius: 5px;
  max-height: 180px;
  overflow-y: auto;
  margin-top: 6px;
}
.ie-items-row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
  font-size: 11px;
  cursor: pointer;
  transition: background .12s;
}
.ie-items-row:hover {
  background: rgba(0, 242, 255, .08);
}
.ie-items-row:last-child { border-bottom: none; }
.ie-items-row-kind {
  flex-shrink: 0;
  width: 50px;
  padding: 1px 4px;
  background: rgba(0, 242, 255, .1);
  color: rgba(0, 242, 255, .8);
  border-radius: 3px;
  font-size: 9px;
  text-align: center;
  font-weight: 700;
  text-transform: uppercase;
}
.ie-items-row-key {
  font-family: monospace;
  color: rgba(255, 216, 107, .85);
  flex-shrink: 0;
  font-size: 10px;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ie-items-row-label {
  flex: 1;
  color: #e8f4ff;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ie-items-empty {
  padding: 18px 12px;
  text-align: center;
  color: rgba(180, 210, 255, .45);
  font-size: 11px;
}
