
/* Ayuda contextual CADela — aislada del motor de dibujo. */
#cadelaContextHelpBtn {
  flex: 0 0 35px;
  width:35px;
  height:35px;
  min-width:35px;
  margin-left:3px;
  border:1px solid #765632;
  border-radius:4px;
  background:#17191b;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:grab;
  touch-action:none;
  user-select:none;
  -webkit-user-select:none;
  -webkit-touch-callout:none;
  position:relative;
}
#cadelaContextHelpBtn:hover,#cadelaContextHelpBtn:focus-visible,
#cadelaContextHelpBtn.cad-help-picking {
  border-color:#ff9d47;
  color:#fff;
  outline:1px solid #ff9d47;
}
#cadelaContextHelpBtn.cad-help-dragging { cursor:grabbing; }
#cadelaContextHelpBtn svg { width:24px;height:24px;pointer-events:none; }
.cad-help-drag-ghost {
  position:fixed; z-index:2147483646; pointer-events:none;
  width:42px;height:42px;display:none;align-items:center;justify-content:center;
  color:#16191b;background:#ffa34f;border:2px solid #fff;
  border-radius:50%;box-shadow:0 4px 20px #000b;
  font:800 29px/1 system-ui,sans-serif;
  transform:translate(-50%,-50%);
}
.cad-help-drag-ghost.is-visible {display:flex;}
.cad-help-drop-highlight {
  outline:3px solid #ff9c3d!important;
  outline-offset:3px!important;
  box-shadow:0 0 0 4px #ff9c3d44!important;
  position:relative;
}
.cad-help-status {
  position:fixed;
  bottom:20px;left:50%;
  transform:translateX(-50%);
  z-index:2147483600;
  color:#f5f6f8;
  border:1px solid #ff9c3d;
  border-radius:10px;
  padding:10px 18px;
  font:600 13px/1.4 system-ui,sans-serif;
  background:#1d2329;
  box-shadow:0 10px 25px #0008;
  pointer-events:none;
  display:none;
  max-width:min(95vw,600px);
  text-align:center;
}
.cad-help-status.is-visible {display:block;}
#cadelaContextHelpOverlay {
  display:none;
  position:fixed;inset:0;z-index:2147483630;
  padding:clamp(8px,2.5vw,32px);
  background:rgba(2,4,9,.83);
  align-items:center;justify-content:center;
  box-sizing:border-box;
  font-family:system-ui,-apple-system,Segoe UI,Arial,sans-serif;
}
#cadelaContextHelpOverlay.is-open {display:flex;}
.cad-help-panel {
  box-sizing:border-box;
  display:flex;flex-direction:column;
  width:min(860px,100%);
  max-height:min(92vh,920px);
  min-height:0;
  overflow:hidden;
  background:#1e2329;
  color:#e9edf1;
  border:1px solid #da863b;
  border-radius:12px;
  box-shadow:0 20px 65px #000d;
}
.cad-help-panel-header {
  flex:0 0 auto;
  border-bottom:1px solid #42484e;
  padding:14px 18px;
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  background:#242930;
}
.cad-help-heading {display:flex;align-items:center;gap:12px;min-width:0;}
.cad-help-heading > img {
  width:49px;height:49px;object-fit:contain;
  background:#101316;border:1px solid #4c5057;border-radius:6px;padding:5px;
  box-sizing:border-box;
}
.cad-help-heading span {
  color:#ffa755;font:700 10px/1.3 system-ui,sans-serif;letter-spacing:1.4px;
}
.cad-help-heading h2 {
  font-size:clamp(18px,2.3vw,24px);
  line-height:1.3;
  font-weight:700;
  margin:2px 0 0;
  overflow-wrap:anywhere;
}
.cad-help-close {
  width:38px;height:38px;flex:0 0 38px;
  cursor:pointer;color:#fff;font-size:26px;
  border:1px solid #636b75;background:#333b44;border-radius:6px;
}
.cad-help-close:hover,.cad-help-close:focus-visible {border-color:#ff9b43;outline:1px solid #ff9b43;}
.cad-help-panel-body {
  min-height:0;
  overflow:auto;
  padding:19px clamp(16px,3vw,30px) 25px;
  font:14px/1.6 system-ui,-apple-system,Segoe UI,Arial,sans-serif;
  overscroll-behavior:contain;
}
.cad-help-panel-body h3 {
  color:#ffae62;font-size:16px;line-height:1.3;
  margin:23px 0 9px;font-weight:700;
}
.cad-help-summary {
  font-size:15px;line-height:1.6;
  padding:12px 15px;margin:2px 0 18px;
  border-left:3px solid #ff9b43;
  background:#282e35;
  border-radius:4px;
}
.cad-help-panel-body li {margin:8px 0;padding-left:4px;}
.cad-help-panel-body ul,.cad-help-panel-body ol {padding-left:23px;}
.cad-help-caption {margin-top:0;color:#aebbc5;font-size:12px;}
.cad-help-options {
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(132px,1fr));
  gap:10px;
  margin:12px 0 18px;
}
.cad-help-option {
  display:flex;flex-direction:column;align-items:center;gap:10px;
  min-height:130px;
  text-align:center;
  padding:13px 8px;
  border:1px solid #454e58;border-radius:8px;
  background:#292f36;
  font-size:12px;font-weight:550;line-height:1.4;
}
.cad-help-option.is-target-option {
  border:2px solid #ffa24a;
  background:#4d392b;
  box-shadow:0 0 0 2px #ffa24a33;
}
.cad-help-option-icon {
  width:62px;height:62px;
  border-radius:7px;
  display:grid;place-items:center;
  background:#0d0d0d;border:1px solid #595959;
}
.cad-help-option-icon img {display:block;width:49px;height:49px;object-fit:contain;}
.cad-help-no-icon {font-size:25px;color:#ff9d47;}
.cad-help-diagram {
  background:#111a25;border:1px solid #4c5765;
  padding:12px;margin:15px 0;border-radius:10px;text-align:center;
}
.cad-help-diagram img {display:block;max-height:300px;max-width:100%;width:100%;object-fit:contain;}
.cad-help-diagram figcaption {font-size:12px;color:#b6c8da;margin-top:6px;}
.cad-help-panel-footer {
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  flex-wrap:wrap;
  border-top:1px solid #454b52;
  padding:12px 18px;background:#242930;
}
.cad-help-panel-footer span {font-size:11px;color:#b9c6d1;}
.cad-help-panel-footer a {
  color:#ffad64;
  font-size:13px;font-weight:650;
  text-decoration:none;border:1px solid #a86b3a;
  padding:8px 10px;border-radius:6px;
}
.cad-help-panel-footer a:hover,.cad-help-panel-footer a:focus-visible {
  color:white;border-color:#ff9a43;outline:1px solid #ff9a43;
}
@media(max-width:580px){
  .cad-help-panel{max-height:96vh;}
  .cad-help-options{grid-template-columns:repeat(2,minmax(0,1fr));}
  .cad-help-panel-header{padding:10px 12px;}
  .cad-help-panel-footer{padding:10px 12px;}
  .cad-help-panel-body{padding:14px;}
}
@media(prefers-reduced-motion:reduce){.cad-help-drag-ghost{transition:none;}}
